[libvirt] [PATCH v2 0/9] admin: Admin API: Introduce client listing API
by Erik Skultety
v2:
- gendispatch was modified to be able to generate more client related code
- Martin noticed that I added avahi-related field into my tests which caused
the tests to fail for him, since he doesn't compile with avahi - fixed
- coverity complained that clts might be uninitialized when calling
virObjectListFreeCount in virAdmServerListClients. Turned out as a
false-positive, but I wanted to silence it so I reworked the logic so that
the caller-supplied pointer (initialized to NULL) isn't touched until all the
memory operations succeeded. That not only didn't help, but since I removed the
ugly check before virObjectListFreeCount (because the method handles NULL
well), coverity started to complain that I might assign a signed value to
an unsigned function argument, which, although being true, is still a false
positive because the pointer will be NULL and will be handled correctly.
Erik Skultety (9):
rpc: virnetserverclient: Identify clients by an integer ID
rpc: virnetserverclient: Introduce new attribute conn_time to client
admin: Introduce virAdmClient client-side object
rpc: gendispatch: Tune it to support client structure
rpc: virnetserver: Support retrieval of a list of clients
include: admin: export connection transport constants
rpc: virnetserverclient: Implement client connection transport
retrieval
admin: Introduce listing clients
virt-admin: Introduce srv-clients-list command
daemon/admin.c | 15 +++
daemon/admin_server.c | 23 ++++
daemon/admin_server.h | 4 +
daemon/libvirtd.c | 4 +-
include/libvirt/libvirt-admin.h | 37 ++++++
src/admin/admin_protocol.x | 29 ++++-
src/admin/admin_remote.c | 6 +
src/admin_protocol-structs | 19 +++
src/datatypes.c | 35 +++++
src/datatypes.h | 47 +++++++
src/libvirt-admin.c | 131 +++++++++++++++++++
src/libvirt_admin_private.syms | 3 +
src/libvirt_admin_public.syms | 5 +
src/libvirt_remote.syms | 2 +
src/locking/lock_daemon.c | 2 +-
src/logging/log_daemon.c | 2 +-
src/lxc/lxc_controller.c | 2 +-
src/rpc/gendispatch.pl | 75 +++++++++--
src/rpc/virnetserver.c | 64 +++++++++-
src/rpc/virnetserver.h | 6 +
src/rpc/virnetserverclient.c | 106 ++++++++++++++--
src/rpc/virnetserverclient.h | 10 +-
tests/Makefile.am | 7 +
tests/virnetdaemondata/input-data-client-ids.json | 68 ++++++++++
.../input-data-client-timestamp.json | 70 ++++++++++
.../virnetdaemondata/output-data-admin-nomdns.json | 6 +
.../output-data-admin-server-names.json | 6 +
.../virnetdaemondata/output-data-anon-clients.json | 3 +
tests/virnetdaemondata/output-data-client-ids.json | 68 ++++++++++
.../output-data-client-timestamp.json | 70 ++++++++++
.../output-data-initial-nomdns.json | 3 +
tests/virnetdaemondata/output-data-initial.json | 3 +
.../output-data-no-keepalive-required.json | 6 +
tests/virnetdaemonmock.c | 34 +++++
tests/virnetdaemontest.c | 13 +-
tests/virnetserverclienttest.c | 2 +-
tools/virt-admin.c | 141 +++++++++++++++++++++
tools/virt-admin.pod | 7 +
38 files changed, 1095 insertions(+), 39 deletions(-)
create mode 100644 tests/virnetdaemondata/input-data-client-ids.json
create mode 100644 tests/virnetdaemondata/input-data-client-timestamp.json
create mode 100644 tests/virnetdaemondata/output-data-client-ids.json
create mode 100644 tests/virnetdaemondata/output-data-client-timestamp.json
create mode 100644 tests/virnetdaemonmock.c
--
2.4.11
8 years, 7 months
[libvirt] [PATCH 0/2] qemu: Refresh guest's RTC on daemon restart
by Michal Privoznik
Thing is, there are is an event that we use to keep our internal
state in sync with qemu. If libvirtd is not running, our internal
state gets out of sync. Therefore we must refresh it as soon as
we are started.
Michal Privoznik (2):
qemu: Introduce qemuMonitorGetRTCTime
qemu: Refresh RTC adjustment on qemuProcessReconnect
src/qemu/qemu_monitor.c | 11 +++++++++++
src/qemu/qemu_monitor.h | 3 +++
src/qemu/qemu_monitor_json.c | 45 ++++++++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_monitor_json.h | 3 +++
src/qemu/qemu_process.c | 44 +++++++++++++++++++++++++++++++++++++++++++
5 files changed, 106 insertions(+)
--
2.8.1
8 years, 7 months
[libvirt] [PATCH v3 0/6] Add panic device support for S390
by Boris Fiuczynski
S390 architecture inherently provides a crash detection capability
which has not been reflected in the domain xml.
This series adds an s390 model to the panic device which does not
allow an address to be specified and is by default created on S390
guests unless already provided.
v3:
* Merged S390 and S390X in the add default device function
* Changed and added tests
* Split out ISA panic device message into separate patch
* Adjusted documentation
v2:
* Grouped default panic device creation and required test code changes into
one patch.
* Added an s390 model instead of using default model for toleration.
Boris Fiuczynski (6):
qemu: add panic device support for S390
qemu: add default panic device to S390 guests
tests: add tests for panic device model s390
docs: align spelling of S390
qemu: merge S390 and S390X default device creation
qemu: fix error message for default panic device
docs/formatdomain.html.in | 26 ++++++++++++-------
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 3 ++-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 21 +++++++++++++++-
src/qemu/qemu_domain.c | 11 +++++---
.../qemuargv2xml-machine-aeskeywrap-off-argv.xml | 1 +
.../qemuargv2xml-machine-aeskeywrap-on-argv.xml | 1 +
.../qemuargv2xml-machine-deakeywrap-off-argv.xml | 1 +
.../qemuargv2xml-machine-deakeywrap-on-argv.xml | 1 +
.../qemuargv2xml-machine-keywrap-none-argv.xml | 1 +
.../qemuxml2argv-s390-panic-address.xml | 26 +++++++++++++++++++
.../qemuxml2argv-s390-panic-missing.args | 25 +++++++++++++++++++
.../qemuxml2argv-s390-panic-missing.xml | 23 +++++++++++++++++
.../qemuxml2argv-s390-panic-no-address.args | 25 +++++++++++++++++++
.../qemuxml2argv-s390-panic-no-address.xml | 22 ++++++++++++++++
tests/qemuxml2argvdata/qemuxml2argv-s390-panic.xml | 22 ++++++++++++++++
tests/qemuxml2argvtest.c | 11 +++++++-
.../qemuxml2xmlout-iothreads-disk-virtio-ccw.xml | 1 +
.../qemuxml2xmlout-s390-defaultconsole.xml | 1 +
.../qemuxml2xmlout-s390-panic-missing.xml | 29 ++++++++++++++++++++++
.../qemuxml2xmlout-s390-panic-no-address.xml | 28 +++++++++++++++++++++
.../qemuxml2xmlout-s390-panic.xml | 28 +++++++++++++++++++++
tests/qemuxml2xmltest.c | 6 +++++
24 files changed, 300 insertions(+), 15 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-s390-panic-address.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-s390-panic.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic-missing.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic-no-address.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic.xml
--
2.3.0
8 years, 7 months
[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, 7 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, 7 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, 7 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, 7 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, 7 months
[libvirt] [PATCH 0/4] network/nwfilter daemon reload fixes
by Cole Robinson
Fix some issues with libvirtd reload (SIGHUP) handling in the
network and nwfilter drivers
Cole Robinson (4):
network: Fix segfault on daemon reload
nwfilter: Fix potential locking problems on ObjLoad failure
nwfilter: Push configFile building into LoadConfig
nwfilter: Save config to disk if we generated a UUID
src/conf/nwfilter_conf.c | 113 ++++++++++++++++++++++-------------------
src/conf/nwfilter_conf.h | 6 +--
src/network/bridge_driver.c | 2 +-
src/nwfilter/nwfilter_driver.c | 6 +--
4 files changed, 66 insertions(+), 61 deletions(-)
--
2.7.3
8 years, 7 months