a7223f0968
Rather than looking for a package to be installed, this change lets us look for the ceph.conf that is setup by the charm to determine if the charm has moved past its install hook Change-Id: I2b6cfbe0bb4207733ed991f6d3a9850584e30408
22 lines
759 B
Bash
Executable File
22 lines
759 B
Bash
Executable File
#!/bin/bash
|
|
# shim used to determine that the ceph packages have been installed
|
|
# before running hook execution. The add-storage hook fires before
|
|
# the install hook in order to provide storage for charms which need
|
|
# it at install time, however the storage added for the ceph-osd
|
|
# application will be used to create OSDs, which require the ceph
|
|
# binaries, bootstrapping the node, etc.
|
|
#
|
|
# Note: this doesn't wait to ensure that ceph is bootstrapped because
|
|
# that logic is already existing in the charm's hook.
|
|
|
|
IFS='/' read -r -a array <<< "$JUJU_UNIT_NAME"
|
|
LOCAL_UNIT="${array[0]}"
|
|
charm_ceph_conf="/var/lib/charm/$LOCAL_UNIT/ceph.conf"
|
|
|
|
if ! test -e $charm_ceph_conf; then
|
|
juju-log "Ceph not yet installed."
|
|
exit 0
|
|
fi
|
|
|
|
exec ./hooks/storage.real
|