Skip to content

Commit

Permalink
systemd: use stable tree
Browse files Browse the repository at this point in the history
This fixes a bug with changed qemu network interface names and also generally
should be preferred to using a release tag.
  • Loading branch information
abbradar authored and fpletz committed Mar 23, 2018
1 parent 0668872 commit 6b9771e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/os-specific/linux/systemd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ in stdenv.mkDerivation rec {
version = "238";
name = "systemd-${version}";

# When updating, use https://github.com/systemd/systemd-stable tree, not the development one!
# Also fresh patches should be cherry-picked from that tree to our current one.
src = fetchFromGitHub {
owner = "NixOS";
repo = "systemd";
rev = "243d65d38f2df82d4a39f6a9970337803dff65a1";
sha256 = "098hxlkh6q17rxa178adylksxnnd4x9rxb8amjnlbiydcc6kaa5n";
rev = "3a439bcdb5706dbb44215ef4e70f07b09aaac040";
sha256 = "0qkk5891068pkxmxqvm07bwl597i8lfp89c23yxp11m21cjq0f4b";
};

outputs = [ "out" "lib" "man" "dev" ];
Expand Down

14 comments on commit 6b9771e

@vcunat
Copy link
Member

@vcunat vcunat commented on 6b9771e Mar 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This broke a test: https://hydra.nixos.org/job/nixos/release-18.03-small/nixos.tests.containers-imperative.x86_64-linux – I'm not yet sure why exactly.

As this isn't on master yet, it's well visible on 18.03 Hydra only, but I tested this commit and its parent as well. Curious thing: this test is missing from the large jobset, so that's why it got ahead of the small one in 18.03.

@vcunat
Copy link
Member

@vcunat vcunat commented on 6b9771e Mar 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In earlier parts of the test it still shows

eth0: renamed from host0

but in a later iteration that gets changed to

Cannot find device "host0"

which kills the rest of the test.

@vcunat
Copy link
Member

@vcunat vcunat commented on 6b9771e Mar 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fpletz: it seems like some change in behavior of containers. ip link show shows no devices beyond lo, after the container got restarted:

machine# [  167.063891] container foo[7008]: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen0
machine# [  167.067169] container foo[7008]:     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

I can't assume having much time this weekend, due to a sudden personal situation. BTW, next time we might try to avoid last-weeks update for packages like systemd.

@vcunat
Copy link
Member

@vcunat vcunat commented on 6b9771e Mar 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect this blocks the 18.03 release, until we move this forward in some way or disprove the regression. Sadly, today is the last of March, but to me it seems better to delay it a bit than to announce it and risk breakages.

@Mic92
Copy link
Member

@Mic92 Mic92 commented on 6b9771e Mar 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me the test (nixos/tests/containers-imperative.nix) fails because offline files are missing

machine# warning: unable to download 'https://cache.nixos.org/nix-cache-info': Couldn't resolve host name (6); retrying in 301 ms
machine# warning: unable to download 'https://cache.nixos.org/nix-cache-info': Couldn't resolve host name (6); retrying in 671 ms
machine# warning: unable to download 'https://cache.nixos.org/nix-cache-info': Couldn't resolve host name (6); retrying in 1314 ms
machine# warning: unable to download 'https://cache.nixos.org/nix-cache-info': Couldn't resolve host name (6); retrying in 2389 ms
machine# warning: unable to download 'https://cache.nixos.org/nix-cache-info': Couldn't resolve host name (6); retrying in 4639 ms
machine# warning: unable to download 'https://cache.nixos.org/nix-cache-info': Couldn't resolve host name (6); retrying in 9994 ms
machine# warning: unable to download 'https://cache.nixos.org/nix-cache-info': Couldn't resolve host name (6); retrying in 17537 ms
machine# warning: unable to download 'https://cache.nixos.org/nix-cache-info': Couldn't resolve host name (6)
machine# these derivations will be built:
machine#   /nix/store/b7irlwi2wjlx5aj1dghx4c8k3ax6m56q-busybox.drv
machine#   /nix/store/drsdq2ca1q1dj1hd0r1w2hl4s0fak1vh-bootstrap-tools.tar.xz.drv
machine#   /nix/store/w3xksy5k5rywl4z27v7gi8yafb7ci2sw-bootstrap-tools.drv
machine#   /nix/store/8j8cdi3scinyx49qdl5h8pvsnn6fq7yb-stdenv-linux-boot.drv
machine#   /nix/store/q0bl8npf7if2a0lsj79a5v9cnrcsb201-bootstrap-glibc.drv
machine#   /nix/store/fn1pk7yigfpi8n3xbd7vqmdhbn8g5hh1-bootstrap-binutils-wrapper.d

@Mic92
Copy link
Member

@Mic92 Mic92 commented on 6b9771e Mar 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when I disable the sandbox it test succeeds on master:

machine# these derivations will be built:
machine#   /nix/store/scyvjb89fvpqrlsq77xjf0lfm0c2pj62-etc-hostname.drv
machine#   /nix/store/83l82daxr7yrwwjlyrsqjzix01wsmnaf-etc.drv
machine#   /nix/store/rg756yjdr4vbqaivflpb230asfxbcsgw-nixos-system-foo-0-18.09.git.ea482d9.drv
machine# building '/nix/store/scyvjb89fvpqrlsq77xjf0lfm0c2pj62-etc-hostname.drv'...
machine# building '/nix/store/83l82daxr7yrwwjlyrsqjzix01wsmnaf-etc.drv'...
machine# building '/nix/store/rg756yjdr4vbqaivflpb230asfxbcsgw-nixos-system-foo-0-18.09.git.ea482d9.drv'

but fails on 18.03 with the same error as @vcunat reported.

@vcunat
Copy link
Member

@vcunat vcunat commented on 6b9771e Mar 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, well, the missing downloads were resolved in my case by

diff --git a/nixos/tests/containers-imperative.nix b/nixos/tests/containers-imperative.nix
index 7e2a5497638..20902913e9a 100644
--- a/nixos/tests/containers-imperative.nix
+++ b/nixos/tests/containers-imperative.nix
@@ -20,7 +20,7 @@ import ./make-test.nix ({ pkgs, ...} : {
             containers.foo.config = {};
           };
         };
-      in [ pkgs.stdenv emptyContainer.config.containers.foo.path ];
+      in [ pkgs.stdenv emptyContainer.config.containers.foo.path pkgs.libxslt ];
     };
 
   testScript =

