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

fix error: interface counters is mismatch after warm-reboot #5346

Merged
merged 2 commits into from
Nov 20, 2020
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
16 changes: 16 additions & 0 deletions files/image_config/warmboot-finalizer/finalize-warmboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,20 @@ function stop_control_plane_assistant()
fi
}

function restore_counters_folder()
{
debug "Restoring counters folder after warmboot..."

modules=("portstat-0" "dropstat" "pfcstat-0" "queuestat-0" "intfstat-0")
for module in ${modules[@]}
do
statfile="/host/counters/$module"
if [[ -d $statfile ]]; then
yxieca marked this conversation as resolved.
Show resolved Hide resolved
mv $statfile /tmp/
fi
done
}


wait_for_database_service

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

restore_counters_folder

list=${COMP_LIST}

# Wait up to 5 minutes
Expand Down