diff --git a/neutron/agent/linux/ovs_lib.py b/neutron/agent/linux/ovs_lib.py index ad94ef4399..097630707a 100644 --- a/neutron/agent/linux/ovs_lib.py +++ b/neutron/agent/linux/ovs_lib.py @@ -207,7 +207,8 @@ class OVSBridge: def add_tunnel_port(self, port_name, remote_ip, local_ip, tunnel_type=constants.TYPE_GRE, vxlan_udp_port=constants.VXLAN_UDP_PORT): - self.run_vsctl(["--may-exist", "add-port", self.br_name, port_name]) + self.run_vsctl(["--", "--may-exist", "add-port", self.br_name, + port_name]) self.set_db_attribute("Interface", port_name, "type", tunnel_type) if tunnel_type == constants.TYPE_VXLAN: # Only set the VXLAN UDP port if it's not the default diff --git a/neutron/tests/unit/openvswitch/test_ovs_lib.py b/neutron/tests/unit/openvswitch/test_ovs_lib.py index 0a2908f2fb..d4fef53e6a 100644 --- a/neutron/tests/unit/openvswitch/test_ovs_lib.py +++ b/neutron/tests/unit/openvswitch/test_ovs_lib.py @@ -219,7 +219,7 @@ class OVS_Lib_Test(base.BaseTestCase): remote_ip = "9.9.9.9" ofport = "6" - utils.execute(["ovs-vsctl", self.TO, "--may-exist", "add-port", + utils.execute(["ovs-vsctl", self.TO, '--', "--may-exist", "add-port", self.BR_NAME, pname], root_helper=self.root_helper) utils.execute(["ovs-vsctl", self.TO, "set", "Interface", pname, "type=gre"], root_helper=self.root_helper)