easyinstall scripts in /usr/local/bin do not work

Bug #885087 reported by Jesse Andrews
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Medium
Dean Troyer

Bug Description

[this was reported by Scott Moser on github issues and moved here]

$ which nova-manage
/usr/local/bin/nova-manage

$ nova-manage flavor list
Command failed, please check log for more info
2011-10-17 13:37:49,222 CRITICAL nova [-] (OperationalError) no such table: instance_types u'SELECT instance_types.created_at AS instance_types_created_at, instance_types.updated_at AS instance_types_updated_at, instance_types.deleted_at AS instance_types_deleted_at, instance_types.deleted AS instance_types_deleted, instance_types.id AS instance_types_id, instance_types.name AS instance_types_name, instance_types.memory_mb AS
<SNIP>
...

$ /opt/stack/nova/bin/nova-manage flavor list
2011-10-17 13:38:51,685 DEBUG nova.utils [-] backend <module 'nova.db.sqlalchemy.api' from '/opt/stack/nova/nova/db/sqlalchemy/api.pyc'> from (pid=22843) __get_backend /opt/stack/nova/nova/utils.py:447
m1.medium: Memory: 4096MB, VCPUS: 2, Storage: 40GB, FlavorID: 3, Swap: 0MB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.large: Memory: 8192MB, VCPUS: 4, Storage: 80GB, FlavorID: 4, Swap: 0MB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.tiny: Memory: 512MB, VCPUS: 1, Storage: 0GB, FlavorID: 1, Swap: 0MB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.xlarge: Memory: 16384MB, VCPUS: 8, Storage: 160GB, FlavorID: 5, Swap: 0MB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.small: Memory: 2048MB, VCPUS: 1, Storage: 20GB, FlavorID: 2, Swap: 0MB, RXTX Quota: 0GB, RXTX Cap: 0MB

$ cat /usr/local/bin/nova-manage
#!/usr/bin/python
# EASY-INSTALL-DEV-SCRIPT: 'nova==2011.3','nova-manage'
__requires__ = 'nova==2011.3'
from pkg_resources import require; require('nova==2011.3')
del require
__file__ = '/opt/stack/nova/bin/nova-manage'
execfile(__file__)

Revision history for this message
Anthony Young (sleepsonthefloor) wrote :

This fails for me too, because --flagfile is not specified (--flagfile for devstack defaults to /opt/stack/nova/bin/nova.conf). If there is a way to specify flagfile via env variable, we could add it to openrc.

Revision history for this message
Scott Moser (smoser) wrote :

well one possibly reasonable work around is to delete those, and set PATH appropriately, so that it finds the stuff in /opt/stack/nova/bin.

you can absolutely set the PATH for the screen session, and even on sourcing of openrc.

Revision history for this message
Jesse Andrews (anotherjesse) wrote : Re: [Bug 885087] Re: easyinstall scripts in /usr/local/bin do not work

Vish was wanting us to put the conf files in /etc/nova.

But that might make having multiple versions of openstack on a system
harder?

Revision history for this message
Monty Taylor (mordred) wrote :

I'd be more inline with vish - install the conf files to /etc - and if
you want multple versions on the same box, use virtualization. No?

On 12/09/2011 02:15 PM, anotherjesse wrote:
> Vish was wanting us to put the conf files in /etc/nova.
>
> But that might make having multiple versions of openstack on a system
> harder?
>

Revision history for this message
Scott Moser (smoser) wrote :

i would be happy enough if nothing was installed in /usr/local, but PATH/environment was configured correctly to use the write programs. Easy enough to set that all up in openrc or some other sourcable file.

I dont really think that multiple decstack installations (avoiding /etc) is necessary for devstack. I think most use it us an ephemeral system if some sort.

Dean Troyer (dtroyer)
Changed in devstack:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Dean Troyer (dtroyer) wrote :

Checking the extent of the problem:

Nova: $(dirname $0)/*, /etc/nova/*

KSL: etc/keystone.conf

Glance: /etc/glance/*, etc/*

Swift: appears to use config/*

Nova is the only project that doesn't yet use a config dir under the top-level installation directory. Symlinking /etc/nova/nova.conf to /opt/stack/nova/bin/nova.conf appears to solve this problem. Solving the larger problem of project config file placement seems to be a low (non-existant?) priority

Changed in devstack:
assignee: nobody → Dean Troyer (dtroyer)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

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

Changed in devstack:
status: Triaged → In Progress
Revision history for this message
Dean Troyer (dtroyer) wrote :

Proposed fix moves nova.conf and nova-api-paste.ini to /etc/nova.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/4070
Committed: http://github.com/openstack-dev/devstack/commit/d1dd25e6a60d7987f94cb39f2150d8083f562032
Submitter: Jenkins
Branch: master

commit d1dd25e6a60d7987f94cb39f2150d8083f562032
Author: Dean Troyer <email address hidden>
Date: Mon Feb 13 11:22:36 2012 -0600

    Fixes bug 885087: /etc/nova/nova.conf

    Move Nova config files (nova.conf, api-paste.ini) to /etc/nova
    so all binaries can find them, particularly /usr/local/bin/nova-manage.

    Change-Id: I2fb71159c16dffc610dcfda4158593dbd6423c5e

Changed in devstack:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

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

Changed in devstack:
status: Fix Committed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/4227
Committed: http://github.com/openstack-dev/devstack/commit/bd13b708f2895a1e6e49096231ce3c60c3bbfa8e
Submitter: Jenkins
Branch: master

commit bd13b708f2895a1e6e49096231ce3c60c3bbfa8e
Author: Dean Troyer <email address hidden>
Date: Mon Feb 13 11:22:36 2012 -0600

    Fixes bug 885087: /etc/nova/nova.conf

    (This commit didn't get backported to redux, so needs to be re-applied now.)

    Move Nova config files (nova.conf, api-paste.ini) to /etc/nova
    so all binaries can find them, particularly /usr/local/bin/nova-manage.

    Change-Id: I002a9ae1c601894c943a49057cdcf0ab9e9d6c61

Changed in devstack:
status: In Progress → Fix Committed
Dean Troyer (dtroyer)
Changed in devstack:
status: Fix Committed → Fix Released
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.