Skip to content

Commit df37625

Browse files
committed
rename all Lix references to Nix, remove Lix cache entries and upterm sessions from CI, enhance K8s debug logging on CI failure with pod describe, timestamped logs, previous logs, and CSI info
1 parent 26632d2 commit df37625

16 files changed

Lines changed: 152 additions & 108 deletions

File tree

.github/actions/setup-nix/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ runs:
2222
# - Update substituters: https://nix-csi.cachix.org → https://nixkube.cachix.org
2323
# - Recreate/migrate Cachix cache from nix-csi to nixkube
2424
nix_conf: |
25-
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o= nixbuild.net/CHEAKK-1:IvfuR1Ldmkef8pMcSuCl9N2jppEb8KpBzdoB8uKQdxE= nix-csi.cachix.org-1:i4w33gR4efO67jpz8U7g/MdvRQ6mQ3LEF9fB8tES60g=
25+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nixbuild.net/CHEAKK-1:IvfuR1Ldmkef8pMcSuCl9N2jppEb8KpBzdoB8uKQdxE= nix-csi.cachix.org-1:i4w33gR4efO67jpz8U7g/MdvRQ6mQ3LEF9fB8tES60g=
2626
extra-platforms = aarch64-linux qemu-user
2727
# builders = ssh-ng://eu.nixbuild.net aarch64-linux ; ssh-ng://eu.nixbuild.net x86_64-linux
28-
substituters = https://cache.nixos.org?priority=1 https://nix-csi.cachix.org?priority=2 https://cache.lix.systems?priority=3 ssh-ng://eu.nixbuild.net?priority=4
28+
substituters = https://cache.nixos.org?priority=1 https://nix-csi.cachix.org?priority=2 ssh-ng://eu.nixbuild.net?priority=4
2929
keep-env-derivations = true
3030
keep-outputs = true
3131
- name: Restore and save Nix store

.github/workflows/ci.yaml

