Default api_extensions_path not found

Bug #1316195 reported by Greg Lucas
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Medium
Ionuț Arțăriși
Icehouse
Fix Released
Medium
Ionuț Arțăriși

Bug Description

The default working directory for OpenStack services installed is in var/lib, e.g. /var/lib/trove. When run from this location the API extension routes will not be loaded and trove commands such as user-list and database-list will fail.

API extension routes are loaded based on the config option api_extensions_path. The specified path is assumed to be either an absolute path or relative to the working directory. The default path is 'trove/extensions/routes' so in a default install the extensions are not loaded.

We could do one of the following:
 - default to '$pybasedir/extensions/routes'
 - modify class TroveExtensionMiddleware to check that the specified api_extensions_path exists, and if not check to see if it exists relative to pybasedir.

Greg Lucas (glucas-q)
Changed in trove-integration:
assignee: nobody → Greg Lucas (glucas-q)
Changed in trove-integration:
status: New → Triaged
importance: Undecided → High
milestone: none → juno-1
importance: High → Medium
Greg Lucas (glucas-q)
Changed in trove-integration:
status: Triaged → In Progress
Greg Lucas (glucas-q)
affects: trove-integration → trove
Changed in trove:
milestone: juno-1 → none
Revision history for this message
Greg Lucas (glucas-q) wrote :

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

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

Reviewed: https://review.openstack.org/98021
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=de5ab898efe449a3c14fafc38df37ce7f958fa1f
Submitter: Jenkins
Branch: master

commit de5ab898efe449a3c14fafc38df37ce7f958fa1f
Author: Greg Lucas <email address hidden>
Date: Wed Jun 4 23:52:35 2014 -0400

    Make default extension path relative to pybasedir

    Load extensions from the trove base dir regardless of the current working
    directory.

    Closes-Bug: 1316195
    Change-Id: I7f75998a357d1fb2033ed944c552fd856c2f2939

Changed in trove:
status: In Progress → Fix Committed
Changed in trove:
milestone: none → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/107696

Revision history for this message
Ionuț Arțăriși (mapleoin) wrote :

I feel that this bug has not been fixed. I still have the same problem in master as described in the bug description.

This is due to the default value from trove.conf.sample which is still:

api_extensions_path = trove/extensions/routes

This takes precedence over the default set in common/cfg.py

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

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

Changed in trove:
assignee: Greg Lucas (glucas-q) → Ionuț Arțăriși (mapleoin)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/107744
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=54097e23b8d6c0a2c62d06138465a988a474979b
Submitter: Jenkins
Branch: master

commit 54097e23b8d6c0a2c62d06138465a988a474979b
Author: Ionuț Arțăriși <email address hidden>
Date: Thu Jul 17 17:20:56 2014 +0200

    Make default extension path relative to pybasedir

    Change the default extension path in the sample config files as these
    take precedence over the files values in common/cfg.py

    Change-Id: I3c473fb9cd7e81341a1963a35834ef4c2fd69717
    Closes-Bug: 1316195

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

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/108916

Changed in trove:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (stable/icehouse)

Reviewed: https://review.openstack.org/108916
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=56ff09fb11bbd81551be727d1da87f6b9f429b7f
Submitter: Jenkins
Branch: stable/icehouse

commit 56ff09fb11bbd81551be727d1da87f6b9f429b7f
Author: Ionuț Arțăriși <email address hidden>
Date: Thu Jul 17 17:20:56 2014 +0200

    Make default extension path relative to pybasedir

    Change the default extension path in the sample config files as these
    take precedence over the files values in common/cfg.py

    Change-Id: I3c473fb9cd7e81341a1963a35834ef4c2fd69717
    Closes-Bug: 1316195

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

Reviewed: https://review.openstack.org/107696
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=ac4bb8922050dd989662e069909fc3db3c286bc1
Submitter: Jenkins
Branch: stable/icehouse

commit ac4bb8922050dd989662e069909fc3db3c286bc1
Author: Greg Lucas <email address hidden>
Date: Wed Jun 4 23:52:35 2014 -0400

    Make default extension path relative to pybasedir

    Load extensions from the trove base dir regardless of the current working
    directory.

    Closes-Bug: 1316195
    Change-Id: I7f75998a357d1fb2033ed944c552fd856c2f2939

Thierry Carrez (ttx)
Changed in trove:
milestone: juno-2 → 2014.2
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.