!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
25 Sep 2022
@rendakuenthusiast:imperishable.name@rendakuenthusiast:imperishable.name

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.name@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 05:40:37
@rendakuenthusiast:imperishable.name@rendakuenthusiast:imperishable.name I was able to work around this by renaming /usr/bin/pgrep on my system and then building locally 05:40:56
@rendakuenthusiast:imperishable.name@rendakuenthusiast:imperishable.nameI'm not sure what the principled way to solve this is05:41:05
@rendakuenthusiast:imperishable.name@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? 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.name@rendakuenthusiast:imperishable.namewhere 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.name@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 05:00:44
@rendakuenthusiast:imperishable.name@rendakuenthusiast:imperishable.name 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
@zhaofeng:zhaofeng.liZhaofeng Li (it's 1 hour and can be controlled with tarball-ttl) 19:46:53
27 Sep 2022
@rendakuenthusiast:imperishable.name@rendakuenthusiast:imperishable.name
In reply to @zhaofeng:zhaofeng.li
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)
so I updated the file at the url and wanted it to get refetched
00:58:54
@rendakuenthusiast:imperishable.name@rendakuenthusiast:imperishable.nameI tried doing the trick of wiping out the sha256, but it just said that the hash of the previously-downloaded version was what the hash had to be00:59:16
@rendakuenthusiast:imperishable.name@rendakuenthusiast:imperishable.namenot the new version I uploaded00:59:21
@rendakuenthusiast:imperishable.name@rendakuenthusiast:imperishable.nameso it's not fetching the new version00:59:28
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @rendakuenthusiast:imperishable.name
I tried doing the trick of wiping out the sha256, but it just said that the hash of the previously-downloaded version was what the hash had to be
If you set sha256 to all zeroes (or lib.fakeSha256) does it force a refetch?
01:00:20
@rendakuenthusiast:imperishable.name@rendakuenthusiast:imperishable.name Zhaofeng Li: that's what i tried, it doesn't force a refresh, it says that it expects the same sha256 that was there before corresponding to the outdated version of the file 03:50:27
@palo:xaos.space@palo:xaos.space changed their profile picture.07:29:30
@palo:xaos.space@palo:xaos.space changed their profile picture.07:31:44
@palo:xaos.space@palo:xaos.space changed their profile picture.07:35:09
@skamdart:matrix.org@skamdart:matrix.org joined the room.21:40:02
30 Sep 2022
@yaya:uwu.isyaya joined the room.12:26:01
@lara:uwu.is@lara:uwu.is left the room.12:36:09
@madonius:entropia.de/madonius[er|he] joined the room.21:11:36
1 Oct 2022
@garionion:entr0py.de@garionion:entr0py.dehey, i want to convert my previous nixops config to a flake using colmena. however, as we have some shared config and custompackages in our infrastructure, i included the shared git repo as git submodule. however, when i want to deploy/update the servers with colmena, it does not find the file with the overlay config. my flake.nix looks like this: https://dev.paste42.de/FIPsp7Iu2e1OjV7V0RgWY89oZQ431zfZ18:17:29
@garionion:entr0py.de@garionion:entr0py.de (everything under ./fem is the submodule 18:17:49

Show newer messages


Back to Room ListRoom Version: 6