From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org, dledford@redhat.com, harald@redhat.com
Subject: Re: [PATCH 1/3] Add support for launching mdmon via systemctl instead of fork/exec
Date: Tue, 22 Jan 2013 08:33:34 +0100 [thread overview]
Message-ID: <wrfjip6pvfht.fsf@redhat.com> (raw)
In-Reply-To: <20130122164623.1962171b@notabene.brown> (NeilBrown's message of "Tue, 22 Jan 2013 16:46:23 +1100")
NeilBrown <neilb@suse.de> writes:
> On Mon, 21 Jan 2013 14:22:56 +0100 Jes.Sorensen@redhat.com wrote:
>
>> From: Jes Sorensen <Jes.Sorensen@redhat.com>
>>
>> To launch mdmon via systemctl, a new command line argument is added to
>> mdadm '--systemctl'. Alternatively it is possible to set the
>> environment variable MDMON_SYSTEMCTL.
>>
>> This allows for having mdmon launched via systemctl which avoids
>> problems with it getting killed by systemd due to it ending up in the
>> parent's cgroup (udev).
>>
>> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
>
> Thanks Jes. This is certainly something that we want in some form.
> Some issues:
>
> - I have come to the conclusion that --offroot is a bad idea. We should
> just make that the default. No matter whether the array is providing the
> root filesystem or not, I never want systemd (or anything else) to kill
> mdmon. I want it to remain in control. So the systemctl handling should
> assume offroot. e.g. there should only be one .service file.
Ok I guess the question is what happens if an array is shut down in
userland, does it take mdmon down manually once it is finished with it?
We need this to happen, because otherwise we end up with a dangling
mdmon process once we reboot, if the IMSM array wasn't assembled in the
initrd.
> - on my machine (openSUSE), systemctl is in /bin, not /usr/bin.
> Would I be correct in thinking that on your machine, /bin is a symlink
> to /usr/bin? If so, maybe we can just use "/bin/systemctl"? If not,
> we might need to try a few different options.
> Similarly I have mdmon in /sbin, not /usr/sbin. We we cannot all
> use /sbin, we might need to 'sed' the .service file on installation to
> match the current system.
> (I note that you didn't get Makefile to install the .services files. I
> think we want it to - at least optionally)
This was done due to the big ->/usr move, I was assuming SuSE was going
the same way? This move isn't actually something which I think was a
great idea, but it's what has been forced upon us, so I tried to stick
to it.
I didn't want to force install the .service files but if you find it's a
good idea, I am not against that.
> - I want the default behaviour to "do the right thing" in most case, but it
> should be possible to over-rid (by command line option or env var or
> both).
> So I think I would like it to try systemctl and if that fails for some
> reason (either because the binary doesn't exist, or because it finds that
> the .services file doesn't exist), then it should try to exec mdmon
> directly.
> This default could be over-ridden to always run mdmon directly.
This should be quite easy to do. I actually made it fail explicitly so
the user knows it fails when they try to run it via systemctl. However
if we take this approach, maybe we should also default to always trying
via systemctl before exec().
Cheers,
Jes
next prev parent reply other threads:[~2013-01-22 7:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-21 13:22 [PATCH v2 0/3] support launching mdmon via systemctl Jes.Sorensen
2013-01-21 13:22 ` [PATCH 1/3] Add support for launching mdmon via systemctl instead of fork/exec Jes.Sorensen
2013-01-22 5:46 ` NeilBrown
2013-01-22 7:33 ` Jes Sorensen [this message]
2013-01-25 11:13 ` Jes Sorensen
2013-01-25 15:05 ` Jes Sorensen
2013-01-21 13:22 ` [PATCH 2/3] systemd .service files for launching mdmon via systemctl Jes.Sorensen
2013-01-21 13:22 ` [PATCH 3/3] execl() only returns in case of error Jes.Sorensen
2013-01-22 5:48 ` NeilBrown
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=wrfjip6pvfht.fsf@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=dledford@redhat.com \
--cc=harald@redhat.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).