nova/nova
Matt Riedemann c895d3e6bc Sanity check instance mapping during scheduling
mnaser reported a weird case where an instance was found
in both cell0 (deleted there) and in cell1 (not deleted
there but in error state from a failed build). It's unclear
how this could happen besides some weird clustered rabbitmq
issue where maybe the schedule and build request to conductor
happens twice for the same instance and one picks a host and
tries to build and the other fails during scheduling and is
buried in cell0.

To avoid a split brain situation like this, we add a sanity
check in _bury_in_cell0 to make sure the instance mapping is
not pointing at a cell when we go to update it to cell0.
Similarly a check is added in the schedule_and_build_instances
flow (the code is moved to a private method to make it easier
to test).

Worst case is this is unnecessary but doesn't hurt anything,
best case is this helps avoid split brain clustered rabbit
issues.

Closes-Bug: #1775934

Change-Id: I335113f0ec59516cb337d34b6fc9078ea202130f
(cherry picked from commit 5b552518e1)
(cherry picked from commit efc35b1c52)
2020-10-06 21:51:34 +00:00
..
api Add checks for volume status when rebuilding 2020-09-08 16:12:47 +08:00
cells Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00
cmd Add --instance option to heal_allocations 2019-11-21 17:32:21 -05:00
common
compute Merge "post live migration: don't call Neutron needlessly" into stable/stein 2020-10-06 02:16:43 +00:00
conductor Sanity check instance mapping during scheduling 2020-10-06 21:51:34 +00:00
conf Reserve DISK_GB resource for the image cache 2020-07-06 10:38:40 +00:00
console Mask the token used to allow access to consoles 2020-01-23 13:25:18 +01:00
consoleauth Mask the token used to allow access to consoles 2020-01-23 13:25:18 +01:00
db Don't delete compute node, when deleting service other than nova-compute 2019-11-21 10:44:15 +01:00
hacking Add a hacking rule for deprecated assertion methods 2018-10-25 11:49:10 +09:00
image Share snapshot image membership with instance owner 2019-02-08 18:06:27 -05:00
ipv6
keymgr
locale Imported Translations from Zanata 2019-11-03 06:27:01 +00:00
network Add config option for neutron client retries 2020-04-22 16:47:17 +00:00
notifications Remove CellMappingPayload database_connection and transport_url fields 2019-04-04 21:25:52 +00:00
objects compute: Use source_bdms to reset attachment_ids during LM rollback 2020-08-27 19:30:45 +01:00
pci Add get_instance_pci_request_from_vif 2019-03-07 11:37:53 +02:00
policies Merge "Remove deprecated 'flavors' policy" 2019-02-23 06:13:00 +00:00
privsep Merge "Move slight bonkers IP management to privsep." 2019-03-20 13:21:29 +00:00
scheduler FUP for in-place numa rebuild 2020-01-22 15:06:07 +00:00
servicegroup Fix deprecation warning for threadgroup.add_timer 2019-02-07 09:37:00 -05:00
tests Sanity check instance mapping during scheduling 2020-10-06 21:51:34 +00:00
virt Merge "Removed the host FQDN from the exception message" into stable/stein 2020-09-11 16:17:37 +00:00
vnc Deprecate the nova-xvpvncproxy service 2018-10-15 10:03:13 +01:00
volume Add retry to cinder API calls related to volume detach 2020-04-24 09:26:28 -04:00
__init__.py Eventlet monkey patching should be as early as possible 2019-03-25 09:22:01 +01:00
availability_zones.py AZ list performance optimization: avoid double service list DB fetch 2019-04-29 19:05:05 +00:00
baserpc.py
block_device.py Add method to generate device names universally 2019-01-15 18:55:11 +00:00
cache_utils.py
config.py Configure placement DB context manager for nova-manage/status 2018-09-05 10:29:48 -04:00
context.py Reset the cell cache for database access in Service 2020-04-16 19:55:10 +00:00
crypto.py Convert certificate generation to processutils. 2018-05-02 19:18:41 +10:00
debugger.py
exception.py Removed the host FQDN from the exception message 2020-09-03 00:28:20 +00:00
exception_wrapper.py Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
filters.py
hooks.py
i18n.py
loadables.py
manager.py
monkey_patch.py Eventlet monkey patching should be as early as possible 2019-03-25 09:22:01 +01:00
policy.py Fix target used in nova.policy.check_is_admin 2019-05-21 10:55:14 +01:00
profiler.py
quota.py Make quotas respect instance_list_per_project_cells 2020-05-21 21:56:44 +00:00
rc_fields.py Switch to using os-resource-classes 2019-02-07 11:11:09 +00:00
rpc.py Fix jsonutils.to_primitive UserWarning 2018-12-17 22:56:50 -05:00
safe_utils.py
service.py Reset the cell cache for database access in Service 2020-04-16 19:55:10 +00:00
service_auth.py
test.py Enhance service restart in functional env 2020-01-20 16:56:13 +00:00
utils.py Eventlet monkey patching should be as early as possible 2019-03-25 09:22:01 +01:00
version.py
weights.py Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00
wsgi.py