DBCDK / morph

NixOS deployment tool
MIT License
826 stars 63 forks source link

Unavailable binary cache hangs deploy #111

Open xavierzwirtz opened 4 years ago

xavierzwirtz commented 4 years ago

If a binary cache is unavailable, morph deploy gets stuck:

$ morph deploy --on="*" ./deployments/dogpound/default.nix switch
Selected 1/1 hosts (name filter:-0, limits:-0):
      0: hephaestus.birddogsw.local (secrets: 7, health checks: 0)

warning: unable to download 'http://nix-cache.atlas.birddogsw.local/4inaxiv1ca0l2d3qadz5fl8hwl9a03ba.narinfo': Couldn't resolve host name (6); retrying in 274 ms

Nothing else happened after waiting 10~ minutes.

xavierzwirtz commented 4 years ago

Looks like this is not an issue with morph, also get this behavior with standard nixos-rebuild. I can add --build-arg="--option" --build-arg="binary-caches" --build- arg='""' to the call to morph, but that is painful, and marked as deprecated.

johanot commented 4 years ago

@xavierzwirtz perhaps you can override the binary-cache list with network.nixConfig in your morph-expression? See: https://github.com/DBCDK/morph/#advanced-configuration

xavierzwirtz commented 4 years ago

Issue is not occurring now so I cant test, but that probably would have worked. Would be nice to have an ergonomic way to do it from the cli though.