Skip to content

Commit

Permalink
bug fix for autonomous (#441)
Browse files Browse the repository at this point in the history
* auto open the autonomous when convert edgenode

* Update edgenode.go

fix the bug: Operate node but node is not latest.
  • Loading branch information
JameKeal authored Aug 31, 2021
1 parent 2267806 commit 55ca955
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/yurtctl/cmd/convert/edgenode.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,14 @@ func (c *ConvertEdgeNodeOptions) RunConvertEdgeNode() (err error) {
if err != nil {
return err
}
_, err = kubeutil.LabelNode(c.clientSet, node, projectinfo.GetEdgeWorkerLabelKey(), "true")
node, err = kubeutil.LabelNode(c.clientSet, node, projectinfo.GetEdgeWorkerLabelKey(), "true")
if err != nil {
return err
}

// 3.6. open the autonomous
klog.Infof("open the %s autonomous", nodeName)
_, err = kubeutil.AnnotateNode(c.clientSet, node, constants.AnnotationAutonomy, "true")
if err != nil {
return err
}
Expand Down

0 comments on commit 55ca955

Please sign in to comment.