Bad path for GLANCE_BIN_DIR on stack.sh first run

Bug #1068386 reported by Terry Wilson
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
Jakub Ružička

Bug Description

On a newly installed Fedora 17 vm, running stack.sh fails on the first run with:

Configuring Glance
+ init_glance
+ rm -rf /opt/stack/data/glance/images
+ mkdir -p /opt/stack/data/glance/images
+ rm -rf /opt/stack/data/glance/cache
+ mkdir -p /opt/stack/data/glance/cache
+ mysql -uroot -p5e28dc3e00ed45bcb466 -e 'DROP DATABASE IF EXISTS glance;'
+ mysql -uroot -p5e28dc3e00ed45bcb466 -e 'CREATE DATABASE glance CHARACTER SET utf8;'
+ /usr/local/bin/glance-manage db_sync
/home/terry/devstack/lib/glance: line 155: /usr/local/bin/glance-manage: No such file or directory

due to GLANCE_BIN_DIR being set to /usr/local/bin since it is set before the source is cloned. Re-running stack.sh fixes the issue since GLANCE_DIR/bin exists at that point.

This problem also exists for all of the other services in lib/ that use the same check for [[ -d $SERVICE_DIR/bin ]] before setting their BIN dirs. There are several ways to fix this, but since I'm not very clear on what the "entry points" feature that this check is supposed to support, I'm not sure the best way to proceed.

Revision history for this message
Daniel Berrange (berrange) wrote :

I'm hitting this issue too - AFAICT, the only way this would ever work is if all the nova/glance/keystone/etc GIT repos were already checked out before the user ran stack.sh, but clearly that defeats the point of having stack.sh do it all. Looking at the code, I don't think this is likely to be Fedora 17 specific - I'd expect all distros to hit this.

Revision history for this message
Sean Dague (sdague) wrote :

Seems like it's just an out of order issue. I'd suggest moving it into configure_glance after the directory creation.

Martin Mágr (mmagr)
Changed in devstack:
assignee: nobody → Martin Magr (mmagr)
Revision history for this message
Martin Mágr (mmagr) wrote :

Does anybody know, why default for *BIN_DIR is /usr/local/bin/ when all scripts are installed to /usr/bin/?

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/17792

Changed in devstack:
status: New → In Progress
Changed in devstack:
assignee: Martin Magr (mmagr) → Jakub Ruzicka (jruzicka)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

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

commit 4196d5565e48608c64fccdd9e17fcc01dd8d06fe
Author: Jakub Ruzicka <email address hidden>
Date: Wed Jan 30 15:35:54 2013 +0100

    Introduce get_python_exec_prefix function.

    get_python_exec_prefix returns the path to the direcotry where python
    executables are installed, that is /usr/bin on Fedora and /usr/local/bin
    everywhere else.

    It is used to properly locate OpenStack executables.

    Fixes: bug #1068386

    Change-Id: I228498ebe2762568d00757d065e37377ee2c8fb3

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

Other bug subscribers