diff options
| author | Gauvain Pocentek <gauvainpocentek@gmail.com> | 2020-03-10 12:46:17 +0100 |
|---|---|---|
| committer | Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | 2020-04-03 15:53:35 +0000 |
| commit | 4696fc0f322bdc4327b0ac4ec58f2ddc9d014ec1 (patch) | |
| tree | 501c482b40a8bfe7b4714fbe5fafda72fa956391 | |
| parent | 519eced6147085151a3e53a55c734c28d1e35eeb (diff) | |
| download | kolla-4696fc0f322bdc4327b0ac4ec58f2ddc9d014ec1.tar.gz kolla-4696fc0f322bdc4327b0ac4ec58f2ddc9d014ec1.zip | |
Fix invalid test in cinder data migration script
The extend_start.sh script for cinder-api uses an incorrect test to
check if the MAX_NUMBER variable is set. This leads to a incorrect
cinder-manage command being run if this variable is not set, making the
database migration fail.
This change fixes the test to properly use the MAX_NUMBER variable.
Change-Id: Ie46da709db0de09a9cf641b3c154275282f213fc
Closes-Bug: #1866827
(cherry picked from commit ff42ff20048ef3b7d2f8df04ada8ff4bf7b710e0)
| -rw-r--r-- | docker/cinder/cinder-api/extend_start.sh | 2 | ||||
| -rw-r--r-- | releasenotes/notes/bug-1866827-5351ec43486d7f33.yaml | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/docker/cinder/cinder-api/extend_start.sh b/docker/cinder/cinder-api/extend_start.sh index 251b9d105..4993bb493 100644 --- a/docker/cinder/cinder-api/extend_start.sh +++ b/docker/cinder/cinder-api/extend_start.sh @@ -9,7 +9,7 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then fi if [[ "${!KOLLA_OSM[@]}" ]]; then - if [[ -z ${MAX_NUMBER} ]]; then + if [[ "${!MAX_NUMBER[@]}" ]]; then cinder-manage db online_data_migrations --max_count ${MAX_NUMBER} else cinder-manage db online_data_migrations diff --git a/releasenotes/notes/bug-1866827-5351ec43486d7f33.yaml b/releasenotes/notes/bug-1866827-5351ec43486d7f33.yaml new file mode 100644 index 000000000..63fae75ec --- /dev/null +++ b/releasenotes/notes/bug-1866827-5351ec43486d7f33.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes the MAX_NUMBER variable usage when running the database online + migrations for cinder. |
