From: Owen Synge <osynge@suse.com>
To: Ceph Development <ceph-devel@vger.kernel.org>
Subject: mon daemon makes authentication side effects on startup
Date: Tue, 5 Apr 2016 13:56:47 +0200 [thread overview]
Message-ID: <5703A7FF.2090002@suse.com> (raw)
Dear all,
This is in my opinion is clearly a bug, but I raise it in the mailing
list as I expect all admins of ceph will strongly agree, that this makes
ceph simpler, but developers may feel that since it requires changes to
more than one repo its not worth doing.
When ever you start the mon demon as a side effect the admin, osd, rgw
and mds keys are created as a side effect if the mds keyring is not
existing.
In the systemV and systemd init scripts (at least) we have a side
effect, that should be removed in my opinion, (or worse in my
alternatively correctly documented.)
This is a deployment layer violation, in my opinion, and it requires
considerably more documentation, (and on my part also code) to keep this
side effect than remove it.
usecases for removing this are:
(0) A ceph cluster should be able to be installed in any order. With the
current behavior if the mds, rgw, or osd nodes are deployed first (along
with the boot strap keyrings), the mon created must have all keys for
the admin, mds-bootstrap, rgw-bootstrap, and osd-boostrap deployed in
the correct path before the mon can safely be started, even if the
cluster does not need the mds or rgw service's.
(1) It is unfriendly to configuration being stored on the configuration
server as the server needs to be updated with the values from the
configured node keys, when people might want to store these keys centrally.
(2) Assuming the admin, rgw-bootstrap, mds-bootstrap and osd-boostrap
keys are always installed on all mon nodes is clearly increasing the
distribution of keys where they might not be needed. Hence reducing
security.
(3) Using the current model adds an extra complication that these keys
then need to be distributed to each node from the configured node, if
generated by starting the mon, and not from the configuration server.
(4) If you wish to use a more devops approach, and generate keys
explicitly all the keys must be installed on all mon nodes before the
mon nodes are started.
(4.1) As a side effect we need to document why admins need the
mds-bootstrap keyring when they dont want this service it is confusing,
and requires an unnecessary process of migrating all keys to the
explicitly desired keys.
(5) I am developing a simple python library to configure ceph on each
node independently of all others, (think of it as a parallelism version
of ceph-deploy that can be called by any config management system) but
with the current side effect behavior starting the mon needs to fail if
the mds-bootstrap keyring is not created on the mon nodes before
starting the mon, otherwise we get ordering complications.
(5) The side effect is confusing, as no one expects this side effect,
hence this leads to ceph seeming complex to a first time user.
(6) I feel it is the responsibility of configuration management not the
mon demon to request creating these keys.
(7) I dont think this is clearly documented, hence this leads to ceph
seeming complex to a first time user.
(8) As more services like mds and rgw get added to ceph the problem gets
multiplied.
(9) Adding one more step to the by hand installation will clarify the
authentication process. This extra step would simply be:
/usr/sbin/ceph-create-keys --cluster ${CLUSTER} --id ${MON_NAME}
This is simpler and clearer than documenting the side effect.
consequences:
(1) Each configuration system which depends upon this behavior will need
to be modified to call the single command on each mon:
/usr/sbin/ceph-create-keys --cluster ${CLUSTER} --id ${MON_NAME}
Here is a fix for ceph-deploy:
https://github.com/SUSE/ceph-deploy/commit/58b030dbe0a964b32f1fbc9a3762e64dd74bf50c
I assume other solutions will be easy to fix too.
The systemd file in question, is
"/usr/lib/systemd/system/ceph-create-keys@.service" and should be removed.
This will simplify the salt configuration module documentation
considerably, and if this is not done the salt module will need to add a
requirement on the mds keyring being created before the mon can be created.
the systemd file looks as follows:
[Unit]
Description=Ceph cluster key creator task
# the last key created is the mds bootstrap key -- look for that.
ConditionPathExists=!/var/lib/ceph/bootstrap-mds/ceph.keyring
[Service]
EnvironmentFile=-/etc/sysconfig/ceph
Environment=CLUSTER=ceph
ExecStart=/usr/sbin/ceph-create-keys --cluster ${CLUSTER} --id %i
as you can see the side effect is blocked if the file
/var/lib/ceph/bootstrap-mds/ceph.keyring
already exists, which is just more to document.
Hoping that you all agree
Owen Synge
next reply other threads:[~2016-04-05 11:56 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 11:56 Owen Synge [this message]
2016-04-05 18:35 ` mon daemon makes authentication side effects on startup John Spray
2016-04-05 23:18 ` Owen Synge
2016-04-05 20:14 ` Gregory Farnum
2016-04-06 8:23 ` The fundamental evil of "magic" in computing systems -> Was: " Owen Synge
2016-04-07 7:49 ` Jens Rosenboom
2016-04-07 11:44 ` Owen Synge
2016-04-07 12:26 ` Sage Weil
2016-04-07 13:54 ` Owen Synge
2016-04-07 14:03 ` Sage Weil
2016-04-07 14:23 ` Gregory Farnum
2016-04-07 14:39 ` Sage Weil
2016-04-07 15:40 ` Owen Synge
2016-04-07 15:43 ` Sage Weil
2016-04-08 20:57 ` Owen Synge
2016-04-11 13:53 ` Owen Synge
2016-05-12 13:06 ` Sage Weil
2016-05-20 13:01 ` Owen Synge
2016-05-25 10:21 ` Owen Synge
2016-05-25 12:45 ` Sage Weil
2016-05-30 14:50 ` Owen Synge
2016-05-31 19:03 ` Alfredo Deza
2016-04-07 12:33 ` Alfredo Deza
2016-04-07 13:12 ` Owen Synge
2016-04-07 14:22 ` Gregory Farnum
2016-04-07 16:08 ` Owen Synge
2016-04-07 16:51 ` Gregory Farnum
2016-04-07 20:40 ` Mark Nelson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5703A7FF.2090002@suse.com \
--to=osynge@suse.com \
--cc=ceph-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.