Lines changed: 105 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ jobs:
5050
unlink nix-envs || true
5151
nix build --show-trace --file . push --out-link nix-envs
5252
./nix-envs/bin/push
53-
- name: Build and push amd64 lix image
53+
- name: Build and push amd64 nix image
5454
run: |
55-
unlink nix-lix || true
56-
nix build --show-trace --file . lixImage.pushArch.x86_64-linux --out-link nix-lix
57-
./nix-lix/bin/push-lix-x86_64-linux
55+
unlink nix-nix || true
56+
nix build --show-trace --file . nixImage.pushArch.x86_64-linux --out-link nix-nix
57+
./nix-nix/bin/push-nix-x86_64-linux
5858
build-arm64:
5959
runs-on: ubuntu-24.04-arm
6060
steps:
@@ -71,11 +71,11 @@ jobs:
7171
unlink nix-envs || true
7272
nix build --show-trace --file . push --out-link nix-envs
7373
./nix-envs/bin/push
74-
- name: Build and push arm64 lix image
74+
- name: Build and push arm64 nix image
7575
run: |
76-
unlink nix-lix || true
77-
nix build --show-trace --file . lixImage.pushArch.aarch64-linux --out-link nix-lix
78-
./nix-lix/bin/push-lix-aarch64-linux
76+
unlink nix-nix || true
77+
nix build --show-trace --file . nixImage.pushArch.aarch64-linux --out-link nix-nix
78+
./nix-nix/bin/push-nix-aarch64-linux
7979
build-manifests:
8080
needs: [build-amd64, build-arm64]
8181
runs-on: ubuntu-latest
@@ -88,11 +88,11 @@ jobs:
8888
nixbuild_key: ${{ secrets.NIXBUILD_KEY }}
8989
github_token: ${{ secrets.GITHUB_TOKEN }}
9090
cache_key: build-manifests
91-
- name: Create lix multi-arch manifest
91+
- name: Create nix multi-arch manifest
9292
run: |
9393
unlink nix-manifest || true
94-
nix build --show-trace --file . lixImage.pushManifest --out-link nix-manifest
95-
./nix-manifest/bin/push-lix-manifest
94+
nix build --show-trace --file . nixImage.pushManifest --out-link nix-manifest
95+
./nix-manifest/bin/push-nix-manifest
9696
- name: Build and push scratch image
9797
run: |
9898
unlink nix-scratches || true
@@ -171,45 +171,58 @@ jobs:
171171
- name: Print node logs
172172
run: |
173173
echo "=== Node pod logs ==="
174-
kubectl logs -l app.kubernetes.io/component=node -n nixkube --tail -1
175-
- name: Cluster state all
176-
if: failure()
177-
run: |
178-
echo "=== Cluster state all ==="
179-
kubectl get all -A || true
180-
- name: Cluster state configmaps
181-
if: failure()
182-
run: |
183-
echo "=== Cluster configmaps ==="
184-
kubectl get configmaps -A || true
185-
- name: Cluster state secrets
186-
if: failure()
187-
run: |
188-
kubectl get secrets -A || true
189-
- name: Cache
190-
if: failure()
191-
run: |
192-
kubectl logs -l app.kubernetes.io/component=cache -n nixkube --tail -1 || true
193-
kubectl describe pod -l app.kubernetes.io/component=cache -n nixkube || true
194-
- name: Node
174+
kubectl logs -l app.kubernetes.io/component=node -n nixkube --tail=50 --timestamps
175+
- name: Debug on failure
195176
if: failure()
196177
run: |
197-
kubectl logs -l app.kubernetes.io/component=node -n nixkube --tail -1 || true
178+
set -x
179+
echo "=== ALL PODS ==="
180+
kubectl get pods -A -o wide || true
181+
182+
echo "=== NIXKUBE PODS WIDE ==="
183+
kubectl get pods -o wide -n nixkube || true
184+
185+
echo "=== NODE POD DESCRIBE ==="
198186
kubectl describe pod -l app.kubernetes.io/component=node -n nixkube || true
199-
- name: Init
200-
if: failure()
201-
run: |
202-
kubectl logs -l app.kubernetes.io/component=init -n nixkube --tail -1 || true
203-
- name: Events
204-
if: failure()
205-
run: |
206-
kubectl get events -n nixkube --sort-by='.lastTimestamp'
207-
- name: Troubleshoot with upterm
208-
if: failure()
209-
uses: owenthereal/action-upterm@main
210-
with:
211-
limit-access-to-actor: true
212-
wait-timeout-minutes: 5
187+
188+
echo "=== CACHE POD DESCRIBE ==="
189+
kubectl describe pod -l app.kubernetes.io/component=cache -n nixkube || true
190+
191+
echo "=== INIT POD DESCRIBE ==="
192+
kubectl describe pod -l app.kubernetes.io/component=init -n nixkube || true
193+
194+
echo "=== NODE POD LOGS (with timestamps) ==="
195+
kubectl logs -l app.kubernetes.io/component=node -n nixkube --tail=100 --timestamps || true
196+
197+
echo "=== NODE POD PREVIOUS LOGS ==="
198+
kubectl logs -l app.kubernetes.io/component=node -n nixkube --tail=100 --timestamps --previous 2>/dev/null || echo "(no previous logs)"
199+
200+
echo "=== CACHE POD LOGS (with timestamps) ==="
201+
kubectl logs -l app.kubernetes.io/component=cache -n nixkube --tail=100 --timestamps || true
202+
203+
echo "=== CACHE POD PREVIOUS LOGS ==="
204+
kubectl logs -l app.kubernetes.io/component=cache -n nixkube --tail=100 --timestamps --previous 2>/dev/null || echo "(no previous logs)"
205+
206+
echo "=== INIT POD LOGS ==="
207+
kubectl logs -l app.kubernetes.io/component=init -n nixkube --tail=100 --timestamps || true
208+
209+
echo "=== INIT POD PREVIOUS LOGS ==="
210+
kubectl logs -l app.kubernetes.io/component=init -n nixkube --tail=100 --timestamps --previous 2>/dev/null || echo "(no previous logs)"
211+
212+
echo "=== CSI NODE INFO ==="
213+
kubectl get csinode -o wide || true
214+
215+
echo "=== VOLUME ATTACHMENTS ==="
216+
kubectl get volumeattachment -o wide || true
217+
218+
echo "=== PVCs ==="
219+
kubectl get pvc -A -o wide || true
220+
221+
echo "=== PVs ==="
222+
kubectl get pv -o wide || true
223+
224+
echo "=== EVENTS ==="
225+
kubectl get events -n nixkube --sort-by='.lastTimestamp' || true
213226
test-kind-nocache:
214227
needs: build-manifests
215228
runs-on: ubuntu-latest
@@ -244,30 +257,58 @@ jobs:
244257
- name: Print node logs
245258
run: |
246259
echo "=== Node pod logs ==="
247-
kubectl logs -l app.kubernetes.io/component=node -n nixkube --tail -1
260+
kubectl logs -l app.kubernetes.io/component=node -n nixkube --tail=50 --timestamps
248261
- name: Debug on failure
249262
if: failure()
250263
run: |
251-
echo "=== Cluster state ==="
252-
kubectl get all -A
264+
set -x
265+
echo "=== ALL PODS ==="
266+
kubectl get pods -A -o wide || true
253267
254-
echo "=== Cache pod logs ==="
255-
kubectl logs -l app.kubernetes.io/name=cache -n nixkube --tail -1 || true
268+
echo "=== NIXKUBE PODS WIDE ==="
269+
kubectl get pods -o wide -n nixkube || true
256270
257-
echo "=== Node pod logs ==="
258-
kubectl logs -l app.kubernetes.io/component=node -n nixkube --tail -1 || true
271+
echo "=== NODE POD DESCRIBE ==="
272+
kubectl describe pod -l app.kubernetes.io/component=node -n nixkube || true
259273
260-
echo "=== Init pod logs ==="
261-
kubectl logs -l app.kubernetes.io/component=init -n nixkube --tail -1 || true
274+
echo "=== CACHE POD DESCRIBE ==="
275+
kubectl describe pod -l app.kubernetes.io/component=cache -n nixkube || true
262276
263-
echo "=== Events ==="
264-
kubectl get events -n nixkube --sort-by='.lastTimestamp'
265-
- name: Troubleshoot with upterm
266-
if: failure()
267-
uses: owenthereal/action-upterm@main
268-
with:
269-
limit-access-to-actor: true
270-
wait-timeout-minutes: 5
277+
echo "=== INIT POD DESCRIBE ==="
278+
kubectl describe pod -l app.kubernetes.io/component=init -n nixkube || true
279+
280+
echo "=== NODE POD LOGS (with timestamps) ==="
281+
kubectl logs -l app.kubernetes.io/component=node -n nixkube --tail=100 --timestamps || true
282+
283+
echo "=== NODE POD PREVIOUS LOGS ==="
284+
kubectl logs -l app.kubernetes.io/component=node -n nixkube --tail=100 --timestamps --previous 2>/dev/null || echo "(no previous logs)"
285+
286+
echo "=== CACHE POD LOGS (with timestamps) ==="
287+
kubectl logs -l app.kubernetes.io/component=cache -n nixkube --tail=100 --timestamps || true
288+
289+
echo "=== CACHE POD PREVIOUS LOGS ==="
290+
kubectl logs -l app.kubernetes.io/component=cache -n nixkube --tail=100 --timestamps --previous 2>/dev/null || echo "(no previous logs)"
291+
292+
echo "=== INIT POD LOGS ==="
293+
kubectl logs -l app.kubernetes.io/component=init -n nixkube --tail=100 --timestamps || true
294+
295+
echo "=== INIT POD PREVIOUS LOGS ==="
296+
kubectl logs -l app.kubernetes.io/component=init -n nixkube --tail=100 --timestamps --previous 2>/dev/null || echo "(no previous logs)"
297+
298+
echo "=== CSI NODE INFO ==="
299+
kubectl get csinode -o wide || true
300+
301+
echo "=== VOLUME ATTACHMENTS ==="
302+
kubectl get volumeattachment -o wide || true
303+
304+
echo "=== PVCs ==="
305+
kubectl get pvc -A -o wide || true
306+
307+
echo "=== PVs ==="
308+
kubectl get pv -o wide || true
309+
310+
echo "=== EVENTS ==="
311+
kubectl get events -n nixkube --sort-by='.lastTimestamp' || true
271312
release:
272313
needs: [check, build-manifests, test-kind-cache, test-kind-nocache]
273314
runs-on: ubuntu-latest

