[Libvirt-cim] [PATCH] [TEST] Updating the 01_forward.py tc in SettingsDefineCapabilities

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Wed Apr 23 20:51:44 UTC 2008


>  > Nice job on turning this into a function. I think this makes things more
>  > readable. I know this is just a reshuffling of code, but can you modify
>  > it so that we return an error instead of just setting the status to
>  > FAIL?  That way, we bail out immediately.
>  >
>  > Also, this test fails for me on F9 with KVM using current sources.  This
>  > is because the current providers use diskpools (which you need a version
>  > of libvirt 0.4.0 or newer, I believe).
>  >
>  > Daisy was going to look into working out a disk pool fix, so you might
>  > want to check with her to see if she's still planning on this.
>  >
> 
> I'm looking into the EAFP 01_forward.py and EAFP 02_reverse.py failing
> issue, they fail for me on F8 with Xen on my own machine, but pass
> on the other machine.
> 
> On the diskpool, the following is the list of what we have to do:
> 
> 1) Move diskpool config functions to a library and updated related
>    test case.
> 
> 2) Create diskpool file function in the same library as above.

I was thinking you could use a wrapper function.  So the test cases only 
need to call one function.  The function can behave appropriately based 
on the version of libvirt.

>    I'm not sure if I catch up the essential difference between
>    diskpool and diskpool file? Why libvirt-0.4.0 or newer ignore
>    the diskpool stuff and use a file?

libvirt didn't add storage pool support until 0.4.1.  Sorry, all of my 
previous mails were incorrect.  I checked the libvirt source, and it 
looks like 0.4.1 has the storage pool support.

Since older versions of libvirt don't have storage support, the provider 
uses a configuration file for its diskpool info.

> 
> 3) Add function to check the version of libvirt. If libvirt >= 0.4.0,
>    we'll need to call creating diskpool file function.

If libvirt <= 0.4.0, create a diskpool file function.

>    Any better way for geting the libvirt version except parsing
>    the output of "rpm -qa libvirt"?

virsh --version will give you the version of libvirt.  It is probably 
more reliable because it's possible that someone installed an rpm and 
then updated the version from source.

> 
> At now, we put the diskpool.conf under /tmp, Dan and Katillin have
> discussed the best location for it, so what's the result?

Good point.  I think the plan is to store the diskpool.conf file in 
/etc/libvirt.  However, I'll need to work on a patch for this.  So, for 
now, plan on using /tmp.

-- 
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list