Skip to content

Commit

Permalink
fix(esxi): Disable automatically add host to the dvs
Browse files Browse the repository at this point in the history
  • Loading branch information
rainzm committed May 15, 2020
1 parent 2fe738b commit 3530bca
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pkg/multicloud/esxi/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -1326,13 +1326,14 @@ func (host *SHost) findVlanDVPG(vlanId int32) (*SDistributedVirtualPortgroup, er
if dvpg.ContainHost(host) {
return dvpg, nil
}
msg := "Find dvpg with correct vlan but it didn't contain this host"
log.Debugf(msg)
// add host to dvg
log.Debugf("Find dvpg with correct vlan but it didn't contain this host")
err := dvpg.AddHostToDVS(host)
if err != nil {
return nil, errors.Wrapf(err, "dvpg %s add host to dvs error", dvpg.GetName())
}
return dvpg, nil
// err := dvpg.AddHostToDVS(host)
// if err != nil {
// return nil, errors.Wrapf(err, "dvpg %s add host to dvs error", dvpg.GetName())
// }
continue
}
}
return nil, nil
Expand Down

0 comments on commit 3530bca

Please sign in to comment.