| 16 Oct 2025 |
raitobezarius | isn't --refresh only about refreshing eval-time artifacts? | 10:21:56 |
raitobezarius | if you want to bypass an unreachable cache, you should either disable it to avoid paying the expbackoff timeouts or accept the expbackoff timeouts | 10:22:42 |
raitobezarius | (or pass --offline but its chance of successes are meager, this feature is broken) | 10:23:09 |
lillecarl | narinfo-cache-negative-ttl = 0
narinfo-cache-positive-ttl = 0
I've got these set in config too. The problem is that I'm bootstrapping the nix cache that isn't working and the build doesn't continue here at all. You think the best way is parsing the error messages for "warning: error: unable to download" and rerun the build without the cache configured? It'll be hard to do "properly"
| 10:26:54 |
lillecarl | (It's been up once before obviously :P) | 10:27:22 |
raitobezarius | I don't think that's the best way | 10:27:24 |
raitobezarius | You should maybe tinker with the connect-timeouts? | 10:27:34 |
raitobezarius | and the number of allowed attempts? | 10:27:42 |
raitobezarius | max-connect-timeout, initial-connect-timeout, download-attempts | 10:28:24 |
raitobezarius | (on lix HEAD) | 10:28:28 |
lillecarl | I mean the cache is 100% dead since the builder can't build the volume the cache needs to run :P
nix-csi-node-sg8p6 nix-csi-node 2025-10-16 10:26:32,952 DEBUG [nix-csi] warning: error: unable to download 'http://nix-cache.default.svc/87bdp04miawiffqc9k8n2m2p172fx6dj.narinfo': Failed to connect to nix-cache.default.svc port 80 after 0 ms: Could not connect to server (curl error code=7); retrying in 330 ms (attempt 1/5)
nix-csi-node-sg8p6 nix-csi-node 2025-10-16 10:26:33,282 DEBUG [nix-csi] warning: error: unable to download 'http://nix-cache.default.svc/87bdp04miawiffqc9k8n2m2p172fx6dj.narinfo': Failed to connect to nix-cache.default.svc port 80 after 0 ms: Could not connect to server (curl error code=7); retrying in 622 ms (attempt 2/5)
nix-csi-node-sg8p6 nix-csi-node 2025-10-16 10:26:33,905 DEBUG [nix-csi] warning: error: unable to download 'http://nix-cache.default.svc/87bdp04miawiffqc9k8n2m2p172fx6dj.narinfo': Failed to connect to nix-cache.default.svc port 80 after 0 ms: Could not connect to server (curl error code=7); retrying in 1053 ms (attempt 3/5)
nix-csi-node-sg8p6 nix-csi-node 2025-10-16 10:26:34,958 DEBUG [nix-csi] warning: error: unable to download 'http://nix-cache.default.svc/87bdp04miawiffqc9k8n2m2p172fx6dj.narinfo': Failed to connect to nix-cache.default.svc port 80 after 0 ms: Could not connect to server (curl error code=7); retrying in 2792 ms (attempt 4/5)
nix-csi-node-sg8p6 nix-csi-node 2025-10-16 10:26:37,761 DEBUG [nix-csi] error: unable to download 'http://nix-cache.default.svc/87bdp04miawiffqc9k8n2m2p172fx6dj.narinfo': Failed to connect to nix-cache.default.svc port 80 after 0 ms: Could not connect to server (curl error code=7)
nix-csi-node-sg8p6 nix-csi-node 2025-10-16 10:26:37,779 ERROR [nix-csi] nix build (expression) failed: build.returncode=1
| 10:28:38 |
lillecarl | I don't mind waiting, but it's failing rather than continuing | 10:28:51 |
raitobezarius | it's curious that it doesn't fallback to build | 10:29:07 |
raitobezarius | are you sure it would succeed building? | 10:29:20 |
raitobezarius | if you pass --substituters '' ? | 10:29:28 |
lillecarl | Yep, I've built this 100 times before 😄 | 10:30:04 |
lillecarl | # Use root as builder since that's the only user in the container.
build-users-group = root
# Auto allocare uids so we don't have to create lots of users in containers
auto-allocate-uids = true
# Enable common features
experimental-features = nix-command flakes auto-allocate-uids fetch-closure pipe-operator
# Don't cache anything that can cause Nix to not try other caches on failure.
narinfo-cache-negative-ttl = 0
narinfo-cache-positive-ttl = 0
# binary cache configuration
${lib.optionalString config.enableBinaryCache ''
trusted-public-keys = ${builtins.readFile ../cache-public} cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = http://nix-cache.${config.namespace}.svc https://cache.nixos.org
''}
# Fuck purity
warn-dirty = false
This is the full nix.conf, I don't think there's anything special here other than setting the cache values to 0 (which I don't wanna do but I thought it'd fix this issue)
| 10:31:32 |
raitobezarius |
# Use root as builder since that's the only user in the container.
build-users-group = root
| 10:32:42 |
raitobezarius | aoutch | 10:32:43 |
lillecarl | Yeah I know i know, it's a work in progress :P | 10:33:03 |
raitobezarius | I don't see anything obviously wrong, except that build-users-group is a very weird configuration to use and I'm not sure if it works | 10:33:07 |
raitobezarius | (I'm also planning to ban it: https://gerrit.lix.systems/c/lix/+/3109 to some extent) | 10:33:29 |
raitobezarius | except if you are running in direct local store access | 10:33:48 |
lillecarl | I'll resolve it eventually, i just need to setup /etc/{shadow,passwd,groups} properly in the container | 10:34:22 |
raitobezarius | nothing comes to my mind to why you don't get the build fallback scenario, but if you say that --substituters '' works and that running with substituters don't lead to fallback, then this is a bug | 10:34:30 |
raitobezarius | if you can minimize this to a minimal reproducer with Lix, we can take a look at it if you open an issue | 10:34:46 |
lillecarl | I'll rewrite it quickly to it retries the build using --substituters '' if it fails (Does that still keep cache.nixos.org?) | 10:35:05 |
raitobezarius | no, it removes cno | 10:35:13 |
raitobezarius | --extra-substituters '' would be the right thing to do but it's an append variable, so putting '' is nop | 10:35:40 |
raitobezarius | * --extra-substituters '' would be the right thing to do but it's an append variable, so putting '' is no-op | 10:35:42 |