Add pre-install phase for extras.d plugins

An additional call hook for the extras.d plugins that is called before
any service installation occurs turns out to be needed by Ceph and
useful for other plugins.

This is called between the installation of the system packages listed
as prerequisites and the installation of the actual services.

Change-Id: Id723bdc7542182d2b2eff40c0dc0127307f094c5
This commit is contained in:
Dean Troyer 2014-07-09 11:27:42 -05:00
parent 49d14407c5
commit 5c3a63e633
2 changed files with 28 additions and 1 deletions

View File

@ -22,9 +22,24 @@ sourced with one or more arguments, the first of which defines the hook phase:
stack: called by stack.sh. There are four possible values for
the second arg to distinguish the phase stack.sh is in:
arg 2: install | post-config | extra | post-extra
arg 2: pre-install | install | post-config | extra
unstack: called by unstack.sh
clean: called by clean.sh. Remember, clean.sh also calls unstack.sh
so that work need not be repeated.
The `stack` phase sub-phases are called from `stack.sh` in the following places:
pre-install - After all system prerequisites have been installed but before any
DevStack-specific services are installed (including database and rpc).
install - After all OpenStack services have been installed and configured
but before any OpenStack services have been started. Changes to OpenStack
service configurations should be done here.
post-config - After OpenStack services have been initialized but still before
they have been started. (This is probably mis-named, think of it as post-init.)
extra - After everything is started.

View File

@ -668,6 +668,18 @@ fi
# Do the ugly hacks for borken packages and distros
$TOP_DIR/tools/fixup_stuff.sh
# Extras Pre-install
# ------------------
# Phase: pre-install
if [[ -d $TOP_DIR/extras.d ]]; then
for i in $TOP_DIR/extras.d/*.sh; do
[[ -r $i ]] && source $i stack pre-install
done
fi
install_rpc_backend
if is_service_enabled $DATABASE_BACKENDS; then