[PATCH] Make CS.RequestStateChange() agree to proceed if RUNNING|BLOCKED

# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1201026051 28800 # Node ID c92db5f8d2b108163d75b32f906c7b55fa4f2854 # Parent 335e7862efa1f3cffce393e684179ec6cc8ee4a4 Make CS.RequestStateChange() agree to proceed if RUNNING|BLOCKED This is an interesting Xen quirk propagated through libvirt. For the most part, RUNNING and BLOCKED are the same thing to us. Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r 335e7862efa1 -r c92db5f8d2b1 src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Fri Jan 18 09:14:17 2008 -0800 +++ b/src/Virt_ComputerSystem.c Tue Jan 22 10:20:51 2008 -0800 @@ -512,6 +512,7 @@ static CMPIStatus state_change_disable(v switch (info->state) { case VIR_DOMAIN_RUNNING: + case VIR_DOMAIN_BLOCKED: CU_DEBUG("Stop domain"); ret = virDomainShutdown(dom); break; @@ -537,6 +538,7 @@ static CMPIStatus state_change_pause(vir switch (info->state) { case VIR_DOMAIN_RUNNING: + case VIR_DOMAIN_BLOCKED: CU_DEBUG("Pause domain"); ret = virDomainSuspend(dom); break; @@ -561,6 +563,7 @@ static CMPIStatus state_change_reboot(vi switch (info->state) { case VIR_DOMAIN_RUNNING: + case VIR_DOMAIN_BLOCKED: CU_DEBUG("Reboot domain"); ret = virDomainReboot(dom, 0); break; @@ -585,6 +588,7 @@ static CMPIStatus state_change_reset(vir switch (info->state) { case VIR_DOMAIN_RUNNING: + case VIR_DOMAIN_BLOCKED: CU_DEBUG("Reset domain"); ret = domain_reset(dom); break;

Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1201026051 28800 # Node ID c92db5f8d2b108163d75b32f906c7b55fa4f2854 # Parent 335e7862efa1f3cffce393e684179ec6cc8ee4a4 Make CS.RequestStateChange() agree to proceed if RUNNING|BLOCKED
This is an interesting Xen quirk propagated through libvirt. For the most part, RUNNING and BLOCKED are the same thing to us.
This is a good catch. Seems reasonable to be able to suspend, etc when the guest is blocked as well as running. +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

Kaitlin Rupert wrote:
Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1201026051 28800 # Node ID c92db5f8d2b108163d75b32f906c7b55fa4f2854 # Parent 335e7862efa1f3cffce393e684179ec6cc8ee4a4 Make CS.RequestStateChange() agree to proceed if RUNNING|BLOCKED
This is an interesting Xen quirk propagated through libvirt. For the most part, RUNNING and BLOCKED are the same thing to us.
This is a good catch. Seems reasonable to be able to suspend, etc when the guest is blocked as well as running. +1
I believe the big issue is that when you try to get the status of your other domains, Domain-0 has to take over in order to get status and return it, which means the other domains will always show up as blocked. So, for a guest, blocked usually means running. -- -Jay

Jay Gagnon wrote:
Kaitlin Rupert wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1201026051 28800 # Node ID c92db5f8d2b108163d75b32f906c7b55fa4f2854 # Parent 335e7862efa1f3cffce393e684179ec6cc8ee4a4 Make CS.RequestStateChange() agree to proceed if RUNNING|BLOCKED
This is an interesting Xen quirk propagated through libvirt. For the most part, RUNNING and BLOCKED are the same thing to us. This is a good catch. Seems reasonable to be able to suspend, etc when
Dan Smith wrote: the guest is blocked as well as running. +1
I believe the big issue is that when you try to get the status of your other domains, Domain-0 has to take over in order to get status and return it, which means the other domains will always show up as blocked. So, for a guest, blocked usually means running.
Yep - that's a really good way of explaining it. =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1201026051 28800 # Node ID c92db5f8d2b108163d75b32f906c7b55fa4f2854 # Parent 335e7862efa1f3cffce393e684179ec6cc8ee4a4 Make CS.RequestStateChange() agree to proceed if RUNNING|BLOCKED
This is an interesting Xen quirk propagated through libvirt. For the most part, RUNNING and BLOCKED are the same thing to us.
Signed-off-by: Dan Smith <danms@us.ibm.com>
Ah, I had forgotten about that bit. Good call, +1 -- -Jay
participants (3)
-
Dan Smith
-
Jay Gagnon
-
Kaitlin Rupert