Bug 842956

Summary: Destroyed interface is not brought up after rollback
Product: [Fedora] Fedora Reporter: Mark Wu <wudxw>
Component: libvirtAssignee: Laine Stump <laine>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: berrange, clalancette, dallan, dougsland, itamar, jforbes, jyang, laine, libvirt-maint, veillard, virt-maint
Target Milestone: ---Flags: laine: needinfo?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-25 18:37:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mark Wu 2012-07-25 05:32:26 UTC
Description of problem:
According to the comments of virInterfaceDestroy, the destroyed interface should be brought up after rollback:

        If there is an open network config transaction at the time this
        interface is destroyed (that is, if virInterfaceChangeBegin() had
        been called), and if the interface is later undefined and then
        virInterfaceChangeRollback() is called, the restoral of the
        interface definition will also bring the interface back up. """
  
But it's not in my test. Actually, I found netcf just restore configuration on rollback and didn't handle the activation of interface. So perhaps we need fix that in netcf at first.

Version-Release number of selected component (if applicable):
libvirt-0.9.11.4-3.fc17

How reproducible:
always

Steps to Reproduce:
1. create interface:
virsh # iface-define /home/mark/Work/xml/em1.xml 
Interface em1 defined from /home/mark/Work/xml/em1.xml
virsh # iface-start em1
Interface em1 started
virsh # iface-dumpxml em1
<interface type='ethernet' name='em1'>
  <protocol family='ipv4'>
    <ip address='9.115.122.89' prefix='24'/>
  </protocol>
  <protocol family='ipv6'>
    <ip address='fe80::221:ccff:fe68:d738' prefix='64'/>
  </protocol>
</interface>

2. begin a transaction and destroy interface:
virsh # iface-begin 
Network config change transaction started

virsh # iface-destroy em1
Interface em1 destroyed

3. rollback
virsh # iface-rollback 
Network config change transaction rolled back

virsh # iface-dumpxml em1
<interface type='ethernet' name='em1'>
</interface>

Actual results:
em1 is not in the out of ifconfig, because it's still down after rollback


Expected results:
bring up the destroyed interface after rollback

Additional info:

Comment 1 Laine Stump 2012-07-25 18:37:15 UTC
iface-rollback rolls back changes in config only, not changes in the current up/down status of the interfaces.


Bug 737149 is an RFE to enhance this functionality to properly ifdown and interfaces that had been added during the transaction prior to restoring the old config, and ifup any interfaces that had been removed after restoring their config.

I hadn't previously considered having it restore the live state of interfaces whose configuration hasn't been changed, but it does make sense, so I'm closing this BZ as a duplicate of the existing bug, and adding that to the "feature list" required to consider that RFE complete.

*** This bug has been marked as a duplicate of bug 737149 ***