You are not logged in.

#1 2014-12-29 06:40:27

justin-8
Member
From: Queensland, Australia
Registered: 2013-06-18
Posts: 53

arch-nspawn/systemd-nspawn issues under v218

So, I'm not completely sure this is the right sub-forum for this, but it sounded most fitting.

Since upgrading to systemd-218 (from 217) whenever arch-nspawn or even systemd-nspawn directly is called from a build script in jenkins, it has a return code of 1. I can't see why and it has no other output at all. Running the same commands from the build log as the jenkins user works exactly as intended and as it has for the past many systemd versions.

After eventually figuring out the problem was actually systemd-nspawn and not some logical-seeming change between versions, I've downgraded systemd to v217 and now it all works again swimmingly.

The script is here if anyone is interested, but it's pretty straightforward; just puts some locking around running multiple build agents on a single machine concurrently: https://github.com/justin8/puppet/blob/ … kg-jenkins

Does anyone have any ideas on what might cause this? or a way to show more debug info from systemd-nspawn?

Offline

#2 2014-12-30 08:33:33

bsaner
Member
From: philadelphia, pa, USA
Registered: 2014-10-23
Posts: 16
Website

Re: arch-nspawn/systemd-nspawn issues under v218

don't have time to check your script atm, but i'd recommend the following:

-sometimes systemd-nspawn chokes on pipes in the command if you're passing it directly (i.e. no -b). but only SOMETIMES.
-have you tried binding the journal for the nspawn'd machine? check out the --link-journal= option in the man page for systemd-nspawn; you may get some useful output there.

Offline

#3 2015-01-01 07:52:57

justin-8
Member
From: Queensland, Australia
Registered: 2013-06-18
Posts: 53

Re: arch-nspawn/systemd-nspawn issues under v218

Thanks for that; the journal linking seems really useful; but when I attempt to run it:

$> systemd-nspawn --link-journal=host -D /chroot/root --register=no --bind=/var/cache/pacman/pkg/ pacman -Syu --noconfirm
Spawning container root on /chroot/root.
Press ^] three times within 1s to kill container.
Container root failed with error code 1.

Last edited by justin-8 (2015-01-01 07:53:12)

Offline

#4 2015-03-04 23:37:12

w-flo
Member
Registered: 2014-07-12
Posts: 8

Re: arch-nspawn/systemd-nspawn issues under v218

Any solutions for this?

I have a jenkins script that executes extra-x86_64-build, which calls arch-nspawn. This fails in jenkins and prints no error message (but used to work a few months ago).

Offline

#5 2015-03-04 23:40:14

justin-8
Member
From: Queensland, Australia
Registered: 2013-06-18
Posts: 53

Re: arch-nspawn/systemd-nspawn issues under v218

Stay on 217 at the moment. I was following the upstream bug and contributing some logs, it's supposed to be fixed in git for v219, so just stick to 217 until 219 is out.

Offline

#6 2015-03-04 23:42:54

w-flo
Member
Registered: 2014-07-12
Posts: 8

Re: arch-nspawn/systemd-nspawn issues under v218

Okay, thanks for the quick reply. :-)

I guess I can manually run this rarely needed build until 219 is out.

Offline

#7 2015-03-05 00:27:19

justin-8
Member
From: Queensland, Australia
Registered: 2013-06-18
Posts: 53

Re: arch-nspawn/systemd-nspawn issues under v218

No problem. I just got back to my computer now; here's the link to the bug if you were interested.

https://bugs.freedesktop.org/show_bug.cgi?id=87732

Offline

#8 2015-03-05 11:48:44

w-flo
Member
Registered: 2014-07-12
Posts: 8

Re: arch-nspawn/systemd-nspawn issues under v218

Ah, that explains why the nspawn command issued by arch-nspawn works when manually pasting it into a terminal, but fails when jenkins does its magic. I'm glad this is already fixed upstream (by Lennart himself big_smile), so it's only a matter of time until the job is back to normal operation.

Thanks again.

Offline

#9 2015-03-07 21:40:37

myles
Member
Registered: 2011-10-06
Posts: 40

Re: arch-nspawn/systemd-nspawn issues under v218

If this is solved please edit the first post to add "[SOLVED]" to the title.

Offline

Board footer

Powered by FluxBB