Revert "Update migration notification"

This reverts commit 6d96512188.

The instance.live_migration_post.end event is created in the source node
before the migration has finished, it shows state migrating and the
source node as host.

The instance.live_migration_post_dest.end is created in the destination
after the migraion is finished, shows task_state None and the correct
destination node as host.

It also adds a release note.

Closes-Bug: #2138857
Change-Id: I751170e4ba1aa5ede0559dae8380120611ecf1e4
Signed-off-by: Alfredo Moralejo <amoralej@redhat.com>
(cherry picked from commit 857e14a9d8)
This commit is contained in:
Alfredo Moralejo
2026-01-22 10:17:20 +01:00
parent 0d5f2080b3
commit 62714e290c
4 changed files with 13 additions and 6 deletions

View File

@@ -0,0 +1,7 @@
---
fixes:
- |
Notification-based updates of the nova DataModel failed to set the
actual destination host as compute node after Live Migrations. The
Nova collector is now using the right Nova notification to update
the instance in the DataModel after those events.

View File

@@ -341,7 +341,7 @@ class VersionedNotification(NovaNotification):
'instance.rescue.end': instance_updated,
'instance.update': instance_updated,
'instance.live_migration_force_complete.end': instance_updated,
'instance.live_migration_post.end': instance_updated,
'instance.live_migration_post_dest.end': instance_updated,
'instance.delete.end': instance_deleted,
'instance.soft_delete.end': instance_deleted,
'service.create': service_updated,

View File

@@ -1,5 +1,5 @@
{
"event_type": "instance.live_migration_post.end",
"event_type": "instance.live_migration_post_dest.end",
"payload": {
"nova_object.data": {
"action_initiator_project": "6f70656e737461636b20342065766572",
@@ -49,7 +49,7 @@
"nova_object.namespace": "nova",
"nova_object.version": "1.4"
},
"host": "Node_1",
"host": "host2",
"host_name": "some-server",
"image_uuid": "155d900f-4e14-4e4c-a73d-069cbf4541e6",
"ip_addresses": [

View File

@@ -72,8 +72,8 @@ class TestReceiveNovaNotifications(NotificationTestCase):
'instance.update': 'instance-update.json',
'instance.live_migration_force_complete.end':
'instance-live_migration_force_complete-end.json',
'instance.live_migration_post.end':
'instance-live_migration_post-end.json',
'instance.live_migration_post_dest.end':
'instance-live_migration_post_dest-end.json',
'instance.delete.end': 'instance-delete-end.json',
'instance.soft_delete.end': 'instance-soft_delete-end.json',
'service.create': 'service-create.json',
@@ -546,7 +546,7 @@ class TestNovaNotifications(NotificationTestCase):
node = compute_model.get_node_by_instance_uuid(instance0_uuid)
self.assertEqual('fa69c544-906b-4a6a-a9c6-c1f7a8078c73', node.uuid)
message = self.load_message(
'instance-live_migration_post-end.json')
'instance-live_migration_post_dest-end.json')
handler.info(
ctxt=self.context,
publisher_id=message['publisher_id'],