Description of problem: The default value of auto_dump_path is /var/lib/libvirt/qemu/dump, this directory is not created at installation Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. yum -y install libvirt 2. ls /var/lib/libvirt/qemu/dump Actual results: dump directory is missing Expected results: dump directory should exist Additional info:
Why do you think the directory should be created at installation? What's wrong with the current behavior of auto-creating it at use time the first time something is actually dumped there? I see little reason to create an empty directory, when it gets auto-created at the point where it is needed, so I'm inclined to close this as not a bug unless you can explain WHY you want it at installation time.
I do not really care when is it created, but it was not created when crasing a VM with watchdog set to action=dump
Ah, that makes more sense for why you are raising a bug report. Can you show actual steps you used for triggering a watchdog crash, and the error message that results when the directory does not exist, in the hopes that it can help someone pinpoint the watchdog code that is not properly auto-creating the directory?
NB, the other general reason for creating dirs at RPM install time, rather than 'mkdir' at runtime is to ensure correct SELinux labelling. Probably doesn't matter here since the label of the default dump dir will match the parent dir anyway, but it is good practice to pre-create the dirs anyway IMHO
Created attachment 793731 [details] libvirt log libvirt log
Created attachment 793732 [details] xml definition of the VM
Steps to Reproduce: 1. create VM with watchdog action=dump 2. run the VM 3. crash the VM 4. wait till watchdog triggered Actual results: - Vm goes paused for a few seconds, then it turns back to running state - no dump found on the local filesystem Expected results: - Dump should have been created - VM should remain in paused mode (unless there is any reason to keep a VM running after it is crashed)
As of at least libvirt 1.1.2 (tested from fedora-virt-preview on Fedora 19): The /dump directory is auto-created when a GUEST is started (but not when libvirtd itself is started): # rmdir /var/lib/libvirt/qemu/dump/ # ls /var/lib/libvirt/qemu/ capabilities.monitor.sock channel save snapshot # systemctl restart libvirtd # ls /var/lib/libvirt/qemu/ capabilities.monitor.sock channel save snapshot # virsh start f18-live Domain f18-live started # ls /var/lib/libvirt/qemu/ capabilities.monitor.sock channel dump f18-live.monitor save snapshot Normally, you can't do a dump without a running guest, so auto-creating the directory on guest start should be sufficient. I'm failing to reproduce a failure scenario under my testing. I'm inclined to close as WORKSFORME unless we can get more details on whether an older libvirt version didn't autocreate the directory; which may include a setup where upgrading libvirtd from an older version that didn't create the directory to a new version that assumes the directory exists without checking it.
The code to auto-create directories has been present since at least commit e123e1e (v0.9.4). We can reopen this if you can provide more details (what XML did you use for your guest; what version of libvirt did you test); but for now, I'm closing this as upstream does not seem to have a problem.
I couldn't get watchdog action=dump to do anything at all. Bug filed here as the symptoms are somewhat different from the current bug: https://bugzilla.redhat.com/show_bug.cgi?id=1099514