[libvirt] [PATCH v2] qemu: handle reconnect on chardev hotplug
by ZhiPeng Lu
The patch passes the reconnect timeout to QEMU by monitor on chardev hotplug.
Signed-off-by: ZhiPeng Lu <lu.zhipeng(a)zte.com.cn>
---
v1->v2:
- Fix syntax errors about Curly brackets
---
src/qemu/qemu_monitor_json.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index df5fb7c..290a037 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -6444,6 +6444,17 @@ int qemuMonitorJSONGetTPMTypes(qemuMonitorPtr mon,
return qemuMonitorJSONGetStringArray(mon, "query-tpm-types", tpmtypes);
}
+static int
+qemuMonitorJSONBuildChrChardevReconnect(virJSONValuePtr object,
+ const virDomainChrSourceReconnectDef *def)
+{
+ int ret = 0;
+
+ if (def->enabled == VIR_TRISTATE_BOOL_YES)
+ ret = virJSONValueObjectAppendNumberUint(object, "reconnect", def->timeout);
+ return ret;
+}
+
static virJSONValuePtr
qemuMonitorJSONAttachCharDevCommand(const char *chrID,
const virDomainChrSourceDef *chr)
@@ -6508,6 +6519,9 @@ qemuMonitorJSONAttachCharDevCommand(const char *chrID,
if (virJSONValueObjectAppendString(data, "tls-creds", tlsalias) < 0)
goto cleanup;
}
+
+ if (qemuMonitorJSONBuildChrChardevReconnect(data, &chr->data.tcp.reconnect) < 0)
+ goto cleanup;
break;
case VIR_DOMAIN_CHR_TYPE_UDP:
@@ -6545,6 +6559,9 @@ qemuMonitorJSONAttachCharDevCommand(const char *chrID,
if (virJSONValueObjectAppendBoolean(data, "wait", false) < 0 ||
virJSONValueObjectAppendBoolean(data, "server", chr->data.nix.listen) < 0)
goto cleanup;
+
+ if (qemuMonitorJSONBuildChrChardevReconnect(data, &chr->data.nix.reconnect) < 0)
+ goto cleanup;
break;
case VIR_DOMAIN_CHR_TYPE_SPICEVMC:
--
1.8.3.1
7 years, 3 months
[libvirt] [PATCH v7 00/11] Add support for Veritas HyperScale (VxHS) block device protocol
by John Ferlan
v6: https://www.redhat.com/archives/libvir-list/2017-August/msg00993.html
Changes/notes since v6:
Patch1 - Used the "right" process to create the files. There's also a
separate patch on list which I used mainly to "extract" the
details/needs from being associated specifically with the
addition of VxHS support
Patch2 - Altered the commit message slightly to note that lack of
ability to actually check that even though something is
introspectible, there's no "non-hacky" way to determine if
the QEMU image being used was built "--enable=vxhs" *unless*
(as Jeff Cody points out) we scan --help output for vxhs within
the "Supported formats:" line. We're avoiding that path for
many different reasons.
Patch3 -> Patch5
- No change, patches ACKed.
Patch6 - Removed qemuCaps from qemuBlockStorageSourceGetVxHSProps and
created a qemuProcessStartValidateDisks which will run the
disk list looking for NETWORK and VXHS to ensure the
QEMU_CAPS_VXHS bit is set. Also added a note here similar
to patch2 describing the "gotcha" with the processing.
Patch7 - Altered the text of the vxhs_tls description a bit, not much
Patch8 - Altered the formatdomain.html.in description a bit in order to
remove the previous restriction surrounding when vxhs_tls = 0,
but src->haveTLS = YES.
Added a tlsFromConfig boolean to virStorageSource to match the
same logic as chardev's use. Documented it's use though as every
time I've read that for chardev, I've first said tlsFromConfig
must mean domain config, when in fact it's meant to be qemu.conf.
Make code adjustments to handle tlsFromConfig
Patch9 - Altered the order here - used to be flip-flopped with subsequent
patch. Create the qemuDomainPrepareDiskSource[TLS] API's in order
manage the src->haveTLS setting just as we've done for chardev.
Also, introduce and manage a virStorageSource "tlsAlias" field.
This is where we'll "set" the alias to be used.
Patch10- Fixed up the virStorageSourceParseBackingJSONVxHS and
TEST_BACKING_PARSE to manage the new src->tlsAlias field.
Patch11- Make this all work for qemu_command *and* qemu_hotplug - well
theoretically at least.
The hotplug code is new in this patch - it has essentially
copied what was needed from qemuDomainAddChardevTLSObjects
and applied it to the needs for disks in general, but mainly
for VxHS in particular.
The qemuDomainAddDiskTLSObjects also doesn't set a 'tlscreds'
boolean like Chardev does since JSON object generation doesn't
occur in the depths of qemu_monitor_json, but rather it occurs
in qemu_block and we have everything we need there. Probably
could have done the chardev code differently to keep the TLS
alias around...
Although I don't believe VxHS has support/need for MassUSB
and SCSI Disk operations, adding the infrastructure there
should be usable for future needs. I also left a note about
future needs that may arise if some network disk type requires
a secret to decrypt a server key (although I cannot imagine
the need, someone else may have a better imagination than me).
The rest of the qemu_command changes remove the qemuCaps and
diskAlias parameters from the qemuBlockStorageSourceGetBackendProps
API and use what's been (hopefully) properly set up during
qemuDomainPrepareDiskSourceTLS.
Finally former patch12 has been removed since there is no
restriction regarding vxhs_tls = 0 and "tls = 'yes'"... Also
former patch13 has been merged into patch11.
Still to be done:
Patch12 - A news.xml article for 3.8.0, but 3.7.0 isn't closed yet
so I'm waiting...
Testing, testing, testing, testing, testing, and more testing. Hopefully
even some hotplug testing as I have absolutely no way to know if the
changes I've made actually work since I don't have a Veritas enviroment
set up. I leave the testing/debugging to Ashish.
I do believe that patches 1-5 (e.g. everything not TLS related are
reasonable and ready once 3.8.0 opens for business).
Ashish Mittal (8):
storage: Introduce VIR_STORAGE_NET_PROTOCOL_VXHS
docs: Add schema and docs for Veritas HyperScale (VxHS)
util: storage: Add JSON backing volume parse for VxHS
qemu: Add qemu command line generation for a VxHS block device
conf: Introduce TLS options for VxHS block device clients
util: Add TLS attributes to virStorageSource
util: Add virstoragetest to parse/format a tls='yes'
qemu: Add TLS support for Veritas HyperScale (VxHS)
John Ferlan (3):
qemu: Add QEMU 2.10 x86_64 the generated capabilities
qemu: Detect support for vxhs
qemu: Introduce qemuDomainPrepareDiskSource
docs/formatdomain.html.in | 45 +-
docs/schemas/domaincommon.rng | 18 +
src/conf/domain_conf.c | 28 +-
src/libxl/libxl_conf.c | 1 +
src/qemu/libvirtd_qemu.aug | 4 +
src/qemu/qemu.conf | 34 +
src/qemu/qemu_block.c | 44 +
src/qemu/qemu_capabilities.c | 4 +
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_command.c | 38 +
src/qemu/qemu_conf.c | 16 +
src/qemu/qemu_conf.h | 3 +
src/qemu/qemu_domain.c | 71 +
src/qemu/qemu_domain.h | 11 +
src/qemu/qemu_driver.c | 3 +
src/qemu/qemu_hotplug.c | 73 +
src/qemu/qemu_parse_command.c | 15 +
src/qemu/qemu_process.c | 33 +
src/qemu/test_libvirtd_qemu.aug.in | 2 +
src/util/virstoragefile.c | 58 +-
src/util/virstoragefile.h | 14 +
src/xenconfig/xen_xl.c | 1 +
.../caps_2.10.0.x86_64.replies | 18144 +++++++++++++++++++
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 799 +
tests/qemucapabilitiestest.c | 1 +
...-disk-drive-network-tlsx509-multidisk-vxhs.args | 43 +
...v-disk-drive-network-tlsx509-multidisk-vxhs.xml | 50 +
...muxml2argv-disk-drive-network-tlsx509-vxhs.args | 30 +
...emuxml2argv-disk-drive-network-tlsx509-vxhs.xml | 32 +
.../qemuxml2argv-disk-drive-network-vxhs.args | 27 +
.../qemuxml2argv-disk-drive-network-vxhs.xml | 32 +
tests/qemuxml2argvtest.c | 8 +
...uxml2xmlout-disk-drive-network-tlsx509-vxhs.xml | 34 +
.../qemuxml2xmlout-disk-drive-network-vxhs.xml | 34 +
tests/qemuxml2xmltest.c | 2 +
tests/virstoragetest.c | 23 +
36 files changed, 19766 insertions(+), 12 deletions(-)
create mode 100644 tests/qemucapabilitiesdata/caps_2.10.0.x86_64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-multidisk-vxhs.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-multidisk-vxhs.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-vxhs.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-vxhs.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-network-tlsx509-vxhs.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-network-vxhs.xml
--
2.9.5
7 years, 3 months
[libvirt] [PATCH v2 0/2] qemu: blockPeek: Fix invalid buffer usage
by Peter Krempa
v2 fixes bug introduced by attempting to split the change into two
patches.
Peter Krempa (2):
qemu: blockPeek: Fix filling of the return buffer
qemu: blockPeek: Enforce buffer filling
src/qemu/qemu_driver.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
--
2.14.1
7 years, 3 months
[libvirt] [PATCH python v2] Add travis build config
by Daniel P. Berrange
Enable builds on several python versions, and against several versions
of libvirt. Ideally we would build all the way back to 0.9.11, since
that is the min supported libvirt for python binding. It is not possible
to build this old libvirt version on modern distros though, so using
1.2.0 as the oldest for now.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
.travis.yml | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++
requirements-test.txt | 2 ++
setup.py | 15 +++++++-------
3 files changed, 65 insertions(+), 7 deletions(-)
create mode 100644 .travis.yml
create mode 100644 requirements-test.txt
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..f608ca1
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,55 @@
+language: python
+os: linux
+
+python:
+ - 2.6
+ - 2.7
+ - 3.2
+ - 3.6
+
+env:
+ - LIBVIRT=1.2.0 EXT=gz
+ - LIBVIRT=2.0.0 EXT=xz
+ - LIBVIRT=3.6.0 EXT=xz
+
+install:
+ - sudo apt-get -qqy build-dep libvirt libxml2-dev
+ - sudo apt-get -qqy install curl
+ - pip install -r requirements-test.txt
+ - curl -O -s https://libvirt.org/sources/libvirt-${LIBVIRT}.tar.${EXT}
+ - tar -xf libvirt-${LIBVIRT}.tar.${EXT}
+ - pushd libvirt-${LIBVIRT}
+ - |
+ ./configure --prefix=`pwd`/../libvirt-vroot \
+ --without-libvirtd \
+ --without-esx \
+ --without-vbox \
+ --without-libxl \
+ --without-xen \
+ --without-qemu \
+ --without-lxc \
+ --without-hyperv \
+ --without-macvtap \
+ --disable-werror
+ - make
+ - make install
+ - popd
+
+script:
+ - LD_LIBRARY_PATH=`pwd`/libvirt-vroot/lib PKG_CONFIG_PATH=`pwd`/libvirt-vroot/lib/pkgconfig python setup.py build sdist test
+
+notifications:
+ irc:
+ # The channel name "irc.oftc.net#virt" is encrypted against libvirt/libvirt-python
+ # to prevent IRC notifications from github forks. This was created using:
+ # $ travis encrypt -r "libvirt/libvirt-python" "irc.oftc.net#virt"
+ channels:
+ - secure: "K4JrbRpz4CHtZ1vjthVwseT8K6INJgjtZethP4DN1jOpm1uC5esbe1Q1qJOfB92JbMcdM6DNjrVg5eyTJj35aD9UoGpTUcPMsYrhlTPHZtfAuLv/at2eB2XRmETlhiXHgI6LizX6gTiwGW5ZHYwGChzumWxu141d/L9harNh9R6z8XH9uJpkNdOAIsJcwS56XGZ74CKsrqF5dK6ZYPIyP+i7gPO67gEWo0oD6TiJKR908fw03ZiXarIFmLRlk4MbHywLRF0byfD0gg2Ht/tDX73+59QXjLKo/GvQecwoU8UuuFRJlyhUfvm1JYYydnS+O7fPJvI0FWlYFY7i76aeVqkARHRpHknFueT6kZADOmiyMLuvdr+gWVuyIdX33vVJtDm4T1OtNMG/wy9EUZUU1vEu+gHhaRkf/O0GkMj0Hac4I14BGyd/Wdhto6zWojFiMEG/HRHey6l15MBQu49QyW/YMyWi/LeBWXuCUgwQ/ij5EPgsn36OxCafV9zMz0oXZskwX6rJGQRZsdgdwYvt2hP3muLaJbwVyT0bGlOJDJieOa/LVKOXPcQm26aGfyMuLgm0//E9v++6W1IDKh6+BNsfTKAwTxlAvJyz6Bns3XuUJUxUz2+uQVSS6S3EwEZUJ+yHDd2F4sX5OP1L7TWIOWFbI4vQK90ZZ7/jgiYQbwo="
+ on_success: change
+ on_failure: always
+ email:
+ # The list name 'libvirt-ci(a)redhat.com" is encrypted against libvirt/libvirt-python
+ # to prevent IRC notifications from github forks. This was created using:
+ # $ travis encrypt -r "libvirt/libvirt-python" "libvirt-ci(a)redhat.com"
+ recipients:
+ - secure: "l6TTLcEcXdDEldHE2NgSIdt6a0k99ug3hp2W4IlnqJWJfIk/87nysJtLNrA0va20pPApCa3iJfMq4PUmBGiIIimTN0/KgC7tONDraogXhCbgfZp9Ejy/57TXxygSp4oum2kDw/c5uLnfrFV/xcn1fk6hvH6CD3bVcJPOQ/mc5FSKLqN5UzwqNnMpMTtG9qxCwfXJ/Bdm9fbURfezC7djcYRwRfPUe3TSD0L76G2HnQnSy4RqR3KFSjQHFPnSGM5IbsokbOaFKCyp/pHOt7QomQaY7YAPX/K9O+eP+hkkp6DGADkkumHctcgnMoyxpahf7pNKw9S8JYabH2NwREIq8whbp9Mo+R4rYO2ozroLWHaboYs/pBLrs606ivTwOmWGRCpJdCmmKTiZNyo6MRrwiOM6x+2YHUTMOa2kVheRNzaaxMFzHPW2kZ20bujPhfViJsRYj9flo5GJXJLyjluGZK5RjrguNJeIh8VJNBiSHW37uj7drmNBsqMad+65mf/4xtGITBqhz5Spx5R9UMZbuiJvcm8GasJMMdQ+bCfuWYjF2nZvSvFEr54Ii1YrDp6FKQ8YG1aD1/D8Z0/b3pLd/8Pn+M9yIWyO/Sto5TbSUjxBTmTStuDmtYE5uu1miYebvgJH5MovWPBegYgrfI417kPJgCG3q/R0YcZFMKFfQyo="
diff --git a/requirements-test.txt b/requirements-test.txt
new file mode 100644
index 0000000..7435c54
--- /dev/null
+++ b/requirements-test.txt
@@ -0,0 +1,2 @@
+nose
+lxml
diff --git a/setup.py b/setup.py
index f33ff1a..e8c498c 100755
--- a/setup.py
+++ b/setup.py
@@ -290,15 +290,16 @@ class my_test(Command):
'lib' + plat_specifier)
def find_nosetests_path(self):
- paths = [
- "/usr/bin/nosetests-%d.%d" % (sys.version_info[0],
- sys.version_info[1]),
- "/usr/bin/nosetests-%d" % (sys.version_info[0]),
- "/usr/bin/nosetests",
+ binaries = [
+ "nosetests-%d.%d" % (sys.version_info[0],
+ sys.version_info[1]),
+ "nosetests-%d" % (sys.version_info[0]),
+ "nosetests",
]
- for path in paths:
- if os.path.exists(path):
+ for binary in binaries:
+ path = distutils.spawn.find_executable(binary)
+ if path is not None:
return path
raise Exception("Cannot find any nosetests binary")
--
2.13.5
7 years, 3 months
[libvirt] [PATCH v8 00/11] Add support for Veritas HyperScale (VxHS) block device protocol
by John Ferlan
v7: https://www.redhat.com/archives/libvir-list/2017-September/msg00035.html
Patches 1-4 are already ACK'd, but are presented again for completeness
Differences:
* Former patch1 already pushed (QEMU 2.10 replies and xml changes)
* Patch 5 is new - to split up the server args into a single server
JSON object creation helper so that it can be used by VxHS code in
patch 6
* Patch 6 uses the new function and alters the .args output to remove
the ".0"
* Patches 7-10, no change
* Patch 11 - adjust the .args output to remove the ".0"
Ashish Mittal (9):
storage: Introduce VIR_STORAGE_NET_PROTOCOL_VXHS
docs: Add schema and docs for Veritas HyperScale (VxHS)
util: storage: Add JSON backing volume parse for VxHS
qemu: Refactor qemuBlockStorageSourceBuildHostsJSONSocketAddress
qemu: Add qemu command line generation for a VxHS block device
conf: Introduce TLS options for VxHS block device clients
util: Add TLS attributes to virStorageSource
util: Add virstoragetest to parse/format a tls='yes'
qemu: Add TLS support for Veritas HyperScale (VxHS)
John Ferlan (2):
qemu: Detect support for vxhs
qemu: Introduce qemuDomainPrepareDiskSource
docs/formatdomain.html.in | 45 +++++--
docs/schemas/domaincommon.rng | 18 +++
src/conf/domain_conf.c | 28 +++-
src/libxl/libxl_conf.c | 1 +
src/qemu/libvirtd_qemu.aug | 4 +
src/qemu/qemu.conf | 34 +++++
src/qemu/qemu_block.c | 150 ++++++++++++++++-----
src/qemu/qemu_capabilities.c | 4 +
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_command.c | 38 ++++++
src/qemu/qemu_conf.c | 16 +++
src/qemu/qemu_conf.h | 3 +
src/qemu/qemu_domain.c | 71 ++++++++++
src/qemu/qemu_domain.h | 11 ++
src/qemu/qemu_driver.c | 3 +
src/qemu/qemu_hotplug.c | 73 ++++++++++
src/qemu/qemu_parse_command.c | 15 +++
src/qemu/qemu_process.c | 33 +++++
src/qemu/test_libvirtd_qemu.aug.in | 2 +
src/util/virstoragefile.c | 58 +++++++-
src/util/virstoragefile.h | 14 ++
src/xenconfig/xen_xl.c | 1 +
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 +
...-disk-drive-network-tlsx509-multidisk-vxhs.args | 43 ++++++
...v-disk-drive-network-tlsx509-multidisk-vxhs.xml | 50 +++++++
...muxml2argv-disk-drive-network-tlsx509-vxhs.args | 30 +++++
...emuxml2argv-disk-drive-network-tlsx509-vxhs.xml | 32 +++++
.../qemuxml2argv-disk-drive-network-vxhs.args | 27 ++++
.../qemuxml2argv-disk-drive-network-vxhs.xml | 32 +++++
tests/qemuxml2argvtest.c | 8 ++
...uxml2xmlout-disk-drive-network-tlsx509-vxhs.xml | 34 +++++
.../qemuxml2xmlout-disk-drive-network-vxhs.xml | 34 +++++
tests/qemuxml2xmltest.c | 2 +
tests/virstoragetest.c | 23 ++++
34 files changed, 893 insertions(+), 48 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-multidisk-vxhs.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-multidisk-vxhs.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-vxhs.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-vxhs.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-network-tlsx509-vxhs.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-network-vxhs.xml
--
2.13.5
7 years, 3 months
[libvirt] [PATCH] qemu: Mark graphics ports used on reconnect
by Michal Privoznik
This is an issue that's bugging me for a long time. I don't know
exactly when and who is to blame but on daemon reconnect we lose
qemu's port allocator internal state. That's okay as we should be
able to rebuild it later. However, now I'm seeing port allocator
biding successfully to ports that are already taken by qemu
(either VNC or Spice). Thus any attempt to start another domain
after daemon is restarted fails because libvirt instructs qemu to
take port 5900 which is already taken.
Now, I don't want to mask the real problem, but one can advocate
that we should be marking graphics ports as already in use on
qemuProcessReconnect anyway, because we already know that they
are taken.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_process.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index d3155e4e7..053aba1a6 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4035,7 +4035,8 @@ qemuProcessStartHook(virQEMUDriverPtr driver,
static int
qemuProcessGraphicsReservePorts(virQEMUDriverPtr driver,
- virDomainGraphicsDefPtr graphics)
+ virDomainGraphicsDefPtr graphics,
+ bool reconnect)
{
virDomainGraphicsListenDefPtr glisten;
@@ -4050,7 +4051,8 @@ qemuProcessGraphicsReservePorts(virQEMUDriverPtr driver,
switch (graphics->type) {
case VIR_DOMAIN_GRAPHICS_TYPE_VNC:
- if (!graphics->data.vnc.autoport) {
+ if (!graphics->data.vnc.autoport ||
+ reconnect) {
if (virPortAllocatorSetUsed(driver->remotePorts,
graphics->data.vnc.port,
true) < 0)
@@ -4065,7 +4067,7 @@ qemuProcessGraphicsReservePorts(virQEMUDriverPtr driver,
break;
case VIR_DOMAIN_GRAPHICS_TYPE_SPICE:
- if (graphics->data.spice.autoport)
+ if (graphics->data.spice.autoport && !reconnect)
return 0;
if (graphics->data.spice.port > 0) {
@@ -4269,7 +4271,7 @@ qemuProcessSetupGraphics(virQEMUDriverPtr driver,
for (i = 0; i < vm->def->ngraphics; i++) {
graphics = vm->def->graphics[i];
- if (qemuProcessGraphicsReservePorts(driver, graphics) < 0)
+ if (qemuProcessGraphicsReservePorts(driver, graphics, false) < 0)
goto cleanup;
}
}
@@ -6881,6 +6883,13 @@ qemuProcessReconnect(void *opaque)
goto error;
}
+ for (i = 0; i < obj->def->ngraphics; i++) {
+ if (qemuProcessGraphicsReservePorts(driver,
+ obj->def->graphics[i],
+ true) < 0)
+ goto error;
+ }
+
if (qemuProcessUpdateState(driver, obj) < 0)
goto error;
--
2.13.5
7 years, 3 months
[libvirt] [PATCH] Revert "travis: Limit git depth to 5 commits"
by Andrea Bolognani
Turns out a build job can be stuck waiting for a macOS worker to
become available for a pretty long time: if more than 5 commits
have been pushed in the meantime, the clone will be too shallow
for the worker to find the commit it's supposed to verify, and
the build job will fail.
See https://travis-ci.org/libvirt/libvirt/jobs/277244110 for an
example of the failure described.
This reverts commit 2e975abdc9bbc9e965486e8486cc17a771cdaeb3.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
.travis.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index b3e73bcf7..480419dfd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -75,7 +75,6 @@ addons:
- zfs-fuse
git:
- depth: 5
submodules: true
env:
--
2.13.5
7 years, 3 months
[libvirt] [PATCH v2 0/2] perl/python: Don't hardcode interpreter path
by Andrea Bolognani
Changes from [v1]:
* fix all Perl scripts instead of a single one;
* fix all Python scripts as well.
[v1] https://www.redhat.com/archives/libvir-list/2017-September/msg00504.html
Andrea Bolognani (2):
perl: Don't hardcode interpreter path
python: Don't hardcode interpreter path
build-aux/augeas-gentest.pl | 2 +-
build-aux/check-spacing.pl | 2 +-
build-aux/mock-noinline.pl | 2 +-
build-aux/prohibit-duplicate-header.pl | 2 +-
docs/apibuild.py | 2 +-
docs/genaclperms.pl | 2 +-
docs/hvsupport.pl | 2 +-
docs/index.py | 2 +-
docs/reformat-news.py | 2 +-
src/access/genpolkit.pl | 2 +-
src/check-aclperms.pl | 2 +-
src/check-aclrules.pl | 2 +-
src/check-driverimpls.pl | 2 +-
src/check-drivername.pl | 2 +-
src/check-symfile.pl | 2 +-
src/check-symsorting.pl | 2 +-
src/dtrace2systemtap.pl | 2 +-
src/esx/esx_vi_generator.py | 2 +-
src/hyperv/hyperv_wmi_generator.py | 2 +-
src/rpc/gendispatch.pl | 3 ++-
src/rpc/genprotocol.pl | 1 +
src/rpc/gensystemtap.pl | 2 +-
tests/check-file-access.pl | 2 +-
tests/cputestdata/cpu-cpuid.py | 2 +-
tests/oomtrace.pl | 2 +-
25 files changed, 26 insertions(+), 24 deletions(-)
--
2.13.5
7 years, 3 months
[libvirt] [PATCH python] Add travis build config
by Daniel P. Berrange
Enable builds on several python versions, and against several versions
of libvirt. Ideally we would build all the way back to 0.9.11, since
that is the min supported libvirt for python binding. It is not possible
to build this old libvirt version on modern distros though, so using
1.2.0 as the oldest for now.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
.travis.yml | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
setup.py | 13 +++++++------
2 files changed, 62 insertions(+), 6 deletions(-)
create mode 100644 .travis.yml
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..203d91d
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,55 @@
+language: python
+os: linux
+
+python:
+ - 2.6
+ - 2.7
+ - 3.2
+ - 3.6
+
+env:
+ - LIBVIRT=1.2.0 EXT=gz
+ - LIBVIRT=2.0.0 EXT=xz
+ - LIBVIRT=3.6.0 EXT=xz
+
+install:
+ - sudo apt-get -qqy build-dep libvirt libxml2-dev
+ - sudo apt-get -qqy install curl
+ - pip install lxml nose
+ - curl -O -s https://libvirt.org/sources/libvirt-${LIBVIRT}.tar.${EXT}
+ - tar -xf libvirt-${LIBVIRT}.tar.${EXT}
+ - pushd libvirt-${LIBVIRT}
+ - |
+ ./configure --prefix=`pwd`/../libvirt-vroot \
+ --without-libvirtd \
+ --without-esx \
+ --without-vbox \
+ --without-libxl \
+ --without-xen \
+ --without-qemu \
+ --without-lxc \
+ --without-hyperv \
+ --without-macvtap \
+ --disable-werror
+ - make
+ - make install
+ - popd
+
+script:
+ - LD_LIBRARY_PATH=`pwd`/libvirt-vroot/lib PKG_CONFIG_PATH=`pwd`/libvirt-vroot/lib/pkgconfig python setup.py build sdist test
+
+notifications:
+ irc:
+ # The channel name "irc.oftc.net#virt" is encrypted against libvirt/libvirt
+ # to prevent IRC notifications from github forks. This was created using:
+ # $ travis encrypt -r "libvirt/libvirt" "irc.oftc.net#virt"
+ channels:
+ - secure: "K4JrbRpz4CHtZ1vjthVwseT8K6INJgjtZethP4DN1jOpm1uC5esbe1Q1qJOfB92JbMcdM6DNjrVg5eyTJj35aD9UoGpTUcPMsYrhlTPHZtfAuLv/at2eB2XRmETlhiXHgI6LizX6gTiwGW5ZHYwGChzumWxu141d/L9harNh9R6z8XH9uJpkNdOAIsJcwS56XGZ74CKsrqF5dK6ZYPIyP+i7gPO67gEWo0oD6TiJKR908fw03ZiXarIFmLRlk4MbHywLRF0byfD0gg2Ht/tDX73+59QXjLKo/GvQecwoU8UuuFRJlyhUfvm1JYYydnS+O7fPJvI0FWlYFY7i76aeVqkARHRpHknFueT6kZADOmiyMLuvdr+gWVuyIdX33vVJtDm4T1OtNMG/wy9EUZUU1vEu+gHhaRkf/O0GkMj0Hac4I14BGyd/Wdhto6zWojFiMEG/HRHey6l15MBQu49QyW/YMyWi/LeBWXuCUgwQ/ij5EPgsn36OxCafV9zMz0oXZskwX6rJGQRZsdgdwYvt2hP3muLaJbwVyT0bGlOJDJieOa/LVKOXPcQm26aGfyMuLgm0//E9v++6W1IDKh6+BNsfTKAwTxlAvJyz6Bns3XuUJUxUz2+uQVSS6S3EwEZUJ+yHDd2F4sX5OP1L7TWIOWFbI4vQK90ZZ7/jgiYQbwo="
+ on_success: change
+ on_failure: always
+ email:
+ # The list name 'libvirt-ci(a)redhat.com" is encrypted against libvirt/libvirt
+ # to prevent IRC notifications from github forks. This was created using:
+ # $ travis encrypt -r "libvirt/libvirt" "libvirt-ci(a)redhat.com"
+ recipients:
+ - secure: "l6TTLcEcXdDEldHE2NgSIdt6a0k99ug3hp2W4IlnqJWJfIk/87nysJtLNrA0va20pPApCa3iJfMq4PUmBGiIIimTN0/KgC7tONDraogXhCbgfZp9Ejy/57TXxygSp4oum2kDw/c5uLnfrFV/xcn1fk6hvH6CD3bVcJPOQ/mc5FSKLqN5UzwqNnMpMTtG9qxCwfXJ/Bdm9fbURfezC7djcYRwRfPUe3TSD0L76G2HnQnSy4RqR3KFSjQHFPnSGM5IbsokbOaFKCyp/pHOt7QomQaY7YAPX/K9O+eP+hkkp6DGADkkumHctcgnMoyxpahf7pNKw9S8JYabH2NwREIq8whbp9Mo+R4rYO2ozroLWHaboYs/pBLrs606ivTwOmWGRCpJdCmmKTiZNyo6MRrwiOM6x+2YHUTMOa2kVheRNzaaxMFzHPW2kZ20bujPhfViJsRYj9flo5GJXJLyjluGZK5RjrguNJeIh8VJNBiSHW37uj7drmNBsqMad+65mf/4xtGITBqhz5Spx5R9UMZbuiJvcm8GasJMMdQ+bCfuWYjF2nZvSvFEr54Ii1YrDp6FKQ8YG1aD1/D8Z0/b3pLd/8Pn+M9yIWyO/Sto5TbSUjxBTmTStuDmtYE5uu1miYebvgJH5MovWPBegYgrfI417kPJgCG3q/R0YcZFMKFfQyo="
diff --git a/setup.py b/setup.py
index f33ff1a..cc3a09a 100755
--- a/setup.py
+++ b/setup.py
@@ -290,15 +290,16 @@ class my_test(Command):
'lib' + plat_specifier)
def find_nosetests_path(self):
- paths = [
- "/usr/bin/nosetests-%d.%d" % (sys.version_info[0],
+ binaries = [
+ "nosetests-%d.%d" % (sys.version_info[0],
sys.version_info[1]),
- "/usr/bin/nosetests-%d" % (sys.version_info[0]),
- "/usr/bin/nosetests",
+ "nosetests-%d" % (sys.version_info[0]),
+ "nosetests",
]
- for path in paths:
- if os.path.exists(path):
+ for binary in binaries:
+ path = distutils.spawn.find_executable(binary)
+ if path != None:
return path
raise Exception("Cannot find any nosetests binary")
--
2.13.5
7 years, 3 months
[libvirt] [PATCH 00/19] Privatize _virStoragePoolObj and _virStorageVolDefList
by John Ferlan
The last of the storage pool object adjustments.
The first patch is a followup from last series to alter the prototype
for two functions to be "const char *".
The next 17 patches make all the adjustments necessary to move the two
structures into virstoragepoolobj.c
The last patch is listed merely for completeness of using obj instead
of pool, but I really don't care if it's not accepted. Still I present
it to be "more complete" - there could be more just like it for the
various storage_backend_*.c modules, but none are necessary "churn".
Since it was written and in my branch, I just kept/posted it too.
John Ferlan (19):
conf: Fix prototype/definition for virStoragePoolObj get functions
storage: Use virStoragePoolObjGetDef accessor for driver
test: Rename @vol to @volDef in testOpenVolumesForPool
test: Create local virStoragePoolObjPtr VolLookup APIs
test: Use virStoragePoolObjGetDef accessor
storage: Use virStoragePoolObjGetDef accessor for storage_util
storage: Use virStoragePoolObjGetDef accessor for Disk backend
storage: Use virStoragePoolObjGetDef accessor for Logical backend
storage: Use virStoragePoolObjGetDef accessor for Sheepdog backend
storage: Use virStoragePoolObjGetDef accessor for FS backend
storage: Use virStoragePoolObjGetDef accessor for Gluster backend
storage: Use virStoragePoolObjGetDef accessor for iSCSI backend
storage: Use virStoragePoolObjGetDef accessor for MPATH backend
storage: Use virStoragePoolObjGetDef accessor for RBD backend
storage: Use virStoragePoolObjGetDef accessor for SCSI backend
storage: Use virStoragePoolObjGetDef accessor for VSTORAGE backend
storage: Use virStoragePoolObjGetDef accessor for ZFS backend
storage: Privatize virStoragePoolObj and virStorageVolDefList
storage: Change storage_util to use obj instead of pool
src/conf/storage_conf.h | 4 -
src/conf/virstorageobj.c | 24 +-
src/conf/virstorageobj.h | 19 +-
src/storage/storage_backend_disk.c | 98 ++++----
src/storage/storage_backend_fs.c | 90 ++++----
src/storage/storage_backend_gluster.c | 20 +-
src/storage/storage_backend_iscsi.c | 41 ++--
src/storage/storage_backend_logical.c | 63 ++---
src/storage/storage_backend_mpath.c | 8 +-
src/storage/storage_backend_rbd.c | 64 ++---
src/storage/storage_backend_scsi.c | 30 ++-
src/storage/storage_backend_sheepdog.c | 23 +-
src/storage/storage_backend_vstorage.c | 31 +--
src/storage/storage_backend_zfs.c | 39 ++--
src/storage/storage_driver.c | 411 +++++++++++++++++++--------------
src/storage/storage_util.c | 200 ++++++++--------
src/storage/storage_util.h | 30 +--
src/test/test_driver.c | 203 ++++++++--------
18 files changed, 777 insertions(+), 621 deletions(-)
--
2.13.5
7 years, 3 months