Horizon Dashboard plugin fails into an login-logout loop.

asked 2017-06-05 09:47:31 -0500

Eugene gravatar image

Hi.

I have a Horizon plugin that extends horizon.dashboard.project.workflow.launch-instance module with an additional step that lists flavors with a target extra-spec properties. The step is an effort to enable user selection of the flavor for an additional nova-boot command param for the extra-spec properties in launch instance action.

The plugin loads fine and the additional step shows in launch instance workflow wizard; however, everytime I restart dashboard tox -e runserver 0.0.0.0:9000 I get into an login-logout loop that stops me from logging in with a valid userId. Terminal shows errors shown below. If I manually stop the browser redirection during the login-logout loop, put in an user credential and hit 'Sign In' it does not get into the login-logout loop and load user into dashboard page just fine.

It seems to me there is an automatic login under the cover with a predefined user credential that keep failing and results in the login logout loop.

Performing system checks...

System check identified no issues (0 silenced).
June 05, 2017 - 14:25:38
Django version 1.8.17, using settings 'openstack_dashboard.settings'
Starting development server at http://0.0.0.0:9000/
Quit the server with CONTROL-C.
[05/Jun/2017 14:25:43] "GET / HTTP/1.1" 302 0
[05/Jun/2017 14:25:51] "GET /auth/login/?next=/ HTTP/1.1" 200 1530522
[05/Jun/2017 14:25:51] "GET /i18n/js/horizon+openstack_dashboard+myplugin/ HTTP/1.1" 200 2370
[05/Jun/2017 14:25:51] "GET /api/keystone/user-session/ HTTP/1.1" 401 15
[05/Jun/2017 14:25:51] "GET /api/keystone/svc-catalog/ HTTP/1.1" 401 15
[05/Jun/2017 14:25:51] "POST /api/policy/ HTTP/1.1" 401 15
[05/Jun/2017 14:25:51] "POST /api/policy/ HTTP/1.1" 401 15
[05/Jun/2017 14:25:51] "GET /api/settings/ HTTP/1.1" 401 15
Logging out user "".
[05/Jun/2017 14:25:52] "GET /auth/logout/ HTTP/1.1" 302 0
[05/Jun/2017 14:25:59] "GET /auth/login/ HTTP/1.1" 200 1530457
[05/Jun/2017 14:25:59] "GET /i18n/js/horizon+openstack_dashboard+myplugin/ HTTP/1.1" 200 2370
[05/Jun/2017 14:26:00] "GET /api/keystone/user-session/ HTTP/1.1" 401 15
[05/Jun/2017 14:26:00] "GET /api/keystone/svc-catalog/ HTTP/1.1" 401 15
[05/Jun/2017 14:26:00] "POST /api/policy/ HTTP/1.1" 401 15
[05/Jun/2017 14:26:00] "POST /api/policy/ HTTP/1.1" 401 15
[05/Jun/2017 14:26:00] "GET /api/settings/ HTTP/1.1" 401 15
Logging out user "".
[05/Jun/2017 14:26:00] "GET /auth/logout/ HTTP/1.1" 302 0
[05/Jun/2017 14:26:21] "GET /auth/login/ HTTP/1.1" 200 1530457

This is happening in both FF and Chrome on CentOS. Note the errors that say logging out user "". gives me an impression that some auto login seems to be happening ... (more)

edit retag flag offensive close merge delete