Re: [PATCH] qemu: handle -1 for pid in qemuDomainGetMachineName

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 31, 2017 at 12:01:44PM +0300, Nikolay Shirokovskiy wrote:
> We call qemuDomainGetMachineName on domain start. On first
> start (after daemon start) pid is 0 and virSystemdGetMachineNameByPID
> don't get called. But after domain shutting down pid became -1 so
> on next start virSystemdGetMachineNameByPID is called and returned an error.
> Error is ignored so it is not critical. But at least on my system
> (systemd-219 with extra patches) systemd-machined is crashed on
> this request.
> 
> This behaviour is triggered by eaf2c9f89.
> ---
>  src/qemu/qemu_domain.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index e580a5b..fe44d36 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -9696,7 +9696,7 @@ qemuDomainGetMachineName(virDomainObjPtr vm)
>      virQEMUDriverPtr driver = priv->driver;
>      char *ret = NULL;
>  
> -    if (vm->pid) {
> +    if (vm->pid > 0) {
>          ret = virSystemdGetMachineNameByPID(vm->pid);
>          if (!ret)
>              virResetLastError();

Reviewed-by: Daniel P. Berrange <berrange@xxxxxxxxxx>


Worth pushing for this release too IMHO

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 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux