Upstream bug: https://bugs.launchpad.net/neutron/+bug/1527274
MOS 8.0 env, 1 compute, 3 controllers.
Step to reproduce:
1. Create internal net, subnet, router. Add interface to router for created net. Boot vm in created net.
2. Create neutron-meter-label
3. Try to create meter-label-rule
4. Rule not appear in iptables on router-namespace and after that we can see traces in neutron-meter-agent logs:
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher [req-2913e1ae-87d3-404e-8897-94aa25338a67 baf05c2230204f19a700b2516b7c2786 fcab0b76df20485193be7853a28ee929 - - -] Exception during message handling: cannot concatenate 'str' and 'NoneType' objects
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher executor_callback))
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher executor_callback)
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/neutron/services/metering/agents/metering_agent.py", line 222, in add_metering_label_rule
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher 'add_metering_label_rule')
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 254, in inner
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/neutron/services/metering/agents/metering_agent.py", line 176, in _invoke_driver
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher return getattr(self.metering_driver, func_name)(context, meterings)
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_log/helpers.py", line 46, in wrapper
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher return method(*args, **kwargs)
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/neutron/services/metering/drivers/iptables/iptables_driver.py", line 259, in add_metering_label_rule
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher self._add_metering_label_rule(router)
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/neutron/services/metering/drivers/iptables/iptables_driver.py", line 272, in _add_metering_label_rule
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher self._process_metering_rule_action(router, 'create')
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/neutron/services/metering/drivers/iptables/iptables_driver.py", line 281, in _process_metering_rule_action
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher ext_dev = self.get_external_device_name(rm.router['gw_port_id'])
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/neutron/services/metering/drivers/iptables/iptables_driver.py", line 132, in get_external_device_name
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher return (EXTERNAL_DEV_PREFIX + port_id)[:self.driver.DEV_NAME_LEN]
2015-12-03 14:03:59.805 21341 ERROR oslo_messaging.rpc.dispatcher TypeError: cannot concatenate 'str' and 'NoneType' objects
5. If we try to remove that meter-label-rule, we can see following traces from neutron-meter-agent:
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher [req-0bf3d3ab-ab66-4aac-a77d-95d82c3dd588 baf05c2230204f19a700b2516b7c2786 fcab0b76df20485193be7853a28ee929 - - -] Exception during message handling: cannot concatenate 'str' and 'NoneType' objects
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher executor_callback))
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher executor_callback)
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/neutron/services/metering/agents/metering_agent.py", line 226, in remove_metering_label_rule
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher 'remove_metering_label_rule')
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 254, in inner
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/neutron/services/metering/agents/metering_agent.py", line 176, in _invoke_driver
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher return getattr(self.metering_driver, func_name)(context, meterings)
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_log/helpers.py", line 46, in wrapper
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher return method(*args, **kwargs)
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/neutron/services/metering/drivers/iptables/iptables_driver.py", line 264, in remove_metering_label_rule
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher self._remove_metering_label_rule(router)
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/neutron/services/metering/drivers/iptables/iptables_driver.py", line 275, in _remove_metering_label_rule
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher self._process_metering_rule_action(router, 'delete')
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/neutron/services/metering/drivers/iptables/iptables_driver.py", line 281, in _process_metering_rule_action
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher ext_dev = self.get_external_device_name(rm.router['gw_port_id'])
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/neutron/services/metering/drivers/iptables/iptables_driver.py", line 132, in get_external_device_name
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher return (EXTERNAL_DEV_PREFIX + port_id)[:self.driver.DEV_NAME_LEN]
2015-12-03 14:07:21.595 21341 ERROR oslo_messaging.rpc.dispatcher TypeError: cannot concatenate 'str' and 'NoneType' objects
(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:
actual result
expected result
steps to reproduce
For more detailed information on the contents of each of the listed sections see https:/ /wiki.openstack .org/wiki/ Fuel/How_ to_contribute# Here_is_ how_you_ file_a_ bug