Skip to content

Commit

Permalink
Pick VID in configureInstallModeDHCP
Browse files Browse the repository at this point in the history
Signed-off-by: Jian Wang <[email protected]>

Co-authored-by: Kiefer Chang <[email protected]>
(cherry picked from commit 9e1027f)
  • Loading branch information
w13915984028 authored and bk201 committed Nov 7, 2024
1 parent 9098efa commit 964cad8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/console/install_panels.go
Original file line number Diff line number Diff line change
Expand Up @@ -2095,8 +2095,7 @@ func addInstallPanel(c *Console) error {
}

if needToGetVIPFromDHCP(c.config.VipMode, c.config.Vip, c.config.VipHwAddr) {
mgmtName := getManagementInterfaceName(c.config.ManagementInterface)
vip, err := getVipThroughDHCP(mgmtName)
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 Expand Up @@ -2265,8 +2264,7 @@ func addVIPPanel(c *Console) error {
spinner := NewSpinner(c.Gui, vipTextPanel, "Requesting IP through DHCP...")
spinner.Start()
go func(g *gocui.Gui) {
mgmtName := getManagementInterfaceName(c.config.ManagementInterface)
vip, err := getVipThroughDHCP(mgmtName)
vip, err := getVipThroughDHCP(getManagementInterfaceName(c.config.ManagementInterface))
if err != nil {
spinner.Stop(true, err.Error())
g.Update(func(_ *gocui.Gui) error {
Expand Down Expand Up @@ -2592,6 +2590,7 @@ func configureInstallModeDHCP(c *Console) {
mgmtNetwork.BondOptions = netDef.BondOptions
}
mgmtNetwork.Method = netDef.Method
mgmtNetwork.VlanID = netDef.VlanID

_, err := applyNetworks(
mgmtNetwork,
Expand Down

0 comments on commit 964cad8

Please sign in to comment.