[libvirt] [PATCH] qemu: save domain status after set the blkio parameters

After set the blkio parameters for running domain, save the change into live xml is needed to survive restarting the libvirtd Same story with bug 1146511 Signed-off-by: Shanzhi Yu <shyu@redhat.com> --- src/qemu/qemu_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 6606154..9c96dea 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -8090,6 +8090,8 @@ qemuDomainSetBlkioParameters(virDomainPtr dom, } if (ret < 0) goto cleanup; + if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) + goto cleanup; if (flags & VIR_DOMAIN_AFFECT_CONFIG) { /* Clang can't see that if we get here, persistentDef was set. */ sa_assert(persistentDef); -- 1.9.3

On Mon, Sep 29, 2014 at 01:14:58PM +0800, Shanzhi Yu wrote:
After set the blkio parameters for running domain, save the change into live xml is needed to survive restarting the libvirtd Same story with bug 1146511
Signed-off-by: Shanzhi Yu <shyu@redhat.com> --- src/qemu/qemu_driver.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 6606154..9c96dea 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -8090,6 +8090,8 @@ qemuDomainSetBlkioParameters(virDomainPtr dom, } if (ret < 0) goto cleanup; + if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) + goto cleanup;
It this failed, the function would return with 0, so there would be no problem indicated and it would also skip the config part. It should be part of the "if (flags & VIR_DOMAIN_AFFECT_LIVE)". I also wonder how come there is no job created for the domain. That needs to be fixed as well. Martin

----- Original Message ----- | From: "Martin Kletzander" <mkletzan@redhat.com> | To: "Shanzhi Yu" <shyu@redhat.com> | Cc: libvir-list@redhat.com | Sent: Monday, September 29, 2014 3:07:11 PM | Subject: Re: [libvirt] [PATCH] qemu: save domain status after set the blkio parameters | | On Mon, Sep 29, 2014 at 01:14:58PM +0800, Shanzhi Yu wrote: | >After set the blkio parameters for running domain, save the change into | >live xml is needed to survive restarting the libvirtd | >Same story with bug 1146511 | > | >Signed-off-by: Shanzhi Yu <shyu@redhat.com> | >--- | > src/qemu/qemu_driver.c | 2 ++ | > 1 file changed, 2 insertions(+) | > | >diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c | >index 6606154..9c96dea 100644 | >--- a/src/qemu/qemu_driver.c | >+++ b/src/qemu/qemu_driver.c | >@@ -8090,6 +8090,8 @@ qemuDomainSetBlkioParameters(virDomainPtr dom, | > } | > if (ret < 0) | > goto cleanup; | >+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) | >+ goto cleanup; | | It this failed, the function would return with 0, so there would be no | problem indicated and it would also skip the config part. It should | be part of the "if (flags & VIR_DOMAIN_AFFECT_LIVE)". | Yes, thanks for your review, I will send V2. numatune/domiftune also have this problem, will fix together | I also wonder how come there is no job created for the domain. That | needs to be fixed as well. | | Martin | -- Regards shyu
participants (2)
-
Martin Kletzander
-
Shanzhi Yu