Bad path for GLANCE_BIN_DIR on first run

Bug #1068386 reported by Terry Wilson on 2012-10-18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Jakub Ruzicka

Bug Description

On a newly installed Fedora 17 vm, running 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 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.

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, but clearly that defeats the point of having 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.

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) on 2012-12-05
Changed in devstack:
assignee: nobody → Martin Magr (mmagr)
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/?

Fix proposed to branch: master

Changed in devstack:
status: New → In Progress
Jakub Ruzicka (jruzicka) on 2013-01-18
Changed in devstack:
assignee: Martin Magr (mmagr) → Jakub Ruzicka (jruzicka)

Fix proposed to branch: master

Fix proposed to branch: master

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  Edit
Everyone can see this information.

Other bug subscribers