Re: [libvirt] [PATCH] openvzDomainCreateWithFlags: set domain id to the correct value
2010/7/30 Matthias Bolte : > 2010/7/30 Jean-Baptiste Rouault : >> I'm not sure if it's ok or not to modify dom->id as I did here. >> >> Regards, >> Jean-Baptiste >> > > I think this is a bug that needs to be fixed and the patch is correct. > After starting a domain it has to have a valid ID >= 0. > > I'm currently checking the other drivers, and the ESX and XenAPI > drivers are affected too. > > The QEMU driver is also affected, but because it's always tunneled > through the remote driver and the remote driver isn't affected, this > problem doesn't surface for the QEMU driver. The same is true for the > LXC, UML and ONE drivers. > > Matthias > ACK to your patch, I applied and pushed it. This ID update problem exists in several other drivers too and I posted patches to fix them. Thanks for reporting and fixing this one, with the side effect of revealing this as a general problem. Matthias -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] openvzDomainCreateWithFlags: set domain id to the correct value
2010/7/30 Jean-Baptiste Rouault : > I'm not sure if it's ok or not to modify dom->id as I did here. > > Regards, > Jean-Baptiste > I think this is a bug that needs to be fixed and the patch is correct. After starting a domain it has to have a valid ID >= 0. I'm currently checking the other drivers, and the ESX and XenAPI drivers are affected too. The QEMU driver is also affected, but because it's always tunneled through the remote driver and the remote driver isn't affected, this problem doesn't surface for the QEMU driver. The same is true for the LXC, UML and ONE drivers. Matthias -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] openvzDomainCreateWithFlags: set domain id to the correct value
I'm not sure if it's ok or not to modify dom->id as I did here. Regards, Jean-Baptiste From 7fd011393a80da32949e4aa5468532140d250021 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Rouault Date: Fri, 30 Jul 2010 10:36:06 +0200 Subject: [PATCH] openvzDomainCreateWithFlags: set domain id to the correct value When an openvz domain is defined with virDomainDefineXML, domain id is set to -1. A call to virDomainGetInfo after starting the domain would then fail because this invalid id is passed to openvzGetProcessInfo. --- src/openvz/openvz_driver.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 98381fb..e5bbdd0 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -992,6 +992,7 @@ openvzDomainCreateWithFlags(virDomainPtr dom, unsigned int flags) vm->pid = strtoI(vm->def->name); vm->def->id = vm->pid; +dom->id = vm->pid; vm->state = VIR_DOMAIN_RUNNING; ret = 0; -- 1.7.0.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list