nixcloud-webservices breaks nixos-rebuild switch update nix 1.x -> nix 2.x
qknight opened this issue · 3 comments
qknight commented
description
nix-env --version
nix-env (Nix) 1.11.16
nixos-version
18.03pre126729.2e4aded3669 (Impala)
when nixcloud.webservices is in use, then the upgrade from 2e4aded3669
to nixos-18.03pre130932.cc4677c36ee
fails with this error message:
nixos-rebuild switch
building Nix...
warning: unknown setting 'signed-binary-caches'
warning: unknown setting 'signed-binary-caches'
building the system configuration...
warning: unknown setting 'signed-binary-caches'
trace: warning: The option `ipAddress' defined in `/etc/nixos/submodule/nixcloud-webservices/modules/virtualisation/container.nix' has been changed to `ipv4.addresses' that has a different type. Please read `ipv4.addresses' documentation and update your configuration accordingly.
trace: warning: The option `prefixLength' defined in `/etc/nixos/submodule/nixcloud-webservices/modules/virtualisation/container.nix' has been changed to `ipv4.addresses' that has a different type. Please read `ipv4.addresses' documentation and update your configuration accordingly.
trace: warning: The option `ipAddress' defined in `/etc/nixos/submodule/nixcloud-webservices/modules/virtualisation/container.nix' has been changed to `ipv4.addresses' that has a different type. Please read `ipv4.addresses' documentation and update your configuration accordingly.
trace: warning: The option `prefixLength' defined in `/etc/nixos/submodule/nixcloud-webservices/modules/virtualisation/container.nix' has been changed to `ipv4.addresses' that has a different type. Please read `ipv4.addresses' documentation and update your configuration accordingly.
trace: warning: The option `ipv6Address' defined in `/etc/nixos/configuration.nix' has been changed to `ipv6.addresses' that has a different type. Please read `ipv6.addresses' documentation and update your configuration accordingly.
trace: warning: The option `ipv6PrefixLength' defined in `/etc/nixos/configuration.nix' has been changed to `ipv6.addresses' that has a different type. Please read `ipv6.addresses' documentation and update your configuration accordingly.
trace: warning: The option `ipAddress' defined in `/etc/nixos/configuration.nix' has been changed to `ipv4.addresses' that has a different type. Please read `ipv4.addresses' documentation and update your configuration accordingly.
trace: warning: The option `prefixLength' defined in `/etc/nixos/configuration.nix' has been changed to `ipv4.addresses' that has a different type. Please read `ipv4.addresses' documentation and update your configuration accordingly.
these derivations will be built:
/nix/store/5zr9g33sbqsy5nxlkphjx9vmkfhhgsbn-closure-info.drv
/nix/store/m4rsn5mmfnxs68m814x3fxs6x2g1i4cd-run-nixos-vm.drv
/nix/store/b4kj6blf5q020apw2fvxyx7hrgapnh47-nixos-vm.drv
/nix/store/sh30831dmn09y6ss79mkm63b149f7ppb-nixos-test-driver-reverse-proxy.drv
/nix/store/0bc0bh4jja7hzj5zgvgxqfxvfris0wgd-vm-test-run-reverse-proxy.drv
/nix/store/0md4hwa56012mpnpfgrs75i9984s47ya-nixos-system-status.nixcloud.io-18.03pre130932.cc4677c36ee.drv
building path(s) ‘/nix/store/p1q9wljslx8ssx986y5yg3pms3q1d42r-closure-info’
/nix/store/aj9rz4k3xvg8q9fzqfnb0q123707zp0n-builder: line 1: .attrs.sh: No such file or directory
builder for ‘/nix/store/5zr9g33sbqsy5nxlkphjx9vmkfhhgsbn-closure-info.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/m4rsn5mmfnxs68m814x3fxs6x2g1i4cd-run-nixos-vm.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/b4kj6blf5q020apw2fvxyx7hrgapnh47-nixos-vm.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/sh30831dmn09y6ss79mkm63b149f7ppb-nixos-test-driver-reverse-proxy.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/0bc0bh4jja7hzj5zgvgxqfxvfris0wgd-vm-test-run-reverse-proxy.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/0md4hwa56012mpnpfgrs75i9984s47ya-nixos-system-status.nixcloud.io-18.03pre130932.cc4677c36ee.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/0md4hwa56012mpnpfgrs75i9984s47ya-nixos-system-status.nixcloud.io-18.03pre130932.cc4677c36ee.drv’ failed
this is caused by our unit test for nixcloud.reverse-proxy
.
hacky solution
- comment out the test in
modules/services/reverse-proxy/default.nix
- do a
nixos-rebuild switch
and NOT reboot - comment the test back in
- rerun
nixos-rebuild switch
-> test is executed and works!
aszlig commented
Yes, this is caused by NixOS/nixpkgs#27688, here is the accompanying changelog entry: https://github.com/NixOS/nixpkgs/blob/3ab34a01e073a766002665c01a19df8f8a7ae876/nixos/doc/manual/release-notes/rl-1803.xml#L353-L383
qknight commented
a solution i found was to remove all nixcloud-webservice references from configuration.nix, do the update, readd them.
a bit of a pain but when the userbase gets bigger, we will make a better workflow.