!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

288 Members
A simple, stateless NixOS deployment tool - https://github.com/zhaofengli/colmena97 Servers

Load older messages


SenderMessageTime
1 May 2023
@yuka:yuka.dev@yuka:yuka.dev * I would love to see the build-on-target mode use that08:31:46
@yuka:yuka.dev@yuka:yuka.dev this also allows fun things like nix build .#nixosConfigurations.host.config.system.build.toplevel --eval-store ssh-ng://localhost --store ssh-ng://remote-host?remote-store=/mnt when the remote host is booted into a live iso for installation 08:32:46
@yuka:yuka.dev@yuka:yuka.dev *

this also allows fun things like

$ ssh remote-host "sudo mkdir -p /mnt/nix; sudo chown -R nixos /mnt/nix"
$ system=$(nix build .#nixosConfigurations.host.config.system.build.toplevel --eval-store ssh-ng://localhost --store ssh-ng://nixos@remote-host?remote-store=/mnt --print-out-paths)
$ ssh remote-host "sudo chown -R root:root /mnt/nix; sudo nixos-install --no-root-passwd --root /mnt --system $system"

when the remote host is booted into a live iso for installation

08:34:49
@yuka:yuka.dev@yuka:yuka.dev *

this also allows fun things like

$ ssh nixos@remote-host "sudo mkdir -p /mnt/nix; sudo chown -R nixos /mnt/nix"
$ system=$(nix build .#nixosConfigurations.host.config.system.build.toplevel --eval-store ssh-ng://localhost --store ssh-ng://nixos@remote-host?remote-store=/mnt --print-out-paths)
$ ssh nixos@remote-host "sudo chown -R root:root /mnt/nix; sudo nixos-install --no-root-passwd --root /mnt --system $system"

when the remote host is booted into a live iso for installation

08:35:09
@hexa:lossy.networkhexa
In reply to @yuka:yuka.dev
The reason for this error is an import-from-derivation

huh? how so? I see

stderr) error: a 'aarch64-linux' with features {} is required to build '/nix/store/21pl4g80gyk0jn77fy5pg4pr3vixj0vj-cabal2nix-arion-compose.drv', but I am a 'x86_64-linux' with features {benchmark, big-parallel, kvm, nixos-test}

09:40:02
@hexa:lossy.networkhexadoes ifd not respect configured builders?09:40:27
@yuka:yuka.dev@yuka:yuka.devfrom what I understood, no remote builders are configured on the system where colmena is run09:42:06
@yuka:yuka.dev@yuka:yuka.dev --build-on-target does not work by passing the target host as builder to nix 09:42:22
@yuka:yuka.dev@yuka:yuka.dev * --build-on-target does pass the target host as builder to nix 09:42:30
@yuka:yuka.dev@yuka:yuka.dev it just runs a nix-instantiate locally, then nix-copy-closure the .drv to the remote host, and then nix-store --realise on the remote host 09:43:16
@yuka:yuka.dev@yuka:yuka.dev usually this works fine when the local host has a different arch because nix-instantiate only does evaluation and no builds.
however, when some expression does an import-from-derivation it will suddenly also have to run builds during the nix-instantiate phase on the local host. and since the nixos system is being evaluated as system = aarch64-linux, those derivations are also using aarch64 binaries
09:44:44
@hexa:lossy.networkhexaah ok10:25:09
@hexa:lossy.networkhexaDidnt understand that --build-on-target was used10:25:33
2 May 2023
@obsidianical:matrix.org@obsidianical:matrix.org changed their display name from ⚠️CYBER⚠️katze to Schrottkatze.22:36:20
3 May 2023
@hexa:lossy.networkhexadoes colmena have a problem working on multiplexed ssh connections?13:38:02
@hexa:lossy.networkhexaI use a ControlMaster socket for ssh13:38:31
@hexa:lossy.networkhexaand when I am already logged into the host I13:38:48
@hexa:lossy.networkhexa * and when I am already logged into the host I'm deploying to, colmena gets stuck at "Pushing system closure" and "Activation system profiile"13:39:18
@hexa:lossy.networkhexa * and when I am already logged into the host I'm deploying to, colmena gets stuck at "Pushing system closure" and "Activation system profile"13:39:20
@hexa:lossy.networkhexafeels like it wants to disconnect/reconnect the ssh connection multiple times13:43:17
@whentze:matrix.orgWanja HentzeI've seen colmena hang forever at pushing when using proxyjumps14:05:10
@whentze:matrix.orgWanja Hentzeseemed to happen only sporadically and only when using ssh-ng14:05:25
@whentze:matrix.orgWanja Hentzedoes your problem happen *always* or just once in a while?14:05:49
@hexa:lossy.networkhexait is highly reproducible14:33:42
@hexa:lossy.networkhexaiterated on a module, so I did 10+ deploys in a row14:33:56
@hexa:lossy.networkhexagot stuck every time I was logged in, tailing the journal14:34:06
@me:indeednotjames.comemilydo you have a lot of deployment keys? jumphost?14:34:30
@hexa:lossy.networkhexano jumphosts, strict key matching14:34:52
@me:indeednotjames.comemilysshd logs? do you use a lot of deployment keys that need to be uploaded each apply? (--no-keys maybe?)14:36:33
@hexa:lossy.networkhexaI don't use pre-activation keys14:39:56

Show newer messages


Back to Room ListRoom Version: 6