[lxc-devel] [lxc/lxc] 31efc3: archlinux template: added sigpwr handling to syste...

Leonid Isaev lisaev at umail.iu.edu
Wed May 7 20:50:00 UTC 2014


Hi,

On Wed, 7 May 2014 13:25:04 -0500
Stéphane Graber <stgraber at ubuntu.com> wrote:

> On Wed, May 07, 2014 at 01:11:39PM -0500, Leonid Isaev wrote:
> > Hi,
> > 
> > 	Unless I am missing something, I see multiple issues with this
> > change:
> > 
> > 1. The template still includes lxc.stopsignal=SIGRTMIN+4 in config which
> > is a proper shutdown signal for systemd (it triggeres poweroff.target). So
> > at best, the patch is incomplete.
> > 
> > 2. The general logic should be that LXC guests receive minimal
> > modifications relative to bare metal installs. All necessary tweaks should
> > be done in the config file and via cmdline options to lxc-stop/start.
> > 
> > 3. Symlinking poweroff.target to sigpwr.target is an obscure and
> > unnecessary hack. The author really should have read systemd
> > documentation, specifically systemd.special(7).
> > 
> > Thanks,
> > Leonid.
> 
> Ok, I believe we had other systemd distros use that trick (Oracle and
> OpenSUSE), so it may be best to agree on one implementation of that with
> systemd and go with it.

You are right: opensuse and oracle do the same thing with the sigpwr.target.
But I think this is a wrong approach because of (2) above. 

> 
> So what you're saying is that before this change, clean shutdown using
> lxc-stop was already working for ArchLinux?

Yes, with lxc-stop (lxc < 1.0) and lxc-stop -k (since 1.0). This change was
supposed to be made in archlinux lxc at .service after packaging lxc-1.0.0, to
not break existing setups (I opened a bugreport back in the day), but
apparently was forgotten. I guess that's what caused the whole story.

So, this really is a distro bug, not an upstream (lxc) issue... sorry for the
mess.

However, if people believe otherwise, IMHO the proper way to fix things was to
change the default container config, i.e. replace "lxc.stopsignal=SIGRTMIN+4"
with "lxc.haltsignal=SIGRTMIN+4" in copy_configuration() and do not mess with
systemd shutdown logic.

Additionally, containers created by lxc-archlinux worked with systemd-nspawn
out-of-the-box, but now I'm not sure of it...

> 
> If so, I'll just revert the patch.

If you have the time. Otherwise, I'll send a patch over the weekend which
reverts this commit and does the above config change as well as some trivial
clean-ups.

Thanks,
L.

-- 
Leonid Isaev
GPG fingerprints: DA92 034D B4A8 EC51 7EA6  20DF 9291 EE8A 043C B8C4
                  C0DF 20D0 C075 C3F1 E1BE  775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140507/ed2ac7c4/attachment.sig>


More information about the lxc-devel mailing list