Skip to content

fails for new arm machines #21

@zeratax

Description

@zeratax

I was trying to provision one of the new arm servers with:

{ apiToken ? "changeme"
, location ? "nbg1" }:
{
   network = {
    description = "Test Server";
    enableRollback = true;
    storage.legacy = {
      databasefile = "~/.nixops/deployments.nixops";
    };
  };

  test =
    { config, pkgs, ... }:
    {
      deployment.targetEnv = "hetznercloud";
      deployment.hetznerCloud = {
        inherit apiToken location;
        serverType = "cax11";
      };

      nixpkgs.system = "aarch64-linux";

      networking = {
        hostName = "test";
        domain = "dmnd.sh";
      };
    };
}

But that just results in:

nixops deploy -d test
...
test> deleting unused links...
test> note: currently hard linking saves -0.00 MiB
test> 661 store paths deleted, 25.78 MiB freed
test> renamed '/etc/resolv.conf' -> '/etc/resolv.conf.lnk'
test> renamed '/boot' -> '/boot.bak'
test> updating GRUB 2 menu...
test> installing the GRUB 2 boot loader on /dev/sda...
test> Installing for arm64-efi platform.
test> /nix/store/w71c29wqs23dvb13dm4j75s1wzfir52m-grub-2.06/sbin/grub-install: error: cannot find EFI directory.
test> /nix/store/f4kkb5vnvvf4i540m66nm5j0s6awzsn6-install-grub.pl: installation of GRUB on /dev/sda failed: No such file or directory
Traceback (most recent call last):
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops/ssh_util.py", line 376, in run_command
    return nixops.util.logged_exec(cmd, self._logger, **kwargs)
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops/util.py", line 372, in logged_exec
    raise CommandFailed(err, res)
nixops.util.CommandFailed: command ‘['ssh', '-oControlPath=/mnt/wslg/runtime-dir/nixops-ssh-tmpdjtu8xsq/master-socket', '-o', 'Port=22', '-i', '/mnt/wslg/runtime-dir/nixops-tmpcn4c2v_k/id_nixops-test', '-x', 'root@91.107.223.192', '--', "bash -c 'export LANG= LC_ALL= LC_TIME=; bash </dev/stdin 2>&1'"]’ failed on machine ‘test’ (exit code 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/96mimkik0xhxhbm37jqlcgfwpf2l0pqg-python3.10-nixops-2.0.0-pre-fc9b55c/bin/.nixops-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops/__main__.py", line 56, in main
    args.op(args)
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops/script_defs.py", line 715, in op_deploy
    depl.deploy(
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops/deployment.py", line 1365, in deploy
    self.run_with_notify("deploy", lambda: self._deploy(**kwargs))
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops/deployment.py", line 1354, in run_with_notify
    f()
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops/deployment.py", line 1365, in <lambda>
    self.run_with_notify("deploy", lambda: self._deploy(**kwargs))
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops/deployment.py", line 1268, in _deploy
    nixops.parallel.run_tasks(
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops/parallel.py", line 106, in run_tasks
    raise list(exceptions.values())[0]
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops/parallel.py", line 70, in thread_fun
    work_result = (worker_fun(t), None, t.name)
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops/deployment.py", line 1220, in worker
    r.create(
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops_hetznercloud/backends/hetznercloud.py", line 752, in create
    self.run_command("bash </dev/stdin 2>&1", stdin=open(INFECT_PATH))
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops/backends/__init__.py", line 604, in run_command
    return self.ssh.run_command(command, user=self.ssh_user, **kwargs)
  File "/nix/store/hq5dq7h07i16866cw1arvc6dzf74rfar-python3-3.10.11-env/lib/python3.10/site-packages/nixops/ssh_util.py", line 378, in run_command
    raise SSHCommandFailed(exc.message, exc.exitcode)
nixops.ssh_util.SSHCommandFailed: command ‘['ssh', '-oControlPath=/mnt/wslg/runtime-dir/nixops-ssh-tmpdjtu8xsq/master-socket', '-o', 'Port=22', '-i', '/mnt/wslg/runtime-dir/nixops-tmpcn4c2v_k/id_nixops-test', '-x', 'root@91.107.223.192', '--', "bash -c 'export LANG= LC_ALL= LC_TIME=; bash </dev/stdin 2>&1'"]’ failed on machine ‘test’ (exit code 1)

Also seems to me like nixops destroy -d test doesn't actually destroy the resouces?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions