Skip to content

Commit

Permalink
Merge pull request #105 from brianhlin/SOFTWARE-5614.debug-authfile-race
Browse files Browse the repository at this point in the history
Dump Authfile debugging info into the container log (SOFTWARE-5614)
  • Loading branch information
matyasselmeci authored Jul 14, 2023
2 parents 1a0e749 + 9e84557 commit 1cf8675
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions stash-origin/image-config.d/40-generate-auth-file.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
#!/bin/bash
#!/bin/bash -x

dump_files () {
local containing_dir
shopt -s nullglob
for f in "$containing_dir"/*; do
echo "======= $f ======="
cat "$f"
echo
done
shopt -u nullglob
}

# Generate the Authfiles and scitokens.conf file
if supervisord_is_enabled stash-origin; then
/usr/libexec/xcache/authfile-update stash-origin
[[ "$?" -ne 0 ]] && dump_files /run/stash-origin
fi
if supervisord_is_enabled stash-origin-auth; then
if supervisord_is_enabled stash-origin-auth ||
supervisord_is_enabled stash-origin-auth-privileged; then
/usr/libexec/xcache/authfile-update stash-origin-auth
[[ "$?" -ne 0 ]] && dump_files /run/stash-origin-auth
fi


Expand Down

0 comments on commit 1cf8675

Please sign in to comment.