Skip to content

Commit 5c3a63e

Browse files
author
Dean Troyer
committed
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
1 parent 49d1440 commit 5c3a63e

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

extras.d/README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,24 @@ sourced with one or more arguments, the first of which defines the hook phase:
2222
stack: called by stack.sh. There are four possible values for
2323
the second arg to distinguish the phase stack.sh is in:
2424

25-
arg 2: install | post-config | extra | post-extra
25+
arg 2: pre-install | install | post-config | extra
2626

2727
unstack: called by unstack.sh
2828

2929
clean: called by clean.sh. Remember, clean.sh also calls unstack.sh
3030
so that work need not be repeated.
31+
32+
The `stack` phase sub-phases are called from `stack.sh` in the following places:
33+
34+
pre-install - After all system prerequisites have been installed but before any
35+
DevStack-specific services are installed (including database and rpc).
36+
37+
install - After all OpenStack services have been installed and configured
38+
but before any OpenStack services have been started. Changes to OpenStack
39+
service configurations should be done here.
40+
41+
post-config - After OpenStack services have been initialized but still before
42+
they have been started. (This is probably mis-named, think of it as post-init.)
43+
44+
extra - After everything is started.
45+

stack.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,18 @@ fi
668668
# Do the ugly hacks for borken packages and distros
669669
$TOP_DIR/tools/fixup_stuff.sh
670670

671+
672+
# Extras Pre-install
673+
# ------------------
674+
675+
# Phase: pre-install
676+
if [[ -d $TOP_DIR/extras.d ]]; then
677+
for i in $TOP_DIR/extras.d/*.sh; do
678+
[[ -r $i ]] && source $i stack pre-install
679+
done
680+
fi
681+
682+
671683
install_rpc_backend
672684

673685
if is_service_enabled $DATABASE_BACKENDS; then

0 commit comments

Comments
 (0)