Skip to content

Commit 1cf8675

Browse files
Merge pull request #105 from brianhlin/SOFTWARE-5614.debug-authfile-race
Dump Authfile debugging info into the container log (SOFTWARE-5614)
2 parents 1a0e749 + 9e84557 commit 1cf8675

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

stash-origin/image-config.d/40-generate-auth-file.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1-
#!/bin/bash
1+
#!/bin/bash -x
2+
3+
dump_files () {
4+
local containing_dir
5+
shopt -s nullglob
6+
for f in "$containing_dir"/*; do
7+
echo "======= $f ======="
8+
cat "$f"
9+
echo
10+
done
11+
shopt -u nullglob
12+
}
213

314
# Generate the Authfiles and scitokens.conf file
415
if supervisord_is_enabled stash-origin; then
516
/usr/libexec/xcache/authfile-update stash-origin
17+
[[ "$?" -ne 0 ]] && dump_files /run/stash-origin
618
fi
7-
if supervisord_is_enabled stash-origin-auth; then
19+
if supervisord_is_enabled stash-origin-auth ||
20+
supervisord_is_enabled stash-origin-auth-privileged; then
821
/usr/libexec/xcache/authfile-update stash-origin-auth
22+
[[ "$?" -ne 0 ]] && dump_files /run/stash-origin-auth
923
fi
1024

1125

0 commit comments

Comments
 (0)