[libvirt] [PATCH v4 05/14] qemu: Store pr runtime data in status XML

Michal Privoznik mprivozn at redhat.com
Mon Apr 16 14:56:36 UTC 2018


On 04/13/2018 10:57 PM, John Ferlan wrote:
> 
> 
> On 04/10/2018 10:58 AM, Michal Privoznik wrote:
>> Now that we generate pr-manager alias and socket path store them
>> in status XML so that they are preserved across daemon restarts.
>>
>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>> ---
>>  src/qemu/qemu_domain.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 64 insertions(+)
>>
> 
> So if we were to save this information (and at this point I don't think
> we need to), then this is where we should be allocating and filling in
> the private data (e.g. not in the previous patch).

How come? What would be left from the previous patch if private runtime
struct would be introduced only here? Or are you just suggesting
swapping these two patches?

> 
> Again as I noted previously, save the alias when printing the domain
> active information and I think you're good.

No, I don't want to expose info on PR helper more than is necessary. The
fact that it's a separate process should not be visible to users because
it is an implementation detail of QEMU. Other hypervisors might do this
differently. And even though it might not be visible from the patches,
using unmanaged mode is discouraged. In fact, unmanaged mode is on the
edge. If pr-helper is viewed as internal implementation the unmanaged
mode has no place in libvirt. However, qemu devels are experimenting
with systemd socket activation and for socket path must be configurable
through libvirt. So the only reason for using unmanaged PRs is systemd
socket activation.

Side note, we are not even exposing qemu's PID anywhere because not
every hypervisor we support has VMs as separate processes.

> 
> AFAICT the only thing printed now (@relPath) is something generated via
> qemu_driver calls (I didn't dig deep); whereas, this data is easily
> regeneratable from existing domain definition data.

Yes it is. Currently. But just look at the history of channelTargetDir,
e.g. a89f05ba8df095875f. We have to have qemuDomainSetPrivatePathsOld(),
worse we have to keep it around for the rest of libvirt's life time.
Only because nobody thought of storing channelTargerDir in runtime XML.

Michal




More information about the libvir-list mailing list