Skip to content

nix thinks the vm is offline #51

Description

@dsilvasc

Repro:

krunvm create --name nix nixos/nix
krunvm start nix nix -- --extra-experimental-features 'nix-command flakes' profile install 'nixpkgs#google-cloud-sdk'

This fails with:

warning: you don't have Internet access; disabling some network-dependent features
error: builder for '/nix/store/5jrd75v747s76s16zxk59384xfcjqn58-bash-5.2.tar.gz.drv' failed with exit code 1;
       last 4 log lines:
       > error:
       >        … writing file '/nix/store/v28dv6l0qk3j382kp40bksa1v6h7dx9p-bash-5.2.tar.gz'
       >
       >        error: unable to download 'https://ftpmirror.gnu.org/bash/bash-5.2.tar.gz': Timeout was reached (28)

Looks like it's because of this check:

https://github.com/NixOS/nix/blob/2.18.1/src/nix/main.cc#L456-L459

https://github.com/NixOS/nix/blob/2.18.1/src/nix/main.cc#L30-L54

I wonder if it's common for programs to inspect getifaddrs like that, and if so, what other problems would come up if it returned a fake non-loopback/link-local network interface.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions