Skip to content

Commit

Permalink
Sure DHCP will work on VLAN interface if VLAN is configured
Browse files Browse the repository at this point in the history
Signed-off-by: Jian Wang <[email protected]>
(cherry picked from commit aae8b1d)
  • Loading branch information
w13915984028 authored and mergify[bot] committed Nov 7, 2024
1 parent e29493c commit 86d4096
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/console/install_panels.go
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ func addNetworkPanel(c *Console) error {
c.config.ManagementInterface = mgmtNetwork

if mgmtNetwork.Method == config.NetworkMethodDHCP {
addr, err := getIPThroughDHCP(config.MgmtInterfaceName)
addr, err := getIPThroughDHCP(getManagementInterfaceName(c.config.ManagementInterface))
if err != nil {
return fmt.Sprintf("Requesting IP through DHCP failed: %s", err.Error()), nil
}
Expand Down Expand Up @@ -2571,14 +2571,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(c.config.ManagementInterface))
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(c.config.ManagementInterface))
if err != nil {
printToPanel(c.Gui, fmt.Sprintf("fail to get vip: %s", err), installPanel)
return
Expand Down

0 comments on commit 86d4096

Please sign in to comment.