]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuProcessReconnect: Fill in pid file path
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 3 Mar 2015 10:51:19 +0000 (11:51 +0100)
committerCole Robinson <crobinso@redhat.com>
Tue, 28 Apr 2015 15:06:37 +0000 (11:06 -0400)
commit91cf6052ded0db1d322ce4e06921fefdca94528a
tree273b21ea7f4d4667119a461bc9ad62dbc77cce3e
parent9aec9a46b43c4681692b106776ef4b7222c66347
qemuProcessReconnect: Fill in pid file path

https://bugzilla.redhat.com/show_bug.cgi?id=1197600

So, libvirt uses pid file to track pid of started qemus. Whenever
a domain is started, its pid is put into corresponding pid file.
The pid file path is generated based on domain name and stored
into domain object internals. However, it's not stored in the
status XML and therefore lost on daemon restarts. Hence, later,
when domain is being shut down, the daemon does not know which
pid file to unlink, and the correct pid file is left behind. To
avoid this, lets generate the pid file path again in
qemuProcessReconnect().

Reported-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 63889e0c775010d8d70b71d25340bab995aa83ce)
src/qemu/qemu_process.c