Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
b309ace7
Commit
b309ace7
authored
Jun 16, 2018
by
Xianglin Gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kubeadm-upgrade: notify the user of manifest upgrade timeouts
Signed-off-by:
Xianglin Gao
<
xianglin.gxl@alibaba-inc.com
>
parent
410941b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
apply.go
cmd/kubeadm/app/cmd/upgrade/apply.go
+0
-2
common.go
cmd/kubeadm/app/cmd/upgrade/common.go
+1
-1
staticpods.go
cmd/kubeadm/app/phases/upgrade/staticpods.go
+6
-0
No files found.
cmd/kubeadm/app/cmd/upgrade/apply.go
View file @
b309ace7
...
...
@@ -42,8 +42,6 @@ import (
)
const
(
upgradeManifestTimeout
=
5
*
time
.
Minute
defaultImagePullTimeout
=
15
*
time
.
Minute
)
...
...
cmd/kubeadm/app/cmd/upgrade/common.go
View file @
b309ace7
...
...
@@ -178,7 +178,7 @@ func getWaiter(dryRun bool, client clientset.Interface) apiclient.Waiter {
if
dryRun
{
return
dryrunutil
.
NewWaiter
()
}
return
apiclient
.
NewKubeWaiter
(
client
,
upgradeManifestTimeout
,
os
.
Stdout
)
return
apiclient
.
NewKubeWaiter
(
client
,
upgrade
.
Upgrade
ManifestTimeout
,
os
.
Stdout
)
}
// InteractivelyConfirmUpgrade asks the user whether they _really_ want to upgrade.
...
...
cmd/kubeadm/app/phases/upgrade/staticpods.go
View file @
b309ace7
...
...
@@ -33,6 +33,11 @@ import (
"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
type
StaticPodPathManager
interface
{
// MoveFile should move a file from oldPath to newPath
...
...
@@ -228,6 +233,7 @@ func upgradeComponent(component string, waiter apiclient.Waiter, pathMgr StaticP
if
waitForComponentRestart
{
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
// notice the removal of the Static Pod, leading to a false positive below where we check that the API endpoint is healthy
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment