Skip to content

Commit 01045ce

Browse files
committed
Fix CrashLoopBackOff, ramdisk-logs no inotifywait
When updating the operators we end up recreating the conductor and inspector deployments. But the old service images does not yet have the required command: inotifywait - because of the missing command the pod enter CrashLoopBackOff state. To resolve the issue, the OpenstackVersion must be patch to update the container images. To workaround this issue, add a check for the inotifywait command, and in case it does not exist: a) Print a Warning b) Starta a tail for follow /dev/null to have the container do nothing forever. (e.g. until it is restarted with new service container images after patching the OpenstackVersion.) Jira: OSPRH-17520
1 parent cc3c9c9 commit 01045ce

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

templates/common/bin/runlogwatch.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
# Ramdisk logs path
44
LOG_DIR=${LOG_DIR:-/var/lib/ironic/ramdisk-logs}
55

6+
# NOTE(hjensas): OSPRH-17520
7+
if ! command -v inotifywait; then
8+
echo "WARNING: ramdisk-logs will not be captured, because the inotifywait command is missing. Please patch the OpenstackVersion to update container images."
9+
# Start a tail on /dev/null to do nothing forever
10+
tail -f /dev/null
11+
fi
12+
613
inotifywait -m "${LOG_DIR}" -e close_write |
714
while read -r path _action file; do
815
echo "************ Contents of ${path}${file} ramdisk log file bundle **************"

0 commit comments

Comments
 (0)