Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 909820 - [engine][networks] Don't block removing/updating network "used" by host
[engine][networks] Don't block removing/updating network "used" by host
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.2.0
Unspecified Unspecified
medium Severity low
: ---
: 3.2.0
Assigned To: lpeer
Meni Yakove
network
:
Depends On:
Blocks: 948448
  Show dependency treegraph
 
Reported: 2013-02-11 03:22 EST by Mike Kolesnik
Modified: 2016-02-10 14:47 EST (History)
9 users (show)

See Also:
Fixed In Version: sf13.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 11968 None None None Never
oVirt gerrit 12527 None None None Never

  None (edit)
Description Mike Kolesnik 2013-02-11 03:22:46 EST
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:
Comment 1 Simon Grinberg 2013-02-12 06:27:59 EST
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.
Comment 2 Muli Salem 2013-02-12 10:19:39 EST
(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.
Comment 3 Simon Grinberg 2013-02-13 07:44:13 EST
(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.
Comment 4 Muli Salem 2013-02-20 10:02:32 EST
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.
Comment 6 Meni Yakove 2013-04-14 08:41:43 EDT
Verified on rhevm-3.2.0-10.19.beta2.el6ev.noarch
Comment 7 Itamar Heim 2013-06-11 05:40:17 EDT
3.2 has been released
Comment 8 Itamar Heim 2013-06-11 05:40:18 EDT
3.2 has been released
Comment 9 Itamar Heim 2013-06-11 05:53:44 EDT
3.2 has been released

Note You need to log in before you can comment on or make changes to this bug.