[libvirt] Is it a problem that "a vm has been shutdown, but its pidfile has not been removed"
Daniel P. Berrange
berrange at redhat.com
Thu Aug 22 09:45:41 UTC 2013
On Thu, Aug 22, 2013 at 09:34:55AM +0000, Wangyufei (A) wrote:
> 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 ?
It is fairly harmless, but it would be good practice to fix
this so it is removed.
> 2. Do you think it is expected that the member of
> privateData.pidfile's value missed after libvirtd restart?
>
> If it's a bug then I'll submit the patch to fix it.
Yes, that's a bug. When restarting libvirtd, we want to maintain
all the state we had before. So loosing the pidfile string is
a mistake.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list