You are not logged in.

#1 2014-04-03 11:10:32

starfry
Member
From: Surrey, UK
Registered: 2010-08-18
Posts: 238

Should systemd have dependency on until_linux?

I've been testing some Linux containers(LXC) and have found that recent systemd (212 and 211) don't work because they don't have the "/usr/bin/mount" and that is provided by "util-linux".

The problem seems to have happened at systemd version 211. I have tried 210 and it is fine - installing 210 brings in util-linux as a dependency.

I don't think LXC has anything to do with it - it just highlights the problem because the ArchLinux template is built with a subset of base packages and not with the "base" metapackage that does include "util-linux"

Steps to recreate (as root)

$ lxc-create -n test -t archlinux
$ lxc-start -n test

A login prompt is never reached. You will see

[FAILED] Failed to mount Debug File System.
[FAILED] Failed to mount POSIX Message Queue File System.
[FAILED] Failed to mount Huge Pages File System.
[FAILED] Failed to mount Configuration File System.
[FAILED] Failed to mount FUSE Control File System.
[FAILED] Failed to mount Temporary Directory.

From another terminal, attach and get some more detail

$ lxc-attach -n test systemctl | grep failed
● dev-hugepages.mount                loaded failed failed    Huge Pages File System
● dev-mqueue.mount                   loaded failed failed    POSIX Message Queue File System
● sys-fs-fuse-connections.mount      loaded failed failed    FUSE Control File System
● sys-kernel-config.mount            loaded failed failed    Configuration File System
● sys-kernel-debug.mount             loaded failed failed    Debug File System
● tmp.mount                          loaded failed failed    Temporary Directory
● console-getty.service              loaded failed failed    Console Getty

$ lxc-attach -n test systemctl status dev-hugepages.mount
...
Process: 15 ExecMount=/bin/mount hugetlbfs /dev/hugepages -t hugetlbfs (code=exited, status=203/EXEC)
...

$ lxc-attach -n test ls /bin/mount /usr/bin/mount
ls: cannot access /bin/mount: No such file or directory
ls: cannot access /usr/bin/mount: No such file or directory

Fix it

$ lxc-stop -n test --kill
$ cp systemd-210-3-x86_64.pkg.tar.xz /var/lib/lxc/test/rootfs
$ arch-chroot /var/lib/lxc/test/rootfs
sh-4.3# pacman -U systemd-210-3-x86_64.pkg.tar.xz 
loading packages...
warning: downgrading package systemd (212-1 => 210-3)
resolving dependencies...
warning: dependency cycle detected:
warning: util-linux will be installed before its systemd dependency
looking for inter-conflicts...
:: systemd and libsystemd are in conflict. Remove libsystemd? [y/N] y

Packages (4): libsystemd-212-1 [removal]  shadow-4.1.5.1-7  util-linux-2.24.1-4
              systemd-210-3

Total Download Size:    2.54 MiB
Total Installed Size:   28.65 MiB
Net Upgrade Size:       10.96 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages ...
 shadow-4.1.5.1-7-x86_64       1041.9 KiB   550K/s 00:02 [##############################] 100%
 util-linux-2.24.1-4-x86_64    1558.3 KiB   556K/s 00:03 [##############################] 100%
(3/3) checking keys in keyring                           [##############################] 100%
(2/3) checking package integrity                         [##############################] 100%
(2/3) loading package files                              [##############################] 100%
(3/3) checking for file conflicts                        [##############################] 100%
(4/4) checking available disk space                      [##############################] 100%
(1/1) removing libsystemd                                [##############################] 100%
(1/3) installing shadow                                  [##############################] 100%
(2/3) installing util-linux                              [##############################] 100%
Optional dependencies for util-linux
    python: python bindings to libmount
(3/3) downgrading systemd                                [##############################] 100%
sh-4.3# which mount
/usr/bin/mount
sh-4.3# ls /bin/mount
/bin/mount
sh-4.3# exit

After that, the container starts fine. But note the dependency cycle - that looks odd.

Once util-linux is installed, the later systemd 212 can be reinstalled and will work fine. Because util-linux isn't a dependency of systemd 212, it doesn't get removed.

Last edited by starfry (2014-04-03 11:12:28)

Offline

#2 2014-04-03 12:12:43

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Should systemd have dependency on until_linux?

I think we may have gone a bit too far with splitting up these dependencies. If I see this right, adding util-linux back as a dependency of systemd (in favor of libutil-linux) should be fine and add no dependency cycle.

The dependency cycles we had were solved by making util-linux depend on libsystemd (not systemd) and e2fsprogs depend on libutil-linux (not util-linux). Changing the util-linux depend in systemd to libutil-linux was unnecessary.

Offline

#3 2014-04-03 12:57:57

starfry
Member
From: Surrey, UK
Registered: 2010-08-18
Posts: 238

Re: Should systemd have dependency on until_linux?

if util-linux was a dependency of systemd then installing systemd would pull in util-linux and that would solve the problem that I experienced.

Offline

#4 2014-04-03 14:59:20

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: Should systemd have dependency on until_linux?

You can (and probably will) run into more issues, though. Some maintainers don't include deps on any packages in base, just assuming that the entire base group is installed.

Offline

#5 2014-04-03 19:53:13

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,048

Re: Should systemd have dependency on until_linux?

Packages in base aren't included.
But the util-linux was split in 2 and systemd too because if were inlcude as it in core there will a unresolvable dependece circle, or this I underestand:

https://mailman.archlinux.org/pipermail … 25912.html


Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::

Offline

#6 2014-04-04 10:26:25

starfry
Member
From: Surrey, UK
Registered: 2010-08-18
Posts: 238

Re: Should systemd have dependency on until_linux?

I normally do just use "base" but the lxc-archlinux template does not: it instead includes a subset of packages that does not explicitly include util-linux. Previously, this was fine because it was a dependency of systemd and, therefore, got included but that isn't now currently the case.

Perhaps this is an issue that should be resolved by LXC: should the lxc-archlinux template explicitly include util-linux (or use the whole of "base") ?

Offline

Board footer

Powered by FluxBB