Skip to content

Commit

Permalink
If shutdownGracePeriod is specified, but with 0s grace period, then d…
Browse files Browse the repository at this point in the history
…on't delay sriov shutdown
  • Loading branch information
jerpeter1 committed Mar 8, 2023
1 parent 7b9888f commit 08ff040
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bindata/scripts/clean-k8s-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ function clean_services() {
fi
}

# If the kubelet is configured to shutdown gracefully, we need to wait for
# If the kubelet is configured to shutdown gracefully (>0s shutdownGracePeriod), we need to wait for
# things to settle before shutting down the node.
if grep "$kubelet_config_path" -e shutdownGrace >/dev/null; then
if grep "$kubelet_config_path" -e shutdownGracePeriod | grep -qv \"0s\"; then
start=$(date +%s)
while [ $(( $(date +%s) - $start )) -lt $wait_time ]; do
if [ ! -f "$delay_shutdown_path" ]; then # don't have to wait anymore
Expand Down

0 comments on commit 08ff040

Please sign in to comment.