Wrong cluster ID on VM history after cluster reorganization
Enhancement Request
Description
VMs deployed on a host which has been moved to another cluster, maintain the previous cluster ID on the last history record. Actions like attach nic to a network which is not part of the old cluster fail. It would be very useful to add a new histroy record to log the new cluster ID.
To reproduce: Two clusters with one host and some vnets and VMs on each one. Reorganize hosts moving one of them to the other cluster. Try to attach nic to a VM on a vnet of the new cluster.
Use case
You need to manually update the last history record of each VM of the moved host.
Interface Changes
N/A
Progress Status
- [ ] Branch created
- [ ] Code committed to development branch
- [ ] Testing - QA
- [ ] Documentation
- [ ] Release notes - resolved issues, compatibility, known issues
- [ ] Code committed to upstream release/hotfix branches
- [ ] Documentation committed to upstream release/hotfix branches
In case somebody runs into this issue, here is command how to fix the cluster ID in the VM history record:
onedb change-history --id <vm-id> --seq <history-last-id> '/HISTORY/CID' <new-cluster-id>
For master branch solved by #6342 Need fix for 6.10 branch