[libvirt] [PATCH] OpenNebula driver changes

Hello, The first patch makes OpenNebula driver compilable in recent codebase. The second one adds direct calls to xmlrpc library so it does not depend on OpenNebula libraries and can be licensed as LGPL. I have compiled libvirt with the modifications without errors but with the current version I checked out from git repository I am having problems: --8<------ (LD) -o libvirtd libvirtd-event.o libvirtd-qemud.o libvirtd-remote.o libvirtd-remote_protocol.o ../src/.libs/libvirt_driver_storage.a(storage_backend.o): In function `virStorageBackendWaitForDevices': /home/jfontan/git/libvirt.git/src/storage_backend.c:262: undefined reference to `virNodeDeviceWaitForDevices' ------>8-- Patches are made from 0a29f59e3b8e2c1fb797d2fa93831f21a3e1711e Bye -- Javier Fontan, Grid & Virtualization Technology Engineer/Researcher DSA Research Group: http://dsa-research.org Globus GridWay Metascheduler: http://www.GridWay.org OpenNebula Virtual Infrastructure Engine: http://www.OpenNebula.org

On Wed, Jun 03, 2009 at 06:42:37PM +0200, Javier Fontan wrote:
Hello,
The first patch makes OpenNebula driver compilable in recent codebase. The second one adds direct calls to xmlrpc library so it does not depend on OpenNebula libraries and can be licensed as LGPL.
This looks good. I'll just suggest that the driver is made to build by default in configure.in, automatically looking for the xml-rpc libs using pkg-config instead. eg you should be able to use something like this XMLRPC_REQUIRED=1.14.0 XMLRPC_CFLAGS= XMLRPC_LIBS= if test "x$with_one" = "xyes" -o "x$with_one" = "xcheck"; then PKG_CHECK_MODULES(XMLRPC, xmlrpc_client >= $XMLRPC_REQUIRED, [with_one=yes], [ if test "x$with_one" = "xcheck" ; then with_one=no else AC_MSG_ERROR( [You must install XMLRPC-C >= $XMLRPC_REQUIRED to compile libvirt ONE driver]) fi ]) if test "x$with_one" = "xyes" ; then AC_DEFINE_UNQUOTED([HAVE_XMLRPC], 1, [whether One is used to broadcast server presense]) fi fi AM_CONDITIONAL([HAVE_XMLRPC], [test "x$with_one" = "xyes"]) AC_SUBST([XMLRPC_CFLAGS]) AC_SUBST([XMLRPC_LIBS]) And change the AC_ARG_WITH([one], [ --with-one add ONE support (on)],[],[with_one=no]) To be AC_ARG_WITH([one], [ --with-one add ONE support (on)],[],[with_one=check])
I have compiled libvirt with the modifications without errors but with the current version I checked out from git repository I am having problems:
--8<------ (LD) -o libvirtd libvirtd-event.o libvirtd-qemud.o libvirtd-remote.o libvirtd-remote_protocol.o ../src/.libs/libvirt_driver_storage.a(storage_backend.o): In function `virStorageBackendWaitForDevices': /home/jfontan/git/libvirt.git/src/storage_backend.c:262: undefined reference to `virNodeDeviceWaitForDevices' ------>8--
Hmm, did your build have the HAL driver enabled ? 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 :|

On Thu, Jun 04, 2009 at 12:14:44PM +0100, Daniel P. Berrange wrote:
On Wed, Jun 03, 2009 at 06:42:37PM +0200, Javier Fontan wrote:
Hello,
The first patch makes OpenNebula driver compilable in recent codebase. The second one adds direct calls to xmlrpc library so it does not depend on OpenNebula libraries and can be licensed as LGPL.
This looks good. I'll just suggest that the driver is made to build by default in configure.in, automatically looking for the xml-rpc libs using pkg-config instead.
Okay, I made the changes suggested by Dan, so it's compiled in by default, cleaned up the c code a bit to make make distcheck, I had to add the privileged parameter to the oneStartup() call, it should probably be saved in the driver structure or checked if we allow the driver only from the daemon. I added the build requirement to the spec file when compiling on Fedora so it will be built in by default. Everything look fine to me but I couldn't test the driver itself, so a bit more testing should be done before the 0.6.5 release end of next week, it's all in CVS, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

