[systemd-devel] [PATCH] unit: When stopping due to BindsTo=, log which unit caused it

Alban Crequy alban at endocode.com
Fri Apr 24 14:40:20 PDT 2015


On Fri, Apr 24, 2015 at 5:34 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Fri, 24.04.15 17:10, Alban Crequy (alban at endocode.com) wrote:
>
>> On Fri, Apr 24, 2015 at 12:45 PM, Lennart Poettering
>> <lennart at poettering.net> wrote:
>> > On Wed, 22.04.15 16:55, Alban Crequy (alban at endocode.com) wrote:
>> >
>> >> Thanks for the commits. They don't seem related to containers.
>> >>
>> >> I can reproduce my issue on git-master:
>> >>
>> >> sudo ~/git/systemd/systemd-nspawn --register=false --bind
>> >> $HOME/tmp/vol -D debian-tree -b
>> >>
>> >> Then, in the container, make sure /bin/umount does NOT exist.
>> >> Then halt the container with kill -37 1 (SIGRTMIN+3)
>> >
>> > We require /bin/mount and /bin/umount to exist. We do not support
>> > systems where you remove those. We also don't support systems without
>> > glibc either, ... ;-)
>>
>> Fair enough about the dependency on umount/mount :)
>>
>> I added /bin/mount and /bin/umount in the container for my test and
>> now systemd in the container says:
>>
>> Unit opt-stage2-sha512(...)-rootfs-dir1.mount is bound to inactive
>> unit dev-disk-by\x2duuid-25ea81c8\x2d20d8\x2d4ab1\x2d862c\x2d882a04478837.device.
>> Stopping, too.
>
> I figure we shouldn't bother with adding bindsto dependencies for
> .device units in containers, given that .device units are not
> supported there anyway.
>
> Fix:
>
> http://cgit.freedesktop.org/systemd/systemd/commit/?id=47bc12e1ba35d38edda737dae232088d6d3ae688
>
> Please verify,

Thanks for the fix, it works for me! I tested the fix both from git
master and cherry-picked on v219.

Cheers,
Alban


More information about the systemd-devel mailing list