Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1162974 - external disk snapshot with fault glusterfs snapshot xml crash libvirtd
external disk snapshot with fault glusterfs snapshot xml crash libvirtd
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.1
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Ján Tomko
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-12 00:47 EST by Wayne Sun
Modified: 2015-03-05 02:47 EST (History)
6 users (show)

See Also:
Fixed In Version: libvirt-1.2.8-7.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 02:47:27 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
libvirtd back trace file (10.41 KB, text/plain)
2014-11-12 00:47 EST, Wayne Sun
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 07:10:54 EST

  None (edit)
Description Wayne Sun 2014-11-12 00:47:53 EST
Created attachment 956560 [details]
libvirtd back trace file

Description of problem:
when do external disk snapshot with fault gluster network snapshot xml, libvirtd crashed.
The fault xml is generated accidentally, with the right one it could succeed. 

Version-Release number of selected component (if applicable):
libvirt-1.2.8-6.el7.x86_64
glusterfs-3.5.2-1.el7.x86_64
qemu-kvm-rhev-2.1.2-6.el7.x86_64
kernel-3.10.0-123.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. prepare a domain with gluster network disk
# virsh dumpxml virt-tests-vm1
...
    <disk type='network' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source protocol='gluster' name='gluster-vol1/rhel7.img'>
        <host name='xx.xx.xx.xx'/>
      </source>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
...

# virsh list
 Id    Name                           State
----------------------------------------------------
 4     virt-tests-vm1                 running

2. prepare a fault snapshot xml
# cat /tmp/gluster_snap.xml 
<domainsnapshot>
<name>snapshot_test</name>
<description>Snapshot Test</description>
<disks>
<disk name='vda' snapshot='external' type='network'>
<source protocol='gluster' name='gluster-vol1/gluster.qcow2.snap'/>
</disk>
</disks>
</domainsnapshot>

Note:
The <source> element closed without <host/> given

3. do external disk snapshot with the xml
# virsh snapshot-create virt-tests-vm1 /tmp/gluster_snap.xml --disk-only
2014-11-12 05:25:19.353+0000: 14192: info : libvirt version: 1.2.8, package: 6.el7 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2014-11-04-08:28:35, x86-020.build.eng.bos.redhat.com)
2014-11-12 05:25:19.353+0000: 14192: warning : virKeepAliveTimerInternal:143 : No response from client 0x7f9784181dd0 after 6 keepalive messages in 35 seconds
error: internal error: received hangup / error event on socket
2014-11-12 05:25:19.354+0000: 14194: warning : virKeepAliveTimerInternal:143 : No response from client 0x7f9784181dd0 after 6 keepalive messages in 35 seconds
error: Failed to reconnect to the hypervisor


Actual results:
libvirtd crashed

Expected results:
no crash

Additional info:
backtrace in attachment
Comment 2 Ján Tomko 2014-11-12 03:40:00 EST
Upstream patch:
https://www.redhat.com/archives/libvir-list/2014-November/msg00357.html
Comment 3 Ján Tomko 2014-11-12 03:48:39 EST
Now pushed:
commit b66288faaba68e22a2876029872ddadf1794bda8
Author:     Ján Tomko <jtomko@redhat.com>
CommitDate: 2014-11-12 09:36:31 +0100

    Do not crash on gluster snapshots with no host name
    
    virStorageFileBackendGlusterInit did not check nhosts.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1162974

git describe: v1.2.10-78-gb66288f
Comment 6 Shanzhi Yu 2014-11-26 01:31:57 EST
Verify this bug with libvirt-1.2.8-9.el7.x86_64, step as comment 0. libvirtd will not crash again and an error show when try to start guest

# virsh snapshot-create rh7 snap.xml  --disk-only
error: internal error: Expected exactly 1 host for the gluster volume

So, change this bug to verify status
Comment 8 errata-xmlrpc 2015-03-05 02:47:27 EST
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://rhn.redhat.com/errata/RHSA-2015-0323.html

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