fix(xnat): Properties file customizations no longer silently ignored for XNAT 1.10+ - #43
Conversation
…han root-owned ${XNAT_HOME} + runs script with -e flag
|
Nice fix, and the diagnosis is exactly right: the old flow wrote the properties into the root-owned A few things I checked that all hold up:
One small request: the diff drops the rationale comment above Two optional notes, neither blocking:
Since you're hardening failure behavior anyway, set -u would catch an unset LGTM either way. |
When running the chart against an XNAT 1.10 image and writing contents to
xnat-conf.properties, xnat started correctly but failed to pick up my properties. The cause was the non-root init container failing to write the properties file to the image's root-owned${XNAT_HOME}due to a permissions error, but still exiting0.Two changes in this diff:
${XNAT_HOME}to the/XNAT_HOMEvolume at the start, rather than at the end. This way we never write anything to the root-owned${XNAT_HOME}.-eflag, so errors in writing or copying the files will fail init. Without this it was harder to track down the source of the issue, because the init container's script seemed to be operating correctly.[ -d /TOMCAT ] && ...into an explicitif [ -d /TOMCAT ]; then ..., because the former would cause a spurious script failure under-ewhere the latter correctly just moves on.