diff --git a/ironic-image/Dockerfile b/ironic-image/Dockerfile index 8c7d04a..3f779c1 100644 --- a/ironic-image/Dockerfile +++ b/ironic-image/Dockerfile @@ -20,11 +20,11 @@ RUN sed -i -e 's%^# rpm.install.excludedocs = no.*%rpm.install.excludedocs = yes #!ArchExclusiveLine: x86_64 RUN if [ "$(uname -m)" = "x86_64" ];then \ - zypper --installroot /installroot --non-interactive install --no-recommends syslinux python311-devel python311 python311-pip python-dracclient python311-sushy-oem-idrac python311-proliantutils python311-sushy python3-ironicclient git curl sles-release tar gzip vim gawk dnsmasq dosfstools apache2 apache2-mod_wsgi inotify-tools ipcalc ipmitool iproute2 procps qemu-tools sqlite3 util-linux xorriso tftp ipxe-bootimgs python311-sushy-tools crudini openstack-ironic openstack-ironic-inspector-api; \ + zypper --installroot /installroot --non-interactive install --no-recommends syslinux python311-devel python311 python311-pip python-dracclient python311-sushy-oem-idrac python311-proliantutils python311-sushy python311-pyinotify python3-ironicclient git curl sles-release tar gzip vim gawk dnsmasq dosfstools apache2 apache2-mod_wsgi ipcalc ipmitool iproute2 procps qemu-tools sqlite3 util-linux xorriso tftp ipxe-bootimgs python311-sushy-tools crudini openstack-ironic openstack-ironic-inspector-api; \ fi #!ArchExclusiveLine: aarch64 RUN if [ "$(uname -m)" = "aarch64" ];then \ - zypper --installroot /installroot --non-interactive install --no-recommends python311-devel python311 python311-pip python-dracclient python311-sushy-oem-idrac python311-proliantutils python311-sushy python3-ironicclient git curl sles-release tar gzip vim gawk dnsmasq dosfstools apache2 apache2-mod_wsgi inotify-tools ipcalc ipmitool iproute2 procps qemu-tools sqlite3 util-linux xorriso tftp ipxe-bootimgs python311-sushy-tools crudini openstack-ironic openstack-ironic-inspector-api; \ + zypper --installroot /installroot --non-interactive install --no-recommends python311-devel python311 python311-pip python-dracclient python311-sushy-oem-idrac python311-proliantutils python311-sushy python311-pyinotify python3-ironicclient git curl sles-release tar gzip vim gawk dnsmasq dosfstools apache2 apache2-mod_wsgi ipcalc ipmitool iproute2 procps qemu-tools sqlite3 util-linux xorriso tftp ipxe-bootimgs python311-sushy-tools crudini openstack-ironic openstack-ironic-inspector-api; \ fi # DATABASE diff --git a/ironic-image/runhttpd b/ironic-image/runhttpd index e5b8dcc..d6175ba 100644 --- a/ironic-image/runhttpd +++ b/ironic-image/runhttpd @@ -72,7 +72,7 @@ fi # Set up inotify to kill the container (restart) whenever cert files for ironic api change if [[ "$IRONIC_TLS_SETUP" == "true" ]] && [[ "${RESTART_CONTAINER_CERTIFICATE_UPDATED}" == "true" ]]; then # shellcheck disable=SC2034 - inotifywait -m -e delete_self "${IRONIC_CERT_FILE}" | while read -r file event; do + python3.11 -m pyinotify --raw-format -e IN_DELETE_SELF -v "${IRONIC_CERT_FILE}" | while read -r file event; do kill -WINCH $(pgrep httpd) done & fi @@ -80,7 +80,7 @@ fi # Set up inotify to kill the container (restart) whenever cert of httpd for /shared/html/ path change if [[ "$IRONIC_VMEDIA_TLS_SETUP" == "true" ]] && [[ "${RESTART_CONTAINER_CERTIFICATE_UPDATED}" == "true" ]]; then # shellcheck disable=SC2034 - inotifywait -m -e delete_self "${IRONIC_VMEDIA_CERT_FILE}" | while read -r file event; do + python3.11 -m pyinotify --raw-format -e IN_DELETE_SELF -v "${IRONIC_VMEDIA_CERT_FILE}" | while read -r file event; do kill -WINCH $(pgrep httpd) done & fi diff --git a/ironic-image/runironic b/ironic-image/runironic index 067a065..d782fe1 100644 --- a/ironic-image/runironic +++ b/ironic-image/runironic @@ -13,7 +13,7 @@ run_ironic_dbsync if [[ "$IRONIC_TLS_SETUP" == "true" ]] && [[ "${RESTART_CONTAINER_CERTIFICATE_UPDATED}" == "true" ]]; then # shellcheck disable=SC2034 - inotifywait -m -e delete_self "${IRONIC_CERT_FILE}" | while read -r file event; do + python3.11 -m pyinotify --raw-format -e IN_DELETE_SELF -v "${IRONIC_CERT_FILE}" | while read -r file event; do kill $(pgrep ironic) done & fi diff --git a/ironic-image/runlogwatch.sh b/ironic-image/runlogwatch.sh index b5bcabb..a2255d2 100644 --- a/ironic-image/runlogwatch.sh +++ b/ironic-image/runlogwatch.sh @@ -11,7 +11,7 @@ while [ ! -d "${LOG_DIR}" ]; do sleep 5 done -inotifywait -m "${LOG_DIR}" -e close_write | +python3.11 -m pyinotify --raw-format -e IN_CLOSE_WRITE -v "${LOG_DIR}" | while read -r path _action file; do echo "************ Contents of ${path}/${file} ramdisk log file bundle **************" tar -xOzvvf "${path}/${file}" | sed -e "s/^/${file}: /"