RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1442700 - The vm shutdown when restart libvirtd with no-autostart network destroyed
Summary: The vm shutdown when restart libvirtd with no-autostart network destroyed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: yalzhang@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-17 07:47 UTC by yalzhang@redhat.com
Modified: 2017-08-02 01:30 UTC (History)
3 users (show)

Fixed In Version: libvirt-3.2.0-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-02 00:05:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1846 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-08-01 18:02:50 UTC

Description yalzhang@redhat.com 2017-04-17 07:47:18 UTC
Description of problem:
The vm shutdown when restart libvirtd with no-autostart network destroyed

Version-Release number of selected component (if applicable):
libvirt-3.2.0-2.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Set the network to persistent and no-autostart.

# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     no            yes

2. Start a vm connected to this network
# brctl show
bridge name    bridge id        STP enabled    interfaces
virbr0        8000.5254007f6545    yes        virbr0-nic
                            vnet0

3. Destroy the network, then restart libvirtd, the guest will be destroyed.
# virsh net-destroy default
Network default destroyed

# virsh list
 Id    Name                           State
----------------------------------------------------
 2     rhel7.3                        running

# systemctl restart libvirtd.service

# virsh list
 Id    Name                           State
----------------------------------------------------

The log says:
2017-04-13 06:27:56.754+0000: 15043: error : virNetDevGetMTU:422 : Cannot get interface MTU on 'virbr0': No such device
2017-04-13 06:27:56.960+0000: 15043: info : virDBusCall:1558 : DBUS_METHOD_ERROR: 'org.freedesktop.machine1.Manager.TerminateMachine' on '/org/freedesktop/machine1' at 'org.freedesktop.machine1' error org.freedesktop.machine1.NoSuchMachine: No machine 'qemu-2-rhel7.3' known


Actual results:
The vm destroyed when restart libvirtd with no-autostart network destroyed

Expected results:
The vm should be active

Additional info:

Comment 2 Laine Stump 2017-04-17 21:23:39 UTC
We're attempting to reconnect to the network (since we've detected that the guest is no longer connected) but failing to account for the possibility that the network is *still* down. That failure needs to be more graceful (i.e. just stop trying to reconnect rather than completely tearing everything else down).

Comment 3 Laine Stump 2017-04-25 17:24:35 UTC
Patches posted upstream:

https://www.redhat.com/archives/libvir-list/2017-April/msg01184.html

Comment 4 Laine Stump 2017-05-02 15:19:22 UTC
Pushed upstream, will be in libvirt-3.3.0:

commit cb182eb11d3a99adb06e188989899dcd488c43fc
Author: Laine Stump <laine>
Date:   Tue Apr 25 12:20:30 2017 -0400

    qemu: don't kill qemu process on restart if networkNotify fails

commit 7949de960eaba07661c1e0ab6e4aa945db8c1b25
Author: Laine Stump <laine>
Date:   Tue Apr 25 12:26:43 2017 -0400

    network: better log message when network is inactive during reconnect

Comment 7 yalzhang@redhat.com 2017-05-07 07:07:05 UTC
test on libvirt-3.2.0-4.el7.x86_64, the results is as expected, 

1. start a guest and connected to a transient not autostart network. 
# virsh net-list
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     no            yes

# virsh list
 Id    Name                           State
----------------------------------------------------
 1     rhel7                          running

# brctl show
bridge name	bridge id		STP enabled	interfaces
virbr0		8000.525400779a74	yes		virbr0-nic
							vnet0

2. destroy the transient network, then restart libvirtd, the guest do not shutdown.
# virsh net-destroy default
Network default destroyed

# systemctl restart libvirtd.service

# virsh list
 Id    Name                           State
----------------------------------------------------
 1     rhel7                          running

3. check the log file
# cat /var/log/libvirt/libvirtd.log
...
2017-05-07 06:43:40.690+0000: 15029: debug : networkNotifyActualDevice:4688 : Requested operation is not valid: network 'default' is not active
...

Comment 8 errata-xmlrpc 2017-08-02 00:05:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:1846

Comment 9 errata-xmlrpc 2017-08-02 01:30:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:1846


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