Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#35001 - [devtools] systemd-nspawn refuses to launch second build chroot

Attached to Project: Arch Linux
Opened by Evangelos Foutras (foutrelis) - Sunday, 28 April 2013, 01:35 GMT
Last edited by Pierre Schmitz (Pierre) - Saturday, 02 November 2013, 22:17 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

I was building a package with staging-x86_64-build and wanted to launch a concurrent build for i686; running staging-i686-build from another terminal would simply exit after the following step:

==> Creating clean working copy [foutrelis]...done

Changing /usr/sbin/mkarchroot's hashbang to call bash with -x revealed that the last command executed was:

# systemd-nspawn -D /var/lib/archbuild/staging-i686/foutrelis --bind=/var/cache/pacman/pkg/ -- /chrootbuild

Running that command just outputs "Container already running." and immediately exits.

That message comes from systemd's nspawn.c¹ which I think just checks if the cgroup name already exists and according to 'systemd-cgls' that's just systemd:/machine/foutrelis for both i686 and x86_64 chroots.

Looks like we can pass a more diverse name to systemd-nspawn with the -M option; e.g. something like -M archbuild-staging-x86_64-foutrelis. (I'm not sure if that information is readily available in mkarchroot though.)

¹ http://cgit.freedesktop.org/systemd/systemd/tree/src/nspawn/nspawn.c


Additional info:

devtools 20130408-1
systemd 202-2
This task depends upon

Closed by  Pierre Schmitz (Pierre)
Saturday, 02 November 2013, 22:17 GMT
Reason for closing:  Fixed
Comment by Evangelos Foutras (foutrelis) - Monday, 29 April 2013, 10:26 GMT
Just a note that -M is not currently recognized; I've sent a patch to systemd-devel about this.¹

Once that's fixed, we could use something as simple as: -M archbuild-$RANDOM (or maybe "archbuild-$$" which is actually unique)

¹ http://lists.freedesktop.org/archives/systemd-devel/2013-April/010762.html
Comment by Jan Alexander Steffens (heftig) - Friday, 03 May 2013, 01:32 GMT
Got a fix for this on my dev branch: https://github.com/heftig/devtools/commits/master
I'm using the absolute path of the chroot as machine name.

Loading...