aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrinath Somanchi <trinaths.dev@gmail.com>2019-03-07 07:48:01 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-03-07 07:48:01 +0000
commit40f7cea5241610cd0370fda6c0187bf23843736f (patch)
treef544f362b66cec211b22d69211f2cf1efca5b594
parent3e1cc4ea68b531d934354f9ebeef15ca08913238 (diff)
parenteb2950a031708efded0dd76e1acc21d8674d161f (diff)
Merge "Fixed missing external-ids"
-rw-r--r--internal/pkg/ovn/pods.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/pkg/ovn/pods.go b/internal/pkg/ovn/pods.go
index 770f4e5..fcd258e 100644
--- a/internal/pkg/ovn/pods.go
+++ b/internal/pkg/ovn/pods.go
@@ -112,7 +112,11 @@ func (oc *Controller) addLogicalPortWithSwitch(pod *kapi.Pod, logicalSwitch, ipA
out, stderr, err = util.RunOVNNbctlUnix("--may-exist", "lsp-add",
logicalSwitch, portName, "--", "lsp-set-addresses", portName,
fmt.Sprintf("%s %s", macAddress, ipAddress), "--", "--if-exists",
- "clear", "logical_switch_port", portName, "dynamic_addresses")
+ "clear", "logical_switch_port", portName, "dynamic_addresses", "--", "set",
+ "logical_switch_port", portName,
+ "external-ids:namespace="+pod.Namespace,
+ "external-ids:logical_switch="+logicalSwitch,
+ "external-ids:pod=true")
if err != nil {
logrus.Errorf("Failed to add logical port to switch "+
"stdout: %q, stderr: %q (%v)",