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:
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 ***