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
a40b15d8
Commit
a40b15d8
authored
Dec 01, 2016
by
Seth Jennings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
error in setNodeStatus func should not abort node status update
parent
b6f466ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
kubelet_node_status.go
pkg/kubelet/kubelet_node_status.go
+4
-9
No files found.
pkg/kubelet/kubelet_node_status.go
View file @
a40b15d8
...
@@ -299,9 +299,7 @@ func (kl *Kubelet) initialNode() (*v1.Node, error) {
...
@@ -299,9 +299,7 @@ func (kl *Kubelet) initialNode() (*v1.Node, error) {
}
}
}
}
}
}
if
err
:=
kl
.
setNodeStatus
(
node
);
err
!=
nil
{
kl
.
setNodeStatus
(
node
)
return
nil
,
err
}
return
node
,
nil
return
node
,
nil
}
}
...
@@ -375,9 +373,7 @@ func (kl *Kubelet) tryUpdateNodeStatus(tryNumber int) error {
...
@@ -375,9 +373,7 @@ func (kl *Kubelet) tryUpdateNodeStatus(tryNumber int) error {
kl
.
updatePodCIDR
(
node
.
Spec
.
PodCIDR
)
kl
.
updatePodCIDR
(
node
.
Spec
.
PodCIDR
)
if
err
:=
kl
.
setNodeStatus
(
node
);
err
!=
nil
{
kl
.
setNodeStatus
(
node
)
return
err
}
// Patch the current status on the API server
// Patch the current status on the API server
updatedNode
,
err
:=
nodeutil
.
PatchNodeStatus
(
kl
.
kubeClient
,
types
.
NodeName
(
kl
.
nodeName
),
originalNode
,
node
)
updatedNode
,
err
:=
nodeutil
.
PatchNodeStatus
(
kl
.
kubeClient
,
types
.
NodeName
(
kl
.
nodeName
),
originalNode
,
node
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -902,13 +898,12 @@ func (kl *Kubelet) setNodeVolumesInUseStatus(node *v1.Node) {
...
@@ -902,13 +898,12 @@ func (kl *Kubelet) setNodeVolumesInUseStatus(node *v1.Node) {
// any fields that are currently set.
// any fields that are currently set.
// TODO(madhusudancs): Simplify the logic for setting node conditions and
// TODO(madhusudancs): Simplify the logic for setting node conditions and
// refactor the node status condition code out to a different file.
// refactor the node status condition code out to a different file.
func
(
kl
*
Kubelet
)
setNodeStatus
(
node
*
v1
.
Node
)
error
{
func
(
kl
*
Kubelet
)
setNodeStatus
(
node
*
v1
.
Node
)
{
for
_
,
f
:=
range
kl
.
setNodeStatusFuncs
{
for
_
,
f
:=
range
kl
.
setNodeStatusFuncs
{
if
err
:=
f
(
node
);
err
!=
nil
{
if
err
:=
f
(
node
);
err
!=
nil
{
return
err
glog
.
Warningf
(
"Failed to set some node status fields: %s"
,
err
)
}
}
}
}
return
nil
}
}
// defaultNodeStatusFuncs is a factory that generates the default set of
// defaultNodeStatusFuncs is a factory that generates the default set of
...
...
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