Commit b309ace7 authored by Xianglin Gao's avatar Xianglin Gao

kubeadm-upgrade: notify the user of manifest upgrade timeouts

parent 410941b4
...@@ -42,8 +42,6 @@ import ( ...@@ -42,8 +42,6 @@ import (
) )
const ( const (
upgradeManifestTimeout = 5 * time.Minute
defaultImagePullTimeout = 15 * time.Minute defaultImagePullTimeout = 15 * time.Minute
) )
......
...@@ -178,7 +178,7 @@ func getWaiter(dryRun bool, client clientset.Interface) apiclient.Waiter { ...@@ -178,7 +178,7 @@ func getWaiter(dryRun bool, client clientset.Interface) apiclient.Waiter {
if dryRun { if dryRun {
return dryrunutil.NewWaiter() return dryrunutil.NewWaiter()
} }
return apiclient.NewKubeWaiter(client, upgradeManifestTimeout, os.Stdout) return apiclient.NewKubeWaiter(client, upgrade.UpgradeManifestTimeout, os.Stdout)
} }
// InteractivelyConfirmUpgrade asks the user whether they _really_ want to upgrade. // InteractivelyConfirmUpgrade asks the user whether they _really_ want to upgrade.
......
...@@ -33,6 +33,11 @@ import ( ...@@ -33,6 +33,11 @@ import (
"k8s.io/kubernetes/pkg/util/version" "k8s.io/kubernetes/pkg/util/version"
) )
const (
// UpgradeManifestTimeout is timeout of upgrading the static pod manifest
UpgradeManifestTimeout = 5 * time.Minute
)
// StaticPodPathManager is responsible for tracking the directories used in the static pod upgrade transition // StaticPodPathManager is responsible for tracking the directories used in the static pod upgrade transition
type StaticPodPathManager interface { type StaticPodPathManager interface {
// MoveFile should move a file from oldPath to newPath // MoveFile should move a file from oldPath to newPath
...@@ -228,6 +233,7 @@ func upgradeComponent(component string, waiter apiclient.Waiter, pathMgr StaticP ...@@ -228,6 +233,7 @@ func upgradeComponent(component string, waiter apiclient.Waiter, pathMgr StaticP
if waitForComponentRestart { if waitForComponentRestart {
fmt.Println("[upgrade/staticpods] Waiting for the kubelet to restart the component") fmt.Println("[upgrade/staticpods] Waiting for the kubelet to restart the component")
fmt.Printf("[upgrade/staticpods] This might take a minute or longer depending on the component/version gap (timeout %v\n", UpgradeManifestTimeout)
// Wait for the mirror Pod hash to change; otherwise we'll run into race conditions here when the kubelet hasn't had time to // Wait for the mirror Pod hash to change; otherwise we'll run into race conditions here when the kubelet hasn't had time to
// notice the removal of the Static Pod, leading to a false positive below where we check that the API endpoint is healthy // notice the removal of the Static Pod, leading to a false positive below where we check that the API endpoint is healthy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment