Re: [libvirt] Python binding to virConnectListInterfaces

2009-09-16 Thread Matthias Bolte
Ah, the not responding NFS datastores may have an empty URL. I'll make
the code more robust in this situation by changing the error to a
warning. Because I iterate over all datastore of the server to find a
matching one, and if a datastore with a problem comes first in the
list it'll hinder the driver to find a possible matching one. Had this
kind of problem before with virtual machines where a broken virtual
machine caused the problem.

I'll review the rest of the code for this kind of problem, because I
suspect there will be more functions with this problem.

Matthias

2009/9/16 Shahar Klein shaharkl...@yahoo.com:
 It's my ESX4i testing server
 with 3 datastores
 one local and 2 over NFS mounts that are not responding
 Plus this ESX4i server is quite messed up with cloning tests
 I made before discovering the OVA-templates
 I'll clean and try again and will make a mental note
 to test NFS datastore diconnections
 Thanks
 Shahar
 
 From: Matthias Bolte matthias.bo...@googlemail.com
 To: Shahar Klein shaharkl...@yahoo.com
 Cc: Daniel P. Berrange berra...@redhat.com; veill...@redhat.com;
 libvir-list@redhat.com
 Sent: Tuesday, September 15, 2009 7:56:43 PM
 Subject: Re: [libvirt] Python binding to virConnectListInterfaces

 2009/9/15 Shahar Klein shaharkl...@yahoo.com:
 understood
 so, is that a bug?
 virsh # list
  Id Name                 State
 --
  16 rh53                 running
 256 smallLinux           running
 336 diskless linux       running
 virsh # dominfo 16
 Id:             16
 Name:           rh53
 UUID:           564dea41-bf37-44d6-2c9e-c6009be71aa6
 OS Type:        hvm
 State:          running
 CPU(s):         1
 Max memory:     393216 kB
 Used memory:    393216 kB
 virsh #
 virsh # dumpxml 16
 error: internal error Datastore URL '' has unexpected prefix, expecting
 '/vmfs/volumes/' prefix


 This message indicates that your ESX server has a datastore with URL
 set to an empty string. This is unexpected.

 Goto https://your-esx-server/mob then goto content - rootFolder -
 childEntity - datastore. For each datastore element check the
 info.url property, if one of them is an empty string or unset then
 this is the cause for this error message.

 If this is really the case for you, the question is: Is an empty URL
 valid, or is this a configuration issue with you ESX server?

 Matthias



--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Python binding to virConnectListInterfaces

2009-09-16 Thread Matthias Bolte
I just tested with a non-responding NFS datastore and got an empty
URL. The fix is simple, the DatastoreSummary has an accessible
property; VI API documentation about it:

The connectivity status of this datastore. If this is set to false,
meaning the datastore is not accessible, this datastore's capacity and
freespace properties cannot be validated. Furthermore, if this
property is set to false, the url properties in this summary and in
DatastoreInfo should not be used.

I'll post a patch for this.

Matthias

2009/9/16 Matthias Bolte matthias.bo...@googlemail.com:
 Ah, the not responding NFS datastores may have an empty URL. I'll make
 the code more robust in this situation by changing the error to a
 warning. Because I iterate over all datastore of the server to find a
 matching one, and if a datastore with a problem comes first in the
 list it'll hinder the driver to find a possible matching one. Had this
 kind of problem before with virtual machines where a broken virtual
 machine caused the problem.

 I'll review the rest of the code for this kind of problem, because I
 suspect there will be more functions with this problem.

 Matthias

 2009/9/16 Shahar Klein shaharkl...@yahoo.com:
 It's my ESX4i testing server
 with 3 datastores
 one local and 2 over NFS mounts that are not responding
 Plus this ESX4i server is quite messed up with cloning tests
 I made before discovering the OVA-templates
 I'll clean and try again and will make a mental note
 to test NFS datastore diconnections
 Thanks
 Shahar
 
 From: Matthias Bolte matthias.bo...@googlemail.com
 To: Shahar Klein shaharkl...@yahoo.com
 Cc: Daniel P. Berrange berra...@redhat.com; veill...@redhat.com;
 libvir-list@redhat.com
 Sent: Tuesday, September 15, 2009 7:56:43 PM
 Subject: Re: [libvirt] Python binding to virConnectListInterfaces

 2009/9/15 Shahar Klein shaharkl...@yahoo.com:
 understood
 so, is that a bug?
 virsh # list
  Id Name                 State
 --
  16 rh53                 running
 256 smallLinux           running
 336 diskless linux       running
 virsh # dominfo 16
 Id:             16
 Name:           rh53
 UUID:           564dea41-bf37-44d6-2c9e-c6009be71aa6
 OS Type:        hvm
 State:          running
 CPU(s):         1
 Max memory:     393216 kB
 Used memory:    393216 kB
 virsh #
 virsh # dumpxml 16
 error: internal error Datastore URL '' has unexpected prefix, expecting
 '/vmfs/volumes/' prefix


 This message indicates that your ESX server has a datastore with URL
 set to an empty string. This is unexpected.

 Goto https://your-esx-server/mob then goto content - rootFolder -
 childEntity - datastore. For each datastore element check the
 info.url property, if one of them is an empty string or unset then
 this is the cause for this error message.

 If this is really the case for you, the question is: Is an empty URL
 valid, or is this a configuration issue with you ESX server?

 Matthias




