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
1ce99931
Commit
1ce99931
authored
Feb 12, 2015
by
Dawn Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better debugging log for investigating pod unknown status.
parent
20dc1c24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
pod_cache.go
pkg/master/pod_cache.go
+3
-3
No files found.
pkg/master/pod_cache.go
View file @
1ce99931
...
@@ -172,7 +172,7 @@ func (p *PodCache) computePodStatus(pod *api.Pod) (api.PodStatus, error) {
...
@@ -172,7 +172,7 @@ func (p *PodCache) computePodStatus(pod *api.Pod) (api.PodStatus, error) {
// Assigned to non-existing node.
// Assigned to non-existing node.
if
err
!=
nil
||
len
(
nodeStatus
.
Conditions
)
==
0
{
if
err
!=
nil
||
len
(
nodeStatus
.
Conditions
)
==
0
{
glog
.
V
(
5
)
.
Infof
(
"node doesn't exist: %v %v, setting pod
status to unknown"
,
err
,
nodeStatus
)
glog
.
V
(
5
)
.
Infof
(
"node doesn't exist: %v %v, setting pod
%q status to unknown"
,
err
,
nodeStatus
,
pod
.
Name
)
newStatus
.
Phase
=
api
.
PodUnknown
newStatus
.
Phase
=
api
.
PodUnknown
newStatus
.
Conditions
=
append
(
newStatus
.
Conditions
,
pod
.
Status
.
Conditions
...
)
newStatus
.
Conditions
=
append
(
newStatus
.
Conditions
,
pod
.
Status
.
Conditions
...
)
return
newStatus
,
nil
return
newStatus
,
nil
...
@@ -181,7 +181,7 @@ func (p *PodCache) computePodStatus(pod *api.Pod) (api.PodStatus, error) {
...
@@ -181,7 +181,7 @@ func (p *PodCache) computePodStatus(pod *api.Pod) (api.PodStatus, error) {
// Assigned to an unhealthy node.
// Assigned to an unhealthy node.
for
_
,
condition
:=
range
nodeStatus
.
Conditions
{
for
_
,
condition
:=
range
nodeStatus
.
Conditions
{
if
(
condition
.
Kind
==
api
.
NodeReady
||
condition
.
Kind
==
api
.
NodeReachable
)
&&
condition
.
Status
==
api
.
ConditionNone
{
if
(
condition
.
Kind
==
api
.
NodeReady
||
condition
.
Kind
==
api
.
NodeReachable
)
&&
condition
.
Status
==
api
.
ConditionNone
{
glog
.
V
(
5
)
.
Infof
(
"node status: %v, setting pod
status to unknown"
,
condition
)
glog
.
V
(
5
)
.
Infof
(
"node status: %v, setting pod
%q status to unknown"
,
condition
,
pod
.
Name
)
newStatus
.
Phase
=
api
.
PodUnknown
newStatus
.
Phase
=
api
.
PodUnknown
newStatus
.
Conditions
=
append
(
newStatus
.
Conditions
,
pod
.
Status
.
Conditions
...
)
newStatus
.
Conditions
=
append
(
newStatus
.
Conditions
,
pod
.
Status
.
Conditions
...
)
return
newStatus
,
nil
return
newStatus
,
nil
...
@@ -191,7 +191,7 @@ func (p *PodCache) computePodStatus(pod *api.Pod) (api.PodStatus, error) {
...
@@ -191,7 +191,7 @@ func (p *PodCache) computePodStatus(pod *api.Pod) (api.PodStatus, error) {
result
,
err
:=
p
.
containerInfo
.
GetPodStatus
(
pod
.
Status
.
Host
,
pod
.
Namespace
,
pod
.
Name
)
result
,
err
:=
p
.
containerInfo
.
GetPodStatus
(
pod
.
Status
.
Host
,
pod
.
Namespace
,
pod
.
Name
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Infof
(
"error getting pod %s status: %v, retry later"
,
pod
.
Name
,
err
)
glog
.
V
(
5
)
.
Infof
(
"error getting pod %s status: %v, retry later"
,
pod
.
Name
,
err
)
}
else
{
}
else
{
newStatus
.
HostIP
=
nodeStatus
.
HostIP
newStatus
.
HostIP
=
nodeStatus
.
HostIP
newStatus
.
Info
=
result
.
Status
.
Info
newStatus
.
Info
=
result
.
Status
.
Info
...
...
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