[host_maintenance] Pass des hostname in add_action solution

Currently we are passing src_node and des_node uuid when we try to run
migrate action.

In the watcher-applier log, migration fails with following exception
```
Nova client exception occurred while live migrating instance <uuid>Exception: Compute host <uuid> could not be found
```
Based on 57f55190ff/watcher/applier/actions/migration.py (L122)
and
57f55190ff/watcher/common/nova_helper.py (L322),
live_migrate_instance expects destination hostname not uuid.

This cr replaces dest_node uuid to hostname.

Closes-Bug: #2109309

Change-Id: I3911ff24ea612f69dddae5eab15fabb4891f938d
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
This commit is contained in:
Chandan Kumar (raukadah)
2025-04-25 09:45:38 +05:30
parent c4acce91d6
commit 278cb7e98c
2 changed files with 5 additions and 5 deletions

View File

@@ -195,7 +195,7 @@ class HostMaintenance(base.HostMaintenanceBaseStrategy):
'source_node': src_node.uuid,
'resource_name': instance.name}
if des_node:
params['destination_node'] = des_node.uuid
params['destination_node'] = des_node.hostname
self.solution.add_action(action_type=self.INSTANCE_MIGRATION,
resource_id=instance.uuid,
input_parameters=params)