ConfigFileValueError when defining enabled_apis

Bug #1751036 reported by Jerome Pansanel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Won't Fix
Undecided
Unassigned

Bug Description

After the upgrade of our OpenStack Cloud infrastructure from Newton to Pike, the following error has appeared:
Traceback (most recent call last):
File "/usr/bin/nova-api", line 10, in <module>
sys.exit(main())
File "/usr/lib/python2.7/site-packages/nova/cmd/api.py", line 44, in main
if 'osapi_compute' in CONF.enabled_apis:
File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2485, in __getattr__
return self._get(name)
File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2929, in _get
value = self._do_get(name, group, namespace)
File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2972, in _do_get
% (opt.name, str(ve)))
ConfigFileValueError: Value for option enabled_apis is not valid: Valid values are [osapi_compute, metadata], but found 'ooi,ec2'

It comes from the fact that we are defining the enabled_apis parameter in nova.conf like:
enabled_apis=osapi_compute,metadata,ooi

It is for us a requirement to be able to define the enabled_apis parameter. We are member of the EGI Cloud federation, that requires an additional API to be available to the users (OCCI). This API is made available through the OOI project (https://github.com/openstack/ooi).

After some investigation, I have seen that the issue is a consequence from this commit:
https://github.com/openstack/nova/commit/e8436283e45b6716fb61d6f6590fadb5fb4ba45c#diff-d4b6199156ad8829f4d47d89d9eef4a7

The bug is fixed when I remove lines 84 ad 85 in https://github.com/openstack/nova/blob/master/nova/conf/service.py.

Is there any reason to enforce the value of enabled_apis?

Tags: api config
Revision history for this message
Jerome Pansanel (pansanel) wrote :

A patch that fix the issue

Matt Riedemann (mriedem)
tags: added: api config
Revision history for this message
Matt Riedemann (mriedem) wrote :

The enabled_apis in nova are fixed for interoperability reasons. There is only one nova compute API.

If you want to run another API, then you should do so like the ec2 or GCE proxies, e.g.:

https://github.com/openstack/gce-api/blob/master/gceapi/cmd/api.py#L34

You can run your own service and add your own entry to the service catalog, but it's not nova.

Changed in nova:
status: New → Won't Fix
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.