Ironic: "api_version" configuration option should support microversion

Bug #1493094 reported by Lucas Alvares Gomes
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Medium
Lucas Alvares Gomes

Bug Description

The Nova Ironic driver supports setting the API version that it will use to when talking to the Ironic API, to do it one should change the "api_version" configuration option under the "ironic" section. The problem is that, since Ironic supports microversion we can't set a version to be "1.8" for e.g, which is a complete valid version for Ironic but the "api_version" field is expecting a Int() instead of a Float() or Str().

How to reproduce:

1- Set the "api_version" under the "ironic" section in nova.conf to some float value, i.e 1.8

2- Restart nova-compute

Error log:

2015-09-07 16:32:31.899 CRITICAL nova [req-f9380d3d-8ea5-48ea-8fa3-5c497c0e3e1c None None] ConfigFileValueError: Value for option api_version is not valid: invalid literal for int() with base 10: '1.8'

2015-09-07 16:32:31.899 TRACE nova Traceback (most recent call last):
2015-09-07 16:32:31.899 TRACE nova File "/usr/local/bin/nova-compute", line 10, in <module>
2015-09-07 16:32:31.899 TRACE nova sys.exit(main())
2015-09-07 16:32:31.899 TRACE nova File "/opt/stack/nova/nova/cmd/compute.py", line 74, in main
2015-09-07 16:32:31.899 TRACE nova service.wait()
2015-09-07 16:32:31.899 TRACE nova File "/opt/stack/nova/nova/service.py", line 439, in wait
2015-09-07 16:32:31.899 TRACE nova _launcher.wait()
2015-09-07 16:32:31.899 TRACE nova File "/usr/local/lib/python2.7/dist-packages/oslo_service/service.py", line 281, in wait
2015-09-07 16:32:31.899 TRACE nova status, signo = self._wait_for_exit_or_signal(ready_callback)
2015-09-07 16:32:31.899 TRACE nova File "/usr/local/lib/python2.7/dist-packages/oslo_service/service.py", line 254, in _wait_for_exit_or_signal
2015-09-07 16:32:31.899 TRACE nova self.conf.log_opt_values(LOG, logging.DEBUG)
2015-09-07 16:32:31.899 TRACE nova File "/usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2233, in log_opt_values
2015-09-07 16:32:31.899 TRACE nova _sanitize(opt, getattr(group_attr, opt_name)))
2015-09-07 16:32:31.899 TRACE nova File "/usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2559, in __getattr__
2015-09-07 16:32:31.899 TRACE nova return self._conf._get(name, self._group)
2015-09-07 16:32:31.899 TRACE nova File "/usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2276, in _get
2015-09-07 16:32:31.899 TRACE nova value = self._do_get(name, group, namespace)
2015-09-07 16:32:31.899 TRACE nova File "/usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2319, in _do_get
2015-09-07 16:32:31.899 TRACE nova % (opt.name, str(ve)))
2015-09-07 16:32:31.899 TRACE nova ConfigFileValueError: Value for option api_version is not valid: invalid literal for int() with base 10: '1.8'
2015-09-07 16:32:31.899 TRACE nova

Tags: ironic
tags: added: ironic
Changed in nova:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
summary: - Ironic: "api_version" configuration option should be float (to support
- microversion)
+ Ironic: "api_version" configuration option should support microversion
description: updated
Revision history for this message
Ruby Loo (rloo) wrote :

I think this is a duplicate of https://bugs.launchpad.net/nova/+bug/1459874, but I'll leave it for the two assignees to discuss.

Revision history for this message
Michael Davies (mrda) wrote :

I've closed down https://bugs.launchpad.net/nova/+bug/1459874 as a duplicate of this - I think Lucas will get to this before I get to the other one.

Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Ruby Loo (rloo) wrote :
Revision history for this message
Lucas Alvares Gomes (lucasagomes) wrote :

Marking the bug as invalid. The ironic team came to an agreement that setting the API version via configuration option shouldn't be supported anymore in the Nova driver.

Changed in nova:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.