Impossible to invoke novaclient APIs
Bug #1401800 reported by
Trung Trinh
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
High
|
Trung Trinh |
Bug Description
Version: stable/juno
Bug description:
Even though the module cinder.compute.nova is provided, it's actually useless because it's impossible to invoke novaclient APIs.
This is because the connection to the compute endpoint can't be established.
The consequence is that all the functions, which are implemented in class API of the module cinder.
Proposal:
Define a valid compute endpoint.
Changed in cinder: | |
assignee: | nobody → Trung Trinh (trung-t-trinh) |
status: | New → In Progress |
Changed in cinder: | |
assignee: | Trung Trinh (trung-t-trinh) → Huang Zhiteng (zhiteng-huang) |
Changed in cinder: | |
assignee: | Huang Zhiteng (zhiteng-huang) → Trung Trinh (trung-t-trinh) |
Changed in cinder: | |
importance: | Undecided → High |
Changed in cinder: | |
milestone: | none → kilo-1 |
Changed in cinder: | |
status: | Fix Committed → Fix Released |
tags: | removed: cinder |
Changed in cinder: | |
milestone: | kilo-1 → 2015.1.0 |
To post a comment you must log in.
Root cause is found out as follows.
In function "url_for()" of the class "ServiceCatalog" inside the module "novaclient. service_ catalog" , the exceptions. EndpointNotFoun d is raised because no matching endpoint found.
This is because in the module "cinder. compute. nova", the configuration for the info of "<service_name>" is wrongly hard-coded with the value of "nova". Instead, it must have been the value of "Compute Service" which is found in the variable "context. service_ catalog"
This can be seen by adding more debug log as follows:
2014-12-13 00:21:57,900 - my_logger - DEBUG - cinder.compute.nova - novaclient() - service_ type:compute, service_ name:Compute Service, endpoint_ type:publicURL, service_ catalog: [{u'endpoints' : [{u'adminURL': u'http:// 192.168. 56.103: 8774/v2/ e97e53f28fd64a0 2a90ae39c5e7c20 49', u'region': u'RegionOne', u'internalURL': u'http:// 192.168. 56.103: 8774/v2/ e97e53f28fd64a0 2a90ae39c5e7c20 49', u'publicURL': u'http:// 192.168. 56.103: 8774/v2/ e97e53f28fd64a0 2a90ae39c5e7c20 49'}], u'type': u'compute', u'name': u'Compute Service'}, {u'endpoints': [{u'adminURL': u'http:// 192.168. 56.103: 8080/', u'region': u'RegionOne', u'internalURL': u'http:// 192.168. 56.103: 8080/v1/ AUTH_e97e53f28f d64a02a90ae39c5 e7c2049', u'publicURL': u'http:// 192.168. 56.103: 8080/v1/ AUTH_e97e53f28f d64a02a90ae39c5 e7c2049'}], u'type': u'object-store', u'name': u'Swift Service'}]
2014-12-13 00:21:57,903 - my_logger - DEBUG - cinder.compute.nova - novaclient() - Novaclient connection created using URL:http:// 192.168. 56.103: 8774/v2/ e97e53f28fd64a0 2a90ae39c5e7c20 49, context. service_ catalog: [{u'endpoints' : [{u'adminURL': u'http:// 192.168. 56.103: 8774/v2/ e97e53f28fd64a0 2a90ae39c5e7c20 49', u'region': u'RegionOne', 'serviceName': u'Compute Service', u'internalURL': u'http:// 192.168. 56.103: 8774/v2/ e97e53f28fd64a0 2a90ae39c5e7c20 49', u'publicURL': u'http:// 192.168. 56.103: 8774/v2/ e97e53f28fd64a0 2a90ae39c5e7c20 49'}], u'type': u'compute', u'name': u'Compute Service'}, {u'endpoints': [{u'adminURL': u'http:// 192.168. 56.103: 8080/', u'region': u'RegionOne', u'internalURL': u'http:// 192.168. 56.103: 8080/v1/ AUTH_e97e53f28f d64a02a90ae39c5 e7c2049', u'publicURL': u'http:// 192.168. 56.103: 8080/v1/ AUTH_e97e53f28f d64a02a90ae39c5 e7c2049'}], u'type': u'object-store', u'name': u'Swift Service'}]
Bug fix proposal:
In the module "cinder. compute. nova", change the "nova_opts" to this one:
nova_opts = [ StrOpt( 'nova_catalog_ info',
default= 'compute: Compute Service:publicURL',
help=' Match this value when searching for nova in the '
' service catalog. Format is: separated values of '
' the form: '
' <service_ type>:< service_ name>:< endpoint_ type>') , StrOpt( 'nova_catalog_ admin_info' ,
default= 'compute: Compute Service:adminURL',
help=' Same as nova_catalog_info, but for admin endpoint.'), ....... .......
cfg.
cfg.
....