Is it a problem that "a vm has been shutdown, but its pidfile has not been removed"

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

 



Hello,

when do steps as follows:

1.  start a vm

2.  restart libvirtd service

3.  shutdown the vm

I found the pidfile associated with the vm has not been removed.

 

    Analyzing related piece of code, I found when libvirtd service restarted, the vm's _virDomainObj structure(named dom here) in libvirtd will be re-established according to the vm's state-file or config-file, but its member of privateData.pidfile will not be reassigned value. By the way, qemudriver is used in my libvirt.

   

So when the vm is shutdown, its pidfile will not be removed, because the member of privateData.pidfile is NULL.

 

My questions are :

1.  Do you think it is a problem when a vm has been shutdown, but its pidfile has not been removed ?

2.  Do you think it is expected that the member of privateData.pidfile's value missed after libvirtd restart?

 

    If its a bug then Ill submit the patch to fix it.

 

    Also list the related piece of code about removing the vm's pidfile in libvirt for your information:

             if (priv->pidfile &&

                    unlink(priv->pidfile) < 0 &&

                    errno != ENOENT)

                    VIR_WARN("Failed to remove PID file for %s: %s",

                 vm->def->name, virStrerror(errno, ebuf, sizeof(ebuf)));

 

Best Regards,

-WangYufei

 

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