Noop CantStartEngineError in targets_cell if API DB not configured
For reschedules during resize (migrate_server method),
the InstanceMapping query in targets_cell is an "up call"
to the API DB which will fail with a CantStartEngineError
if the cell conductor is not configured for the API DB.
This changes the targets_cell decorator to handle the
CantStartEngineError and if the API DB is not configured,
we assume we're in the cell conductor and just ignore the
error, otherwise if the API DB is configured we assume
we're in the super-conductor and reraise as before.
Change-Id: I0a413eb4f8a94500941e53b9a294d7cdb45d2a1c
Closes-Bug: #1781300
(cherry picked from commit 22dd4fca3837d6cea3f983b021aa6907695a540b)
Reviewed: https:/ /review. opendev. org/663030 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=d4bc147c38c 5fe7c4adb592522 5ced16d2ff4757
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit d4bc147c38c5fe7 c4adb5925225ced 16d2ff4757
Author: Matt Riedemann <email address hidden>
Date: Thu Sep 13 13:28:24 2018 -0400
Noop CantStartEngine Error in targets_cell if API DB not configured
For reschedules during resize (migrate_server method), Error
the InstanceMapping query in targets_cell is an "up call"
to the API DB which will fail with a CantStartEngine
if the cell conductor is not configured for the API DB.
This changes the targets_cell decorator to handle the gineError and if the API DB is not configured,
CantStartEn
we assume we're in the cell conductor and just ignore the
error, otherwise if the API DB is configured we assume
we're in the super-conductor and reraise as before.
Change-Id: I0a413eb4f8a945 00941e53b9a294d 7cdb45d2a1c ea3f983b021aa69 07695a540b)
Closes-Bug: #1781300
(cherry picked from commit 22dd4fca3837d6c