!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
20 Sep 2022
@brokenwifi:matrix.orgbrokenwifi err, yes. Thank you. I thought because I did an --on @homelab parameter it would ignore the hosts that don't match. that was sloppy thinking. 20:49:02
@zhaofeng:zhaofeng.liZhaofeng Li Yeah, when matching against tags, currently Colmena will evaluate the deployment.tags for all nodes so that triggered the error 20:58:58
21 Sep 2022
@winterqt:nixos.devWinter (she/her)
In reply to @zhaofeng:zhaofeng.li

A couple updates:

  • More work was done on separating the evaluation logic from the deployment logic, with the new colmenaHive output being the integration point that ties the two halves together. Colmena can now deploy from the colmenaHive output which should be an already-evaluated hive generated by colmena.lib.makeHive (or your own logic!). Example here. cc David Arnold (blaggacao) Yureka (she/her)
  • Flake-enabled deployments now use nix copy and the new SSH store protocol (ssh-ng://) for copying closures to remote hosts.

Flake-enabled deployments now use nix copy and the new SSH store protocol (ssh-ng://) for copying closures to remote hosts.

Looks like this breaks buildOnTarget.

00:50:59
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @winterqt:nixos.dev

Flake-enabled deployments now use nix copy and the new SSH store protocol (ssh-ng://) for copying closures to remote hosts.

Looks like this breaks buildOnTarget.

Oops, let me look at it and fix when I get home
03:58:37
@zhaofeng:zhaofeng.liZhaofeng Li(also need to add better integration tests for flakes)03:59:04
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @winterqt:nixos.dev

Flake-enabled deployments now use nix copy and the new SSH store protocol (ssh-ng://) for copying closures to remote hosts.

Looks like this breaks buildOnTarget.

* Oops, let me look at it and fix when I get home (Edit: fixed)
06:41:29
@ronixx:matrix.orgroshan | byteio.in 🌷 joined the room.10:06:04
22 Sep 2022
@yuka:yuka.dev@yuka:yuka.devYay for colmenaEval and makeHive, this is exactly what I wanted09:50:38
@yuka:yuka.dev@yuka:yuka.dev I have another request: In flake-enabled deployments, can we pass the nixpkgs flake so that the hive expression can use nixpkgs.lib.nixosSystem and get the proper system.nixos.(revision|versionSuffix)? 09:51:51
@yuka:yuka.dev@yuka:yuka.dev * Yay for colmenaHive and makeHive, this is exactly what I wanted10:08:39
@tommy:datenkollektiv.netTommy joined the room.12:48:28
25 Sep 2022
@rendakuenthusiast:imperishable.namerendakuenthusiasthm, I ran into a weird issue05:38:42
@rendakuenthusiast:imperishable.namerendakuenthusiastI was having a problem building redis05:38:51
@rendakuenthusiast:imperishable.namerendakuenthusiast

specifically I got this exception:

couldn't execute "pgrep": no such file or directory
    while executing
"open "|pgrep -P $pid" "r""
    (procedure "get_child_pid" line 4)
    invoked from within
"get_child_pid 0"
    ("uplevel" body line 16)
    invoked from within
"uplevel 1 $code"
    (procedure "test" line 51)
    invoked from within
"test {Don't rehash if redis has child process} {
        r config set save ""
        r config set rdb-key-save-delay 1000000

        populate 4096 "..."
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code "
    (procedure "start_server" line 3)
    invoked from within
"start_server {tags {"other external:skip"}} {
    test {Don't rehash if redis has child process} {
        r config set save ""
        r config set r..."
    (file "tests/unit/other.tcl" line 334)
    invoked from within
"source $path"
    (procedure "execute_test_file" line 4)
    invoked from within
"execute_test_file $data"
    (procedure "test_client_main" line 10)
    invoked from within
05:39:30
@rendakuenthusiast:imperishable.namerendakuenthusiastwhich I believe was coming from this test in redis' source: https://github.com/redis/redis/blob/b414605285244c453f3fadbbe7a157cd83ed5f59/tests/unit/other.tcl#L33405:39:41
@rendakuenthusiast:imperishable.namerendakuenthusiastwhich calls this code: https://github.com/redis/redis/blob/13d25dd95eec5e21925ef474b5d43f2acb23e54e/tests/support/util.tcl#L61605:39:56
@rendakuenthusiast:imperishable.namerendakuenthusiast

which does:

    if {[file exists "/usr/bin/pgrep"]} {
        set fd [open "|pgrep -P $pid" "r"]
        set child_pid [string trim [lindex [split [read $fd] \n] 0]]
    } else {
        set fd [open "|ps --ppid $pid -o pid" "r"]
        set child_pid [string trim [lindex [split [read $fd] \n] 1]]
    }
05:40:12
@rendakuenthusiast:imperishable.namerendakuenthusiast and when colmena tries to deploy from my laptop, I have /usr/bin/pgrep installed at that path in my normal OS 05:40:37
@rendakuenthusiast:imperishable.namerendakuenthusiast I was able to work around this by renaming /usr/bin/pgrep on my system and then building locally 05:40:56
@rendakuenthusiast:imperishable.namerendakuenthusiastI'm not sure what the principled way to solve this is05:41:05
@rendakuenthusiast:imperishable.namerendakuenthusiast this is basically a failure of hermeticism, right? the redis build was happening on my system and it has one bit of source code that looks at /usr/bin/pgrep. is there a principled way in nix to make that not visible to derivations being built? 05:41:49
@yuka:yuka.dev@yuka:yuka.dev
In reply to @yuka:yuka.dev
I have another request: In flake-enabled deployments, can we pass the nixpkgs flake so that the hive expression can use nixpkgs.lib.nixosSystem and get the proper system.nixos.(revision|versionSuffix)?
I guess this is issue https://github.com/zhaofengli/colmena/issues/60
08:15:39
26 Sep 2022
@rendakuenthusiast:imperishable.namerendakuenthusiastwhere does colmena cache tarballs? I think it is failing to register that a tarball has been updated00:41:15
@winterqt:nixos.devWinter (she/her)what tarballs?01:03:12
@jhillyerd:matrix.orgjhillyerd
In reply to @rendakuenthusiast:imperishable.name
this is basically a failure of hermeticism, right? the redis build was happening on my system and it has one bit of source code that looks at /usr/bin/pgrep. is there a principled way in nix to make that not visible to derivations being built?
Typically you would patch/rewrite the package to not point at /usr/bin, example for regular grep: https://github.com/NixOS/nixpkgs/blob/4e62b94df308e197c1f107564ebdb4318bb80e27/pkgs/development/libraries/nss/generic.nix#L61
04:59:20
@rendakuenthusiast:imperishable.namerendakuenthusiast Winter (she/her): I'm using builtins.fetchTarball to fetch an additional module with some custom modifications I made, from a server I control 05:00:44
@rendakuenthusiast:imperishable.namerendakuenthusiast jhillyerd: where does that substituteInPlace function come from? is that supposed to be shell code? 05:01:59
@jhillyerd:matrix.orgjhillyerdI believe it is one of the shell functions that mkDerivation provides 05:05:43
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @rendakuenthusiast:imperishable.name
and when colmena tries to deploy from my laptop, I have /usr/bin/pgrep installed at that path in my normal OS
Hmm, pgrep should have been added when the tests were enabled in https://github.com/NixOS/nixpkgs/commit/835c3419d9b9
19:42:12
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @rendakuenthusiast:imperishable.name
Winter (she/her): I'm using builtins.fetchTarball to fetch an additional module with some custom modifications I made, from a server I control
I recommend adding a sha256 to the fetchTarball call so it's pinned to the specific version of the module and cached correctly. If you don't have a sha256, Nix itself has some time-based caching (need to look at the expiration - don't know offhand)
19:44:50

Show newer messages


Back to Room ListRoom Version: 6