Skip to content

Commit

Permalink
return only on error for tryAssignIPs method
Browse files Browse the repository at this point in the history
(cherry picked from commit 0492ba9)
  • Loading branch information
nithu0115 authored and jayanthvn committed Aug 19, 2020
1 parent 7f0c98a commit 7197496
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/ipamd/ipamd.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ func (c *IPAMContext) nodeInit() error {
increasedPool, err := c.tryAssignIPs()
if err == nil && increasedPool {
c.updateLastNodeIPPoolAction()
} else {
} else if err != nil {
return err
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/networkutils/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ func (n *linuxNetwork) DeleteRuleListBySrc(src net.IPNet) error {

// UpdateRuleListBySrc modify IP rules that have a matching source IP
func (n *linuxNetwork) UpdateRuleListBySrc(ruleList []netlink.Rule, src net.IPNet, toCIDRs []string, requiresSNAT bool) error {
log.Infof("Update Rule List[%v] for source[%v] with toCIDRs[%v], excludeSNATCIDRs[%v], requiresSNAT[%v]",
log.Debugf("Update Rule List[%v] for source[%v] with toCIDRs[%v], excludeSNATCIDRs[%v], requiresSNAT[%v]",
ruleList, src, toCIDRs, n.excludeSNATCIDRs, requiresSNAT)

srcRuleList, err := n.GetRuleListBySrc(ruleList, src)
Expand Down

0 comments on commit 7197496

Please sign in to comment.