From 51172a587bd1bdef402bacfba7767086c7dbec46 Mon Sep 17 00:00:00 2001 From: Jing Ai Date: Tue, 3 Oct 2017 16:55:36 -0700 Subject: [PATCH 1/2] Minior cleanup in pkg/controller/node/ipam/sync/sync.go --- pkg/controller/node/ipam/sync/sync.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pkg/controller/node/ipam/sync/sync.go b/pkg/controller/node/ipam/sync/sync.go index 60c9d59b6b1..67fc2c4c325 100644 --- a/pkg/controller/node/ipam/sync/sync.go +++ b/pkg/controller/node/ipam/sync/sync.go @@ -56,7 +56,7 @@ type kubeAPI interface { UpdateNodePodCIDR(ctx context.Context, node *v1.Node, cidrRange *net.IPNet) error // UpdateNodeNetworkUnavailable updates the network unavailable status for the node. UpdateNodeNetworkUnavailable(nodeName string, unavailable bool) error - // EmitNodeEvent emits an event for the given node. + // EmitNodeWarningEvent emits an event for the given node. EmitNodeWarningEvent(nodeName, reason, fmt string, args ...interface{}) } @@ -173,7 +173,7 @@ func (sync *NodeSync) Delete(node *v1.Node) { // syncOp is the interface for generic sync operation. type syncOp interface { - // run the requested sync operation. + // Run the requested sync operation. run(sync *NodeSync) error } @@ -263,11 +263,6 @@ func (op *updateOp) updateNodeFromAlias(ctx context.Context, sync *NodeSync, nod glog.V(2).Infof("Node %q PodCIDR set to %v", node.Name, aliasRange) - if err := sync.kubeAPI.UpdateNodeNetworkUnavailable(node.Name, false); err != nil { - glog.Errorf("Error setting route status for node %q: %v", node.Name, err) - return err - } - if err := sync.kubeAPI.UpdateNodeNetworkUnavailable(node.Name, false); err != nil { glog.Errorf("Could not update node NetworkUnavailable status to false: %v", err) return err From 688dab724970ba73316320b67263dd814d3b125b Mon Sep 17 00:00:00 2001 From: Jing Ai Date: Wed, 4 Oct 2017 11:01:04 -0700 Subject: [PATCH 2/2] revert the comment change from Run to run --- pkg/controller/node/ipam/sync/sync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/node/ipam/sync/sync.go b/pkg/controller/node/ipam/sync/sync.go index 67fc2c4c325..4995f425543 100644 --- a/pkg/controller/node/ipam/sync/sync.go +++ b/pkg/controller/node/ipam/sync/sync.go @@ -173,7 +173,7 @@ func (sync *NodeSync) Delete(node *v1.Node) { // syncOp is the interface for generic sync operation. type syncOp interface { - // Run the requested sync operation. + // run the requested sync operation. run(sync *NodeSync) error }