@@ -294,15 +294,6 @@ func (c *Controller) InitIPAM() error {
294
294
}
295
295
}
296
296
297
- result , err := c .ovnLegacyClient .CustomFindEntity ("logical_switch_port" , []string {"name" }, `external-ids:vendor{<}""` )
298
- if err != nil {
299
- klog .Errorf ("failed to find logical switch port without external-ids:vendor: %v" , err )
300
- }
301
- lspWithoutVendor := make (map [string ]struct {}, len (result ))
302
- for _ , lsp := range result {
303
- lspWithoutVendor [lsp ["name" ][0 ]] = struct {}{}
304
- }
305
-
306
297
pods , err := c .podsLister .List (labels .Everything ())
307
298
if err != nil {
308
299
klog .Errorf ("failed to list pods: %v" , err )
@@ -370,12 +361,6 @@ func (c *Controller) InitIPAM() error {
370
361
klog .Errorf ("failed to create/update ips CR %s.%s with ip address %s: %v" , podName , pod .Namespace , ip , err )
371
362
}
372
363
}
373
-
374
- if _ , ok := lspWithoutVendor [portName ]; ok {
375
- if err = c .initAppendLspExternalIds (portName , pod ); err != nil {
376
- klog .Errorf ("failed to append external-ids for logical switch port %s: %v" , portName , err )
377
- }
378
- }
379
364
// Append ExternalIds is added in v1.7, used for upgrading from v1.6.3. It should be deleted now since v1.7 is not used anymore.
380
365
}
381
366
}
@@ -441,12 +426,6 @@ func (c *Controller) InitIPAM() error {
441
426
if v4IP != "" && v6IP != "" {
442
427
node .Annotations [util .IpAddressAnnotation ] = util .GetStringIP (v4IP , v6IP )
443
428
}
444
-
445
- if _ , ok := lspWithoutVendor [portName ]; ok {
446
- if err = c .initAppendLspExternalIds (portName , nil ); err != nil {
447
- klog .Errorf ("failed to append external-ids for logical switch port %s: %v" , portName , err )
448
- }
449
- }
450
429
}
451
430
}
452
431
@@ -767,21 +746,6 @@ func (c *Controller) initNodeRoutes() error {
767
746
return nil
768
747
}
769
748
770
- func (c * Controller ) initAppendLspExternalIds (portName string , pod * v1.Pod ) error {
771
- externalIDs := make (map [string ]string , 2 )
772
- externalIDs ["vendor" ] = util .CniTypeName
773
- if pod != nil {
774
- externalIDs ["pod" ] = fmt .Sprintf ("%s/%s" , pod .Namespace , pod .Name )
775
- }
776
-
777
- if err := c .ovnLegacyClient .SetLspExternalIds (portName , externalIDs ); err != nil {
778
- klog .Errorf ("failed to set lsp external_ids for port %s: %v" , portName , err )
779
- return err
780
- }
781
-
782
- return nil
783
- }
784
-
785
749
func (c * Controller ) initNodeChassis () error {
786
750
nodes , err := c .nodesLister .List (labels .Everything ())
787
751
if err != nil {
0 commit comments