[libvirt] [PATCH 0/9] stream error reporting fixes
by Cole Robinson
This series attempts to address various stream finish/abort error
reporting issues:
* Unclear error messages
* virStreamAbort always returns an error
* Spurious errors logged on the daemon side
* Various issues in stream error cleanup (found through code inspection)
Cole Robinson (9):
fdstream: separate out virCommandPtr cleanup
fdstream: Report error with virProcessTranslateStatus
fdstream: Raise explicit error when iohelper gets SIGPIPE
daemon: stream: Close stream on send failure
daemon: stream: don't update events if stream->closed
daemon: stream: set stream->closed on removal
rpc: protocol: Clarify VIR_NET_ERROR usage with streams
daemon: stream: Don't force error when client aborts
fdstream: don't raise error on SIGPIPE if abort requested
daemon/stream.c | 42 +++++++++++++++++-------
src/fdstream.c | 84 ++++++++++++++++++++++++++++++------------------
src/rpc/virnetprotocol.x | 7 ++--
3 files changed, 88 insertions(+), 45 deletions(-)
--
2.7.3
8 years, 8 months
[libvirt] [PATCH v2 00/12] Add IV Secret Object support
by John Ferlan
v1: http://www.redhat.com/archives/libvir-list/2016-April/msg00596.html
Differences since v1:
- Add qemuBuildiSCSICommandLine (and BuildDiskiSCSI && BuildHostdeviSCSI)
These will do the magic necessary in order to support IV secret objects
for the impending iSCSI -drive argument. This API doesn't require any
qemu patches in order to work AFAICT. I also determined that the "id="
*isn't* required for an '-iscsi ...' argument, which made using the
complete 'path' string for 'initiator-name' possible. The other option
was to break it up and pass the "iqn.*" string as the initiator-name
and a "modified" remaining string as the "id=" parameter. The modified
would be to ensure only alphanumeric, '-', '.', and '_' characters are
in the 'id=' string.
- Fix up some logic found while actually working through the tests. Some
of it related to what was found for the 'iscsi' options. A couple of
other minor nits.
- Add tests and mocks for virRandomBytes and gnutls_rnd (note: the former
could be used to "randomly" (hah!) generate a UUID of all '0xff').
A mock of 'gnutls_encrypt' is not necessary since, it can only be called
if the function gnutls_encrypt exists *and* we have a secret object
capability. Not having a mock function allows us to validate that
gnutls_encrypt actually generates a value we expect based on some
less than stellar and totally non random key's!
- Remove the hotplug IV code (I've saved it off for future expansion).
Although not needing to do hotplug probably means patches 6-9 are not
required, but still I think better than the existing so I kept them
even though they have nothing to do with IV secrets (they'd need to
go in after patches 1-5 anyways).
- Ran the changes through the coverity checker...
John Ferlan (12):
qemu: Introduce qemuDomainSecretInfo
qemu: Introduce qemuDomainSecretPrepare and Destroy
qemu: Introduce qemuDomainHostdevPrivatePtr
qemu: Introduce qemuDomainSecretHostdevPrepare and Destroy
qemu: Use qemuDomainSecretInfoPtr in qemuBuildNetworkDriveURI
qemu: hotplug: Assume support for -device for attach virtio disk
qemu: hotplug: Adjust error path for attach scsi disk
qemu: hotplug: Adjust error path for attach virtio disk
qemu: hotplug: Adjust error path for attach hostdev scsi disk
qemu: hotplug: Fix possible memory leak of props
qemu: Introduce qemuDomainSecretIV
qemu: Utilize qemu secret objects for SCSI/RBD auth/secret
configure.ac | 1 +
src/conf/domain_conf.c | 33 +-
src/conf/domain_conf.h | 5 +-
src/lxc/lxc_native.c | 4 +-
src/qemu/qemu_alias.c | 23 +
src/qemu/qemu_alias.h | 2 +
src/qemu/qemu_command.c | 445 ++++++++++++++----
src/qemu/qemu_command.h | 13 +-
src/qemu/qemu_domain.c | 516 ++++++++++++++++++++-
src/qemu/qemu_domain.h | 81 +++-
src/qemu/qemu_driver.c | 13 +-
src/qemu/qemu_hotplug.c | 247 +++++-----
src/qemu/qemu_hotplug.h | 4 +-
src/qemu/qemu_parse_command.c | 4 +-
src/qemu/qemu_process.c | 13 +-
src/vbox/vbox_common.c | 4 +-
src/xenconfig/xen_common.c | 4 +-
src/xenconfig/xen_sxpr.c | 4 +-
...uxml2argv-disk-drive-network-iscsi-auth-IV.args | 39 ++
...muxml2argv-disk-drive-network-iscsi-auth-IV.xml | 43 ++
...emuxml2argv-disk-drive-network-rbd-auth-IV.args | 31 ++
...qemuxml2argv-disk-drive-network-rbd-auth-IV.xml | 42 ++
...emuxml2argv-hostdev-scsi-lsi-iscsi-auth-IV.args | 41 ++
...qemuxml2argv-hostdev-scsi-lsi-iscsi-auth-IV.xml | 48 ++
...xml2argv-hostdev-scsi-virtio-iscsi-auth-IV.args | 43 ++
...uxml2argv-hostdev-scsi-virtio-iscsi-auth-IV.xml | 48 ++
tests/qemuxml2argvmock.c | 31 +-
tests/qemuxml2argvtest.c | 19 +
tests/virhostdevtest.c | 3 +-
29 files changed, 1557 insertions(+), 247 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth-IV.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth-IV.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth-IV.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth-IV.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth-IV.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth-IV.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth-IV.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth-IV.xml
--
2.5.5
8 years, 8 months
[libvirt] [PATCH] Adapt augeas profile to handle negative int values.
by Cédric Bosdonnat
Introducing keepalive_interval = -1 breaks to augeas lens. Fix the lens
by allowing signed ints in the regular expression.
---
daemon/libvirtd.aug | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemon/libvirtd.aug b/daemon/libvirtd.aug
index a70aa1d..4d40ee2 100644
--- a/daemon/libvirtd.aug
+++ b/daemon/libvirtd.aug
@@ -13,7 +13,7 @@ module Libvirtd =
let str_val = del /\"/ "\"" . store /[^\"]*/ . del /\"/ "\""
let bool_val = store /0|1/
- let int_val = store /[0-9]+/
+ let int_val = store /-?[0-9]+/
let str_array_element = [ seq "el" . str_val ] . del /[ \t\n]*/ ""
let str_array_val = counter "el" . array_start . ( str_array_element . ( array_sep . str_array_element ) * ) ? . array_end
--
2.6.6
8 years, 8 months
[libvirt] [PATCH v3 0/4] Fix parsing our own XMLs
by Martin Kletzander
v3:
- Actually use virPCIDeviceAddress. It was actually ACKed with that
changed but I feel like it's way too big of a change for just
pushing it. Also, I'm in no rush with this, so I'l gladly wait
after therelease with this.
v2:
- Just a rebase
- I did *not* use virPCIDeviceAddress wording instead as discussed in
the v1 thread. That's because we have lot of functions working
with virDevicePCIAddress named exactly after that and renaming
those would be ugly IMHO. -
https://www.redhat.com/archives/libvir-list/2016-April/msg00714.html
v1:
- https://www.redhat.com/archives/libvir-list/2016-April/msg00081.html
Martin Kletzander (4):
Change virDevicePCIAddress to virPCIDeviceAddress
Move capability formatting together
schemas: Update nodedev schema to match reality
conf: Parse more of our nodedev XML
docs/schemas/nodedev.rng | 29 +++---
src/bhyve/bhyve_device.c | 4 +-
src/conf/device_conf.c | 16 +--
src/conf/device_conf.h | 25 ++---
src/conf/domain_addr.c | 24 ++---
src/conf/domain_addr.h | 22 ++--
src/conf/domain_conf.c | 26 ++---
src/conf/domain_conf.h | 10 +-
src/conf/network_conf.c | 8 +-
src/conf/network_conf.h | 2 +-
src/conf/node_device_conf.c | 111 +++++++++++++++++++--
src/conf/storage_conf.c | 14 +--
src/conf/storage_conf.h | 2 +-
src/libvirt_private.syms | 8 +-
src/network/bridge_driver.c | 4 +-
src/qemu/qemu_agent.c | 2 +-
src/qemu/qemu_domain_address.c | 12 +--
src/qemu/qemu_hotplug.c | 10 +-
src/qemu/qemu_monitor.c | 12 +--
src/qemu/qemu_monitor.h | 14 +--
src/qemu/qemu_monitor_json.c | 12 +--
src/qemu/qemu_monitor_json.h | 12 +--
src/qemu/qemu_monitor_text.c | 14 +--
src/qemu/qemu_monitor_text.h | 12 +--
src/storage/storage_backend_scsi.c | 2 +-
src/util/virpci.c | 2 +-
src/util/virpci.h | 3 +-
src/xen/xend_internal.c | 2 +-
.../pci_0000_00_1c_0_header_type.xml | 2 +-
tests/nodedevschemadata/pci_0000_02_10_7_sriov.xml | 23 +++++
.../pci_0000_02_10_7_sriov_pf_vfs_all.xml | 29 ++++++
...i_0000_02_10_7_sriov_pf_vfs_all_header_type.xml | 30 ++++++
.../pci_0000_02_10_7_sriov_vfs.xml | 26 +++++
.../pci_0000_02_10_7_sriov_zero_vfs_max_count.xml | 21 ++++
tests/nodedevxml2xmltest.c | 7 ++
35 files changed, 391 insertions(+), 161 deletions(-)
create mode 100644 tests/nodedevschemadata/pci_0000_02_10_7_sriov.xml
create mode 100644 tests/nodedevschemadata/pci_0000_02_10_7_sriov_pf_vfs_all.xml
create mode 100644 tests/nodedevschemadata/pci_0000_02_10_7_sriov_pf_vfs_all_header_type.xml
create mode 100644 tests/nodedevschemadata/pci_0000_02_10_7_sriov_vfs.xml
create mode 100644 tests/nodedevschemadata/pci_0000_02_10_7_sriov_zero_vfs_max_count.xml
--
2.8.1
8 years, 8 months
[libvirt] [PATCH] spec: add vz daemon related packages to libvirt.spec.in
by Maxim Nestratov
---
libvirt.spec.in | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 8036fa3..cddf447 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -54,6 +54,7 @@
%define with_uml 0%{!?_without_uml:%{server_drivers}}
%define with_libxl 0%{!?_without_libxl:%{server_drivers}}
%define with_vbox 0%{!?_without_vbox:%{server_drivers}}
+%define with_vz 0%{!?_without_vz:%{server_drivers}}
%define with_qemu_tcg %{with_qemu}
@@ -423,6 +424,9 @@ Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
%if %{with_nwfilter}
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
%endif
+ %if %{with_vz}
+Requires: libvirt-daemon-driver-vz = %{version}-%{release}
+ %endif
%if %{with_interface}
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
@@ -988,6 +992,19 @@ VirtualBox
%endif
+ %if %{with_vz}
+%package daemon-driver-vz
+Summary: Virtuozzo driver plugin for the libvirtd daemon
+Group: Development/Libraries
+Requires: libvirt-daemon = %{version}-%{release}
+
+%description daemon-driver-vz
+The vz driver plugin for the libvirtd daemon, providing
+an implementation of the hypervisor driver APIs using
+Virtuozzo
+ %endif
+
+
%if %{with_libxl}
%package daemon-driver-libxl
Summary: Libxl driver plugin for the libvirtd daemon
@@ -1141,6 +1158,27 @@ Requires: libvirt-daemon-driver-storage = %{version}-%{release}
Server side daemon and driver required to manage the virtualization
capabilities of VirtualBox
%endif
+
+ %if %{with_vz}
+%package daemon-vz
+Summary: Server side daemon & driver required to run Virtuozzo guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+ %if %{with_driver_modules}
+Requires: libvirt-daemon-driver-vz = %{version}-%{release}
+Requires: libvirt-daemon-driver-interface = %{version}-%{release}
+Requires: libvirt-daemon-driver-network = %{version}-%{release}
+Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
+Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
+Requires: libvirt-daemon-driver-secret = %{version}-%{release}
+Requires: libvirt-daemon-driver-storage = %{version}-%{release}
+ %endif
+%description daemon-vz
+Server side daemon and driver required to manage the virtualization
+capabilities of Virtuozzo
+ %endif
+
%endif # %{with_libvirtd}
%package client
@@ -2228,6 +2266,13 @@ exit 0
%defattr(-, root, root)
%{_libdir}/%{name}/connection-driver/libvirt_driver_vbox.so
%endif
+
+ %if %{with_vz}
+%files daemon-driver-vz
+%defattr(-, root, root)
+%{_libdir}/%{name}/connection-driver/libvirt_driver_vz.so
+ %endif
+
%endif # %{with_driver_modules}
%if %{with_qemu_tcg}
@@ -2259,6 +2304,11 @@ exit 0
%files daemon-vbox
%defattr(-, root, root)
%endif
+
+ %if %{with_vz}
+%files daemon-vz
+%defattr(-, root, root)
+ %endif
%endif # %{with_libvirtd}
%if %{with_sanlock}
--
2.4.3
8 years, 8 months