]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
iptables_manager: Fix get_binary_name for eventlet
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Tue, 9 Sep 2014 03:20:23 +0000 (12:20 +0900)
committerYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Tue, 2 Dec 2014 03:40:03 +0000 (12:40 +0900)
commit2c5b6391c06f20959a86ad27950e30547f9559ac
treeb7df3d03bad20039baa4058955704b6d439a5888
parentab8d6756ebbe23624b39cbdfedcf2c54e65f04fe
iptables_manager: Fix get_binary_name for eventlet

The inspect trick used by get_binary_name does not work for
eventlet non-main threads.  It's actually the case for ofagent
and in that case it yields something like "greenthread.py",
which is not desirable because this module assumes it different
for each programs.  This commit fixes the problem by switching
to use sys.argv.

Closes-Bug: #1367075
Change-Id: I8e765882c58d9991a37f0bbb52cdccc406e287bd
neutron/agent/linux/iptables_manager.py
neutron/tests/unit/test_iptables_manager.py