[PATCH v2 11/11] qemu: Make auto dump path generation embed driver aware

Daniel P. Berrangé berrange at redhat.com
Mon Mar 30 11:24:18 UTC 2020


On Thu, Mar 26, 2020 at 04:15:15PM +0100, Michal Privoznik wrote:
> So far, libvirt generates the following path for automatic dumps:
> 
>   $autoDumpPath/$id-$shortName-$timestamp
> 
> where $autoDumpPath is where libvirt stores dumps of guests (e.g.
> /var/lib/libvirt/qemu/dump), $id is domain ID and $shortName is
> shortened version of domain name. So for instance, the generated
> path may look something like this:
> 
>   /var/lib/libvirt/qemu/dump/1-QEMUGuest-2020-03-25-10:40:50
> 
> While in case of embed driver the following path would be
> generated by default:
> 
>   $root/lib/libvirt/qemu/dump/1-QEMUGuest-2020-03-25-10:40:50
> 
> which is not clashing with other embed drivers, we allow users to
> override the default and have all embed drivers use the same
> prefix. This can create clashing paths. Fortunately, we can reuse
> the approach for machined name generation
> (v6.1.0-178-gc9bd08ee35) and include part of hash of the root in
> the generated path.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> Reviewed-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
> ---
>  src/qemu/qemu_driver.c | 6 ++++++
>  1 file changed, 6 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list