Skip to content

Commit 5bb5f45

Browse files
committed
kubectl-ko: fix trace when u2oInterconnection is enabled (#2836)
1 parent e45a297 commit 5bb5f45

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dist/images/kubectl-ko

+3-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ trace(){
242242
if [ -z "$dstMac" ]; then
243243
vlan=$(kubectl get subnet "$ls" -o jsonpath={.spec.vlan})
244244
logicalGateway=$(kubectl get subnet "$ls" -o jsonpath={.spec.logicalGateway})
245-
if [ ! -z "$vlan" -a "$logicalGateway" != "true" ]; then
245+
u2oIC=$(kubectl get subnet "$ls" -o jsonpath={.spec.u2oInterconnection})
246+
if [ ! -z "$vlan" -a "$logicalGateway" != "true" -a "$u2oIC" != "true" ]; then
246247
gateway=$(kubectl get subnet "$ls" -o jsonpath={.spec.gateway})
247248
if [[ "$gateway" =~ .*,.* ]]; then
248249
if [ "$af" = "4" ]; then
@@ -288,7 +289,7 @@ trace(){
288289
if [ -z "$lr" ]; then
289290
lr=$(kubectl get subnet "$ls" -o jsonpath={.spec.vpc})
290291
fi
291-
dstMac=$(kubectl exec $OVN_NB_POD -n $KUBE_OVN_NS -c ovn-central -- ovn-nbctl --data=bare --no-heading --columns=mac find logical_router_port name="$lr"-"$ls" | tr -d '\r')
292+
dstMac=$(kubectl exec $OVN_NB_POD -n $KUBE_OVN_NS -c ovn-central -- ovn-nbctl --data=bare --no-heading --columns=mac find logical_router_port name="$lr-$ls" | tr -d '\r')
292293
fi
293294
fi
294295

0 commit comments

Comments
 (0)