fix: actions need hooks/
Some charm builds will put additional functionality into a subdirectory of hooks/ (eg designate-bind creates a hooks/relations directory.) However, when running an action, those are run from "actions/pause" not as "hooks/config-changed". Which means that they cannot find the "relations" directory to import it. We could: a) symlink all the extra things from actions/* to point at hooks/* b) include hooks as part of the import path c) change so that all of those extra libraries are put into somewhere in 'lib' instead of somewhere in hooks/*. This patch chooses (b). This should fix: https://bugs.launchpad.net/charm-designate-bind/+bug/2107591 once it is rebuilt with this version of layer openstack. Closes-Bug: 2107591 Change-Id: Ib1f0893bbff00ffc28a80162dd5472bfb64a3033 Signed-off-by: Arif Ali <arif-ali@ubuntu.com>
This commit is contained in:
@@ -18,6 +18,9 @@ import sys
|
||||
|
||||
# Load modules from $CHARM_DIR/lib
|
||||
sys.path.append('lib')
|
||||
# Some charms include extra functionality in the hooks/ directory
|
||||
# Load modules from $CHARM_DIR/hooks (eg hooks/relations)
|
||||
sys.path.append('hooks')
|
||||
|
||||
from charms.layer import basic
|
||||
basic.bootstrap_charm_deps()
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Requirements to build the layer
|
||||
charm-tools
|
||||
git+https://github.com/juju/charm-tools.git
|
||||
simplejson
|
||||
flake8
|
||||
|
||||
@@ -9,3 +9,4 @@ netifaces>=0.10.4
|
||||
psutil
|
||||
# charms_openstack - pull from github until first release
|
||||
git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack
|
||||
pbr>=6.1.1
|
||||
|
||||
Reference in New Issue
Block a user