.github/workflows/test-nixos.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
nix_conf: |
2323
experimental-features = nix-command flakes
2424
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
25-
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o= nixbuild.net/CHEAKK-1:IvfuR1Ldmkef8pMcSuCl9N2jppEb8KpBzdoB8uKQdxE= nix-csi.cachix.org-1:i4w33gR4efO67jpz8U7g/MdvRQ6mQ3LEF9fB8tES60g=
25+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nixbuild.net/CHEAKK-1:IvfuR1Ldmkef8pMcSuCl9N2jppEb8KpBzdoB8uKQdxE= nix-csi.cachix.org-1:i4w33gR4efO67jpz8U7g/MdvRQ6mQ3LEF9fB8tES60g=
2626
# builders = ssh-ng://eu.nixbuild.net aarch64-linux ; ssh-ng://eu.nixbuild.net x86_64-linux
27-
substituters = https://cache.nixos.org?priority=1 https://nix-csi.cachix.org?priority=2 https://cache.lix.systems?priority=3 ssh-ng://eu.nixbuild.net?priority=4
27+
substituters = https://cache.nixos.org?priority=1 https://nix-csi.cachix.org?priority=2 ssh-ng://eu.nixbuild.net?priority=4
2828
sandbox = relaxed
2929
- name: Configure SSH Keys
3030
shell: bash
@@ -44,8 +44,10 @@ jobs:
4444
echo $! > /tmp/test.pid
4545
echo "Test running in background (PID: $(cat /tmp/test.pid))"
4646
sleep 5
47-
- name: Setup upterm session (test runs in parallel)
48-
uses: owenthereal/action-upterm@v1
49-
with:
50-
wait-timeout-minutes: 5
51-
limit-access-to-actor: true
47+
- name: Print test logs
48+
run: |
49+
cat /tmp/test.log || true
50+
- name: Print test results
51+
run: |
52+
echo "=== Test log output ==="
53+
cat /tmp/test.log 2>/dev/null || echo "(no test log)"

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ The integration test (runs in CI via `.github/workflows/integration-test.yaml`):
116116
- Confirms cache and node pods are operational
117117

