Pecan doesn't work with noauth auth_strategy

Bug #1673105 reported by Jakub Libosvar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Jakub Libosvar

Bug Description

All fullstack tests fail because server is unable to server GET requests:

2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation [-] GET failed.
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation Traceback (most recent call last):
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation File "/opt/stack/new/neutron/.tox/dsvm-fullstack/local/lib/python2.7/site-packages/pecan/core.py", line 682, in __call__
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation controller, args, kwargs = self.find_controller(state)
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation File "/opt/stack/new/neutron/.tox/dsvm-fullstack/local/lib/python2.7/site-packages/pecan/core.py", line 858, in find_controller
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation controller, args, kw = super(Pecan, self).find_controller(_state)
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation File "/opt/stack/new/neutron/.tox/dsvm-fullstack/local/lib/python2.7/site-packages/pecan/core.py", line 550, in find_controller
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation self.handle_hooks(self.determine_hooks(controller), 'before', state)
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation File "/opt/stack/new/neutron/.tox/dsvm-fullstack/local/lib/python2.7/site-packages/pecan/core.py", line 865, in handle_hooks
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation return super(Pecan, self).handle_hooks(hooks, *args, **kw)
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation File "/opt/stack/new/neutron/.tox/dsvm-fullstack/local/lib/python2.7/site-packages/pecan/core.py", line 342, in handle_hooks
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation result = getattr(hook, hook_type)(*args)
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation File "/opt/stack/new/neutron/neutron/pecan_wsgi/hooks/context.py", line 24, in before
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation ctx = state.request.environ['neutron.context']
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation KeyError: 'neutron.context'
2017-03-15 05:04:13.916 12991 ERROR neutron.pecan_wsgi.hooks.translation

Switching web_framework to legacy works so it's related to pecan switch.

tags: added: gate-failure
Changed in neutron:
importance: Undecided → High
Revision history for this message
Jakub Libosvar (libosvar) wrote :

I'm not very familiar with pecan but from what I saw so far I think pecan now works only with keystone auth, while fullstack doesn't use auth.

neutron.context is added by keystonecontext factory that is not used by noauth

summary: - fullstack: Server can't server GET requests
+ Pecan doesn't work with noauth auth_strategy
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/446563

Changed in neutron:
assignee: nobody → Jakub Libosvar (libosvar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/446598

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Jakub Libosvar (<email address hidden>) on branch: master
Review: https://review.openstack.org/446563
Reason: Abandoned in favor of https://review.openstack.org/#/c/446598/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/446598
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=86866f9ba5655ada618be4ebdb4dd6d62dece314
Submitter: Jenkins
Branch: master

commit 86866f9ba5655ada618be4ebdb4dd6d62dece314
Author: Jakub Libosvar <email address hidden>
Date: Thu Mar 16 11:28:10 2017 -0400

    pecan: Make admin context if no context was created

    Simlarly to legacy [1] this patch creates context in case environment
    doesn't have one.

    Closes-bug: #1673105

    [1] https://git.openstack.org/cgit/openstack/neutron/tree/neutron/wsgi.py?id=fe4559f475757c7fc1314862eba4705a27c06c87#n276

    Change-Id: I4bf17d115166a8b18b054da41e79914eab27f6d3

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 11.0.0.0b1

This issue was fixed in the openstack/neutron 11.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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