[Libvirt-cim] [PATCH 1 of 2] Add function to poll for a guest

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Fri Aug 1 18:42:37 UTC 2008


Dan Smith wrote:
> KR> 6 - 7 iterations - seems pretty consistent in my testing.
> 
> Okay.
> 
> KR> In the future, most of these tests will use the provider to create the
> KR> guest (not virsh), so I think this problem will go away on its own in
> KR> time.
> 
> Indeed.  As long as that's the plan, I think doing this for those
> tests that need to check this behavior is fine.
> 
> What's up with the name though?  The function has 'virsh' in the name,
> but it's querying the providers, right?
> 

It's checking both virsh and the providers.  The hack here is that virsh 
doesn't hit the caching issue. So if virsh lists the guest, then we poll 
until the providers see it.

If virsh doesn't see the guest, then the guest wasn't created.  So we 
don't waste time polling for a guest that doesn't exist.

Even still, the name is pretty poor. I'll think something else up and 
resend.  =)
-- 
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list