Move migration to run after post-configure

This change has been discussed and planned for a while. We have not used
migrations much in TripleO, so it was not clear that it was necessary.
But as we move to HA deployments we need a way to run scripts after the
system state has been asserted, which is what migration is for.

Change-Id: I16d90abb3fccc791001beb5d8ed267fcd00f820c
This commit is contained in:
Clint Byrum 2014-02-07 12:15:49 -08:00
parent d137cbceb5
commit 8e73c9226c
2 changed files with 13 additions and 5 deletions

View File

@ -7,8 +7,8 @@ pre-defined set of directories::
/opt/stack/os-config-refresh/pre-configure.d
/opt/stack/os-config-refresh/configure.d
/opt/stack/os-config-refresh/migration.d
/opt/stack/os-config-refresh/post-configure.d
/opt/stack/os-config-refresh/migration.d
`/opt/stack/os-config-refresh` is the default base directory. You can
set `OS_REFRESH_CONFIG_BASE_DIR` environment variable to override the
@ -18,10 +18,18 @@ Its intended purpose is to separate scripts execution into 4 phases:
1. Quiesce(pre-configure.d),
2. Configure(configure.d),
3. Migrate(migration.d),
4. Activate(post-configure.d).
3. Activate(post-configure.d).
4. Migrate(migration.d),
It runs through all the phases above to ensure configuration is
applied and enabled on a machine. It will exit with an error if any
phase has a problem. The scripts in each phase should not depend on
each other having worked properly.
Note: Earlier versions of os-refresh-config ran migration before
post-configure. This was an oversight in the initial design, as
migrations are intended to be online migrations after the host is
fully configured.
For things which must happen while the service is quiesced, that should
be done in the post-configure scripts which control the service state.

View File

@ -26,8 +26,8 @@ BASE_DIR = os.environ.get('OS_REFRESH_CONFIG_BASE_DIR',
'/opt/stack/os-config-refresh')
PHASES = ['pre-configure',
'configure',
'migration',
'post-configure']
'post-configure',
'migration']
def main(argv=sys.argv):