Hi Daniel These are great news indeed!. We are already doing the testing of the driver. THANK YOU VERY MUCH for your help Ruben On Wed, Jun 24, 2009 at 7:40 PM, Daniel Veillard <veillard@redhat.com> wrote:
On Thu, Jun 04, 2009 at 12:14:44PM +0100, Daniel P. Berrange wrote:
On Wed, Jun 03, 2009 at 06:42:37PM +0200, Javier Fontan wrote:
Hello,
The first patch makes OpenNebula driver compilable in recent codebase. The second one adds direct calls to xmlrpc library so it does not depend on OpenNebula libraries and can be licensed as LGPL.
This looks good. I'll just suggest that the driver is made to build by default in configure.in, automatically looking for the xml-rpc libs using pkg-config instead.
Okay, I made the changes suggested by Dan, so it's compiled in by default, cleaned up the c code a bit to make make distcheck, I had to add the privileged parameter to the oneStartup() call, it should probably be saved in the driver structure or checked if we allow the driver only from the daemon. I added the build requirement to the spec file when compiling on Fedora so it will be built in by default. Everything look fine to me but I couldn't test the driver itself, so a bit more testing should be done before the 0.6.5 release end of next week,
it's all in CVS,
thanks !
Daniel
-- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@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
-- +---------------------------------------------------------------+ Dr. Ruben Santiago Montero Associate Professor Distributed System Architecture Group (http://dsa-research.org) URL: http://dsa-research.org/doku.php?id=people:ruben Weblog: http://blog.dsa-research.org/?author=7 GridWay, http://www.gridway.org OpenNebula, http://www.opennebula.org +---------------------------------------------------------------+

On Wed, Jun 24, 2009 at 10:55:31PM +0200, Ruben S. Montero wrote:
Hi Daniel
These are great news indeed!. We are already doing the testing of the driver.
THANK YOU VERY MUCH for your help
It would be good to get a page on the libvirt website outlining how to use the OpenNebula driver. At least documenting the URI syntax to use, and providing some example XML files that work, and any other info you think might be useful to people The website is all stored in regular CVS repo, so you can just send patches to the content in the docs/ directory. You would wan tto create a file docs/drvopennebula.html.in and put your content in that (look at docs/drvqemu.html.in for example). The .html file is auto-generated bfrom the html.in file Also add an etry in the sitemap file docs/sitemap.html.in under the Documentation -> Drivers section. 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 :|

OK, we'll do so... On Thu, Jun 25, 2009 at 10:58 AM, Daniel P. Berrange <berrange@redhat.com> wrote:
On Wed, Jun 24, 2009 at 10:55:31PM +0200, Ruben S. Montero wrote:
Hi Daniel
These are great news indeed!. We are already doing the testing of the driver.
THANK YOU VERY MUCH for your help
It would be good to get a page on the libvirt website outlining how to use the OpenNebula driver. At least documenting the URI syntax to use, and providing some example XML files that work, and any other info you think might be useful to people
The website is all stored in regular CVS repo, so you can just send patches to the content in the docs/ directory.
You would wan tto create a file docs/drvopennebula.html.in and put your content in that (look at docs/drvqemu.html.in for example). The .html file is auto-generated bfrom the html.in file
Also add an etry in the sitemap file docs/sitemap.html.in under the Documentation -> Drivers section.
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 :|
-- +---------------------------------------------------------------+ Dr. Ruben Santiago Montero Associate Professor Distributed System Architecture Group (http://dsa-research.org) URL: http://dsa-research.org/doku.php?id=people:ruben Weblog: http://blog.dsa-research.org/?author=7 GridWay, http://www.gridway.org OpenNebula, http://www.opennebula.org +---------------------------------------------------------------+
participants (4)
-
Daniel P. Berrange
-
Daniel Veillard
-
Javier Fontan
-
Ruben S. Montero