Bug 1113091

Summary: VDSM trying to restore saved network rollback
Product: [Retired] oVirt Reporter: Michael Burman <mburman>
Component: vdsmAssignee: Antoni Segura Puimedon <asegurap>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Pavlik <mpavlik>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.5CC: bazulay, danken, dcaroest, eedri, gklein, iheim, mburman, mgoldboi, mpavlik, ncredi, obasan, rbalakri, yeylon
Target Milestone: ---Keywords: AutomationBlocker, Triaged
Target Release: 3.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: network
Fixed In Version: ovirt-3.5.0-beta1.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:30:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1073943    
Description Flags
vdsm faild to restart- Running restore_nets (unknown nic ethx) none

Description Michael Burman 2014-06-25 12:25:17 UTC
Created attachment 912077 [details]
vdsm faild to restart- Running restore_nets (unknown nic ethx)

Description of problem:
VDSM trying to restore saved network rollback. 
network rollbak failed if saved configuration have missing nic.
for example: 
vm with vdsm installed on it (nested vm). 
nic2(of the vm) attached to net1
if shutting down the vm, removing nic2 and then running the vm and restarting vdsmd. 
When trying to restart the vdsm, he is trying to restore saved network setup,vdsm use /var/lib/vdsm/persistent/netconf/eth1 to restore netconf. 

Version-Release number of selected component (if applicable):
 oVirt Engine Version: 3.5.0-0.0.master.20140605145557.git3ddd2de.el6 

How reproducible:

Steps to Reproduce:
1. create new vm,nested vm(vdsm on it). (for nested vm installation see additional info down below). 
4. create nic2 on the vm attached to net1
5. shut down the vm and remove nic2
6. run the vm and restart vdsmd on the vm
Actual results:
when trying to restart vdsm, vdsm use /var/lib/vdsm/persistent/netconf/eth1 to restore netconf. he fails. "unknown nic eth1"

Expected results:
vdsm restarts with no problem. 

Additional info:

Comment 1 Antoni Segura Puimedon 2014-06-25 13:16:55 UTC
I could use some clarification:

Is this right?

1. Create a VM 
2. install vdsm on the VM
3. attach a vnic (nic2 named eth1 in the guest OS) to the VM that runs vdsm.
4. configure VM's vdsm to use eth1 for net1
5. save the network configuration for the VM host. ?
6. Shutdown the VM
7. Detach/unconfigure nic2 so that it is no longer one of the vnics in the VM.
8. Start the VM vdsmd being enabled

What after start? If using unified persistence, as it is the default in vdsm for oVirt-3.5, The networks will be read from /var/lib/vdsm/persistence/netconf/nets/
(in this case I guess it would be the net1 file). It would try to setup the network and it would fail due to the nic being missing. Is that what happened?

Comment 2 Michael Burman 2014-06-25 13:22:22 UTC
yes, it is right. steps 1-8

Yes, that what happened.

Comment 3 Antoni Segura Puimedon 2014-06-25 13:50:21 UTC
Thanks for the clarification Michael. I'll change the behavior so that on restoring the networks at boot:
 - networks that depend on a non-existing nic are filtered out (and an error to set them up is logged).
 - networks that depened on a bond that referes to a non-existing nic are filtered out (and an error to set them up is logged).

Comment 4 Martin Pavlik 2014-07-17 13:50:40 UTC
MainThread::ERROR::2014-07-17 13:47:47,812::vdsm-restore-net-config::100::root::(_filter_nets_bonds) Nic "eth1" required by network net1 is missing. The network will not be configured

Comment 5 Sandro Bonazzola 2014-10-17 12:30:57 UTC
oVirt 3.5 has been released and should include the fix for this issue.