Skip to content

Commit bad86a3

Browse files
committed
fix repeate set chassis
1 parent 88b5912 commit bad86a3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/controller/init.go

+8
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,14 @@ func (c *Controller) initNodeChassis() error {
853853
for _, node := range nodes {
854854
chassisName := node.Annotations[util.ChassisAnnotation]
855855
if chassisName != "" {
856+
existChasisId, err := c.ovnLegacyClient.GetChassis(node.Name)
857+
if err != nil {
858+
klog.Errorf("failed to get chassis id: %v", err)
859+
return err
860+
}
861+
if existChasisId == chassisName {
862+
continue
863+
}
856864
exist, err := c.ovnLegacyClient.ChassisExist(chassisName)
857865
if err != nil {
858866
klog.Errorf("failed to check chassis exist: %v", err)

0 commit comments

Comments
 (0)