/
pod_configuration.go
585 lines (539 loc) · 20.9 KB
/
pod_configuration.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
// Copyright 2019 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cniserver
import (
"encoding/json"
"fmt"
"net"
"strings"
"github.com/containernetworking/cni/pkg/types/current"
"github.com/containernetworking/cni/pkg/version"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/klog/v2"
"antrea.io/antrea/pkg/agent/cniserver/ipam"
"antrea.io/antrea/pkg/agent/cniserver/types"
"antrea.io/antrea/pkg/agent/interfacestore"
"antrea.io/antrea/pkg/agent/openflow"
"antrea.io/antrea/pkg/agent/route"
"antrea.io/antrea/pkg/agent/secondarynetwork/cnipodcache"
agenttypes "antrea.io/antrea/pkg/agent/types"
"antrea.io/antrea/pkg/agent/util"
"antrea.io/antrea/pkg/ovs/ovsconfig"
"antrea.io/antrea/pkg/util/channel"
"antrea.io/antrea/pkg/util/k8s"
)
type vethPair struct {
name string
ifIndex int
peerIndex int
}
const (
ovsExternalIDMAC = "attached-mac"
ovsExternalIDIP = "ip-address"
ovsExternalIDContainerID = "container-id"
ovsExternalIDPodName = "pod-name"
ovsExternalIDPodNamespace = "pod-namespace"
)
const (
defaultOVSInterfaceType int = iota //nolint suppress deadcode check for windows
internalOVSInterfaceType
)
var (
getNSPath = util.GetNSPath
)
type podConfigurator struct {
ovsBridgeClient ovsconfig.OVSBridgeClient
ofClient openflow.Client
routeClient route.Interface
ifaceStore interfacestore.InterfaceStore
gatewayMAC net.HardwareAddr
ifConfigurator podInterfaceConfigurator
// podUpdateNotifier is used for notifying updates of local Pods to other components which may benefit from this
// information, i.e. NetworkPolicyController, EgressController.
podUpdateNotifier channel.Notifier
// consumed by secondary network creation.
podInfoStore cnipodcache.CNIPodInfoStore
}
func newPodConfigurator(
ovsBridgeClient ovsconfig.OVSBridgeClient,
ofClient openflow.Client,
routeClient route.Interface,
ifaceStore interfacestore.InterfaceStore,
gatewayMAC net.HardwareAddr,
ovsDatapathType ovsconfig.OVSDatapathType,
isOvsHardwareOffloadEnabled bool,
podUpdateNotifier channel.Notifier,
podInfoStore cnipodcache.CNIPodInfoStore,
disableTXChecksumOffload bool,
) (*podConfigurator, error) {
ifConfigurator, err := newInterfaceConfigurator(ovsDatapathType, isOvsHardwareOffloadEnabled, disableTXChecksumOffload)
if err != nil {
return nil, err
}
return &podConfigurator{
ovsBridgeClient: ovsBridgeClient,
ofClient: ofClient,
routeClient: routeClient,
ifaceStore: ifaceStore,
gatewayMAC: gatewayMAC,
ifConfigurator: ifConfigurator,
podUpdateNotifier: podUpdateNotifier,
podInfoStore: podInfoStore,
}, nil
}
func parseContainerIPs(ipcs []*current.IPConfig) ([]net.IP, error) {
var ips []net.IP
for _, ipc := range ipcs {
ips = append(ips, ipc.Address.IP)
}
if len(ips) > 0 {
return ips, nil
}
return nil, fmt.Errorf("failed to find a valid IP address")
}
func buildContainerConfig(
interfaceName, containerID, podName, podNamespace string,
containerIface *current.Interface,
ips []*current.IPConfig,
vlanID uint16) *interfacestore.InterfaceConfig {
containerIPs, err := parseContainerIPs(ips)
if err != nil {
klog.Errorf("Failed to find container %s IP", containerID)
}
// containerIface.Mac should be a valid MAC string, otherwise it should throw error before
containerMAC, _ := net.ParseMAC(containerIface.Mac)
return interfacestore.NewContainerInterface(
interfaceName,
containerID,
podName,
podNamespace,
containerMAC,
containerIPs,
vlanID)
}
// BuildOVSPortExternalIDs parses OVS port external_ids from InterfaceConfig.
// external_ids are used to compare and sync container interface configuration.
func BuildOVSPortExternalIDs(containerConfig *interfacestore.InterfaceConfig) map[string]interface{} {
externalIDs := make(map[string]interface{})
externalIDs[ovsExternalIDMAC] = containerConfig.MAC.String()
externalIDs[ovsExternalIDContainerID] = containerConfig.ContainerID
externalIDs[ovsExternalIDIP] = getContainerIPsString(containerConfig.IPs)
externalIDs[ovsExternalIDPodName] = containerConfig.PodName
externalIDs[ovsExternalIDPodNamespace] = containerConfig.PodNamespace
externalIDs[interfacestore.AntreaInterfaceTypeKey] = interfacestore.AntreaContainer
return externalIDs
}
func getContainerIPsString(ips []net.IP) string {
var containerIPs []string
for _, ip := range ips {
containerIPs = append(containerIPs, ip.String())
}
return strings.Join(containerIPs, ",")
}
// ParseOVSPortInterfaceConfig reads the Pod properties saved in the OVS port
// external_ids, initializes and returns an InterfaceConfig struct.
// nill will be returned, if the OVS port does not have external IDs or it is
// not created for a Pod interface.
func ParseOVSPortInterfaceConfig(portData *ovsconfig.OVSPortData, portConfig *interfacestore.OVSPortConfig) *interfacestore.InterfaceConfig {
if portData.ExternalIDs == nil {
klog.V(2).Infof("OVS port %s has no external_ids", portData.Name)
return nil
}
containerID, found := portData.ExternalIDs[ovsExternalIDContainerID]
if !found {
klog.V(2).Infof("OVS port %s has no %s in external_ids", portData.Name, ovsExternalIDContainerID)
return nil
}
containerIPStrs := strings.Split(portData.ExternalIDs[ovsExternalIDIP], ",")
var containerIPs []net.IP
for _, ipStr := range containerIPStrs {
containerIPs = append(containerIPs, net.ParseIP(ipStr))
}
containerMAC, err := net.ParseMAC(portData.ExternalIDs[ovsExternalIDMAC])
if err != nil {
klog.Errorf("Failed to parse MAC address from OVS external config %s: %v",
portData.ExternalIDs[ovsExternalIDMAC], err)
}
podName, _ := portData.ExternalIDs[ovsExternalIDPodName]
podNamespace, _ := portData.ExternalIDs[ovsExternalIDPodNamespace]
interfaceConfig := interfacestore.NewContainerInterface(
portData.Name,
containerID,
podName,
podNamespace,
containerMAC,
containerIPs,
portData.VLANID)
interfaceConfig.OVSPortConfig = portConfig
return interfaceConfig
}
func (pc *podConfigurator) configureInterfaces(
podName string,
podNameSpace string,
containerID string,
containerNetNS string,
containerIFDev string,
mtu int,
sriovVFDeviceID string,
result *ipam.IPAMResult,
createOVSPort bool,
containerAccess *containerAccessArbitrator,
) error {
err := pc.ifConfigurator.configureContainerLink(podName, podNameSpace, containerID, containerNetNS, containerIFDev, mtu, sriovVFDeviceID, "", &result.Result, containerAccess)
if err != nil {
return err
}
hostIface := result.Interfaces[0]
containerIface := result.Interfaces[1]
if !createOVSPort {
return nil
}
// Delete veth pair if any failure occurs in later manipulation.
success := false
defer func() {
if !success {
_ = pc.ifConfigurator.removeContainerLink(containerID, hostIface.Name)
}
}()
// Check if the OVS configurations for the container exists or not. If yes, return immediately. This check is
// used on Windows, as kubelet on Windows will call CNI Add for infrastructure container for multiple times
// to query IP of Pod. But there should be only one OVS port created for the same Pod (identified by its sandbox
// container ID). And if the OVS port is added more than once, OVS will return an error.
// See https://github.com/kubernetes/kubernetes/issues/57253#issuecomment-358897721.
_, found := pc.ifaceStore.GetContainerInterface(containerID)
if found {
klog.V(2).Infof("Found an existing OVS port for container %s, returning", containerID)
// Mark the operation as successful, otherwise the container link might be removed by mistake.
success = true
return nil
}
var containerConfig *interfacestore.InterfaceConfig
if containerConfig, err = pc.connectInterfaceToOVS(podName, podNameSpace, containerID, hostIface, containerIface, result.IPs, result.VLANID, containerAccess); err != nil {
return fmt.Errorf("failed to connect to ovs for container %s: %v", containerID, err)
}
defer func() {
if !success {
_ = pc.disconnectInterfaceFromOVS(containerConfig)
}
}()
if err := pc.routeClient.AddLocalAntreaFlexibleIPAMPodRule(containerConfig.IPs); err != nil {
return err
}
// Note that the IP address should be advertised after Pod OpenFlow entries are installed, otherwise the packet might
// be dropped by OVS.
if err = pc.ifConfigurator.advertiseContainerAddr(containerNetNS, containerIface.Name, &result.Result); err != nil {
klog.Errorf("Failed to advertise IP address for container %s: %v", containerID, err)
}
// Mark the manipulation as success to cancel deferred operations.
success = true
klog.Infof("Configured interfaces for container %s", containerID)
return nil
}
func (pc *podConfigurator) createOVSPort(ovsPortName string, ovsAttachInfo map[string]interface{}, vlanID uint16) (string, error) {
var portUUID string
var err error
switch getOVSInterfaceType(ovsPortName) {
case internalOVSInterfaceType:
portUUID, err = pc.ovsBridgeClient.CreateInternalPort(ovsPortName, 0, "", ovsAttachInfo)
default:
if vlanID == 0 {
portUUID, err = pc.ovsBridgeClient.CreatePort(ovsPortName, ovsPortName, ovsAttachInfo)
} else {
portUUID, err = pc.ovsBridgeClient.CreateAccessPort(ovsPortName, ovsPortName, ovsAttachInfo, vlanID)
}
}
if err != nil {
klog.Errorf("Failed to add OVS port %s, remove from local cache: %v", ovsPortName, err)
return "", err
}
return portUUID, nil
}
func (pc *podConfigurator) removeInterfaces(containerID string) error {
containerConfig, found := pc.ifaceStore.GetContainerInterface(containerID)
if !found {
klog.V(2).Infof("Did not find the port for container %s in local cache", containerID)
return nil
}
// Deleting veth devices and OVS port must be called after Openflows are uninstalled.
// Otherwise there could be a race condition:
// 1. Pod A's ofport was released
// 2. Pod B got the ofport released above
// 3. Flows for Pod B were installed
// 4. Flows for Pod A were uninstalled
// Because Pod A and Pod B had same ofport, they had overlapping flows, e.g. the
// classifier flow in table 0 which has only in_port as the match condition, then
// step 4 can remove flows owned by Pod B by mistake.
// Note that deleting the interface attached to an OVS port can release the ofport.
if err := pc.disconnectInterfaceFromOVS(containerConfig); err != nil {
return err
}
if err := pc.ifConfigurator.removeContainerLink(containerID, containerConfig.InterfaceName); err != nil {
return err
}
if err := pc.routeClient.DeleteLocalAntreaFlexibleIPAMPodRule(containerConfig.IPs); err != nil {
return err
}
return nil
}
func (pc *podConfigurator) checkInterfaces(
containerID, containerNetNS string,
containerIface *current.Interface,
prevResult *current.Result, sriovVFDeviceID string) error {
if link, err := pc.ifConfigurator.checkContainerInterface(
containerNetNS,
containerID,
containerIface,
prevResult.IPs,
prevResult.Routes,
sriovVFDeviceID); err != nil {
return err
} else if err := pc.checkHostInterface(
containerID,
containerIface,
link,
prevResult.IPs,
prevResult.Interfaces,
sriovVFDeviceID); err != nil {
return err
}
return nil
}
func (pc *podConfigurator) checkHostInterface(
containerID string,
containerIntf *current.Interface,
containerIfKind interface{},
containerIPs []*current.IPConfig,
interfaces []*current.Interface,
sriovVFDeviceID string,
) error {
var ifname string
if sriovVFDeviceID != "" {
vfRep, errlink := pc.ifConfigurator.validateVFRepInterface(sriovVFDeviceID)
if errlink != nil {
klog.Errorf("Failed to check container %s interface on the host: %v",
containerID, errlink)
return errlink
}
ifname = vfRep
} else {
containerVeth := containerIfKind.(*vethPair)
hostVeth, errlink := pc.ifConfigurator.validateContainerPeerInterface(interfaces, containerVeth)
if errlink != nil {
klog.Errorf("Failed to check container %s interface on the host: %v",
containerID, errlink)
return errlink
}
ifname = hostVeth.name
}
if err := pc.validateOVSInterfaceConfig(containerID, containerIntf.Mac, containerIPs); err != nil {
klog.Errorf("Failed to check host link %s for container %s attaching status on ovs. err: %v",
ifname, containerID, err)
return err
}
return nil
}
func (pc *podConfigurator) validateOVSInterfaceConfig(containerID string, containerMAC string, ips []*current.IPConfig) error {
if containerConfig, found := pc.ifaceStore.GetContainerInterface(containerID); found {
if containerConfig.MAC.String() != containerMAC {
return fmt.Errorf("interface MAC %s does not match container %s MAC",
containerConfig.MAC.String(), containerID)
}
for _, ipc := range ips {
if ipc.Version == "4" {
ipv4Addr := util.GetIPv4Addr(containerConfig.IPs)
if ipv4Addr != nil && ipv4Addr.Equal(ipc.Address.IP) {
return nil
}
}
}
return fmt.Errorf("interface IP %s does not match container %s IP",
getContainerIPsString(containerConfig.IPs), containerID)
}
return fmt.Errorf("container %s interface not found from local cache", containerID)
}
func parsePrevResult(conf *types.NetworkConfig) error {
if conf.RawPrevResult == nil {
return nil
}
resultBytes, err := json.Marshal(conf.RawPrevResult)
if err != nil {
return fmt.Errorf("could not serialize prevResult: %v", err)
}
conf.RawPrevResult = nil
conf.PrevResult, err = version.NewResult(conf.CNIVersion, resultBytes)
if err != nil {
return fmt.Errorf("could not parse prevResult: %v", err)
}
return nil
}
func (pc *podConfigurator) reconcile(pods []corev1.Pod, containerAccess *containerAccessArbitrator) error {
// desiredPods is the set of Pods that should be present, based on the
// current list of Pods got from the Kubernetes API.
desiredPods := sets.NewString()
// knownInterfaces is the list of interfaces currently in the local cache.
knownInterfaces := pc.ifaceStore.GetInterfacesByType(interfacestore.ContainerInterface)
for _, pod := range pods {
// Skip Pods for which we are not in charge of the networking.
if pod.Spec.HostNetwork {
continue
}
desiredPods.Insert(k8s.NamespacedName(pod.Namespace, pod.Name))
}
missingIfConfigs := make([]*interfacestore.InterfaceConfig, 0)
for _, containerConfig := range knownInterfaces {
namespacedName := k8s.NamespacedName(containerConfig.PodNamespace, containerConfig.PodName)
if desiredPods.Has(namespacedName) {
// Find the OVS ports which are not connected to host interfaces. This is useful on Windows if the runtime is
// Containerd, because the host interface is created async from the OVS port.
if containerConfig.OFPort == -1 {
missingIfConfigs = append(missingIfConfigs, containerConfig)
continue
}
// This interface matches an existing Pod.
// We rely on the interface cache / store - which is initialized from the persistent
// OVSDB - to map the Pod to its interface configuration. The interface
// configuration includes the parameters we need to replay the flows.
klog.V(4).Infof("Syncing interface %s for Pod %s", containerConfig.InterfaceName, namespacedName)
if err := pc.ofClient.InstallPodFlows(
containerConfig.InterfaceName,
containerConfig.IPs,
containerConfig.MAC,
uint32(containerConfig.OFPort),
containerConfig.VLANID,
nil,
); err != nil {
klog.Errorf("Error when re-installing flows for Pod %s", namespacedName)
}
} else {
// clean-up and delete interface
klog.V(4).Infof("Deleting interface %s", containerConfig.InterfaceName)
if err := pc.removeInterfaces(containerConfig.ContainerID); err != nil {
klog.Errorf("Failed to delete interface %s: %v", containerConfig.InterfaceName, err)
}
// interface should no longer be in store after the call to removeInterfaces
}
}
if len(missingIfConfigs) > 0 {
pc.reconcileMissingPods(missingIfConfigs, containerAccess)
}
return nil
}
func (pc *podConfigurator) connectInterfaceToOVSCommon(ovsPortName string, containerConfig *interfacestore.InterfaceConfig) error {
// create OVS Port and add attach container configuration into external_ids
containerID := containerConfig.ContainerID
klog.V(2).Infof("Adding OVS port %s for container %s", ovsPortName, containerID)
ovsAttachInfo := BuildOVSPortExternalIDs(containerConfig)
portUUID, err := pc.createOVSPort(ovsPortName, ovsAttachInfo, containerConfig.VLANID)
if err != nil {
return fmt.Errorf("failed to add OVS port for container %s: %v", containerID, err)
}
// Remove OVS port if any failure occurs in later manipulation.
defer func() {
if err != nil {
_ = pc.ovsBridgeClient.DeletePort(portUUID)
}
}()
// GetOFPort will wait for up to 1 second for OVSDB to report the OFPort number.
var ofPort int32
ofPort, err = pc.ovsBridgeClient.GetOFPort(ovsPortName, false)
if err != nil {
return fmt.Errorf("failed to get of_port of OVS port %s: %v", ovsPortName, err)
}
klog.V(2).Infof("Setting up Openflow entries for container %s", containerID)
if err = pc.ofClient.InstallPodFlows(ovsPortName, containerConfig.IPs, containerConfig.MAC, uint32(ofPort), containerConfig.VLANID, nil); err != nil {
return fmt.Errorf("failed to add Openflow entries for container %s: %v", containerID, err)
}
containerConfig.OVSPortConfig = &interfacestore.OVSPortConfig{PortUUID: portUUID, OFPort: ofPort}
// Add containerConfig into local cache
pc.ifaceStore.AddInterface(containerConfig)
// Notify the Pod update event to required components.
event := agenttypes.PodUpdate{
PodName: containerConfig.PodName,
PodNamespace: containerConfig.PodNamespace,
IsAdd: true,
ContainerID: containerConfig.ContainerID,
}
pc.podUpdateNotifier.Notify(event)
return nil
}
// disconnectInterfaceFromOVS disconnects an existing interface from ovs br-int.
func (pc *podConfigurator) disconnectInterfaceFromOVS(containerConfig *interfacestore.InterfaceConfig) error {
containerID := containerConfig.ContainerID
klog.V(2).Infof("Deleting Openflow entries for container %s", containerID)
if err := pc.ofClient.UninstallPodFlows(containerConfig.InterfaceName); err != nil {
return fmt.Errorf("failed to delete Openflow entries for container %s: %v", containerID, err)
// We should not delete OVS port if Pod flows deletion fails, otherwise
// it is possible a new Pod will reuse the reclaimed ofport number, and
// the OVS flows added for the new Pod can conflict with the stale
// flows of the deleted Pod.
}
klog.V(2).Infof("Deleting OVS port %s for container %s", containerConfig.PortUUID, containerID)
// TODO: handle error and introduce garbage collection for failure on deletion
if err := pc.ovsBridgeClient.DeletePort(containerConfig.PortUUID); err != nil {
return fmt.Errorf("failed to delete OVS port for container %s: %v", containerID, err)
}
// Remove container configuration from cache.
pc.ifaceStore.DeleteInterface(containerConfig)
event := agenttypes.PodUpdate{
PodName: containerConfig.PodName,
PodNamespace: containerConfig.PodNamespace,
IsAdd: false,
ContainerID: containerConfig.ContainerID,
}
pc.podUpdateNotifier.Notify(event)
klog.Infof("Removed interfaces for container %s", containerID)
return nil
}
// connectInterceptedInterface connects intercepted interface to ovs br-int.
func (pc *podConfigurator) connectInterceptedInterface(
podName string,
podNameSpace string,
containerID string,
containerNetNS string,
containerIFDev string,
containerIPs []*current.IPConfig,
containerAccess *containerAccessArbitrator,
) error {
sandbox, err := getNSPath(containerNetNS)
if err != nil {
return err
}
containerIface, hostIface, err := pc.ifConfigurator.getInterceptedInterfaces(sandbox, containerNetNS, containerIFDev)
if err != nil {
return err
}
if err = pc.routeClient.MigrateRoutesToGw(hostIface.Name); err != nil {
return fmt.Errorf("connectInterceptedInterface failed to migrate: %w", err)
}
_, err = pc.connectInterfaceToOVS(podName, podNameSpace, containerID, hostIface,
containerIface, containerIPs, 0, containerAccess)
return err
}
// disconnectInterceptedInterface disconnects intercepted interface from ovs br-int.
func (pc *podConfigurator) disconnectInterceptedInterface(podName, podNamespace, containerID string) error {
containerConfig, found := pc.ifaceStore.GetContainerInterface(containerID)
if !found {
klog.V(2).Infof("Did not find the port for container %s in local cache", containerID)
return nil
}
for _, ip := range containerConfig.IPs {
ipNet := util.NewIPNet(ip)
if err := pc.routeClient.UnMigrateRoutesFromGw(ipNet, ""); err != nil {
return fmt.Errorf("connectInterceptedInterface failed to migrate: %w", err)
}
}
return pc.disconnectInterfaceFromOVS(containerConfig)
// TODO recover pre-connect state? repatch vethpair to original bridge etc ?? to make first CNI happy??
}