nova/doc/notification_samples
Matt Riedemann 437211bf37 Null out instance.availability_zone on shelve offload
When a user shelve offloads a server, the compute manager
nulls out the instance host and node attributes. However
the availability_zone attribute is left set on the instance
so the API will show the instance as in an AZ when really
it's not, because an instance that is not on a host is not
in a host aggregate so it can't be in an AZ.

Keep in mind that there are two ways an instance can be in
an AZ:

1. The user specifically requests to create the server in
   the AZ.

2. The user does not request an AZ and one is assigned via
   the selected host during server create (or resize, etc).

For the first case, the server will always remain in the
user-requested AZ even after shelve/unshelve. But in the
second case, unshelving the server can result in the server
being spawned on a new host in a different AZ - the scheduler
does not restrict the AZ in that second case.

This change nulls out the instance.availability_zone just like
the host and node fields on shelve offload since it's
confusing to show a shelved offloaded server in an AZ that
doesn't have a host.

Final note: the _nil_out_instance_obj_host_and_node method
is also called during server create if the build fails and
is aborted or rescheduled to another host, and in the case
that unshelve fails. In the case of a server build reschedule,
conductor will set the instance.availability_zone appropriately
based on the alternate host for the reschedule. In the other
failure cases, leaving the instance AZ null is appropriate.

Conflicts:
      doc/notification_samples/instance-shelve_offload-end.json

NOTE(mriedem): The conflict is due to not having change
Ic64f89d33a985cf6121ddc198380902a5e936ec4 in Queens.

Change-Id: I25a4f36027390def83cfe25f4f3b4af9660da502
Closes-Bug: #1790221
(cherry picked from commit 771b9eaa71)
(cherry picked from commit b3060a9d31)
2018-09-28 14:07:15 -04:00
..
common_payloads Merge "Deduplicate service status notification samples" 2018-02-01 21:26:47 +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
compute-exception.json Aggregate create and destroy work against API db 2016-08-01 08:22:08 -07: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 Deduplicate instance.create notification samples 2017-11-28 17:17:15 +01: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-start.json Factor out duplicated notification sample data (2) 2017-11-06 15:54:09 +01:00
instance-evacuate.json Transform instance-evacuate notification 2018-01-22 17:49:32 +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 Deduplicate instance.interface_attach samples 2017-11-06 16:10:19 +01: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 Remove unnecessary execute permissions in files 2018-01-15 23:53:01 +09:00
instance-live_migration_abort-start.json Remove unnecessary execute permissions in files 2018-01-15 23:53:01 +09:00
instance-live_migration_pre-end.json Transform instance-live_migration_pre notification 2017-11-22 16:59:13 +01:00
instance-live_migration_pre-start.json Transform instance-live_migration_pre notification 2017-11-22 16:59:13 +01:00
instance-live_migration_rollback-end.json Deduplicate instance.live_migration notification samples 2017-11-06 16:13:47 +01:00
instance-live_migration_rollback-start.json Deduplicate instance.live_migration notification samples 2017-11-06 16:13:47 +01: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 Deduplicate instance.reboot notification samples 2017-11-06 16:18:22 +01:00
instance-reboot-start.json Deduplicate instance.reboot notification samples 2017-11-06 16:18:22 +01:00
instance-rebuild-end.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-rebuild-error.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-rebuild-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05: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 Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-resize-error.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-resize-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05: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 Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-resize_finish-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05: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 Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-restore-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-resume-end.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-resume-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-shelve-end.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-shelve-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-shelve_offload-end.json Null out instance.availability_zone on shelve offload 2018-09-28 14:07:15 -04:00
instance-shelve_offload-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-shutdown-end.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-shutdown-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-snapshot-end.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-snapshot-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-soft_delete-end.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-soft_delete-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-suspend-end.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-suspend-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-trigger_crash_dump-end.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-trigger_crash_dump-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05: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 Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-unshelve-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-update-tags-action.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-update.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-volume_attach-end.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-volume_attach-error.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-volume_attach-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-volume_detach-end.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-volume_detach-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-volume_swap-end.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-volume_swap-error.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05:00
instance-volume_swap-start.json Add FlavorPayload.description for versioned notifications 2017-11-14 09:14:12 -05: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
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