Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[control plane assistant] stop control plane assistant after warm reboot #3337

Merged
merged 1 commit into from
Aug 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions files/image_config/warmboot-finalizer/finalize-warmboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ function finalize_warm_boot()
sudo config warm_restart disable
}

function stop_control_plane_assistant()
{
if [[ -x ${ASSISTANT_SCRIPT} ]]; then
debug "Tearing down control plane assistant ..."
${ASSISTANT_SCRIPT} -m reset
fi
}


wait_for_database_service

Expand All @@ -78,11 +86,6 @@ if [[ x"${WARM_BOOT}" != x"true" ]]; then
exit 0
fi

# No need to wait for the reconciliation process. Database has been loaded
# and migrated. This is good enough to save a copy.
debug "Save in-memory database after warm reboot ..."
config save -y

list=${COMP_LIST}

# Wait up to 5 minutes
Expand All @@ -94,6 +97,12 @@ for i in `seq 60`; do
sleep 5
done

stop_control_plane_assistant

# Save DB after stopped control plane assistant to avoid extra entries
debug "Save in-memory database after warm reboot ..."
config save -y

if [[ -n "${list}" ]]; then
debug "Some components didn't finish reconcile: ${list} ..."
fi
Expand Down