Fix spare amphora failover

Failover of spare amphorae failed with an exception,
because they're not attached to any loadbalancer.

This commit fixes this issue, allowing to rotate/update
spare amphora images.

Story: 2005470
Task: 30549

Change-Id: I9c9002486a9a547a215514c24ccb95f039b23ec2
This commit is contained in:
Gregory Thiemonge 2019-04-17 10:46:07 +02:00
parent 66656bceb6
commit a509710a7f
2 changed files with 5 additions and 1 deletions

View File

@ -823,7 +823,7 @@ class ControllerWorker(base_taskflow.BaseTaskFlowEngine):
db_apis.get_session(), amp.id)
if CONF.nova.enable_anti_affinity and lb:
stored_params[constants.SERVER_GROUP_ID] = lb.server_group_id
if lb.flavor_id:
if lb and lb.flavor_id:
stored_params[constants.FLAVOR] = (
self._flavor_repo.get_flavor_metadata_dict(
db_apis.get_session(), lb.flavor_id))

View File

@ -0,0 +1,4 @@
---
fixes:
- |
Fixed a bug that prevents spare amphora rotation.