File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -529,7 +529,9 @@ spec:
529529 # ephemeral volumes could also work, ... but that config is even deeper.
530530 command :
531531 - ' sh'
532- - ' -ec'
532+ # -e => exit on failure
533+ # -E => trap ERR is inherited in subfunctions
534+ - ' -eEc'
533535 - |
534536 cat << 'INTRO'
535537 Testing write permissions for packs volumes.
@@ -538,6 +540,16 @@ spec:
538540 and then delete this st2canary pod manually.
539541 INTRO
540542
543+ function __handle_error__(){
544+ cat <<- 'FAIL'
545+ ERROR: The volumes defined in st2.packs.volumes must use ReadWriteMany (RWX) access mode
546+ so StackStorm can dynamically install packs from any of the st2actionrunner pods
547+ and have those file changes available in all of the other StackStorm pods.
548+ see: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes
549+ FAIL
550+ }
551+ trap __handle_error__ ERR
552+
541553 for volume in packs virtualenvs {{ if $.Values.st2.packs.volumes.configs }}configs{{ end }}; do
542554 echo Testing write permissions on ${volume} volume...
543555 touch /opt/stackstorm/${volume}/.write-test
You can’t perform that action at this time.
0 commit comments