let the init container's temp file take its umask
fetch-secrets ran under umask 0227 for the files it writes, which made the mktemp file of grafana_secret_key mode 0400: the redirect of bao's stderr into it failed, every bao call in the helper answered 1, and the init container exited 1 before it stored or read the key. The umask now covers only the writes of put(), the helper chmods its own file, the script test runs under that umask, and a pod that does not start prints its init containers' logs.
This commit is contained in:
parent
bd0cff47f9
commit
f8fb71253e
1 changed files with 19 additions and 3 deletions
|
|
@ -865,6 +865,13 @@ pkgs.testers.runNixOSTest {
|
|||
diagnose(["hyperhive-k8s-ca-trust.service"])
|
||||
print(machine.execute(f"kubectl -n {NS} describe pod {name}")[1])
|
||||
print(machine.execute(f"kubectl -n {NS} logs {name} --tail=60")[1])
|
||||
# An init container that fails keeps the pod out of Running, and its
|
||||
# output is the only thing that says why: the default container has
|
||||
# none yet.
|
||||
for init in machine.execute(f"kubectl -n {NS} get pod {name} -o jsonpath='{{.spec.initContainers[*].name}}'")[1].split():
|
||||
for previous in ("", "--previous"):
|
||||
print(f"--- init container {init} {previous}")
|
||||
print(machine.execute(f"kubectl -n {NS} logs {name} -c {init} {previous} --tail=60 2>&1")[1])
|
||||
raise
|
||||
return name
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue