nova/doc/notification_samples
Balazs Gibizer b874c409c1 Enhance service restart in functional env
Bugfix Icaf1bae8cb040b939f916a19ce026031ddb84af7 showed that restarting
a compute service in the functional env is unrealistic causing faults
to slip through. During that bug fix only the minimal change was done
in the functional env regarding compute service restart to reproduce
the reported fault. However the restart of the compute service could
be made even more realistic.

This patch simulates a compute service restart in the functional env
by stopping the original compute service and starting a totally new
compute service for the same host and node. This way we can make sure
that we get a brand new ComputeManager in the new service and no
state can leak between the old and the new service.

This change revealed another shortcoming of the functional env.
In the real world the nova-compute service could be restarted without
loosing any running servers on the compute host. But with the naive
implementation of this change the compute service is re-created. This
means that a new ComputeManager is instantiated that loads a new
FakeDriver instance as well. That new FakeDriver instance then reports
an empty hypervisor. This behavior is not totally unrealistic as it
simulates such a compute host restart that cleans the hypervisor state
as well (e.g. compute host redeployment). However this type of restart
shows another bug in the code path that destroys and deallocates
evacuated instance from the source host. Therefore this patch
implements the compute service restart in a way that simulates only a
service restart and not a full compute restart. A subsequent patch will
add a test that uses the clean hypervisor case to reproduces the
revealed bug.

Related-Bug: #1724172

On stable/stein:

Closes-Bug: #1859766

Note: mock package import added to nova/test.py (due to not having patch
Ibe7cb29620f06d31059f2a5f94ca180b8671046e in stable/stein)

