Browse code

Merge "Add pre-install phase for extras.d plugins"

Jenkins authored on 2014/07/14 04:02:40
Showing 2 changed files
... ...
@@ -22,9 +22,24 @@ sourced with one or more arguments, the first of which defines the hook phase:
22 22
     stack: called by stack.sh.  There are four possible values for
23 23
         the second arg to distinguish the phase stack.sh is in:
24 24
 
25
-        arg 2:  install | post-config | extra | post-extra
25
+        arg 2:  pre-install | install | post-config | extra
26 26
 
27 27
     unstack: called by unstack.sh
28 28
 
29 29
     clean: called by clean.sh.  Remember, clean.sh also calls unstack.sh
30 30
         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
+
... ...
@@ -668,6 +668,18 @@ fi
668 668
 # Do the ugly hacks for borken packages and distros
669 669
 $TOP_DIR/tools/fixup_stuff.sh
670 670
 
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
+
671 683
 install_rpc_backend
672 684
 
673 685
 if is_service_enabled $DATABASE_BACKENDS; then