Re: [libvirt] can't build python bindings on FreeBSD
I was able to get this to build with some tweaking, that in the end used the updated patch, but was using this patch all along, and found the first patch didn't work. http://meatwad.mouf.net/rubick/poudriere/logs/bulk/92i386-jgh/2013-12-30_08h29m34s/logs/py27-libvirt-1.2.0.log Here is a link to the code for the port: (under the files directory is the patch) https://svn.redports.org/jgh/devel/py-libvirt/ -jgh On Sun, Dec 29, 2013 at 3:21 PM, Jason Helfman j...@freebsd.org wrote: I will try it out. Please open a new account here: http://redports.org, and that should be sufficient enough. It will build on new commits, and I can help with the port. I can also help justify the account, if that is needed. Thanks! -jgh On Sun, Dec 29, 2013 at 2:59 PM, Doug Goldstein car...@gentoo.org wrote: On Sun, Dec 29, 2013 at 12:42 PM, Jason Helfman j...@freebsd.org wrote: Any ideas? I just posted a patch with the subject of [PATCH python] define __GNUC_PREREQ macro before using it [1]. Give it a shot and let me know if that fixes the issue. Additionally, if you can potentially provide a FreeBSD machine that we can use as a BuildBot [2] for libvirt-python, that would likely prevent problems in the future. You can see the BB here [3]. [1] https://www.redhat.com/archives/libvir-list/2013-December/msg01317.html [2] http://buildbot.net [3] http://bb.cardoe.com/libvirt-python/ Clang: FreeBSD clang version 3.1 creating build/temp.freebsd-9.1-RELEASE-p4-i386-2.7 creating build/temp.freebsd-9.1-RELEASE-p4-i386-2.7/build clang -DNDEBUG -O2 -pipe -fno-strict-aliasing -O2 -pipe -fno-strict-aliasing -fPIC -I. -I/usr/local/include/python2.7 -c libvirt-override.c -o build/temp.freebsd-9.1-RELEASE-p4-i386-2.7/libvirt-override.o -I/usr/local/include In file included from libvirt-override.c:26: ./libvirt-utils.h:87:22: error: token is not a valid binary operator in a preprocessor subexpression # if __GNUC_PREREQ (3, 3) ~ ^ ./libvirt-utils.h:99:22: error: token is not a valid binary operator in a preprocessor subexpression # if __GNUC_PREREQ (3, 4) ~ ^ 2 errors generated. error: command 'clang' failed with exit status 1 *** [do-build] Error code 1 Stop in /usr/home/jgh/workspace/ports/devel/py-libvirt. Gcc: gcc (GCC) 4.2.1 20070831 gcc -DNDEBUG -O2 -pipe -fno-strict-aliasing -O2 -pipe -fno-strict-aliasing -fPIC -I. -I/usr/local/include/python2.7 -c libvirt-override.c -o build/temp.freebsd-9.1-RELEASE-p4-i386-2.7/libvirt-override.o -I/usr/local/include In file included from libvirt-override.c:26: libvirt-utils.h:87:22: error: missing binary operator before token ( libvirt-utils.h:99:22: error: missing binary operator before token ( error: command 'gcc' failed with exit status 1 *** [do-build] Error code 1 Thanks! -jgh -- Jason Helfman | FreeBSD Committer j...@freebsd.org | http://people.freebsd.org/~jgh | The Power to Serve -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list -- Doug Goldstein -- Jason Helfman | FreeBSD Committer j...@freebsd.org | http://people.freebsd.org/~jgh | The Power to Serve -- Jason Helfman | FreeBSD Committer j...@freebsd.org | http://people.freebsd.org/~jgh | The Power to Serve -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vbox: add support for v4.2.20+ and v4.3.4+
On Sunday 29 December 2013 14:44:10 Ryota Ozaki wrote: On Wed, Dec 25, 2013 at 12:47 AM, Jean-Baptiste Rouault jean-baptiste.roua...@diateam.net wrote: While working on adding virDomain*Stats support to the vbox driver, we found bugs in the VirtualBox API C bindings. These bugs have been fixed in versions 4.2.20 and 4.3.4. However, the changes in the C bindings are incompatible with the vbox_CAPI_v4_2.h and vbox_CAPI_v4_3.h files which are bundled in libvirt source code. This is why the following patch adds vbox_CAPI_v4_2_20.h and vbox_CAPI_v4_3_4.h. We tried to keep compatibility with older VirtualBox 4.2.x and 4.3.x releases so we added a SPECIAL_VERSION identifier to conditionnaly include the right header. I'm not really pleased with this SPECIAL_VERSION identifier, maybe we could instead increase the precision of VBOX_API_VERSION, for example 4002 would become 4002000. This would permit us to select the right header based on the VBOX_API_VERSION only, what do you think ? Can we use VBOX_XPCOMC_VERSION instead of adding a new flag? The version has been bumped up when the incompatibility is introduced. ozaki-r The problem is that VBOX_XPCOMC_VERSION is defined in the vbox_CAPI_v*.h headers and we need a flag to choose which header we have to include. -- Jean-Baptiste ROUAULT RD Engineer - diateam : Architectes de l'information Phone : +33 (0)2 98 050 050 Fax : +33 (0)2 98 050 051 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vbox: add support for v4.2.20+ and v4.3.4+
On Mon, Dec 30, 2013 at 5:55 PM, Jean-Baptiste Rouault jean-baptiste.roua...@diateam.net wrote: On Sunday 29 December 2013 14:44:10 Ryota Ozaki wrote: On Wed, Dec 25, 2013 at 12:47 AM, Jean-Baptiste Rouault jean-baptiste.roua...@diateam.net wrote: While working on adding virDomain*Stats support to the vbox driver, we found bugs in the VirtualBox API C bindings. These bugs have been fixed in versions 4.2.20 and 4.3.4. However, the changes in the C bindings are incompatible with the vbox_CAPI_v4_2.h and vbox_CAPI_v4_3.h files which are bundled in libvirt source code. This is why the following patch adds vbox_CAPI_v4_2_20.h and vbox_CAPI_v4_3_4.h. We tried to keep compatibility with older VirtualBox 4.2.x and 4.3.x releases so we added a SPECIAL_VERSION identifier to conditionnaly include the right header. I'm not really pleased with this SPECIAL_VERSION identifier, maybe we could instead increase the precision of VBOX_API_VERSION, for example 4002 would become 4002000. This would permit us to select the right header based on the VBOX_API_VERSION only, what do you think ? Can we use VBOX_XPCOMC_VERSION instead of adding a new flag? The version has been bumped up when the incompatibility is introduced. ozaki-r The problem is that VBOX_XPCOMC_VERSION is defined in the vbox_CAPI_v*.h headers and we need a flag to choose which header we have to include. Oops. You're right. Well, one other idea is to include each vbox_CAPI_X_Y.h in the corresponding vbox_VX_Y.c. That's rather straightforward for me than including vbox_CAPI_*.h in vbox_tmpl.c according to VBOX_API_VERSION. ozaki-r -- Jean-Baptiste ROUAULT RD Engineer - diateam : Architectes de l'information Phone : +33 (0)2 98 050 050 Fax : +33 (0)2 98 050 051 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [CFT] FreeBSD: new libvirt-python package
Hello Everyone, Believe it or not, I don't have any test framework for testing FreeBSD libvirt, so was hoping there may be some folks out there that could help out on that front with this new port I was going to put into our ports tree. :) https://svn.redports.org/jgh/devel/py-libvirt/ Thanks! -jgh -- Jason Helfman | FreeBSD Committer j...@freebsd.org | http://people.freebsd.org/~jgh | The Power to Serve -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] qemu: Add support for changing timeout value to open unix monitor socket
Hi, I am talking about *Bug 987088*https://bugzilla.redhat.com/show_bug.cgi?id=987088, I have added a patch and a description of the fix, this is a copy of my comment on the bug: the default code behavior is wait for 3 seconds and if the socket is not opened yet, print this error and terminate. the code is in src/qemu/qemu_monitor.c in function qemuMonitorOpenUnix. In 2009 there was a patch that added the original 3 seconds retry, the patch can be found here: http://www.redhat.com/archives/libvir-list/2009-July/msg00335.html I have added a patch with this solution: the default behavior stays the same, but a user can add a configuration variable to qemu.conf and change the timeout value. every system needs a different value according to their system configuration but anyway 3 seconds is not suitable for all cases. I am attaching my patch. Pavel Fux. From 89063e242b46a781b7416a5d395ece9afea635a5 Mon Sep 17 00:00:00 2001 From: Pavel Fux pa...@stratoscale.com Date: Thu, 19 Dec 2013 15:20:57 +0200 Subject: [PATCH] Add monitor timeout configuration --- src/qemu/qemu.conf | 7 +++ src/qemu/qemu_conf.c| 2 ++ src/qemu/qemu_conf.h| 2 ++ src/qemu/qemu_monitor.c | 13 + 4 files changed, 24 insertions(+) diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf index 0f0a24c..6ba6207 100644 --- a/src/qemu/qemu.conf +++ b/src/qemu/qemu.conf @@ -409,3 +409,10 @@ # Defaults to -1. # #seccomp_sandbox = 1 + + +#If you sometimes get the message failed to connect to monitor socket +#that could be because qemu did not wait enough time, you can try increasing +#this timeout, the default is 3 seconds +# +#monitor_socket_open_timeout = 30 diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 7c3f317..4f35801 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -520,6 +520,8 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg, GET_VALUE_LONG(seccomp_sandbox, cfg-seccompSandbox); +GET_VALUE_LONG(monitor_socket_open_timeout, cfg-monitorSocketOpenTimeout); + ret = 0; cleanup: diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index 77d3d2f..625e69d 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -148,6 +148,8 @@ struct _virQEMUDriverConfig { unsigned int keepAliveCount; int seccompSandbox; + +int monitorSocketOpenTimeout; }; /* Main driver state */ diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 1b1d4a1..b5deb6b 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -29,6 +29,7 @@ #include fcntl.h #include qemu_monitor.h +#include qemu_conf.h #include qemu_monitor_text.h #include qemu_monitor_json.h #include virerror.h @@ -47,6 +48,8 @@ #define DEBUG_IO 0 #define DEBUG_RAW_IO 0 +extern virQEMUDriverPtr qemu_driver; + struct _qemuMonitor { virObjectLockable parent; @@ -252,6 +255,16 @@ qemuMonitorOpenUnix(const char *monitor, pid_t cpid) int monfd; int timeout = 3; /* In seconds */ int ret, i = 0; +virQEMUDriverConfigPtr cfg = NULL; + +if (qemu_driver != NULL){ +cfg = virQEMUDriverGetConfig(qemu_driver); +if (cfg-monitorSocketOpenTimeout 3){ +timeout = cfg-monitorSocketOpenTimeout; +} +virObjectUnref(cfg); +cfg = NULL; +} if ((monfd = socket(AF_UNIX, SOCK_STREAM, 0)) 0) { virReportSystemError(errno, -- 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] Add test for transient disk support in VMX files
From: Wout Mertens wout.mert...@gmail.com Adds test for transient disk translation in vmx files --- tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx |6 + tests/vmx2xmldata/vmx2xml-harddisk-transient.xml | 25 ++ tests/vmx2xmltest.c |1 + 3 files changed, 32 insertions(+), 0 deletions(-) create mode 100644 tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx create mode 100644 tests/vmx2xmldata/vmx2xml-harddisk-transient.xml diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx b/tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx new file mode 100644 index 000..68ef382 --- /dev/null +++ b/tests/vmx2xmldata/vmx2xml-harddisk-transient.vmx @@ -0,0 +1,6 @@ +config.version = 8 +virtualHW.version = 4 +ide0:0.present = true +ide0:0.deviceType = ata-hardDisk +ide0:0.fileName = harddisk.vmdk +ide0:0.mode = independent-nonpersistent diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml b/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml new file mode 100644 index 000..3786e2f --- /dev/null +++ b/tests/vmx2xmldata/vmx2xml-harddisk-transient.xml @@ -0,0 +1,25 @@ +domain type='vmware' + uuid----/uuid + memory unit='KiB'32768/memory + currentMemory unit='KiB'32768/currentMemory + vcpu placement='static'1/vcpu + os +type arch='i686'hvm/type + /os + clock offset='utc'/ + on_poweroffdestroy/on_poweroff + on_rebootrestart/on_reboot + on_crashdestroy/on_crash + devices +disk type='file' device='disk' + source file='[datastore] directory/harddisk.vmdk'/ + target dev='hda' bus='ide'/ + transient/ + address type='drive' controller='0' bus='0' target='0' unit='0'/ +/disk +controller type='ide' index='0'/ +video + model type='vmvga' vram='4096'/ +/video + /devices +/domain diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c index 13515f0..70178f7 100644 --- a/tests/vmx2xmltest.c +++ b/tests/vmx2xmltest.c @@ -221,6 +221,7 @@ mymain(void) DO_TEST(harddisk-scsi-file, harddisk-scsi-file); DO_TEST(harddisk-ide-file, harddisk-ide-file); +DO_TEST(harddisk-transient, harddisk-transient); DO_TEST(cdrom-scsi-file, cdrom-scsi-file); DO_TEST(cdrom-scsi-device, cdrom-scsi-device); -- 1.7.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list