Bug 1354238

Summary: auto_dump_path setting in the qemu.conf not work
Product: Red Hat Enterprise Linux 7 Reporter: yafu <yafu>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: dyuan, fjin, mprivozn, mzhan, rbalakri, zpeng
Target Milestone: rcKeywords: Upstream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-2.0.0-3.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 18:48:37 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 yafu 2016-07-11 03:10:16 UTC
Description of problem:
auto_dump_path setting in the qemu.conf does not work, the auto-dump file will be created in the '/' directory.

Version-Release number of selected component (if applicable):
libvirt-2.0.0-2.el7.x86_64
qemu-kvm-rhev-2.6.0-12.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Check the default setting of the auto_dump_path:
  #cat /etc/libvirt/qemu.conf
    ...
    # When a domain is configured to be auto-dumped when libvirtd receives a
    # watchdog event from qemu guest, libvirtd will save dump files in directory
    # specified by auto_dump_path. Default value is /var/lib/libvirt/qemu/dump
    #
    #auto_dump_path = "/var/lib/libvirt/qemu/dump"
     ...

2.Start a guest with watchdog device:
   #virsh dumpxml rhel7.3
    ...
    <watchdog model='i6300esb' action='dump'>
      <alias name='watchdog0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
    </watchdog>
   ...

3.In guest:
  echo 1 > /dev/watchdog

Actual results:
The auto dump file created in the '/' directory:

Expected results:
The auto dump file created in the default auto_dump_path: /var/lib/libvirt/qemu/dump

Additional info: 
The dump filename is only consists of 'domainid-domainname', so the dump filename is the same for the same guest, it means the dumpfile will be overlapped by the next dump.

Comment 4 Fangge Jin 2016-08-08 10:49:37 UTC
Reproduce this on build libvirt-2.0.0-2.el7.x86_64


Verify this BZ on build libvirt-2.0.0-4.el7.x86_64.

1. Use the default auto_dump_path value, there is core dump file generated in directory /var/lib/libvirt/qemu/dump:

# ll /var/lib/libvirt/qemu/dump/5-rhel7.2-2016-08-08-18:31:44
-rw-------. 1 root root 1182815304 8月   8 18:31 /var/lib/libvirt/qemu/dump/5-rhel7.2-2016-08-08-18:31:44

2. Set auto_dump_path = "/var/lib/libvirt/qemu/dump1" in qemu.conf and restart libvirtd, core dump file can also be generated:

# ll /var/lib/libvirt/qemu/dump1/6-rhel7.2-2016-08-08-18\:42\:30 
-rw-------. 1 root root 1182815304 8月   8 18:42 /var/lib/libvirt/qemu/dump1/6-rhel7.2-2016-08-08-18:42:30

Comment 6 errata-xmlrpc 2016-11-03 18:48:37 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://rhn.redhat.com/errata/RHSA-2016-2577.html