Skip to content

Commit

Permalink
Stop the OVN database during the cleanup script
Browse files Browse the repository at this point in the history
Stop the DB server gracefully; this will also end the pod running script.
By executing the stop command in the backgroung, we guarantee to exit
this script and not fail with "FailedPreStopHook", while the database is
stopped and the pod exits.

Closes-Issue: OSPRH-8118
  • Loading branch information
ralonsoh committed Sep 23, 2024
1 parent d2e1e7c commit ee2ec81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions templates/ovndbcluster/bin/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@ if [[ "$(hostname)" != "{{ .SERVICE_NAME }}-0" ]]; then
# now that we left, the database file is no longer valid
cleanup_db_file
fi

# Stop the DB server gracefully; this will also end the pod running script.
# By executing the stop command in the background, we guarantee to exit
# this script and not fail with "FailedPreStopHook", while the database is
# stopped.
/usr/share/ovn/scripts/ovn-ctl stop_${DB_TYPE}_ovsdb &

0 comments on commit ee2ec81

Please sign in to comment.