Skip to content

Commit

Permalink
fix: check chassis before creation (#3482)
Browse files Browse the repository at this point in the history
Signed-off-by: bobz965 <[email protected]>
  • Loading branch information
bobz965 committed Dec 4, 2023
1 parent 023ad57 commit 637b781
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/ovs/ovn-nb-gateway_chassis.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,15 @@ func (c *OVNNbClient) CreateGatewayChassisesOp(lrpName string, chassises []strin

for i, chassisName := range chassises {
gwChassisName := lrpName + "-" + chassisName
gwChassis, err := c.newGatewayChassis(gwChassisName, chassisName, 100-i)
gwChassis, err := c.GetGatewayChassis(chassisName, true)
if err != nil {
klog.Error(err)
return nil, err
}
if gwChassis != nil {
continue
}
gwChassis, err = c.newGatewayChassis(gwChassisName, chassisName, 100-i)
if err != nil {
klog.Error(err)
return nil, err
Expand Down

0 comments on commit 637b781

Please sign in to comment.