118118
**Build job** (runs once, pushes to cachix and container registry):
119-
1. Builds and pushes Lix image
119+
1. Builds and pushes Nix image
120120
2. Builds and pushes cache/node environments
121121
3. Builds and pushes scratch image
122122

@@ -202,7 +202,7 @@ The `config-reconciler` service runs continuously to sync SSH keys and Nix confi
202202
- `kubenix/builder.nix`: Optional builder pods for distributed builds
203203
- `pkgs/nixkube/src/csi/server.py`: CSI driver gRPC server
204204
- `pkgs/nixkube/src/nri/server.py`: NRI plugin ttrpc handler
205-
- `liximage.nix`: Builds the Lix container used by initContainers
205+
- `niximage.nix`: Builds the Nix container used by initContainers
206206

207207
## Code Review Standards
208208

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,6 @@ rec {
225225
programs.yamlfmt.enable = true;
226226
};
227227

228-
lixImage = pkgs.callPackage ./liximage.nix { };
228+
nixImage = pkgs.callPackage ./niximage.nix { };
229229
scratchImage = pkgs.callPackage ./scratchimage.nix { };
230230
}

demo/pod.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let
2020
pkgs.fishMinimal
2121
pkgs.coreutils
2222
pkgs.moreutils
23-
pkgs.lix
23+
pkgs.nix
2424
];
2525
};
2626

environments/cache/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: MIT
22

3-
# Cache uses lruLix which is Lix patched to keep storePaths registrationTime up2date when they're referenced
3+
# Cache uses a patched Nix to keep storePaths registrationTime up2date when they're referenced
44
# through the Daemon protocol
55
{
66
pkgs,

environments/modules/gc.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
command = pkgs.writeShellApplication {
2424
name = "gc";
2525
runtimeInputs = [
26-
pkgs.lruLix
26+
pkgs.nix
2727
pkgs.jq
2828
];
2929
text =

environments/modules/nix-daemon.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{
99
config = {
1010
services.nix-daemon = {
11-
command = "${lib.getExe pkgs.lruLix} daemon --store local";
11+
command = "${lib.getExe pkgs.nix} daemon --store local";
1212
depends-on = [ "setup" ];
1313
log-type = "file";
1414
logfile = "/var/log/nix-daemon.log";

environments/modules/setup.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
runtimeInputs = [
2020
pkgs.rsync
2121
pkgs.coreutils
22-
pkgs.lruLix
22+
pkgs.nix
2323
];
2424
text = # bash
2525
''

0 commit comments

Comments
 (0)