diff --git a/pkg/console/install_panels.go b/pkg/console/install_panels.go index 57100635b..06e9102ee 100644 --- a/pkg/console/install_panels.go +++ b/pkg/console/install_panels.go @@ -1399,7 +1399,7 @@ func addNetworkPanel(c *Console) error { c.config.ManagementInterface = mgmtNetwork if mgmtNetwork.Method == config.NetworkMethodDHCP { - addr, err := getIPThroughDHCP(config.MgmtInterfaceName) + addr, err := getIPThroughDHCP(getManagementInterfaceName(mgmtNetwork)) if err != nil { return fmt.Sprintf("Requesting IP through DHCP failed: %s", err.Error()), nil } @@ -2602,14 +2602,14 @@ func configureInstallModeDHCP(c *Console) { printToPanel(c.Gui, fmt.Sprintf("error applying network configuration: %s", err.Error()), installPanel) } - _, err = getIPThroughDHCP(config.MgmtInterfaceName) + _, err = getIPThroughDHCP(getManagementInterfaceName(mgmtNetwork)) if err != nil { printToPanel(c.Gui, fmt.Sprintf("error getting DHCP address: %s", err.Error()), installPanel) } // if need vip via dhcp if c.config.Install.VipMode == config.NetworkMethodDHCP { - vip, err := getVipThroughDHCP(config.MgmtInterfaceName) + vip, err := getVipThroughDHCP(getManagementInterfaceName(mgmtNetwork)) if err != nil { printToPanel(c.Gui, fmt.Sprintf("fail to get vip: %s", err), installPanel) return diff --git a/pkg/console/vip.go b/pkg/console/vip.go index e5a60d5b7..446c04395 100644 --- a/pkg/console/vip.go +++ b/pkg/console/vip.go @@ -80,6 +80,7 @@ func getVipThroughDHCP(iface string) (*vipAddr, error) { } func getIPThroughDHCP(iface string) (net.IP, error) { + logrus.Infof("Get IP through DHCP via interface %s", iface) broadcast, err := nclient4.New(iface) if err != nil { return nil, err