When using the IpNetnsExecFilter, if the nested command is not found, the exception raised is NoFilterMatched when I think it should be FilterMatchNotExecutable.
The command run is in this log message:
2016-03-08 17:32:57.522 20681 DEBUG neutron.agent.linux.utils [req-1033d4e2-9705-47d4-8daf-bf9746b27a45 TestHealthMonitors-254658321 -] Running command (rootwrap daemon): ['ip', 'netns', 'exec', 'qlbaas-ba5ba518-5327-4f19-9e3a-d26d643a479f', 'haproxy', '-f', '/opt/stack/data/neutron/lbaas/v2/ba5ba518-5327-4f19-9e3a-d26d643a479f/haproxy.conf', '-p', '/opt/stack/data/neutron/lbaas/v2/ba5ba518-5327-4f19-9e3a-d26d643a479f/haproxy.pid'] execute_rootwrap_daemon /opt/stack/new/neutron/neutron/agent/linux/utils.py:100
The filters are here:
[Filters]
# haproxy
haproxy: CommandFilter, haproxy, root
# lbaas-agent uses kill as well, that's handled by the generic KillFilter
kill_haproxy_usr: KillFilter, root, /usr/sbin/haproxy, -9, -HUP
ovs-vsctl: CommandFilter, ovs-vsctl, root
mm-ctl: CommandFilter, mm-ctl, root
# ip_lib
ip: IpFilter, ip, root
ip_exec: IpNetnsExecFilter, ip, root
route: CommandFilter, route, root
# arping
arping: CommandFilter, arping, root
The trace is here:
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager [req-1033d4e2-9705-47d4-8daf-bf9746b27a45 TestHealthMonitors-254658321 -] Create healthmonitor 412888cd-a6e5-4d0c-99aa-a1b066459bae failed on device driver haproxy_ns
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager Traceback (most recent call last):
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager File "/opt/stack/new/neutron-lbaas/neutron_lbaas/agent/agent_manager.py", line 382, in create_healthmonitor
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager driver.healthmonitor.create(healthmonitor)
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager File "/opt/stack/new/neutron-lbaas/neutron_lbaas/drivers/haproxy/namespace_driver.py", line 463, in create
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager self.driver.loadbalancer.refresh(hm.pool.loadbalancer)
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager File "/opt/stack/new/neutron-lbaas/neutron_lbaas/drivers/haproxy/namespace_driver.py", line 370, in refresh
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager if (not self.driver.deploy_instance(loadbalancer) and
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 271, in inner
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager return f(*args, **kwargs)
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager File "/opt/stack/new/neutron-lbaas/neutron_lbaas/drivers/haproxy/namespace_driver.py", line 175, in deploy_instance
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager self.create(loadbalancer)
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager File "/opt/stack/new/neutron-lbaas/neutron_lbaas/drivers/haproxy/namespace_driver.py", line 203, in create
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager self._spawn(loadbalancer)
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager File "/opt/stack/new/neutron-lbaas/neutron_lbaas/drivers/haproxy/namespace_driver.py", line 358, in _spawn
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager ns.netns.execute(cmd)
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager File "/opt/stack/new/neutron/neutron/agent/linux/ip_lib.py", line 931, in execute
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager log_fail_as_error=log_fail_as_error, **kwargs)
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager File "/opt/stack/new/neutron/neutron/agent/linux/utils.py", line 116, in execute
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager execute_rootwrap_daemon(cmd, process_input, addl_env))
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager File "/opt/stack/new/neutron/neutron/agent/linux/utils.py", line 102, in execute_rootwrap_daemon
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager return client.execute(cmd, process_input)
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager File "/usr/local/lib/python2.7/dist-packages/oslo_rootwrap/client.py", line 128, in execute
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager res = proxy.run_one_command(cmd, stdin)
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager File "<string>", line 2, in run_one_command
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager File "/usr/lib/python2.7/multiprocessing/managers.py", line 774, in _callmethod
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager raise convert_to_error(kind, result)
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager NoFilterMatched
2016-03-08 17:32:57.526 20681 ERROR neutron_lbaas.agent.agent_manager
In this case, the haproxy command was not present on the host.