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   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-25 14:37:15 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Mark Wu 2012-07-25 01:32:26 EDT
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):

How reproducible:

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='' prefix='24'/>
  <protocol family='ipv6'>
    <ip address='fe80::221:ccff:fe68:d738' prefix='64'/>

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'>

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 14:37:15 EDT
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 ***