mirror of
https://github.com/rancher/os.git
synced 2025-09-19 00:59:53 +00:00
Swap the remove and apply IP order - seem to fix the problem
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
@@ -402,11 +402,6 @@ func applyInterfaceConfig(link netlink.Link, netConf InterfaceConfig) error {
|
||||
addrMap := make(map[string]bool)
|
||||
for _, address := range addresses {
|
||||
addrMap[address] = true
|
||||
log.Infof("Applying %s to %s", address, link.Attrs().Name)
|
||||
err := applyAddress(address, link, netConf)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to apply address %s to %s: %v", address, link.Attrs().Name, err)
|
||||
}
|
||||
}
|
||||
for _, addr := range existingAddrs {
|
||||
if _, ok := addrMap[addr.IPNet.String()]; !ok {
|
||||
@@ -419,6 +414,13 @@ func applyInterfaceConfig(link netlink.Link, netConf InterfaceConfig) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, address := range addresses {
|
||||
log.Infof("Applying %s to %s", address, link.Attrs().Name)
|
||||
err := applyAddress(address, link, netConf)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to apply address %s to %s: %v", address, link.Attrs().Name, err)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: can we set to default?
|
||||
if netConf.MTU > 0 {
|
||||
|
Reference in New Issue
Block a user