Change-Id: I9d6cd6259659a35383c0c9c21db72a9434ba86b1
(cherry picked from commit 2794748d9c)
2020-01-20 16:56:13 +00:00
..
common_payloads The field instance_name was added to InstanceCreatePayload 2019-01-15 15:27:07 +00:00
aggregate-add_host-end.json Deduplicate aggregate notification samples 2018-01-16 15:59:16 +01:00
aggregate-add_host-start.json Deduplicate aggregate notification samples 2018-01-16 15:59:16 +01:00
aggregate-create-end.json Deduplicate aggregate notification samples 2018-01-16 15:59:16 +01:00
aggregate-create-start.json Deduplicate aggregate notification samples 2018-01-16 15:59:16 +01:00
aggregate-delete-end.json Deduplicate aggregate notification samples 2018-01-16 15:59:16 +01:00
aggregate-delete-start.json Deduplicate aggregate notification samples 2018-01-16 15:59:16 +01:00
aggregate-remove_host-end.json Deduplicate aggregate notification samples 2018-01-16 15:59:16 +01:00
aggregate-remove_host-start.json Deduplicate aggregate notification samples 2018-01-16 15:59:16 +01:00
aggregate-update_metadata-end.json Transform aggregate.update_metadata notification 2018-04-04 23:25:42 +00:00
aggregate-update_metadata-start.json Transform aggregate.update_metadata notification 2018-04-04 23:25:42 +00:00
aggregate-update_prop-end.json Transform aggregate.update_prop notification 2018-07-15 23:36:31 +09:00
aggregate-update_prop-start.json Transform aggregate.update_prop notification 2018-07-15 23:36:31 +09:00
compute-exception.json Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
compute_task-build_instances-error.json Transform compute_task notifications 2018-11-21 16:23:28 +09:00
compute_task-migrate_server-error.json Transform compute_task notifications 2018-11-21 16:23:28 +09:00
compute_task-rebuild_server-error.json Transform compute_task notifications 2018-11-21 16:23:28 +09:00
flavor-create.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
flavor-delete.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
flavor-update.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-create-end.json Deduplicate instance.create notification samples 2017-11-28 17:17:15 +01:00
instance-create-error.json Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
instance-create-start.json Deduplicate instance.create notification samples 2017-11-28 17:17:15 +01:00
instance-delete-end.json Factor out duplicated notification sample data (2) 2017-11-06 15:54:09 +01:00
instance-delete-end_compute_down.json Transform missing delete notifications 2018-08-29 13:39:57 +02:00
instance-delete-end_not_scheduled.json Null out instance.availability_zone on shelve offload 2018-09-27 08:49:41 -04:00
instance-delete-start.json Factor out duplicated notification sample data (2) 2017-11-06 15:54:09 +01:00
instance-delete-start_compute_down.json Transform missing delete notifications 2018-08-29 13:39:57 +02:00
instance-delete-start_not_scheduled.json Null out instance.availability_zone on shelve offload 2018-09-27 08:49:41 -04:00
instance-evacuate.json Add action initiator attribute to the instance payload 2018-07-03 18:45:44 +00:00
instance-exists.json Remove unnecessary execute permissions of a file 2018-07-02 19:40:48 +09:00
instance-interface_attach-end.json Deduplicate instance.interface_attach samples 2017-11-06 16:10:19 +01:00
instance-interface_attach-error.json Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
instance-interface_attach-start.json Deduplicate instance.interface_attach samples 2017-11-06 16:10:19 +01:00
instance-interface_detach-end.json Deduplicate instance.interface_attach samples 2017-11-06 16:10:19 +01:00
instance-interface_detach-start.json Deduplicate instance.interface_attach samples 2017-11-06 16:10:19 +01:00
instance-live_migration_abort-end.json Add action initiator attribute to the instance payload 2018-07-03 18:45:44 +00:00
instance-live_migration_abort-start.json Add action initiator attribute to the instance payload 2018-07-03 18:45:44 +00:00
instance-live_migration_force_complete-end.json Transform instance.live_migration_force_complete notification 2018-07-16 00:12:37 +09:00
instance-live_migration_force_complete-start.json Transform instance.live_migration_force_complete notification 2018-07-16 00:12:37 +09:00
instance-live_migration_post-end.json Transform instance.live_migration_post notification 2018-07-05 20:24:46 +09:00
instance-live_migration_post-start.json Transform instance.live_migration_post notification 2018-07-05 20:24:46 +09:00
instance-live_migration_post_dest-end.json Add action initiator attribute to the instance payload 2018-07-03 18:45:44 +00:00
instance-live_migration_post_dest-start.json Add action initiator attribute to the instance payload 2018-07-03 18:45:44 +00:00
instance-live_migration_pre-end.json Add action initiator attribute to the instance payload 2018-07-03 18:45:44 +00:00
instance-live_migration_pre-start.json Add action initiator attribute to the instance payload 2018-07-03 18:45:44 +00:00
instance-live_migration_rollback-end.json Add action initiator attribute to the instance payload 2018-07-03 18:45:44 +00:00
instance-live_migration_rollback-start.json Add action initiator attribute to the instance payload 2018-07-03 18:45:44 +00:00
instance-live_migration_rollback_dest-end.json Transform instance.live_migration_rollback_dest notification 2018-07-05 13:19:32 +09:00
instance-live_migration_rollback_dest-start.json Transform instance.live_migration_rollback_dest notification 2018-07-05 13:19:32 +09:00
instance-lock.json Add instance.lock notification 2018-06-21 10:29:31 +08:00
instance-pause-end.json Deduplicated instance.(un)pause notification samples 2017-11-06 16:03:08 +01:00
instance-pause-start.json Deduplicated instance.(un)pause notification samples 2017-11-06 16:03:08 +01:00
instance-power_off-end.json Deduplicate instance.power-off notification samples 2017-11-06 16:07:33 +01:00
instance-power_off-start.json Deduplicate instance.power-off notification samples 2017-11-06 16:07:33 +01:00
instance-power_on-end.json Deduplicate instance.power-off notification samples 2017-11-06 16:07:33 +01:00
instance-power_on-start.json Deduplicate instance.power-off notification samples 2017-11-06 16:07:33 +01:00
instance-reboot-end.json Deduplicate instance.reboot notification samples 2017-11-06 16:18:22 +01:00
instance-reboot-error.json Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
instance-reboot-start.json Deduplicate instance.reboot notification samples 2017-11-06 16:18:22 +01:00
instance-rebuild-end.json Transform instance.rebuild_scheduled notification 2018-07-09 09:55:40 +09:00
instance-rebuild-error.json Transform instance.rebuild_scheduled notification 2018-07-09 09:55:40 +09:00
instance-rebuild-start.json Transform instance.rebuild_scheduled notification 2018-07-09 09:55:40 +09:00
instance-rebuild_scheduled.json Transform instance.rebuild_scheduled notification 2018-07-09 09:55:40 +09:00
instance-rescue-end.json Transform rescue/unrescue instance notifications 2018-01-14 02:15:18 +00:00
instance-rescue-start.json Transform rescue/unrescue instance notifications 2018-01-14 02:15:18 +00:00
instance-resize-end.json Deduplicate notification samples Rocky - 2 2018-04-16 09:21:19 +08:00
instance-resize-error.json Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
instance-resize-start.json Deduplicate notification samples Rocky - 2 2018-04-16 09:21:19 +08:00
instance-resize_confirm-end.json Transform instance.resize_confirm notification 2018-01-18 08:01:10 +09:00
instance-resize_confirm-start.json Transform instance.resize_confirm notification 2018-01-18 08:01:10 +09:00
instance-resize_finish-end.json Deduplicate notification samples Rocky - 2 2018-04-16 09:21:19 +08:00
instance-resize_finish-start.json Deduplicate notification samples Rocky - 2 2018-04-16 09:21:19 +08:00
instance-resize_prep-end.json Transform instance.resize_prep notification 2018-01-25 09:30:50 +09:00
instance-resize_prep-start.json Transform instance.resize_prep notification 2018-01-25 09:30:50 +09:00
instance-resize_revert-end.json Transform instance.resize_revert notification 2017-12-04 20:54:39 -05:00
instance-resize_revert-start.json Transform instance.resize_revert notification 2017-12-04 20:54:39 -05:00
instance-restore-end.json Deduplicate notification samples Rocky - 1 2018-04-16 09:19:43 +08:00
instance-restore-start.json Deduplicate notification samples Rocky - 1 2018-04-16 09:19:43 +08:00
instance-resume-end.json Deduplicate notification samples Rocky - 1 2018-04-16 09:19:43 +08:00
instance-resume-start.json Deduplicate notification samples Rocky - 1 2018-04-16 09:19:43 +08:00
instance-shelve-end.json Deduplicate notification samples Rocky - 3 2018-04-16 09:25:39 +08:00
instance-shelve-start.json Deduplicate notification samples Rocky - 3 2018-04-16 09:25:39 +08:00
instance-shelve_offload-end.json Null out instance.availability_zone on shelve offload 2018-09-27 08:49:41 -04:00
instance-shelve_offload-start.json Deduplicate notification samples Rocky - 3 2018-04-16 09:25:39 +08:00
instance-shutdown-end.json Deduplicate notification samples Rocky - 5 2018-04-17 18:57:27 +02:00
instance-shutdown-start.json Deduplicate notification samples Rocky - 5 2018-04-17 18:57:27 +02:00
instance-snapshot-end.json Deduplicate notification samples Rocky - 5 2018-04-17 18:57:27 +02:00
instance-snapshot-start.json Deduplicate notification samples Rocky - 5 2018-04-17 18:57:27 +02:00
instance-soft_delete-end.json Follow up for Ib6f95c22ffd3ea235b60db4da32094d49c2efa2a 2018-09-27 11:33:55 +02:00
instance-soft_delete-start.json Follow up for Ib6f95c22ffd3ea235b60db4da32094d49c2efa2a 2018-09-27 11:33:55 +02:00
instance-suspend-end.json Deduplicate notification samples Rocky - 6 2018-04-17 18:57:34 +02:00
instance-suspend-start.json Deduplicate notification samples Rocky - 6 2018-04-17 18:57:34 +02:00
instance-trigger_crash_dump-end.json Deduplicate notification samples Rocky - 6 2018-04-17 18:57:34 +02:00
instance-trigger_crash_dump-start.json Deduplicate notification samples Rocky - 6 2018-04-17 18:57:34 +02:00
instance-unlock.json Add instance.unlock notification 2018-06-25 19:25:39 +00:00
instance-unpause-end.json Deduplicated instance.(un)pause notification samples 2017-11-06 16:03:08 +01:00
instance-unpause-start.json Deduplicated instance.(un)pause notification samples 2017-11-06 16:03:08 +01:00
instance-unrescue-end.json Transform rescue/unrescue instance notifications 2018-01-14 02:15:18 +00:00
instance-unrescue-start.json Transform rescue/unrescue instance notifications 2018-01-14 02:15:18 +00:00
instance-unshelve-end.json Deduplicate notification samples Rocky - 3 2018-04-16 09:25:39 +08:00
instance-unshelve-start.json Deduplicate notification samples Rocky - 3 2018-04-16 09:25:39 +08:00
instance-update-tags-action.json Deduplicate notification samples Rocky - 7 2018-04-19 20:33:17 +08:00
instance-update.json Deduplicate notification samples Rocky - 7 2018-04-19 20:33:17 +08:00
instance-volume_attach-end.json Deduplicate notification samples Rocky - 4 2018-04-17 18:56:54 +02:00
instance-volume_attach-error.json Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
instance-volume_attach-start.json Deduplicate notification samples Rocky - 4 2018-04-17 18:56:54 +02:00
instance-volume_detach-end.json Deduplicate notification samples Rocky - 4 2018-04-17 18:56:54 +02:00
instance-volume_detach-start.json Deduplicate notification samples Rocky - 4 2018-04-17 18:56:54 +02:00
instance-volume_swap-end.json Deduplicate notification samples Rocky - 4 2018-04-17 18:56:54 +02:00
instance-volume_swap-error.json Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
instance-volume_swap-start.json Deduplicate notification samples Rocky - 4 2018-04-17 18:56:54 +02:00
keypair-create-end.json Deduplicate keypair notification samples 2017-11-20 16:30:21 +01:00
keypair-create-start.json Deduplicate keypair notification samples 2017-11-20 16:30:21 +01:00
keypair-delete-end.json Deduplicate keypair notification samples 2017-11-20 16:30:21 +01:00
keypair-delete-start.json Deduplicate keypair notification samples 2017-11-20 16:30:21 +01:00
keypair-import-end.json Deduplicate keypair notification samples 2017-11-20 16:30:21 +01:00
keypair-import-start.json Deduplicate keypair notification samples 2017-11-20 16:30:21 +01:00
libvirt-connect-error.json Enhance service restart in functional env 2020-01-20 16:56:13 +00:00
metrics-update.json Transform metrics.update notification 2018-07-18 09:13:27 +09:00
scheduler-select_destinations-end.json Transform scheduler.select_destinations notification 2018-11-30 13:20:35 +01:00
scheduler-select_destinations-start.json Transform scheduler.select_destinations notification 2018-11-30 13:20:35 +01:00
server_group-add_member.json Transform servergroup.addmember notification 2018-03-06 22:03:00 +00:00
server_group-create.json Deduplicate server_group samples 2017-11-14 13:06:40 +01:00
server_group-delete.json Deduplicate server_group samples 2017-11-14 13:06:40 +01:00
service-create.json Deduplicate service status notification samples 2018-01-19 08:35:19 +00:00
service-delete.json Deduplicate service status notification samples 2018-01-19 08:35:19 +00:00
service-update.json Deduplicate service status notification samples 2018-01-19 08:35:19 +00:00
volume-usage.json Transform volume.usage notification 2018-10-09 06:28:11 +00:00