wi3dzma opened a new issue, #14709:
URL: https://github.com/apache/cloudstack/issues/14709
### problem
After an attempt to put a KVM host into maintenance mode failed, opening the
console
of a VM running on that host fails with:
Failed to execute API. createConsoleEndpoint
Server Internal Error: Duplicate key kvm.vnc.address
(attempted merging values 10.x.x.x and 10.x.x.x)
The VM had two rows with name `kvm.vnc.address` (same value) in
`vm_instance_details`.
The VM itself kept running normally; only console access was affected.
### Suspected cause
The failed-maintenance path that sets VNC access details for VMs with failed
migrations seems to add
`kvm.vnc.address` without removing the existing row. The console endpoint
code
then collects VM details into a map and throws on the duplicate key.
### Expected behaviour
VNC details should be updated in place (no duplicate rows), and/or console
endpoint creation should tolerate duplicate detail keys.
### versions
- CloudStack 4.22.1.1
- Hypervisor: KVM, [Rocky Linux 9.8]
### The steps to reproduce the bug
1. Put a KVM host with running VMs into maintenance mode.
2. Maintenance fails with an error ([error message / reason, e.g. VM
migration failed]).
3. Open the console of a VM on that host -> the error above.
### What to do about it?
Either stop/start the VM, or delete one of the duplicated rows from
`vm_instance_details`. Console works again afterwards.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]