I somehow forgot to post that.

@Mic92
Copy link
Member

@Mic92 Mic92 commented on 6b9771e Apr 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vcunat Ok. I try to have another look this evening. I had some debug sessions in the past regarding interface naming...

@fpletz
Copy link
Member

@fpletz fpletz commented on 6b9771e Apr 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vcunat Sorry about the breakage. We can revert that bump anytime. I only attempted the bump because it fixed the problem from #30333 properly though, see also #32279.

@vcunat
Copy link
Member

@vcunat vcunat commented on 6b9771e Apr 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fpletz did it really solve the problem? I didn't spend much time on it, but it wasn't clear for me.

@vcunat
Copy link
Member

@vcunat vcunat commented on 6b9771e Apr 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preparing systemd revert in staging-18.03 b3c938b, but if you find a fix in the meantime (or find that it's OK), we may still keep it. In any case, systemd-238 should get to master soon, so we will need to resolve it somehow sooner or later.

@xeji
Copy link
Contributor

@xeji xeji commented on 6b9771e Apr 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some manual test runs with systemd-nspawn 238 on NixOS, it looks like --private-network and all related network options don't work, including --network-bridge=, --network-veth, --network-macvlan=. In all these cases, the container only sees a loopback interface. Doesn't look a bug in systemd 238 itself - works fine on Arch and they don't seem to have any related patches. I'll keep investigating.

@xeji
Copy link
Contributor

@xeji xeji commented on 6b9771e Apr 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more data point: looks fine on NixOS with systemd 238 and linux 4.9.
Guess we'll have to look at kernel changelogs.

@vcunat
Copy link
Member

@vcunat vcunat commented on 6b9771e Apr 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Systemd downgraded for 18.03, but the issue continues on #38341.

Please sign in to comment.