From 1a5b796b0639593eaee36be5a7b3ac371884d67d Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Tue, 29 Aug 2017 20:10:12 +0000 Subject: [PATCH] fullstack: skip test_mtu_update when DHCP agent is not in rootns The test case requires access to devices created by DHCP agent. When the agent is deployed with linuxbridge agent, we start it in a host- namespace, and then it creates its own qdhcp- namespaces for dhcp ports inside the host- namespace. This could be solved by calling: ip netns exec host-* ip netns exec qdhcp-* ip link show ... but ip_lib doesn't support constructing such commands. Of course, we could extend ip_lib to support this use case, but currently we have larger dragons to fight. We will revisit the skip once all agents are moved to namespaces as planned by jlibosva@. This patch merely disables the test case if DHCP agent is running in a namespace. We may revisit it when and if we feel comfortable making significant changes to ip_lib. Change-Id: Ieea83bf2959654f98b1dc4d7aa17138d0626ec40 Related-Bug: #1671634 --- neutron/tests/fullstack/test_dhcp_agent.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/neutron/tests/fullstack/test_dhcp_agent.py b/neutron/tests/fullstack/test_dhcp_agent.py index 3729d340e22..1902070bfde 100644 --- a/neutron/tests/fullstack/test_dhcp_agent.py +++ b/neutron/tests/fullstack/test_dhcp_agent.py @@ -102,6 +102,13 @@ class TestDhcpAgentNoHA(BaseDhcpAgentTest): self.vm.block_until_dhcp_config_done() def test_mtu_update(self): + # The test case needs access to devices in nested namespaces. ip_lib + # doesn't support it, and it's probably unsafe to touch the library for + # testing matters. + # TODO(jlibosva) revisit when ip_lib supports nested namespaces + if self.environment.hosts[0].dhcp_agent.namespace is not None: + self.skip("ip_lib doesn't support nested namespaces") + self.vm.block_until_dhcp_config_done() namespace = cmd._get_namespace_name(