doc: document override_defaults phase
override_defaults phase was added to devstack in [1]
but documentation was pending. This patch adds the
same. For history around override_defaults, one can
refer to the mail thread [2]
Also fixes a small typo
[1]: https://review.openstack.org/#/c/167933/
[2]: http://lists.openstack.org/pipermail/openstack-dev/2015-March/059621.html
Change-Id: I1b58ca0ce0e4b85a1dbd710b4c426606fd4dcf45
diff --git a/doc/source/plugins.rst b/doc/source/plugins.rst
index 8bd3797..b8da7e1 100644
--- a/doc/source/plugins.rst
+++ b/doc/source/plugins.rst
@@ -19,7 +19,16 @@
external repositories. The plugin interface assumes the following:
An external git repository that includes a ``devstack/`` top level
-directory. Inside this directory there can be 2 files.
+directory. Inside this directory there can be 3 files.
+
+- ``override_defaults`` - a file containing global variables that
+ will be sourced before the lib/* files. This allows the plugin
+ to override the defaults that are otherwise set in the lib/*
+ files.
+
+ For example, override_defaults may export CINDER_ENABLED_BACKENDS
+ to include the plugin-specific storage backend and thus be able
+ to override the default lvm only storage backend for Cinder.
- ``settings`` - a file containing global variables that will be
sourced very early in the process. This is helpful if other plugins
@@ -38,7 +47,7 @@
- ``plugin.sh`` - the actual plugin. It is executed by devstack at
well defined points during a ``stack.sh`` run. The plugin.sh
- internal structure is discussed bellow.
+ internal structure is discussed below.
Plugins are registered by adding the following to the localrc section
diff --git a/extras.d/README.md b/extras.d/README.md
index 7c2e4fe..4cec14b 100644
--- a/extras.d/README.md
+++ b/extras.d/README.md
@@ -14,10 +14,13 @@
entire `stack.sh` variable space is available. The scripts are
sourced with one or more arguments, the first of which defines the hook phase:
- source | stack | unstack | clean
+ override_defaults | source | stack | unstack | clean
- source: always called first in any of the scripts, used to set the
- initial defaults in a lib/* script or similar
+ override_defaults: always called first in any of the scripts, used to
+ override defaults (if need be) that are otherwise set in lib/* scripts
+
+ source: called by stack.sh. Used to set the initial defaults in a lib/*
+ script or similar
stack: called by stack.sh. There are four possible values for
the second arg to distinguish the phase stack.sh is in: