Skip to content

Commit

Permalink
fix: scale-up new node bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevent-fei committed Feb 16, 2023
1 parent 866a48f commit 88c989f
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions pkg/registry/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,7 @@ func (c *localConfigurator) UninstallFrom(deletedMasters, deletedNodes []net.IP)
if err := c.removeRegistryConfig(all); err != nil {
return err
}
if !*c.HA {
return nil
}
// if current deployHosts is null,means clean all, just return.
if len(c.deployHosts) == 0 {
return nil
}

// flush ipvs policy on remain nodes
return c.configureLvs(c.deployHosts, netutils.RemoveIPs(c.infraDriver.GetHostIPListByRole(common.NODE), deletedNodes))
return nil
}

func (c *localConfigurator) removeRegistryConfig(hosts []net.IP) error {
Expand Down Expand Up @@ -148,7 +139,7 @@ func (c *localConfigurator) configureRegistryNetwork(masters, nodes []net.IP) er
return err
}

return c.configureLvs(c.deployHosts, c.infraDriver.GetHostIPListByRole(common.NODE))
return c.configureLvs(c.deployHosts, nodes)
}

func (c *localConfigurator) configureLvs(registryHosts, clientHosts []net.IP) error {
Expand Down

0 comments on commit 88c989f

Please sign in to comment.