All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Elsayed <eternaleye@gmail.com>
To: ceph-devel@vger.kernel.org
Subject: Re: systemd status
Date: Wed, 29 Jul 2015 08:17:31 -0700	[thread overview]
Message-ID: <mpaqqd$blm$1@ger.gmane.org> (raw)
In-Reply-To: alpine.DEB.2.00.1507290748290.22099@cobra.newdream.net

Sage Weil wrote:

> On Wed, 29 Jul 2015, Alex Elsayed wrote:
<snip for gmane>
>> My thinking is more that the "osd data = " key makes a lot less sense in
>> the systemd world overall - passing the OSD the full path on the
>> commandline via some --datadir would mean you could trivially use
>> systemd's instance templating, and just do
>> 
>> ExecStart=/usr/bin/ceph-osd -f --datadir=/var/lib/ceph/osd/%i
>> 
>> and be done with it. Could even do RequiresMountsFor=/var/lib/ceph/osd/%i
>> too, which would order it after (and make it depend on) any systemd.mount
>> units for that path.
> 
> Note that there is a 1:1 equivalence between command line options and
> config options, so osd data = /foo and --osd-data foo are the same thing.
> Not that I think that matters here--although it's possible to manually
> specify paths in ceph.conf users can't do that if they want the udev magic
> to work (that's already true today, without systemd).

Sure, though my thought was that the udev magic would work more sanely _via_ 
this. The missing part is loading the cluster and ID from the OSD data dir.

> In any case, though, if your %i above is supposed to be the uuid, that's
> much less friendly than what we have now, where users can do
> 
>  systemctl stop ceph-osd@12
> 
> to stop osd.12.
> 
> I'm not sure it's worth giving up the bind mount complexity unless it
> really becomes painful to support, given how much nicer the admin
> experience is...

Well, that does presuppose that they've either SSHed into the machine 
manually, or are using systemctl -H to do so via systemctl. That's already 
not an especially nice user experience, since they need to manually consider 
the cluster's structure.

Something more like 'ceph tell osd.N die' or similar could work, and 
SuccessExitStatus= could be used to make it even nicer (that even if it 
gives a different exit status for "die" as opposed to other successes, 
systemd can say "any of these exit codes are okay, don't autorestart")

However, neither of those handles unmounting, and it still doesn't handle 
starting. All of the above are still partial solutions; hopefully iteration 
can result in something better in all ways.

Also, note that if RequiresMountsFor= is used, unmounting the filesystem - 
by device or by mountpoint - will stop the unit due to proper dependency 
handling. (If RMF doesn't, BindsTo does - BindsTo will additionally do so if 
the device is unmounted or suddenly unplugged without systemd intervention)

systemctl stop dev-sdc.device # all OSDs running off of sdc stop
systemctl stop dev-sdd1.device # Just one partition this time

Nice and tidy.


  reply	other threads:[~2015-07-29 15:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28 19:13 systemd status Sage Weil
2015-07-28 22:16 ` Travis Rhoden
2015-07-29 11:25   ` Alex Elsayed
2015-07-29 12:55     ` Sage Weil
2015-07-29 13:09       ` Wyllys Ingersoll
2015-07-29 14:08       ` Alex Elsayed
2015-07-29 14:19         ` Sage Weil
2015-07-29 14:30           ` Alex Elsayed
2015-07-29 14:53             ` Sage Weil
2015-07-29 15:17               ` Alex Elsayed [this message]
2015-07-29 16:50                 ` Vasiliy Angapov
2015-07-31 13:29                   ` Owen Synge
2015-07-30 12:45                 ` Sage Weil
2015-07-30 19:40                   ` Robert LeBlanc
2015-08-03  8:53         ` Owen Synge
2015-07-31  8:11 ` Owen Synge
2015-07-31 13:23 ` Owen Synge
2015-08-03 19:01 ` Fedora 22 systemd and ceph-deploy Owen Synge
2015-08-03 19:07   ` Sage Weil
2015-08-04 10:13     ` Owen Synge
2015-08-04 12:32       ` Fedora 22 systemd and rgw Owen Synge
2015-08-04 13:07         ` Sage Weil
2015-08-04 16:10           ` Owen Synge

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='mpaqqd$blm$1@ger.gmane.org' \
    --to=eternaleye@gmail.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.