Contrail web-ui doesn't work if any tenant in keystone is disabled

Bug #1491217 reported by Nachi Ueno
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.0
Fix Committed
Critical
Rahul
R2.1
Won't Fix
Critical
Rahul
R2.20
Fix Committed
Critical
Rahul
Trunk
Fix Committed
Critical
Rahul

Bug Description

If we disable keystone tenant, contrail-webui stop working.

 log fragment:
2015-09-01T07:16:00.531Z - error: URL [http://172.26.10.214:5000/v2.0/tokens] returned error [{"error":{"message":"The request you have made requires authentication.","code":401,"title":"Unauthorized"}}]
2015-09-01T07:16:00.532Z - error: authPostV2Req() error:REST Server Error: { error:
   { message: 'The request you have made requires authentication.',
     code: 401,
     title: 'Unauthorized' } }
TypeError: Failed to parse JSON body: Cannot read property 'tokenObj' of null
    at /usr/src/contrail/contrail-web-core/src/serverroot/orchestration/plugins/openstack/keystone.api.js:922:38
    at _asyncMap (/usr/lib64/node_modules/async/lib/async.js:254:17)
    at done (/usr/lib64/node_modules/async/lib/async.js:135:19)
    at _toString (/usr/lib64/node_modules/async/lib/async.js:32:16)
    at _asyncMap (/usr/lib64/node_modules/async/lib/async.js:251:21)
    at /usr/src/contrail/contrail-web-core/src/serverroot/orchestration/plugins/openstack/keystone.api.js:888:13
    at /usr/src/contrail/contrail-web-core/src/serverroot/orchestration/plugins/openstack/keystone.api.js:665:17
    at /usr/src/contrail/contrail-web-core/src/serverroot/orchestration/plugins/openstack/keystone.api.js:307:13
    at /usr/src/contrail/contrail-web-core/src/serverroot/orchestration/plugins/openstack/keystone.api.js:116:9
    at /usr/src/contrail/contrail-web-core/src/serverroot/orchestration/plugins/openstack/keystone.api.js:98:9
2015-09-01T07:16:00.620Z - error: URL [http://172.26.10.214:5000/v2.0/tokens] returned error [{}]
2015-09-01T07:16:00.620Z - error: authPostV2Req() error:REST Server Error: [TypeError: Failed to parse JSON body: Cannot read property 'tokenObj' of null]

/usr/lib64/node_modules/async/lib/async.js:30
            if (called) throw new Error("Callback was already called.");
                              ^
Error: Callback was already called.
    at _toString (/usr/lib64/node_modules/async/lib/async.js:30:31)
    at _asyncMap (/usr/lib64/node_modules/async/lib/async.js:251:21)
    at /usr/src/contrail/contrail-web-core/src/serverroot/orchestration/plugins/openstack/keystone.api.js:890:13
    at /usr/src/contrail/contrail-web-core/src/serverroot/orchestration/plugins/openstack/keystone.api.js:667:17
    at getAuthData (/usr/src/contrail/contrail-web-core/src/serverroot/orchestration/plugins/openstack/keystone.api.js:302:9)
    at /usr/src/contrail/contrail-web-core/src/serverroot/orchestration/plugins/openstack/keystone.api.js:310:13
    at /usr/src/contrail/contrail-web-core/src/serverroot/orchestration/plugins/openstack/keystone.api.js:116:9
    at /usr/src/contrail/contrail-web-core/src/serverroot/orchestration/plugins/openstack/keystone.api.js:98:9
    at APIServer.retryMakeCall (/usr/src/contrail/contrail-web-core/src/serverroot/common/rest.api.js:177:5)
    at Request.APIServer.makeCall (/usr/src/contrail/contrail-web-core/src/serverroot/common/rest.api.js:285:18)
First it happened with demo tenant, but I've verified that creating new tenant and disabling it also causes the same problem.

Tags: blocker ui
Rahul (rahuls)
tags: added: ui
removed: webui
Changed in juniperopenstack:
assignee: nobody → Rahul (rahuls)
importance: High → Critical
tags: added: blocker
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/13502
Submitter: Biswajit Mandal (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/13502
Committed: http://github.org/Juniper/contrail-web-core/commit/db0e9621c6c9c7f88aed38d5d8c9cb2d0089663f
Submitter: Zuul
Branch: master

commit db0e9621c6c9c7f88aed38d5d8c9cb2d0089663f
Author: Biswajit Mandal <email address hidden>
Date: Wed Sep 2 10:04:45 2015 +0530

Closes-Bug: #1491217
If a tenant is disabled and getting tokens API to keystones throws error,
so handled the null case before accessing variable.

Change-Id: I03021444f9ed36135bd85b0129bbb3e4e0c5a86f

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/13578
Submitter: Biswajit Mandal (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.0

Review in progress for https://review.opencontrail.org/13580
Submitter: Biswajit Mandal (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/13578
Committed: http://github.org/Juniper/contrail-web-core/commit/40e64465c400994ac0ff0fb721bff010b8f4405e
Submitter: Zuul
Branch: R2.20

commit 40e64465c400994ac0ff0fb721bff010b8f4405e
Author: Biswajit Mandal <email address hidden>
Date: Wed Sep 2 10:04:45 2015 +0530

Closes-Bug: #1491217
If a tenant is disabled and getting tokens API to keystones throws error,
so handled the null case before accessing variable.

Change-Id: I03021444f9ed36135bd85b0129bbb3e4e0c5a86f
(cherry picked from commit db0e9621c6c9c7f88aed38d5d8c9cb2d0089663f)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/13580
Committed: http://github.org/Juniper/contrail-web-core/commit/9c9ef0b7aab1b51f742654dd38314c460bca9c1d
Submitter: Zuul
Branch: R2.0

commit 9c9ef0b7aab1b51f742654dd38314c460bca9c1d
Author: Biswajit Mandal <email address hidden>
Date: Wed Sep 2 10:04:45 2015 +0530

Closes-Bug: #1491217
If a tenant is disabled and getting tokens API to keystones throws error,
so handled the null case before accessing variable.

Conflicts:
 src/serverroot/orchestration/plugins/openstack/keystone.api.js

Change-Id: I03021444f9ed36135bd85b0129bbb3e4e0c5a86f
(cherry picked from commit db0e9621c6c9c7f88aed38d5d8c9cb2d0089663f)

Jeba Paulaiyan (jebap)
information type: Proprietary → Public
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.