yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #57969
[Bug 1634114] Re: fwaas v2 update firewall group hit l3 agent error.
Reviewed: https://review.openstack.org/387398
Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=4ce07ca9318ac48097f41f7713938555b050f76f
Submitter: Jenkins
Branch: master
commit 4ce07ca9318ac48097f41f7713938555b050f76f
Author: ZhaoBo <zhaobo6@xxxxxxxxxx>
Date: Mon Oct 17 20:09:34 2016 +0800
Fix UnboundLocalError during update firewall group.
In l3 agent fwaas v2 logic, it may cause the local varible 'fw_ports'
not defined, so we should set it.
This patch fix it when an new collection of ports_for_fwg, as this time
it will store the 'add-ports' list. Then re-defining 'fw_ports'.
Change-Id: Idb9d7987bed74b6e78ae153610e2c351c2c389f0
Closes-Bug: #1634114
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1634114
Title:
fwaas v2 update firewall group hit l3 agent error.
Status in neutron:
Fix Released
Bug description:
update fwaas v2 firewall group with a associated port and a non-associated port.
And the server send the agent the firewall_group body like:
{
u'firewall_group': {
u'status': u'PENDING_UPDATE',
u'description': u'',
u'admin_state_up': True,
u'ingress_rule_list': [{
u'protocol': u'tcp',
u'description': u'',
u'tenant_id': u'488da3aab0ff45df9e85e17e7f89fedd',
u'enabled': True,
u'public': False,
u'source_ip_address': u'6.6.6.6',
u'destination_ip_address': None,
u'action': u'reject',
u'source_port': None,
u'ip_version': 4,
u'destination_port': u'80',
u'project_id': u'488da3aab0ff45df9e85e17e7f89fedd',
u'id': u'5cab3347-00bc-45a8-9af6-2cdcca008661',
u'name': u'reject'
}],
u'tenant_id': u'488da3aab0ff45df9e85e17e7f89fedd',
u'ingress_firewall_policy_id': u'8a17ebd9-3cc6-47ec-aafd-aa0d804740e7',
u'public': False,
u'del-port-ids': [],
u'egress_rule_list': [],
u'last-port': False,
u'add-port-ids': [u'9e7caee0-0c8f-435f-98aa-726f6afc4e97',
u'38c3efc1-fd8f-4e4a-a1da-1bf9ccef89cc'],
u'project_id': u'488da3aab0ff45df9e85e17e7f89fedd',
u'id': u'2932b3d9-3a7b-48a1-a16c-bf9f7b2751a5',
u'egress_firewall_policy_id': None,
u'name': u'ag1'
},
u'host': u'SZX1000138589'
}
Then the l3 agent will hit error and the resource status still hang in
PENDING_UPDATE.
Trace:
2016-10-17 19:38:52.763 DEBUG neutron.agent.linux.utils [^[[01;36mreq-70a427db-42b1-414d-9126-21df67ac5572 ^[[00;36madmin 488da3aab0ff45df9e85e17e7f89fedd] ^[[01;35mExit code: 0^[[00m ^[[00;33mfrom (pid=3657) execute /opt/stack/neutron/neutron/agent/linux/utils.py:141^[[00m
2016-10-17 19:38:52.764 ERROR oslo_messaging.rpc.server [^[[01;36mreq-70a427db-42b1-414d-9126-21df67ac5572 ^[[00;36madmin 488da3aab0ff45df9e85e17e7f89fedd] ^[[01;35mException during message handling^[[00m
2016-10-17 19:38:52.764 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00mTraceback (most recent call last):
2016-10-17 19:38:52.764 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 133, in _process_incoming
2016-10-17 19:38:52.764 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m res = self.dispatcher.dispatch(message)
2016-10-17 19:38:52.764 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 150, in dispatch
2016-10-17 19:38:52.764 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m return self._do_dispatch(endpoint, method, ctxt, args)
2016-10-17 19:38:52.764 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 121, in _do_dispatch
2016-10-17 19:38:52.764 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m result = func(ctxt, **new_args)
2016-10-17 19:38:52.764 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/oslo_log/helpers.py", line 48, in wrapper
2016-10-17 19:38:52.764 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m return method(*args, **kwargs)
2016-10-17 19:38:52.764 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m File "/opt/stack/neutron-fwaas/neutron_fwaas/services/firewall/agents/l3reference/firewall_l3_agent_v2.py", line 421, in update_firewall_group
2016-10-17 19:38:52.764 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m 'ports': ', '.join(fw_ports)})
2016-10-17 19:38:52.764 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00mUnboundLocalError: local variable 'fw_ports' referenced before assignment
2016-10-17 19:38:52.764 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1634114/+subscriptions
References