Fix regression in undercloud upgrade cell_v2 setup

For cell0 the order needs to be create_cell, map_cell0, dbsync.
I67c50fd5a5d2f4841ab26bce796a33efce0510b2 reversed this, as a result the cell0
tables are not created as it does not exist when the dbsync runs.

Change-Id: I8774865a573bf9c63190d3df8aaca34089755549
Closes-Bug: 1778788
This commit is contained in:
Oliver Walsh 2018-06-26 22:11:40 +01:00
parent 9c00a1f991
commit cc45c6689a
2 changed files with 16 additions and 9 deletions

View File

@ -712,9 +712,9 @@ if str2bool($::undercloud_upgrade) {
# NOTE(aschultz): this should pull the cell v2 items out and run them before
# the api db sync.
# The order should be:
# - cell v2 setup
# - db sync
# - create cell_v2 cells
# - map_cell0
# - db sync
# - discover hosts
# - map instances
# - api db sync
@ -750,11 +750,12 @@ if str2bool($::undercloud_upgrade) {
command => 'nova-manage cell_v2 delete_cell --force --cell_uuid $(nova-manage cell_v2 list_cells | sed -e \'1,3d\' -e \'$d\' | awk -F \' *| *\' \'$2 == "None" {print $4}\')',
unless => 'test -z $(nova-manage cell_v2 list_cells | sed -e \'1,3d\' -e \'$d\' | awk -F \' *| *\' \'$2 == "None" {print $4}\')',
} ->
Anchor['nova::dbsync::end'] ~>
Class['nova::cell_v2::map_cell0'] ~>
Nova::Cell_v2::Cell<||> ~>
Exec['nova-cell_v2-discover_hosts'] ~>
Class['nova::cell_v2::map_instances'] ~>
Anchor['nova::cell_v2::end']
Anchor['nova::cell_v2::begin'] ~>
Nova::Cell_v2::Cell<||> ~>
Class['nova::cell_v2::map_cell0'] ~>
Anchor['nova::dbsync::begin'] ~>
Anchor['nova::dbsync::end'] ~>
Exec['nova-cell_v2-discover_hosts'] ~>
Class['nova::cell_v2::map_instances'] ~>
Anchor['nova::cell_v2::end']
}

View File

@ -0,0 +1,6 @@
---
fixes:
- |
The ordering of the cell_v2 setup steps during undercloud upgrade has been
corrected to ensure dbsync is run after cell0 setup.
Fixes `bug 1778788 <https://bugs.launchpad.net/tripleo/+bug/1778788>`__.