Version: newton[ocata,pike is still exists]
project: neutron-lbaas
code place: neutron_lbaas/services/loadbalancer/plugin.py: line 580
when I update type of HTTPS loadbalancer occured error like this:
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource Traceback (most recent call last):
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 79, in resource
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource result = method(request=request, **args)
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 604, in update
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource return self._update(request, id, body, **kwargs)
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 88, in wrapped
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource self.force_reraise()
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 84, in wrapped
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 151, in wrapper
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource self.force_reraise()
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 139, in wrapper
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 124, in wrapped
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource traceback.format_exc())
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource self.force_reraise()
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 119, in wrapped
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource return f(*dup_args, **dup_kwargs)
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 652, in _update
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource obj = obj_updater(request.context, id, **kwargs)
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron_lbaas/services/loadbalancer/plugin.py", line 604, in update_list
ener
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource raise exc
2017-09-29 14:41:48.585 14541 ERROR neutron.api.v2.resource AttributeError: 'dict' object has no attribute 'tls_container_id'
this error caused by the code of below:
def update_listener(self, context, id, listener):
listener = listener.get('listener')
curr_listener_db = self.db.get_listener(context, id)
default_pool_id = listener.get('default_pool_id')
if default_pool_id:
self._check_listener_pool_lb_match(
context, id, default_pool_id)
self.db.test_and_set_status(context, models.Listener, id,
constants.PENDING_UPDATE)
try:
curr_listener = curr_listener_db.to_dict()
if 'default_tls_container_ref' not in listener:
listener['default_tls_container_ref'] = (
# NOTE(blogan): not changing to ref bc this dictionary is
# created from a data model
curr_listener['default_tls_container_id'])
if 'sni_container_refs' not in listener:
listener['sni_container_ids'] = [
container.tls_container_id for container in (
curr_listener['sni_containers'])]
see that? error disappear when i change it like this:
if 'sni_container_refs' not in listener:
listener['sni_container_ids'] = [
container["tls_container_id"] for container in (
curr_listener['sni_containers'])]
Patchset proposed: https:/ /review. openstack. org/#/c/ 518455/