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:
529
529
# ephemeral volumes could also work, ... but that config is even deeper.
530
530
command :
531
531
- ' sh'
532
- - ' -ec'
532
+ # -e => exit on failure
533
+ # -E => trap ERR is inherited in subfunctions
534
+ - ' -eEc'
533
535
- |
534
536
cat << 'INTRO'
535
537
Testing write permissions for packs volumes.
@@ -538,6 +540,16 @@ spec:
538
540
and then delete this st2canary pod manually.
539
541
INTRO
540
542
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
+
541
553
for volume in packs virtualenvs {{ if $.Values.st2.packs.volumes.configs }}configs{{ end }}; do
542
554
echo Testing write permissions on ${volume} volume...
543
555
touch /opt/stackstorm/${volume}/.write-test
You can’t perform that action at this time.
0 commit comments