problem
Adding an existing KVM host in zone A to another Zone B is currently allowed.
When it is added, the zone for the host changes and the zone is updated for the host. The host goes into the Alert.
The existing VMs on Zone A are still running on this host and are displayed as such in the UI.
This shouldn't be allowed. We should fail the request to add host, if the host already exists in the database.
versions
4.20 with KVM. Probably present since the beginning.
The steps to reproduce the bug
- Setup a host in Zone A
- Add the existing host in Zone B
What to do about it?
Before adding a host, we should validate if the host already exists in the database with same hostname or IP address and throw an error.
problem
Adding an existing KVM host in zone A to another Zone B is currently allowed.
When it is added, the zone for the host changes and the zone is updated for the host. The host goes into the Alert.
The existing VMs on Zone A are still running on this host and are displayed as such in the UI.
This shouldn't be allowed. We should fail the request to add host, if the host already exists in the database.
versions
4.20 with KVM. Probably present since the beginning.
The steps to reproduce the bug
What to do about it?
Before adding a host, we should validate if the host already exists in the database with same hostname or IP address and throw an error.