nixbot

builds

succeeded container-test-run-github-agent-authd checks.x86_64-linux.nixosTests.github-agent-authd.x86_64-linux · build #177 · raw

1[0.00s] Machine state will be reset. To keep it, pass --keep-machine-state2[0.00s] start all VLans3[0.00s] (finished: start all VLans, in 0.00 seconds)4Initializing machine ID from random generator.5[0.02s] Test will time out and terminate in 300.0 seconds6[0.02s] run the VM test script7additionally exposed symbols:8 machine,9 vlan1,10 start_all, test_script, machines, machines_qemu, machines_nspawn, vlans, driver, log, os, create_machine, subtest, run_tests, join_all, retry, serial_stdout_off, serial_stdout_on, polling_condition, BaseMachine, QemuMachine, NspawnMachine, t, debug, dump_machine_ssh11[0.02s] machine: systemd-nspawn running (pid 50)12[0.02s] machine: Waiting for journal at /build/vm-state-machine/var/log/journal...13[0.02s] machine: waiting for unit multi-user.target14nixos-nspawn(machine): TAP vde-tap1 not found; container will be isolated from VDE15nixos-nspawn(machine): A common reason for this is that /dev/net is not available in the Nix sandbox. Try adding /dev/net to extra-sandbox-paths.16Note: in a future version of systemd-nspawn the default set of permitted socket address families will be restricted to AF_INET, AF_INET6 and AF_UNIX. Use --restrict-address-families= to configure the set of permitted socket address families, or set RestrictAddressFamilies= in a .nspawn file.17░ Spawning container machine on /build/vm-state-machine.18machine # [ 2586.959281] machine systemd-journald[58]: Journal started19machine # [ 2586.959351] machine systemd-journald[58]: Runtime Journal (/run/log/journal/201bd2dbb455446f8ecd2b3e0dad182a) is 8M, max 1.2G, 1.2G free.20machine # [ 2586.979849] machine systemd[1]: Finished Apply Kernel Variables.21machine # [ 2586.999968] machine systemd[1]: Finished Create Static Device Nodes in /dev gracefully.22machine # [ 2587.021939] machine systemd[1]: Starting Flush Journal to Persistent Storage...23machine # [ 2587.022586] machine systemd[1]: Starting Create Static Device Nodes in /dev...24machine # [ 2587.038447] machine systemd-journald[58]: Time spent on flushing to /var/log/journal/201bd2dbb455446f8ecd2b3e0dad182a is 1.401ms for 6 entries.25machine # [ 2587.038447] machine systemd-journald[58]: System Journal (/var/log/journal/201bd2dbb455446f8ecd2b3e0dad182a) is 8M, max 4G, 3.9G free.26machine # [ 2587.055332] machine systemd[1]: Finished Flush Journal to Persistent Storage.27machine # [ 2587.055649] machine systemd[1]: Finished Create Static Device Nodes in /dev.28machine # [ 2587.056576] machine systemd[1]: Reached target Preparation for Local File Systems.29machine # [ 2587.056759] machine systemd[1]: Rule-based Manager for Device Events and Files skipped, unmet condition check ConditionPathIsReadWrite=/sys30machine # [ 2587.097708] machine systemd[1]: Finished Firewall.31machine # [ 2587.963391] machine systemd[1]: Mounting /run/wrappers...32machine # [ 2588.008146] machine systemd[1]: Mounted /run/wrappers.33machine # [ 2588.008736] machine systemd[1]: Reached target Local File Systems.34machine # [ 2588.009830] machine systemd[1]: Listening on Boot Loader Control Service Socket.35machine # [ 2588.010766] machine systemd[1]: Starting Create SUID/SGID Wrappers...36machine # [ 2588.010803] machine systemd[1]: Update Boot Loader Random Seed skipped, unmet condition check ConditionVirtualization=!container37machine # [ 2588.011537] machine systemd[1]: Starting Save Transient machine-id to Disk...38machine # [ 2588.012244] machine systemd[1]: Starting Create System Files and Directories...39machine # [ 2588.037821] machine systemd-tmpfiles[164]: Cannot set file attributes for '/var/empty', value=0x00000010, mask=0x00000010, ignoring: Operation not permitted40machine # [ 2588.038518] machine systemd-tmpfiles[164]: fchmod() of /var/log/journal failed: Operation not permitted41machine # [ 2588.038712] machine systemd-tmpfiles[164]: fchmod() of /var/log/journal/201bd2dbb455446f8ecd2b3e0dad182a failed: Operation not permitted42machine # [ 2588.038999] machine systemd-tmpfiles[164]: fchmod() of /run/log/journal failed: Operation not permitted43machine # [ 2588.045821] machine suid-sgid-wrappers-start[171]: chmod: changing permissions of '/run/wrappers/wrappers.DqQqdfsM1b/chsh': Operation not permitted44machine # [ 2588.046194] machine systemd[1]: Finished Create System Files and Directories.45machine # [ 2588.067555] machine systemd[1]: suid-sgid-wrappers.service: Main process exited, code=exited, status=1/FAILURE46machine # [ 2588.067618] machine systemd[1]: suid-sgid-wrappers.service: Failed to read pids.max for control group /system.slice/suid-sgid-wrappers.service, ignoring: No data available47machine # [ 2588.067688] machine systemd[1]: suid-sgid-wrappers.service: Failed to read pids.max for control group /system.slice/suid-sgid-wrappers.service, ignoring: No data available48machine # [ 2588.067726] machine systemd[1]: suid-sgid-wrappers.service: Failed with result 'exit-code'.49machine # [ 2588.068562] machine systemd[1]: Failed to start Create SUID/SGID Wrappers.50machine # [ 2588.073941] machine systemd[1]: Starting Rebuild Journal Catalog...51machine # [ 2588.076810] machine systemd[1]: Starting Record System Boot/Shutdown in UTMP...52machine # [ 2588.099485] machine systemd[1]: Finished Record System Boot/Shutdown in UTMP.53machine # [ 2588.119810] machine systemd[1]: Finished Rebuild Journal Catalog.54machine # [ 2588.122729] machine systemd[1]: Starting Update is Completed...55machine # [ 2588.169114] machine systemd[1]: etc-machine\x2did.mount: Deactivated successfully.56machine # [ 2588.170953] machine systemd[1]: Finished Save Transient machine-id to Disk.57machine # [ 2588.171298] machine systemd[1]: Finished Update is Completed.58machine # [ 2588.172490] machine systemd[1]: Reached target System Initialization.59machine # [ 2588.172602] machine systemd[1]: Discard unused filesystem blocks once a week skipped, unmet condition check ConditionVirtualization=!container60machine # [ 2588.172649] machine systemd[1]: Started Daily Cleanup of Temporary Directories.61machine # [ 2588.172697] machine systemd[1]: Reached target Timer Units.62machine # [ 2588.172896] machine systemd[1]: Listening on D-Bus System Message Bus Socket.63machine # [ 2588.174035] machine systemd[1]: Starting GitHub agent auth broker socket...64machine # [ 2588.174282] machine systemd[1]: Listening on Nix Daemon Socket.65machine # [ 2588.176488] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Export).66machine # [ 2588.178463] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Local).67machine # [ 2588.179810] machine systemd[1]: Listening on SSH Socket.68machine # [ 2588.180108] machine systemd[1]: Listening on Virtual Machine and Container Registration Service Socket.69machine # [ 2588.181671] machine systemd[1]: Listening on GitHub agent auth broker socket.70machine # [ 2588.181873] machine systemd[1]: Reached target Socket Units.71machine # [ 2588.181946] machine systemd[1]: Reached target Basic System.72machine # [ 2588.183612] machine systemd[1]: Starting Import lastlog data into lastlog2 database...73machine # [ 2588.185646] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...74machine # [ 2588.187271] machine systemd[1]: Starting resolvconf update...75machine # [ 2588.187460] machine systemd[1]: SSH Host Keys Generation skipped, no trigger condition checks were met.76machine # [ 2588.207722] machine systemd[1]: Finished Import lastlog data into lastlog2 database.77machine # [ 2588.245649] machine systemd[1]: nscd.service: Failed to read pids.max for control group /system.slice/nscd.service, ignoring: No data available78machine # [ 2588.245688] machine systemd[1]: nscd.service: Deactivated successfully.79machine # [ 2588.245852] machine systemd[1]: Stopped Name Service Cache Daemon (nsncd).80machine # [ 2588.248108] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...81machine # [ 2588.262133] machine resolvconf-start[239]: setfacl: /run/resolvconf: Operation not supported82machine # [ 2588.263208] machine systemd[1]: resolvconf.service: Main process exited, code=exited, status=1/FAILURE83machine # [ 2588.263278] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available84machine # [ 2588.263341] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available85machine # [ 2588.263380] machine systemd[1]: resolvconf.service: Failed with result 'exit-code'.86machine # [ 2588.263566] machine systemd[1]: Failed to start resolvconf update.87machine # [ 2588.263878] machine systemd[1]: Reached target Preparation for Network.88machine # [ 2588.265064] machine systemd[1]: Starting Address configuration of eth1...89machine # [ 2588.266110] machine systemd[1]: Starting Extra networking commands....90machine # [ 2588.289230] machine network-addresses-eth1-start[242]: adding address 192.168.1.1/24... done91machine # [ 2588.293366] machine network-addresses-eth1-start[242]: adding address 2001:db8:1::1/64... done92machine # [ 2588.298189] machine systemd[1]: Finished Address configuration of eth1.93machine # [ 2588.335972] machine systemd[1]: Finished Extra networking commands..94machine # [ 2588.336276] machine systemd[1]: Reached target Network.95machine # [ 2588.337215] machine systemd[1]: Started Fake GitHub API for github-agent-authd test.96machine # [ 2588.464474] machine nsncd[231]: Nov 15 08:11:50.394 INFO started, config: Config { ignored_request_types: {}, worker_count: 8, handoff_timeout: 10s }, path: "/var/run/nscd/socket"97machine # [ 2588.464505] machine systemd[1]: Started Name Service Cache Daemon (nsncd).98machine # [ 2588.464569] machine systemd[1]: Reached target Host and Network Name Lookups.99machine # [ 2588.464625] machine systemd[1]: Reached target User and Group Name Lookups.100machine # [ 2588.465692] machine systemd[1]: Starting User Login Management...101machine # [ 2588.466442] machine systemd[1]: Starting Permit User Sessions...102machine # [ 2588.484462] machine systemd[1]: Finished Permit User Sessions.103machine # [ 2588.486173] machine systemd[1]: Started Console Getty.104machine # [ 2588.486227] machine systemd[1]: Getty on tty1 skipped, unmet condition check ConditionPathExists=/dev/tty0105machine # [ 2588.486253] machine systemd[1]: Reached target Login Prompts.106machine # [ 2589.691072] machine systemd-logind[311]: New seat seat0.107machine # [ 2589.691502] machine systemd[1]: Starting D-Bus System Message Bus...108machine # [ 2589.691788] machine systemd[1]: Started User Login Management.109machine # [ 2589.694013] machine systemd[1]: Starting linger-users.service...110machine # [ 2589.714528] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available111machine # [ 2589.714595] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available112machine # [ 2589.714635] machine systemd[1]: linger-users.service: Deactivated successfully.113machine # [ 2589.714803] machine systemd[1]: Finished linger-users.service.114machine # [ 2589.715037] machine systemd[1]: Reached target Multi-User System.115[4.17s] machine: (finished: waiting for unit multi-user.target, in 4.15 seconds)116[4.17s] machine: waiting for unit fake-github-api.service117[4.19s] machine: (finished: waiting for unit fake-github-api.service, in 0.02 seconds)118[4.19s] machine: waiting for unit github-agent-authd.socket119[4.21s] machine: (finished: waiting for unit github-agent-authd.socket, in 0.02 seconds)120[4.21s] machine: waiting for file '/run/github-agent-authd/socket'121[4.21s] machine: (finished: waiting for file '/run/github-agent-authd/socket', in 0.01 seconds)122[4.21s] machine: must fail: systemctl is-active github-agent-authd.service123[4.23s] machine: (finished: must fail: systemctl is-active github-agent-authd.service, in 0.02 seconds)124Test 1: socket access denied for non-member user...125[4.23s] machine: must fail: runuser -u blocked -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz126curl: (7) Failed to connect to localhost:80 over unix:///run/github-agent-authd/socket after 0 ms: Could not connect to server127[4.26s] machine: (finished: must fail: runuser -u blocked -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz, in 0.03 seconds)128✓ Test 1 passed129Test 2: health check via authorized user...130[4.26s] machine: must succeed: runuser -u testuser -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz131machine # [ 2590.118030] machine dbus-broker-launch[321]: Looking up NSS user entry for 'systemd-timesync'...132machine # [ 2590.118533] machine dbus-broker-launch[321]: NSS returned no entry for 'systemd-timesync'133machine # [ 2590.118533] machine dbus-broker-launch[321]: Invalid user-name in /nix/store/cj7ihjraaw8n50y8sm8skl9gsn8vkby7-system-path/share/dbus-1/system.d/org.freedesktop.timesync1.conf +16: user="systemd-timesync"134machine # [ 2590.119396] machine systemd[1]: Started D-Bus System Message Bus.135machine # [ 2590.119756] machine systemd[1]: Startup finished in 3.631s.136machine # [ 2590.129963] machine dbus-broker-launch[321]: Ready137machine # [ 2590.278035] machine runuser[331]: pam_unix(runuser:session): session opened for user blocked(uid=1000) by (uid=0)138machine # [ 2590.288806] machine runuser[331]: pam_unix(runuser:session): session closed for user blocked139machine # [ 2590.300196] machine runuser[333]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)140machine # [ 2590.308754] machine systemd[1]: Reached target Network is Online.141machine # [ 2590.312105] machine systemd[1]: Starting GitHub agent auth broker...142[5.75s] machine: (finished: must succeed: runuser -u testuser -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz, in 1.49 seconds)143[5.75s] machine: waiting for unit github-agent-authd.service144[5.77s] machine: (finished: waiting for unit github-agent-authd.service, in 0.02 seconds)145✓ Test 2 passed146Test 3: token retrieval and cache reuse...147[5.77s] machine: must succeed: runuser -u testuser -- github-agent-token --repo test/repo148[5.80s] machine: (finished: must succeed: runuser -u testuser -- github-agent-token --repo test/repo, in 0.03 seconds)149[5.80s] machine: must succeed: runuser -u testuser -- github-agent-token --repo test/repo150[5.83s] machine: (finished: must succeed: runuser -u testuser -- github-agent-token --repo test/repo, in 0.03 seconds)151[5.83s] machine: must succeed: cat /tmp/fake-gh-install-repo152[5.84s] machine: (finished: must succeed: cat /tmp/fake-gh-install-repo, in 0.01 seconds)153[5.84s] machine: must succeed: cat /tmp/fake-gh-token-mints154[5.85s] machine: (finished: must succeed: cat /tmp/fake-gh-token-mints, in 0.01 seconds)155✓ Test 3 passed156Test 4: git credential helper returns app credentials...157[5.85s] machine: must succeed: runuser -u testuser -- bash -lc "printf 'protocol=https\nhost=github.com\npath=test/repo.git\n\n' | github-agent-git-credential-helper get"158[5.88s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "printf 'protocol=https\nhost=github.com\npath=test/repo.git\n\n' | github-agent-git-credential-helper get", in 0.04 seconds)159✓ Test 4 passed160Test 5: github-agent-gh injects token and execs gh...161[5.88s] machine: must succeed: runuser -u testuser -- bash -lc 'cd /tmp && mkdir gh-test && cd gh-test && git init -q && git remote add origin https://github.com/test/repo.git'162[5.91s] machine: (finished: must succeed: runuser -u testuser -- bash -lc 'cd /tmp && mkdir gh-test && cd gh-test && git init -q && git remote add origin https://github.com/test/repo.git', in 0.02 seconds)163[5.91s] machine: must succeed: runuser -u testuser -- bash -lc 'cd /tmp/gh-test && gh help >/dev/null'164machine # [ 2591.776544] machine systemd[1]: Started GitHub agent auth broker.165machine # [ 2591.778648] machine github-agent-authd[335]: github-agent-authd: ready idle_shutdown_timeout=30m0s166machine # [ 2591.779979] machine runuser[333]: pam_unix(runuser:session): session closed for user testuser167machine # [ 2591.806227] machine runuser[341]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)168machine # [ 2591.824029] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=miss latency_ms=5169machine # [ 2591.829625] machine runuser[341]: pam_unix(runuser:session): session closed for user testuser170machine # [ 2591.840652] machine runuser[349]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)171machine # [ 2591.852824] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0172machine # [ 2591.857666] machine runuser[349]: pam_unix(runuser:session): session closed for user testuser173machine # [ 2591.883771] machine runuser[356]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)174machine # [ 2591.904498] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0175machine # [ 2591.909318] machine runuser[356]: pam_unix(runuser:session): session closed for user testuser176machine # [ 2591.916447] machine runuser[366]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)177machine # [ 2591.931869] machine runuser[366]: pam_unix(runuser:session): session closed for user testuser178machine # [ 2591.939560] machine runuser[370]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)179machine # [ 2591.968418] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0180[6.02s] machine: (finished: must succeed: runuser -u testuser -- bash -lc 'cd /tmp/gh-test && gh help >/dev/null', in 0.11 seconds)181machine # [ 2592.041174] machine runuser[370]: pam_unix(runuser:session): session closed for user testuser182[6.02s] machine: must succeed: cat /tmp/fake-gh-token-mints183[6.03s] machine: (finished: must succeed: cat /tmp/fake-gh-token-mints, in 0.01 seconds)184✓ Test 5 passed185Test 6: helper cleanly misses unknown repo for git fallback...186[6.03s] machine: must succeed: runuser -u testuser -- bash -lc "printf 'protocol=https\nhost=github.com\npath=test/missing.git\n\n' | github-agent-git-credential-helper get"187[6.06s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "printf 'protocol=https\nhost=github.com\npath=test/missing.git\n\n' | github-agent-git-credential-helper get", in 0.03 seconds)188✓ Test 6 passed189Test 7: missing repo uses negative cache...190[6.06s] machine: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?"191[6.09s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?", in 0.03 seconds)192[6.09s] machine: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?"193[6.11s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?", in 0.03 seconds)194[6.11s] machine: must succeed: cat /tmp/fake-gh-install-missing195[6.12s] machine: (finished: must succeed: cat /tmp/fake-gh-install-missing, in 0.01 seconds)196✓ Test 7 passed197✅ All tests passed!198[6.12s] (finished: run the VM test script, in 6.10 seconds)199[6.14s] test script finished in 6.12s200[6.14s] cleanup201[6.14s] kill NspawnMachine (pid 50)202Container machine terminated by signal KILL.203[6.20s] (finished: cleanup, in 0.06 seconds)