You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to use this image on multiple Openshift 4.7 platforms, where the httpd service needs to be configured independently, and I can't afford rebuilding a new image for each cluster (all clusters are supposed to use the same images for alignment sake)
When mounting a first ConfigMap into /opt/app-root/src/httpd-cfg with .conf files, the script run-httpd > pre-init/20-copy-config.sh > process_config_files fails when trying to delete the read only files [1].
When mounting a second ConfigMap into /opt/app-root/src/httpd-pre-init with .sh files, the script run-httpd > process_extending_files only lists actual files (not symlinks) [2] while ConfigMap volumes rather provide symlinks to the actual files in a timestamped subfolder [3].
This makes the image difficult to configure at runtime, and prevents my current usecase to be implemented.
Would it be possible to update the way configuration is processed so that use of ConfigMaps can work?
Thanks for your help
FWIW this is similar to our use case, which fails on startup with:
sed: cannot rename /etc/httpd/conf/sedfNzfTt: Device or resource busy
when using a ConfigMap to manage the /etc/httpd/conf/httpd.conf file
In looking at the code for /usr/share/container-scripts/httpd/common.sh, wrapping the sed commands with something like "if [ -w ${HTTPD_MAIN_CONF_PATH}/httpd.conf ]" would probably fix it.
I try to use this image on multiple Openshift 4.7 platforms, where the httpd service needs to be configured independently, and I can't afford rebuilding a new image for each cluster (all clusters are supposed to use the same images for alignment sake)
Therefore I'm trying to mount ConfigMaps volumes at pod runtime, containing httpd-configuration files and httpd-pre-init scripts so that the specific configuration is provided at runtime (similarly to what is described here https://github.com/sclorg/httpd-container/tree/master/2.4#direct-usage-with-a-mounted-directory )
When mounting a first ConfigMap into
/opt/app-root/src/httpd-cfg
with .conf files, the scriptrun-httpd > pre-init/20-copy-config.sh > process_config_files
fails when trying to delete the read only files [1].When mounting a second ConfigMap into
/opt/app-root/src/httpd-pre-init
with .sh files, the scriptrun-httpd > process_extending_files
only lists actual files (not symlinks) [2] while ConfigMap volumes rather provide symlinks to the actual files in a timestamped subfolder [3].This makes the image difficult to configure at runtime, and prevents my current usecase to be implemented.
Would it be possible to update the way configuration is processed so that use of ConfigMaps can work?
Thanks for your help
Refs:
[1] rm fails on readonly volumes
https://github.com/sclorg/httpd-container/blob/master/2.4/root/usr/share/container-scripts/httpd/common.sh#L164
[2] only files are listed
https://github.com/sclorg/httpd-container/blob/master/2.4/root/usr/share/container-scripts/httpd/common.sh#L117-L142
[3] ConfigMap mount example
The text was updated successfully, but these errors were encountered: