NixOS / nixops

NixOps is a tool for deploying to NixOS machines in a network or cloud.
https://nixos.org/nixops
GNU Lesser General Public License v3.0
1.87k stars 365 forks source link

Trivial deployment: `hash of path /nix/store... has changed from ... to ... at /nix/store/.../Nix/CopyClosure.pm line 44` #662

Closed deepfire closed 4 years ago

deepfire commented 7 years ago

When adding a simple python package to a deployment:

{
  network.description = "An example network.";
  example = { config, pkgs, lib, ... }: {
    environment.systemPackages = with pkgs; [
      python3
    ];
    deployment.targetEnv = "libvirtd";
    deployment.libvirtd.headless = true;
  };
}

..the following crops up:

example> copying 10 missing paths (55.07 MiB) to ‘root@192.168.122.152’...
example> hash of path ‘/nix/store/g8h4lr486n2d9vh13rcjp1w9grakr71m-python3-3.5.3’ has changed from ‘3baa486a8e6f911ad56625ebf60ee2315e15136ee06aca7de3dd70b4d9176916’ to ‘748e9ee8a82bb6c533149d667c518e9329b96bb813d0cf042d3df3918b8665c4’! at /nix/store/3xz4p02h8qg6cqywwm4c45yk696jbn64-nix-1.11.8/lib/perl5/site_perl/5.22.2/x86_64-linux-thread-multi/Nix/CopyClosure.pm line 44.
example> error: unexpected end-of-file
error: command ‘['nix-copy-closure', '--to', 'root@192.168.122.152', u'/nix/store/2ygmdjvh0zcc3r48d81ims59i2nvqclf-nixos-system-example-17.03.git.ebbabab']’ failed on machine ‘example’ (exit code 255)

According to google, this error is mentioned a couple of times on #nixos IRC, but nowhere else.

deepfire commented 7 years ago

cc @domenkozar

domenkozar commented 7 years ago

That's only Nix specific. Seems like contents of store path changed, you'd have to diff binary to see if it was a bitrot or something else.

teto commented 6 years ago

@deepfire did it block the deployement too ?

client> copying closure...
server> copying closure...
client> nix-copy-closure --to root@192.168.122.224 /nix/store/8x8yiwj6wgwdbkqyilhrjahynazrv8c7-nixos-system-client-18.03.git.2813af5
server> nix-copy-closure --to root@192.168.122.165 /nix/store/mabsi34yqlcj6mgih4ywvmq52y6xfzxa-nixos-system-server-18.03.git.2813af5
server> copying 139 missing paths (462.19 MiB) to ‘root@192.168.122.165’...
client> copying 139 missing paths (462.19 MiB) to ‘root@192.168.122.224’...
server> hash of path ‘/nix/store/35igc6qymihx77qslirbqiqk8k7l0v7n-autojump-22.5.0’ has changed from ‘fea7b7e5c18763e8cbd9f6ec7824fd97a04432c435cf4a8052cc2178444999da’ to ‘e398b3c59f45feab134030d24a3db20a7fc0fda8d02b31f243357768fd79cf24’! at /nix/store/yvcm543nk.
client> hash of path ‘/nix/store/35igc6qymihx77qslirbqiqk8k7l0v7n-autojump-22.5.0’ has changed from ‘fea7b7e5c18763e8cbd9f6ec7824fd97a04432c435cf4a8052cc2178444999da’ to ‘e398b3c59f45feab134030d24a3db20a7fc0fda8d02b31f243357768fd79cf24’! at /nix/store/yvcm543nk.
client> error: unexpected end-of-file
server> error: unexpected end-of-file
error: Multiple exceptions (2): 
  * client: command ‘['nix-copy-closure', '--to', 'root@192.168.122.224', u'/nix/store/8x8yiwj6wgwdbkqyilhrjahynazrv8c7-nixos-system-client-18.03.git.2813af5']’ failed on machine ‘client’ (exit code 255)
  * server: command ‘['nix-copy-closure', '--to', 'root@192.168.122.165', u'/nix/store/mabsi34yqlcj6mgih4ywvmq52y6xfzxa-nixos-system-server-18.03.git.2813af5']’ failed on machine ‘server’ (exit code 255)

------------------------------
Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/teto/nixops/scripts/nixops", line 994, in <module>
    e.print_all_backtraces()
  File "/home/teto/nixops/nixops/parallel.py", line 20, in print_all_backtraces
    traceback.print_exception(e[0], e[1], e[2])
  File "/nix/store/xk2drqkvcv0cabgb3hsikh5vm5mhi9qi-python-2.7.14/lib/python2.7/traceback.py", line 125, in print_exception
    print_tb(tb, limit, file)
  File "/nix/store/xk2drqkvcv0cabgb3hsikh5vm5mhi9qi-python-2.7.14/lib/python2.7/traceback.py", line 61, in print_tb
    f = tb.tb_frame
AttributeError: 'unicode' object has no attribute 'tb_frame'

I updated nixos-unstable but I now hit the attribute ‘nixosVersion’ missing, at /home/teto/nixops/nix/eval-machine-info.nix:306:107 (but I see a fix is pending :) )