update HTTPS protocol loadbalancer's listener occured error

Bug #1720313 reported by wangyingming
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Invalid
Undecided
Hunt Xu

Bug Description

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'])]

description: updated
tags: added: neutron-lbaas
description: updated
description: updated
Boden R (boden)
tags: added: lbaas
Hunt Xu (huntxu)
Changed in neutron:
assignee: nobody → Hunt Xu (huntxu)
status: New → Confirmed
Revision history for this message
Hunt Xu (huntxu) wrote :
Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
Akihiro Motoki (amotoki) wrote :

LBaaS is an individual project Octavia now. Bug tracking is done on the storyboard.
This report has been migrated to https://storyboard.openstack.org/#!/story/2001521
(Marking this as Invalid in the neutron launchpad)

Changed in neutron:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.