--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Python binding to virConnectListInterfaces

2009-09-15 Thread Shahar Klein
OK, Thanks

How about listing interfaces for a VM(virDomainListInterfaces )
will you accept such an API?





From: Daniel Veillard veill...@redhat.com
To: Shahar Klein shaharkl...@yahoo.com
Cc: libvir-list@redhat.com
Sent: Monday, September 14, 2009 4:25:37 PM
Subject: Re: [libvirt] Python binding to virConnectListInterfaces

On Mon, Sep 14, 2009 at 03:26:01AM -0700, Shahar Klein wrote:
 
 
 Hi
 
 I'm trying to implement virConnectListInterfaces for the ESX driver
 (actually the esx_interface driver)
 but the python generator does not write the code for this function

  yes, basically it doesn't know how to handle char **const names
parameter.

 in generator.py this function is in a special table called: skip_impl
 
 and there is a comment saying:
 # Class methods which are written by hand in libvir.c but the Python-level
 # code is still automatically generated (so they are not in skip_function())
 
 I'm not sure what does it mean 

  add the function name there so that the generator won't try to add the
bindings

 should I implement in libvir.c? 

yes and

 and I'm done?

add an entry for the function in python/libvirt-python-api.xml
that's an XML description of the intefaces fow which bindings are
implemented manually.
I guess if you have the 3 you should be all set. See for example
how virConnectListDomains is handled, that should be fairly similar
except with strings.

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/



  --
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Python binding to virConnectListInterfaces

2009-09-15 Thread Shahar Klein
understood

so, is that a bug?

virsh # list
 Id Name State
--
 16 rh53 running
256 smallLinux   running
336 diskless linux   running

virsh # dominfo 16
Id: 16
Name:   rh53
UUID:   564dea41-bf37-44d6-2c9e-c6009be71aa6
OS Type:hvm
State:  running
CPU(s): 1
Max memory: 393216 kB
Used memory:393216 kB

virsh # 
virsh # dumpxml 16
error: internal error Datastore URL '' has unexpected prefix, expecting 
'/vmfs/volumes/' prefix





From: Daniel P. Berrange berra...@redhat.com
To: Shahar Klein shaharkl...@yahoo.com
Cc: veill...@redhat.com; libvir-list@redhat.com
Sent: Tuesday, September 15, 2009 12:05:49 PM
Subject: Re: [libvirt] Python binding to virConnectListInterfaces

On Tue, Sep 15, 2009 at 01:55:40AM -0700, Shahar Klein wrote:
 OK, Thanks
 
 How about listing interfaces for a VM(virDomainListInterfaces )
 will you accept such an API?


That information is already available in the XML for a guest so there is
no need for any API

Regards
Daniel
-- 
|: Red Hat, Engineering, London   -o-  http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org   -o-http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|



  --
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Python binding to virConnectListInterfaces

2009-09-15 Thread Shahar Klein
It's my ESX4i testing server
with 3 datastores
one local and 2 over NFS mounts that are not responding
Plus this ESX4i server is quite messed up with cloning tests
I made before discovering the OVA-templates

I'll clean and try again and will make a mental note
to test NFS datastore diconnections 

Thanks
Shahar




From: Matthias Bolte matthias.bo...@googlemail.com
To: Shahar Klein shaharkl...@yahoo.com
Cc: Daniel P. Berrange berra...@redhat.com; veill...@redhat.com; 
libvir-list@redhat.com
Sent: Tuesday, September 15, 2009 7:56:43 PM
Subject: Re: [libvirt] Python binding to virConnectListInterfaces

2009/9/15 Shahar Klein shaharkl...@yahoo.com:
 understood
 so, is that a bug?
 virsh # list
  Id Name State
 --
  16 rh53 running
 256 smallLinux   running
 336 diskless linux   running
 virsh # dominfo 16
 Id: 16
 Name:   rh53
 UUID:   564dea41-bf37-44d6-2c9e-c6009be71aa6
 OS Type:hvm
 State:  running
 CPU(s): 1
 Max memory: 393216 kB
 Used memory:393216 kB
 virsh #
 virsh # dumpxml 16
 error: internal error Datastore URL '' has unexpected prefix, expecting
 '/vmfs/volumes/' prefix


This message indicates that your ESX server has a datastore with URL
set to an empty string. This is unexpected.

Goto https://your-esx-server/mob then goto content - rootFolder -
childEntity - datastore. For each datastore element check the
info.url property, if one of them is an empty string or unset then
this is the cause for this error message.

If this is really the case for you, the question is: Is an empty URL
valid, or is this a configuration issue with you ESX server?

Matthias



  --
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] Python binding to virConnectListInterfaces

2009-09-14 Thread Shahar Klein


Hi

I'm trying to implement virConnectListInterfaces for the ESX driver
(actually the esx_interface driver)
but the python generator does not write the code for this function

in generator.py this function is in a special table called: skip_impl

and there is a comment saying:
# Class methods which are written by hand in libvir.c but the Python-level
# code is still automatically generated (so they are not in skip_function())

I'm not sure what does it mean 

should I implement in libvir.c? 
and I'm done?

thanks ahead

Shahar


  --
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list