diff options
author | Ritu Sood <ritu.sood@intel.com> | 2019-02-27 22:52:03 -0800 |
---|---|---|
committer | Ritu Sood <ritu.sood@intel.com> | 2019-02-27 22:52:03 -0800 |
commit | eb2950a031708efded0dd76e1acc21d8674d161f (patch) | |
tree | c87ac39a96ea7f22326a97759472facd66c491ae | |
parent | 95d21eeecec4ea01078c62527faa0fe8c3f9c539 (diff) |
Fixed missing external-ids
Adding external-ids in static IP
address port creation to match dynamic
address port creation. Used to delete
port etc.
Change-Id: Ied6b1ae5091559ba4a593e34dd72cfaa067f44ab
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
-rw-r--r-- | internal/pkg/ovn/pods.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/pkg/ovn/pods.go b/internal/pkg/ovn/pods.go index cc3d459..f217bf6 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)", |