From 4d089b9fc0a7002a377b28f5867be0c4b342d04b Mon Sep 17 00:00:00 2001 From: Brian Lin Date: Thu, 6 Jul 2023 13:44:09 -0500 Subject: [PATCH 1/3] Dump Authfile debugging info into the container log (SOFTWARE-5614) --- stash-origin/image-config.d/40-generate-auth-file.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stash-origin/image-config.d/40-generate-auth-file.sh b/stash-origin/image-config.d/40-generate-auth-file.sh index 84badf6..868f9bf 100755 --- a/stash-origin/image-config.d/40-generate-auth-file.sh +++ b/stash-origin/image-config.d/40-generate-auth-file.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -x # Generate the Authfiles and scitokens.conf file if supervisord_is_enabled stash-origin; then From fa7d1de8beeef2ab400caed0445bc661a3ab0be7 Mon Sep 17 00:00:00 2001 From: Brian Lin Date: Thu, 13 Jul 2023 15:18:32 -0500 Subject: [PATCH 2/3] Ensure Authfile generation for multiuser origins (SOFTWARE-5614) --- stash-origin/image-config.d/40-generate-auth-file.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stash-origin/image-config.d/40-generate-auth-file.sh b/stash-origin/image-config.d/40-generate-auth-file.sh index 868f9bf..d01e170 100755 --- a/stash-origin/image-config.d/40-generate-auth-file.sh +++ b/stash-origin/image-config.d/40-generate-auth-file.sh @@ -4,7 +4,8 @@ if supervisord_is_enabled stash-origin; then /usr/libexec/xcache/authfile-update 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 fi From 9e84557901c34bbf2f07b6821da4988ad1210dc7 Mon Sep 17 00:00:00 2001 From: Brian Lin Date: Thu, 13 Jul 2023 15:30:46 -0500 Subject: [PATCH 3/3] Dump auth config contents (SOFTWARE-5614) --- .../image-config.d/40-generate-auth-file.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/stash-origin/image-config.d/40-generate-auth-file.sh b/stash-origin/image-config.d/40-generate-auth-file.sh index d01e170..c2ca618 100755 --- a/stash-origin/image-config.d/40-generate-auth-file.sh +++ b/stash-origin/image-config.d/40-generate-auth-file.sh @@ -1,12 +1,25 @@ #!/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 || 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