admin image table failed to load image list
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Critical
|
Timur Sufiev |
Bug Description
Admin Image panel fails to load image list with the following error message.
Due to the error, the admin image table has no content.
2016-09-17 15:21:46.000420 error invoking apiclient
2016-09-17 15:21:46.000461 Traceback (most recent call last):
2016-09-17 15:21:46.000466 File "/opt/stack/
2016-09-17 15:21:46.000470 data = function(self, request, *args, **kw)
2016-09-17 15:21:46.000474 File "/opt/stack/
2016-09-17 15:21:46.000477 request, filters=filters, **kwargs)
2016-09-17 15:21:46.000480 File "/opt/stack/
2016-09-17 15:21:46.000484 _normalize_
2016-09-17 15:21:46.000487 File "/opt/stack/
2016-09-17 15:21:46.000491 _normalize_
2016-09-17 15:21:46.000495 File "/opt/stack/
2016-09-17 15:21:46.000498 visibility = PUBLIC_
2016-09-17 15:21:46.000502 KeyError: u'None'
2016-09-17 15:21:46.020015 error invoking apiclient
2016-09-17 15:21:46.020089 Traceback (most recent call last):
2016-09-17 15:21:46.020121 File "/opt/stack/
2016-09-17 15:21:46.020147 data = function(self, request, *args, **kw)
2016-09-17 15:21:46.020172 File "/opt/stack/
2016-09-17 15:21:46.020196 request, filters=filters, **kwargs)
2016-09-17 15:21:46.020219 File "/opt/stack/
2016-09-17 15:21:46.020265 _normalize_
2016-09-17 15:21:46.020293 File "/opt/stack/
2016-09-17 15:21:46.020321 _normalize_
2016-09-17 15:21:46.020366 File "/opt/stack/
2016-09-17 15:21:46.020396 visibility = PUBLIC_
2016-09-17 15:21:46.020420 KeyError: u'None'
description: | updated |
Changed in horizon: | |
assignee: | Akihiro Motoki (amotoki) → nobody |
After investigating this issue, it turns out it is more complex than I thought.
To retrieve all images from all tenants, is_public=None needs to be specified in Glance API v1. On the other hand, Glance API v2 returns all images from all tenants if a caller has admin privilege.
The error I reported occurs when Glance v2 API is used.
The cause is list-function- extra-params= "{is_public: 'None'}" specified in openstack_ dashboard/ static/ app/core/ images/ admin-panel. html.
If we consider glance v2 API only, the diff below will fix the problem.
--- dashboard/ static/ app/core/ images/ images. module. js b/openstack_ dashboard/ static/ app/core/ images/ images. module. js dashboard/ static/ app/core/ images/ images. module. js dashboard/ static/ app/core/ images/ images. module. js
diff --git a/openstack_
index e708291..2ead08e 100644
--- a/openstack_
+++ b/openstack_
@@ -303,7 +303,7 @@
});
$routeProv ider.when( '/admin/ images' , {
- templateUrl: path + 'admin-panel.html'
+ templateUrl: path + 'panel.html'
});
function goToAngularDeta ils(params) {
--
Unfortunately, this solution does not work for Glance v1 API.
I am not sure where should be changed to fix this bug.
To handle this bug, the logic needs to know which image API version is used.
The server side logic looks suitable to fix this issue, but at now the client side code handles v1/v2 differences.
Thought?