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
e13c3e48
Commit
e13c3e48
authored
Feb 10, 2017
by
Michail Kargakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more logs during the progress check
parent
ce998a9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
progress.go
pkg/controller/deployment/progress.go
+4
-0
deployment_util.go
pkg/controller/deployment/util/deployment_util.go
+6
-1
No files found.
pkg/controller/deployment/progress.go
View file @
e13c3e48
...
...
@@ -64,11 +64,15 @@ func (dc *DeploymentController) hasFailed(d *extensions.Deployment) (bool, error
// If the deployment is complete or it is progressing, there is no need to check if it
// has timed out.
// TODO: Switch to a much higher verbosity level
glog
.
V
(
2
)
.
Infof
(
"Checking if deployment %q is complete or progressing"
,
d
.
Name
)
if
util
.
DeploymentComplete
(
d
,
&
newStatus
)
||
util
.
DeploymentProgressing
(
d
,
&
newStatus
)
{
return
false
,
nil
}
// Check if the deployment has timed out.
// TODO: Switch to a much higher verbosity level
glog
.
V
(
2
)
.
Infof
(
"Checking if deployment %q has timed out"
,
d
.
Name
)
return
util
.
DeploymentTimedOut
(
d
,
&
newStatus
),
nil
}
...
...
pkg/controller/deployment/util/deployment_util.go
View file @
e13c3e48
...
...
@@ -867,8 +867,13 @@ func DeploymentTimedOut(deployment *extensions.Deployment, newStatus *extensions
// progress or tried to create a replica set, or resumed a paused deployment and
// compare against progressDeadlineSeconds.
from
:=
condition
.
LastUpdateTime
now
:=
nowFn
()
delta
:=
time
.
Duration
(
*
deployment
.
Spec
.
ProgressDeadlineSeconds
)
*
time
.
Second
return
from
.
Add
(
delta
)
.
Before
(
nowFn
())
timedOut
:=
from
.
Add
(
delta
)
.
Before
(
now
)
// TODO: Switch to a much higher verbosity level
glog
.
V
(
2
)
.
Infof
(
"Deployment %q timed out (%t) [last progress check: %v - now: %v]"
,
deployment
.
Name
,
timedOut
,
from
,
now
)
return
timedOut
}
// NewRSNewReplicas calculates the number of replicas a deployment's new RS should have.
...
...
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