Hide Forgot
Description of problem: Currently it's possible to detach a network that is "used" by a host from the cluster. Since the network is provisioned on the hosts by name and no other ID, it is possible that the network be detached and become "unmanaged" on the host. Hence, it makes little sense to block this on the DC level since the user can simply detach the network and then remove it. Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Setup a network on the host 2. Try to remove the network from the DC 3. Actual results: Removal will fail since the network is "used" by the host Expected results: Removal should succeed. Additional info:
Just note this is a complex operation: 1. Remove from DC 2. Remove from all clusters 3. Remove from the configuration per all the hosts. Only then it becomes un-managed. Now for VM-Network which is assigned to VMs it may be even more complex - here we may need to block. If we don't then: If all VMs that are attached to the network are down - remove the network from all the VMs NICs and make them "None" If VMs are running, I have no idea how this could be solved. You can do as the above, but I don't see the engine sending re-wire command for each VM moving them to the null network.
(In reply to comment #1) > Just note this is a complex operation: > 1. Remove from DC > 2. Remove from all clusters > 3. Remove from the configuration per all the hosts. > > Only then it becomes un-managed. > > Now for VM-Network which is assigned to VMs it may be even more complex - > here we may need to block. > > If we don't then: > If all VMs that are attached to the network are down - remove the network > from all the VMs NICs and make them "None" > If VMs are running, I have no idea how this could be solved. You can do as > the above, but I don't see the engine sending re-wire command for each VM > moving them to the null network. I'm not sure what you mean. When the network is removed from the DC, it is removed from the cluster, but remains on the host as an unmanaged network. Regarding a network that is assigned to a VM, I agree we should continue blocking network removal.
(In reply to comment #2) > I'm not sure what you mean. When the network is removed from the DC, it is > removed from the cluster, but remains on the host as an unmanaged network. Yes, now that you say so, I remember that we do not have 'host configuration' saved in the DB, thus the only indication for managed/un-managed id it's existence in the cluster The problem is that it's a wrong approach and this is why it takes time for me to account for that. > Regarding a network that is assigned to a VM, I agree we should continue > blocking network removal.
Behaviour of Update network will be modified as well to allow updating a network when network is assigned to a host. The network will simply become unsynced, and admin will be able to sync the network via Setup Networks.
Verified on rhevm-3.2.0-10.19.beta2.el6ev.noarch
3.2 has been released