nova-manage --version doesn't return anything

Bug #1138844 reported by Joe Gordon
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Mark McLoughlin
oslo-incubator
Invalid
Low
Davanum Srinivas (DIMS)

Bug Description

From Latest Develop (Grizzly RC3)

$ nova-manage --version
$

$ nova-manage version
2013.1
$

Joe Gordon (jogo)
description: updated
Revision history for this message
Chuck Short (zulcss) wrote :

Is this a regression?

Changed in nova:
status: New → Confirmed
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

@markmc,

1) For "--version" to work is for us to pass in version string in nova/config.py when we call cfg.CONF()
2) To get the version string we need to call version_string_with_package() in nova/version.py

#2 assumes that config-dir, config-file, project options are set because it is calling find_file in cfg.py which is done in #1 (cfg.CONF() is called with project, version etc). So there seems to be a cyclical problem.

Thoughts please?

-- dims

Revision history for this message
Joe Gordon (jogo) wrote :

'nova-manage version' works

just not 'nova-manage --version'

vagrant@precise64:~$ nova-manage version
2013.1
vagrant@precise64:~$ nova-manage --version
vagrant@precise64:~$

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

@markmc,

The only solution i could come up with with least changes to oslo-config and nova is this:

http://paste.openstack.org/show/32974/

-- dims

Changed in oslo:
status: New → Confirmed
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Shows up in other projects as well

https://bugs.launchpad.net/keystone/+bug/1152740

Revision history for this message
Michael Still (mikal) wrote :

@dims -- I recon you should send off that paste as a code review.

Changed in nova:
status: Confirmed → Triaged
importance: Undecided → Low
Changed in oslo:
status: Confirmed → Triaged
importance: Undecided → Low
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

I have some changes for oslo in https://review.openstack.org/#/c/24076/ - if that gets approved, then i'll submit the nova changes needed.

Changed in oslo:
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
status: Triaged → Confirmed
Changed in nova:
status: Triaged → Confirmed
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/24173

Changed in nova:
assignee: Davanum Srinivas (DIMS) (dims-v) → Mark McLoughlin (markmc)
status: Confirmed → In Progress
Revision history for this message
Mark McLoughlin (markmc) wrote :

I proposed a simple patch to Nova that seems to work fine

dims: not sure why you wanted to use version_string_with_package() rather than simply version_string() ?

Changed in oslo:
status: Confirmed → Invalid
Mark McLoughlin (markmc)
Changed in nova:
milestone: none → grizzly-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/24173
Committed: http://github.com/openstack/nova/commit/01627ff0bf522deb8c2a838724f88cd2506ca626
Submitter: Jenkins
Branch: master

commit 01627ff0bf522deb8c2a838724f88cd2506ca626
Author: Mark McLoughlin <email address hidden>
Date: Tue Mar 12 13:02:09 2013 +0000

    Fix nova-manage --version

    Fixes bug #1138844

    Pass the version kwarg to cfg.CONF() so that --version shows the
    version number.

    Change-Id: I589ebffec67ef00f8ba24f553bf3e81806aa50b6

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
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.