[libvirt] [PATCH alt] conf: Allow user define their own alias
by Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1434451
It comes handy for management application to be able to have a
per-device label so that it can uniquely identify devices it
cares about. The advantage of this approach is that we don't have
to generate aliases at define time (non trivial amount of work
and problems). The only thing we do is parse the user supplied
tag and format it back. For instance:
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
<alias user='myDisk0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
An alternative approach to:
https://www.redhat.com/archives/libvir-list/2017-September/msg00765.html
Honestly, I prefer this one as it's simpler and we don't have to care about
devices changing their aliases on cold plug. I mean, on cold (un-)plug we'd
have to regenerate the aliases so it might be hard to track certain device.
But with this approach, it's no problem.
Also, I'm not completely convinced about the name of @user attribute. So I'm
open for suggestions.
docs/schemas/domaincommon.rng | 13 +++++++---
src/conf/device_conf.c | 1 +
src/conf/device_conf.h | 1 +
src/conf/domain_conf.c | 20 ++++++++++-----
tests/genericxml2xmlindata/generic-user-alias.xml | 31 +++++++++++++++++++++++
tests/genericxml2xmltest.c | 2 ++
6 files changed, 59 insertions(+), 9 deletions(-)
create mode 100644 tests/genericxml2xmlindata/generic-user-alias.xml
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index bac371ea3..69c121ce9 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -5864,9 +5864,16 @@
</define>
<define name='alias'>
<element name='alias'>
- <attribute name='name'>
- <ref name='aliasName'/>
- </attribute>
+ <optional>
+ <attribute name='name'>
+ <ref name='aliasName'/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name='user'>
+ <ref name='aliasName'/>
+ </attribute>
+ </optional>
</element>
<empty/>
</define>
diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
index d69f94fad..ced5db123 100644
--- a/src/conf/device_conf.c
+++ b/src/conf/device_conf.c
@@ -57,6 +57,7 @@ void
virDomainDeviceInfoClear(virDomainDeviceInfoPtr info)
{
VIR_FREE(info->alias);
+ VIR_FREE(info->user);
memset(&info->addr, 0, sizeof(info->addr));
info->type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE;
VIR_FREE(info->romfile);
diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h
index f87d6f1fc..08a9e57e3 100644
--- a/src/conf/device_conf.h
+++ b/src/conf/device_conf.h
@@ -135,6 +135,7 @@ typedef struct _virDomainDeviceInfo virDomainDeviceInfo;
typedef virDomainDeviceInfo *virDomainDeviceInfoPtr;
struct _virDomainDeviceInfo {
char *alias;
+ char *user; /* user defined ID for the device */
int type; /* virDomainDeviceAddressType */
union {
virPCIDeviceAddress pci;
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 87192eb2d..885825226 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -5756,6 +5756,8 @@ virDomainDeviceInfoFormat(virBufferPtr buf,
virDomainDeviceInfoPtr info,
unsigned int flags)
{
+ bool formatAlias = info->alias && !(flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE);
+
if ((flags & VIR_DOMAIN_DEF_FORMAT_ALLOW_BOOT) && info->bootIndex) {
virBufferAsprintf(buf, "<boot order='%u'", info->bootIndex);
@@ -5764,9 +5766,13 @@ virDomainDeviceInfoFormat(virBufferPtr buf,
virBufferAddLit(buf, "/>\n");
}
- if (info->alias &&
- !(flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE)) {
- virBufferAsprintf(buf, "<alias name='%s'/>\n", info->alias);
+ if (formatAlias || info->user) {
+ virBufferAddLit(buf, "<alias");
+ if (formatAlias)
+ virBufferAsprintf(buf, " name='%s'", info->alias);
+ if (info->user)
+ virBufferAsprintf(buf, " user='%s'", info->user);
+ virBufferAddLit(buf, "/>\n");
}
if (info->mastertype == VIR_DOMAIN_CONTROLLER_MASTER_USB) {
@@ -6327,7 +6333,6 @@ virDomainDeviceInfoParseXML(xmlNodePtr node,
while (cur != NULL) {
if (cur->type == XML_ELEMENT_NODE) {
if (alias == NULL &&
- !(flags & VIR_DOMAIN_DEF_PARSE_INACTIVE) &&
virXMLNodeNameEqual(cur, "alias")) {
alias = cur;
} else if (address == NULL &&
@@ -6349,8 +6354,11 @@ virDomainDeviceInfoParseXML(xmlNodePtr node,
cur = cur->next;
}
- if (alias)
- info->alias = virXMLPropString(alias, "name");
+ if (alias) {
+ if (!(flags & VIR_DOMAIN_DEF_PARSE_INACTIVE))
+ info->alias = virXMLPropString(alias, "name");
+ info->user = virXMLPropString(alias, "user");
+ }
if (master) {
info->mastertype = VIR_DOMAIN_CONTROLLER_MASTER_USB;
diff --git a/tests/genericxml2xmlindata/generic-user-alias.xml b/tests/genericxml2xmlindata/generic-user-alias.xml
new file mode 100644
index 000000000..025924442
--- /dev/null
+++ b/tests/genericxml2xmlindata/generic-user-alias.xml
@@ -0,0 +1,31 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-i686</emulator>
+ <disk type='block' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <alias user='myDisk0'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0'>
+ <alias user='myController0'/>
+ </controller>
+ <controller type='ide' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/genericxml2xmltest.c b/tests/genericxml2xmltest.c
index 0377a05e9..63a62f6a5 100644
--- a/tests/genericxml2xmltest.c
+++ b/tests/genericxml2xmltest.c
@@ -130,6 +130,8 @@ mymain(void)
DO_TEST_FULL("chardev-reconnect-invalid-mode", 0, false,
TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_PARSE);
+ DO_TEST("user-alias");
+
virObjectUnref(caps);
virObjectUnref(xmlopt);
--
2.13.5
7 years, 1 month
[libvirt] [PATCH] spec: Delay supported_platform check
by Jiri Denemark
Building RPM should only be allowed on a supported platform, but
unpacking the source and applying all patches can be done anywhere.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
libvirt.spec.in | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index a3bd77f8a4..48f193f0c4 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1091,10 +1091,6 @@ Libvirt plugin for NSS for translating domain names into IP addresses.
%prep
-%if ! %{supported_platform}
-echo "This RPM requires either Fedora >= 20 or RHEL >= 6"
-exit 1
-%endif
%setup -q
@@ -1135,6 +1131,11 @@ rm -f $PATCHLIST
rm -rf .git
%build
+%if ! %{supported_platform}
+echo "This RPM requires either Fedora >= 20 or RHEL >= 6"
+exit 1
+%endif
+
%if %{with_xen}
%define arg_xen --with-xen
%else
--
2.14.2
7 years, 1 month
[libvirt] [PATCH 0/3] Hyper-V driver fixes
by Ladi Prosek
Fixes a couple of minor issues in the Hyper-V driver found by code inspection.
Ladi Prosek (3):
hyperv: Fix hypervInitConnection error reporting
hyperv: Escape WQL queries
hyperv: Map Limit to max_memory and VirtualQuantity to cur_balloon
src/hyperv/hyperv_driver.c | 104 ++++++++++++++++++++++-----------------------
src/hyperv/hyperv_wmi.c | 3 +-
src/util/virbuffer.c | 18 ++++++++
src/util/virbuffer.h | 3 ++
4 files changed, 75 insertions(+), 53 deletions(-)
--
2.13.5
7 years, 1 month
[libvirt] [libvirt-jenkins-ci PATCH 00/18] Ansible all the things!
by Andrea Bolognani
See patch 18 for information about the purpose and scope of
these changes.
Andrea Bolognani (18):
ansible: Add initial support
ansible: Add initial support for building projects
ansible: Add libosinfo project
ansible: Add libvirt project
ansible: Add libvirt-cim project
ansible: Add libvirt-glib project
ansible: Add libvirt-go project
ansible: Add libvirt-go-xml project
ansible: Add libvirt-perl project
ansible: Add libvirt-python project
ansible: Add libvirt-sandbox project
ansible: Add libvirt-tck project
ansible: Add osinfo-db project
ansible: Add osinfo-db-tools project
ansible: Add virt-manager project
ansible: Add virt-viewer project
ansible: Install and configure Jenkins agent
ansible: Add documentation
ansible/.gitignore | 3 +
ansible/Makefile | 12 ++
ansible/README.markdown | 71 +++++++
ansible/ansible.cfg | 9 +
ansible/bootstrap.yml | 17 ++
ansible/group_vars/all/main.yml | 18 ++
ansible/host_vars/libvirt-centos-6/main.yml | 10 +
ansible/host_vars/libvirt-centos-6/vault.yml | 10 +
ansible/host_vars/libvirt-centos-7/main.yml | 19 ++
ansible/host_vars/libvirt-centos-7/vault.yml | 10 +
ansible/host_vars/libvirt-debian-8/main.yml | 17 ++
ansible/host_vars/libvirt-debian-8/vault.yml | 10 +
ansible/host_vars/libvirt-debian-9/main.yml | 19 ++
ansible/host_vars/libvirt-debian-9/vault.yml | 10 +
ansible/host_vars/libvirt-fedora-25/main.yml | 20 ++
ansible/host_vars/libvirt-fedora-25/vault.yml | 10 +
ansible/host_vars/libvirt-fedora-26/main.yml | 20 ++
ansible/host_vars/libvirt-fedora-26/vault.yml | 10 +
ansible/host_vars/libvirt-fedora-rawhide/main.yml | 20 ++
ansible/host_vars/libvirt-fedora-rawhide/vault.yml | 10 +
ansible/host_vars/libvirt-freebsd-11/main.yml | 25 +++
ansible/host_vars/libvirt-freebsd-11/vault.yml | 10 +
ansible/host_vars/libvirt-ubuntu-12/main.yml | 7 +
ansible/host_vars/libvirt-ubuntu-12/vault.yml | 8 +
ansible/host_vars/libvirt-ubuntu-14/main.yml | 14 ++
ansible/host_vars/libvirt-ubuntu-14/vault.yml | 8 +
ansible/host_vars/libvirt-ubuntu-16/main.yml | 18 ++
ansible/host_vars/libvirt-ubuntu-16/vault.yml | 8 +
ansible/inventory | 8 +
ansible/mappings/commands.yml | 77 +++++++
ansible/mappings/libraries.yml | 228 +++++++++++++++++++++
ansible/mappings/misc.yml | 13 ++
ansible/mappings/perl.yml | 112 ++++++++++
ansible/mappings/python.yml | 35 ++++
ansible/site.yml | 38 ++++
ansible/tasks/base.yml | 77 +++++++
ansible/tasks/bootstrap.yml | 22 ++
ansible/tasks/build.yml | 223 ++++++++++++++++++++
ansible/tasks/compat.yml | 16 ++
ansible/tasks/facts.yml | 14 ++
ansible/tasks/jenkins.yml | 59 ++++++
ansible/tasks/packages.yml | 22 ++
ansible/templates/jenkins.service.j2 | 14 ++
ansible/vars/base/CentOS-6.yml | 13 ++
ansible/vars/base/CentOS-7.yml | 13 ++
ansible/vars/base/Debian-8.yml | 14 ++
ansible/vars/base/Debian-9.yml | 14 ++
ansible/vars/base/Fedora-25.yml | 15 ++
ansible/vars/base/Fedora-26.yml | 15 ++
ansible/vars/base/Fedora-Rawhide.yml | 15 ++
ansible/vars/base/FreeBSD-11.yml | 11 +
ansible/vars/base/Ubuntu-12.yml | 13 ++
ansible/vars/base/Ubuntu-14.yml | 13 ++
ansible/vars/base/Ubuntu-16.yml | 14 ++
ansible/vars/jenkins/CentOS-6.yml | 3 +
ansible/vars/jenkins/CentOS-7.yml | 3 +
ansible/vars/jenkins/Debian-8.yml | 3 +
ansible/vars/jenkins/Debian-9.yml | 3 +
ansible/vars/jenkins/Fedora-25.yml | 3 +
ansible/vars/jenkins/Fedora-26.yml | 3 +
ansible/vars/jenkins/Fedora-Rawhide.yml | 3 +
ansible/vars/jenkins/FreeBSD-11.yml | 3 +
ansible/vars/jenkins/Ubuntu-12.yml | 3 +
ansible/vars/jenkins/Ubuntu-14.yml | 3 +
ansible/vars/jenkins/Ubuntu-16.yml | 3 +
ansible/vars/libosinfo/CentOS-7.yml | 19 ++
ansible/vars/libosinfo/Debian-8.yml | 19 ++
ansible/vars/libosinfo/Debian-9.yml | 19 ++
ansible/vars/libosinfo/Fedora-25.yml | 19 ++
ansible/vars/libosinfo/Fedora-26.yml | 19 ++
ansible/vars/libosinfo/Fedora-Rawhide.yml | 19 ++
ansible/vars/libosinfo/FreeBSD-11.yml | 19 ++
ansible/vars/libosinfo/Ubuntu-14.yml | 19 ++
ansible/vars/libosinfo/Ubuntu-16.yml | 19 ++
ansible/vars/libvirt-cim/CentOS-6.yml | 11 +
ansible/vars/libvirt-cim/CentOS-7.yml | 11 +
ansible/vars/libvirt-cim/Fedora-25.yml | 11 +
ansible/vars/libvirt-cim/Fedora-26.yml | 11 +
ansible/vars/libvirt-cim/Fedora-Rawhide.yml | 11 +
ansible/vars/libvirt-glib/CentOS-7.yml | 16 ++
ansible/vars/libvirt-glib/Debian-8.yml | 16 ++
ansible/vars/libvirt-glib/Debian-9.yml | 16 ++
ansible/vars/libvirt-glib/Fedora-25.yml | 16 ++
ansible/vars/libvirt-glib/Fedora-26.yml | 16 ++
ansible/vars/libvirt-glib/Fedora-Rawhide.yml | 16 ++
ansible/vars/libvirt-glib/FreeBSD-11.yml | 16 ++
ansible/vars/libvirt-glib/Ubuntu-16.yml | 16 ++
ansible/vars/libvirt-go-xml/CentOS-7.yml | 3 +
ansible/vars/libvirt-go-xml/Debian-8.yml | 3 +
ansible/vars/libvirt-go-xml/Debian-9.yml | 3 +
ansible/vars/libvirt-go-xml/Fedora-25.yml | 3 +
ansible/vars/libvirt-go-xml/Fedora-26.yml | 3 +
ansible/vars/libvirt-go-xml/Fedora-Rawhide.yml | 3 +
ansible/vars/libvirt-go-xml/FreeBSD-11.yml | 3 +
ansible/vars/libvirt-go-xml/Ubuntu-16.yml | 3 +
ansible/vars/libvirt-go/CentOS-7.yml | 7 +
ansible/vars/libvirt-go/Debian-8.yml | 7 +
ansible/vars/libvirt-go/Debian-9.yml | 7 +
ansible/vars/libvirt-go/Fedora-25.yml | 7 +
ansible/vars/libvirt-go/Fedora-26.yml | 7 +
ansible/vars/libvirt-go/Fedora-Rawhide.yml | 7 +
ansible/vars/libvirt-go/FreeBSD-11.yml | 6 +
ansible/vars/libvirt-go/Ubuntu-16.yml | 7 +
ansible/vars/libvirt-perl/CentOS-6.yml | 7 +
ansible/vars/libvirt-perl/CentOS-7.yml | 8 +
ansible/vars/libvirt-perl/Debian-8.yml | 7 +
ansible/vars/libvirt-perl/Debian-9.yml | 7 +
ansible/vars/libvirt-perl/Fedora-25.yml | 8 +
ansible/vars/libvirt-perl/Fedora-26.yml | 8 +
ansible/vars/libvirt-perl/Fedora-Rawhide.yml | 8 +
ansible/vars/libvirt-perl/FreeBSD-11.yml | 8 +
ansible/vars/libvirt-perl/Ubuntu-14.yml | 6 +
ansible/vars/libvirt-perl/Ubuntu-16.yml | 7 +
ansible/vars/libvirt-python/CentOS-6.yml | 8 +
ansible/vars/libvirt-python/CentOS-7.yml | 8 +
ansible/vars/libvirt-python/Debian-8.yml | 8 +
ansible/vars/libvirt-python/Debian-9.yml | 8 +
ansible/vars/libvirt-python/Fedora-25.yml | 11 +
ansible/vars/libvirt-python/Fedora-26.yml | 11 +
ansible/vars/libvirt-python/Fedora-Rawhide.yml | 11 +
ansible/vars/libvirt-python/FreeBSD-11.yml | 7 +
ansible/vars/libvirt-python/Ubuntu-14.yml | 8 +
ansible/vars/libvirt-python/Ubuntu-16.yml | 8 +
ansible/vars/libvirt-sandbox/CentOS-7.yml | 25 +++
ansible/vars/libvirt-sandbox/Debian-9.yml | 22 ++
ansible/vars/libvirt-sandbox/Fedora-25.yml | 26 +++
ansible/vars/libvirt-sandbox/Fedora-26.yml | 26 +++
ansible/vars/libvirt-sandbox/Fedora-Rawhide.yml | 26 +++
ansible/vars/libvirt-sandbox/Ubuntu-16.yml | 22 ++
ansible/vars/libvirt-tck/Debian-8.yml | 22 ++
ansible/vars/libvirt-tck/Debian-9.yml | 22 ++
ansible/vars/libvirt-tck/Fedora-25.yml | 22 ++
ansible/vars/libvirt-tck/Fedora-26.yml | 22 ++
ansible/vars/libvirt-tck/Fedora-Rawhide.yml | 22 ++
ansible/vars/libvirt-tck/FreeBSD-11.yml | 20 ++
ansible/vars/libvirt-tck/Ubuntu-14.yml | 21 ++
ansible/vars/libvirt-tck/Ubuntu-16.yml | 22 ++
ansible/vars/libvirt/CentOS-6.yml | 119 +++++++++++
ansible/vars/libvirt/CentOS-7.yml | 121 +++++++++++
ansible/vars/libvirt/Debian-8.yml | 124 +++++++++++
ansible/vars/libvirt/Debian-9.yml | 126 ++++++++++++
ansible/vars/libvirt/Fedora-25.yml | 125 +++++++++++
ansible/vars/libvirt/Fedora-26.yml | 124 +++++++++++
ansible/vars/libvirt/Fedora-Rawhide.yml | 148 +++++++++++++
ansible/vars/libvirt/FreeBSD-11.yml | 98 +++++++++
ansible/vars/libvirt/Ubuntu-12.yml | 122 +++++++++++
ansible/vars/libvirt/Ubuntu-14.yml | 125 +++++++++++
ansible/vars/libvirt/Ubuntu-16.yml | 128 ++++++++++++
ansible/vars/osinfo-db-tools/CentOS-7.yml | 8 +
ansible/vars/osinfo-db-tools/Debian-8.yml | 8 +
ansible/vars/osinfo-db-tools/Debian-9.yml | 8 +
ansible/vars/osinfo-db-tools/Fedora-25.yml | 8 +
ansible/vars/osinfo-db-tools/Fedora-26.yml | 8 +
ansible/vars/osinfo-db-tools/Fedora-Rawhide.yml | 8 +
ansible/vars/osinfo-db-tools/FreeBSD-11.yml | 8 +
ansible/vars/osinfo-db-tools/Ubuntu-14.yml | 8 +
ansible/vars/osinfo-db-tools/Ubuntu-16.yml | 8 +
ansible/vars/osinfo-db/CentOS-7.yml | 7 +
ansible/vars/osinfo-db/Debian-9.yml | 7 +
ansible/vars/osinfo-db/Fedora-25.yml | 7 +
ansible/vars/osinfo-db/Fedora-26.yml | 7 +
ansible/vars/osinfo-db/Fedora-Rawhide.yml | 7 +
ansible/vars/osinfo-db/FreeBSD-11.yml | 7 +
ansible/vars/virt-manager/CentOS-7.yml | 12 ++
ansible/vars/virt-manager/Debian-8.yml | 12 ++
ansible/vars/virt-manager/Debian-9.yml | 12 ++
ansible/vars/virt-manager/Fedora-25.yml | 12 ++
ansible/vars/virt-manager/Fedora-26.yml | 12 ++
ansible/vars/virt-manager/Fedora-Rawhide.yml | 12 ++
ansible/vars/virt-manager/FreeBSD-11.yml | 11 +
ansible/vars/virt-manager/Ubuntu-14.yml | 12 ++
ansible/vars/virt-manager/Ubuntu-16.yml | 12 ++
ansible/vars/virt-viewer/CentOS-7.yml | 20 ++
ansible/vars/virt-viewer/Debian-8.yml | 18 ++
ansible/vars/virt-viewer/Debian-9.yml | 20 ++
ansible/vars/virt-viewer/Fedora-25.yml | 20 ++
ansible/vars/virt-viewer/Fedora-26.yml | 20 ++
ansible/vars/virt-viewer/Fedora-Rawhide.yml | 20 ++
ansible/vars/virt-viewer/FreeBSD-11.yml | 18 ++
ansible/vars/virt-viewer/Ubuntu-14.yml | 16 ++
ansible/vars/virt-viewer/Ubuntu-16.yml | 18 ++
181 files changed, 4230 insertions(+)
create mode 100644 ansible/.gitignore
create mode 100644 ansible/Makefile
create mode 100644 ansible/README.markdown
create mode 100644 ansible/ansible.cfg
create mode 100644 ansible/bootstrap.yml
create mode 100644 ansible/group_vars/all/main.yml
create mode 100644 ansible/host_vars/libvirt-centos-6/main.yml
create mode 100644 ansible/host_vars/libvirt-centos-6/vault.yml
create mode 100644 ansible/host_vars/libvirt-centos-7/main.yml
create mode 100644 ansible/host_vars/libvirt-centos-7/vault.yml
create mode 100644 ansible/host_vars/libvirt-debian-8/main.yml
create mode 100644 ansible/host_vars/libvirt-debian-8/vault.yml
create mode 100644 ansible/host_vars/libvirt-debian-9/main.yml
create mode 100644 ansible/host_vars/libvirt-debian-9/vault.yml
create mode 100644 ansible/host_vars/libvirt-fedora-25/main.yml
create mode 100644 ansible/host_vars/libvirt-fedora-25/vault.yml
create mode 100644 ansible/host_vars/libvirt-fedora-26/main.yml
create mode 100644 ansible/host_vars/libvirt-fedora-26/vault.yml
create mode 100644 ansible/host_vars/libvirt-fedora-rawhide/main.yml
create mode 100644 ansible/host_vars/libvirt-fedora-rawhide/vault.yml
create mode 100644 ansible/host_vars/libvirt-freebsd-11/main.yml
create mode 100644 ansible/host_vars/libvirt-freebsd-11/vault.yml
create mode 100644 ansible/host_vars/libvirt-ubuntu-12/main.yml
create mode 100644 ansible/host_vars/libvirt-ubuntu-12/vault.yml
create mode 100644 ansible/host_vars/libvirt-ubuntu-14/main.yml
create mode 100644 ansible/host_vars/libvirt-ubuntu-14/vault.yml
create mode 100644 ansible/host_vars/libvirt-ubuntu-16/main.yml
create mode 100644 ansible/host_vars/libvirt-ubuntu-16/vault.yml
create mode 100644 ansible/inventory
create mode 100644 ansible/mappings/commands.yml
create mode 100644 ansible/mappings/libraries.yml
create mode 100644 ansible/mappings/misc.yml
create mode 100644 ansible/mappings/perl.yml
create mode 100644 ansible/mappings/python.yml
create mode 100644 ansible/site.yml
create mode 100644 ansible/tasks/base.yml
create mode 100644 ansible/tasks/bootstrap.yml
create mode 100644 ansible/tasks/build.yml
create mode 100644 ansible/tasks/compat.yml
create mode 100644 ansible/tasks/facts.yml
create mode 100644 ansible/tasks/jenkins.yml
create mode 100644 ansible/tasks/packages.yml
create mode 100644 ansible/templates/jenkins.service.j2
create mode 100644 ansible/vars/base/CentOS-6.yml
create mode 100644 ansible/vars/base/CentOS-7.yml
create mode 100644 ansible/vars/base/Debian-8.yml
create mode 100644 ansible/vars/base/Debian-9.yml
create mode 100644 ansible/vars/base/Fedora-25.yml
create mode 100644 ansible/vars/base/Fedora-26.yml
create mode 100644 ansible/vars/base/Fedora-Rawhide.yml
create mode 100644 ansible/vars/base/FreeBSD-11.yml
create mode 100644 ansible/vars/base/Ubuntu-12.yml
create mode 100644 ansible/vars/base/Ubuntu-14.yml
create mode 100644 ansible/vars/base/Ubuntu-16.yml
create mode 100644 ansible/vars/jenkins/CentOS-6.yml
create mode 100644 ansible/vars/jenkins/CentOS-7.yml
create mode 100644 ansible/vars/jenkins/Debian-8.yml
create mode 100644 ansible/vars/jenkins/Debian-9.yml
create mode 100644 ansible/vars/jenkins/Fedora-25.yml
create mode 100644 ansible/vars/jenkins/Fedora-26.yml
create mode 100644 ansible/vars/jenkins/Fedora-Rawhide.yml
create mode 100644 ansible/vars/jenkins/FreeBSD-11.yml
create mode 100644 ansible/vars/jenkins/Ubuntu-12.yml
create mode 100644 ansible/vars/jenkins/Ubuntu-14.yml
create mode 100644 ansible/vars/jenkins/Ubuntu-16.yml
create mode 100644 ansible/vars/libosinfo/CentOS-7.yml
create mode 100644 ansible/vars/libosinfo/Debian-8.yml
create mode 100644 ansible/vars/libosinfo/Debian-9.yml
create mode 100644 ansible/vars/libosinfo/Fedora-25.yml
create mode 100644 ansible/vars/libosinfo/Fedora-26.yml
create mode 100644 ansible/vars/libosinfo/Fedora-Rawhide.yml
create mode 100644 ansible/vars/libosinfo/FreeBSD-11.yml
create mode 100644 ansible/vars/libosinfo/Ubuntu-14.yml
create mode 100644 ansible/vars/libosinfo/Ubuntu-16.yml
create mode 100644 ansible/vars/libvirt-cim/CentOS-6.yml
create mode 100644 ansible/vars/libvirt-cim/CentOS-7.yml
create mode 100644 ansible/vars/libvirt-cim/Fedora-25.yml
create mode 100644 ansible/vars/libvirt-cim/Fedora-26.yml
create mode 100644 ansible/vars/libvirt-cim/Fedora-Rawhide.yml
create mode 100644 ansible/vars/libvirt-glib/CentOS-7.yml
create mode 100644 ansible/vars/libvirt-glib/Debian-8.yml
create mode 100644 ansible/vars/libvirt-glib/Debian-9.yml
create mode 100644 ansible/vars/libvirt-glib/Fedora-25.yml
create mode 100644 ansible/vars/libvirt-glib/Fedora-26.yml
create mode 100644 ansible/vars/libvirt-glib/Fedora-Rawhide.yml
create mode 100644 ansible/vars/libvirt-glib/FreeBSD-11.yml
create mode 100644 ansible/vars/libvirt-glib/Ubuntu-16.yml
create mode 100644 ansible/vars/libvirt-go-xml/CentOS-7.yml
create mode 100644 ansible/vars/libvirt-go-xml/Debian-8.yml
create mode 100644 ansible/vars/libvirt-go-xml/Debian-9.yml
create mode 100644 ansible/vars/libvirt-go-xml/Fedora-25.yml
create mode 100644 ansible/vars/libvirt-go-xml/Fedora-26.yml
create mode 100644 ansible/vars/libvirt-go-xml/Fedora-Rawhide.yml
create mode 100644 ansible/vars/libvirt-go-xml/FreeBSD-11.yml
create mode 100644 ansible/vars/libvirt-go-xml/Ubuntu-16.yml
create mode 100644 ansible/vars/libvirt-go/CentOS-7.yml
create mode 100644 ansible/vars/libvirt-go/Debian-8.yml
create mode 100644 ansible/vars/libvirt-go/Debian-9.yml
create mode 100644 ansible/vars/libvirt-go/Fedora-25.yml
create mode 100644 ansible/vars/libvirt-go/Fedora-26.yml
create mode 100644 ansible/vars/libvirt-go/Fedora-Rawhide.yml
create mode 100644 ansible/vars/libvirt-go/FreeBSD-11.yml
create mode 100644 ansible/vars/libvirt-go/Ubuntu-16.yml
create mode 100644 ansible/vars/libvirt-perl/CentOS-6.yml
create mode 100644 ansible/vars/libvirt-perl/CentOS-7.yml
create mode 100644 ansible/vars/libvirt-perl/Debian-8.yml
create mode 100644 ansible/vars/libvirt-perl/Debian-9.yml
create mode 100644 ansible/vars/libvirt-perl/Fedora-25.yml
create mode 100644 ansible/vars/libvirt-perl/Fedora-26.yml
create mode 100644 ansible/vars/libvirt-perl/Fedora-Rawhide.yml
create mode 100644 ansible/vars/libvirt-perl/FreeBSD-11.yml
create mode 100644 ansible/vars/libvirt-perl/Ubuntu-14.yml
create mode 100644 ansible/vars/libvirt-perl/Ubuntu-16.yml
create mode 100644 ansible/vars/libvirt-python/CentOS-6.yml
create mode 100644 ansible/vars/libvirt-python/CentOS-7.yml
create mode 100644 ansible/vars/libvirt-python/Debian-8.yml
create mode 100644 ansible/vars/libvirt-python/Debian-9.yml
create mode 100644 ansible/vars/libvirt-python/Fedora-25.yml
create mode 100644 ansible/vars/libvirt-python/Fedora-26.yml
create mode 100644 ansible/vars/libvirt-python/Fedora-Rawhide.yml
create mode 100644 ansible/vars/libvirt-python/FreeBSD-11.yml
create mode 100644 ansible/vars/libvirt-python/Ubuntu-14.yml
create mode 100644 ansible/vars/libvirt-python/Ubuntu-16.yml
create mode 100644 ansible/vars/libvirt-sandbox/CentOS-7.yml
create mode 100644 ansible/vars/libvirt-sandbox/Debian-9.yml
create mode 100644 ansible/vars/libvirt-sandbox/Fedora-25.yml
create mode 100644 ansible/vars/libvirt-sandbox/Fedora-26.yml
create mode 100644 ansible/vars/libvirt-sandbox/Fedora-Rawhide.yml
create mode 100644 ansible/vars/libvirt-sandbox/Ubuntu-16.yml
create mode 100644 ansible/vars/libvirt-tck/Debian-8.yml
create mode 100644 ansible/vars/libvirt-tck/Debian-9.yml
create mode 100644 ansible/vars/libvirt-tck/Fedora-25.yml
create mode 100644 ansible/vars/libvirt-tck/Fedora-26.yml
create mode 100644 ansible/vars/libvirt-tck/Fedora-Rawhide.yml
create mode 100644 ansible/vars/libvirt-tck/FreeBSD-11.yml
create mode 100644 ansible/vars/libvirt-tck/Ubuntu-14.yml
create mode 100644 ansible/vars/libvirt-tck/Ubuntu-16.yml
create mode 100644 ansible/vars/libvirt/CentOS-6.yml
create mode 100644 ansible/vars/libvirt/CentOS-7.yml
create mode 100644 ansible/vars/libvirt/Debian-8.yml
create mode 100644 ansible/vars/libvirt/Debian-9.yml
create mode 100644 ansible/vars/libvirt/Fedora-25.yml
create mode 100644 ansible/vars/libvirt/Fedora-26.yml
create mode 100644 ansible/vars/libvirt/Fedora-Rawhide.yml
create mode 100644 ansible/vars/libvirt/FreeBSD-11.yml
create mode 100644 ansible/vars/libvirt/Ubuntu-12.yml
create mode 100644 ansible/vars/libvirt/Ubuntu-14.yml
create mode 100644 ansible/vars/libvirt/Ubuntu-16.yml
create mode 100644 ansible/vars/osinfo-db-tools/CentOS-7.yml
create mode 100644 ansible/vars/osinfo-db-tools/Debian-8.yml
create mode 100644 ansible/vars/osinfo-db-tools/Debian-9.yml
create mode 100644 ansible/vars/osinfo-db-tools/Fedora-25.yml
create mode 100644 ansible/vars/osinfo-db-tools/Fedora-26.yml
create mode 100644 ansible/vars/osinfo-db-tools/Fedora-Rawhide.yml
create mode 100644 ansible/vars/osinfo-db-tools/FreeBSD-11.yml
create mode 100644 ansible/vars/osinfo-db-tools/Ubuntu-14.yml
create mode 100644 ansible/vars/osinfo-db-tools/Ubuntu-16.yml
create mode 100644 ansible/vars/osinfo-db/CentOS-7.yml
create mode 100644 ansible/vars/osinfo-db/Debian-9.yml
create mode 100644 ansible/vars/osinfo-db/Fedora-25.yml
create mode 100644 ansible/vars/osinfo-db/Fedora-26.yml
create mode 100644 ansible/vars/osinfo-db/Fedora-Rawhide.yml
create mode 100644 ansible/vars/osinfo-db/FreeBSD-11.yml
create mode 100644 ansible/vars/virt-manager/CentOS-7.yml
create mode 100644 ansible/vars/virt-manager/Debian-8.yml
create mode 100644 ansible/vars/virt-manager/Debian-9.yml
create mode 100644 ansible/vars/virt-manager/Fedora-25.yml
create mode 100644 ansible/vars/virt-manager/Fedora-26.yml
create mode 100644 ansible/vars/virt-manager/Fedora-Rawhide.yml
create mode 100644 ansible/vars/virt-manager/FreeBSD-11.yml
create mode 100644 ansible/vars/virt-manager/Ubuntu-14.yml
create mode 100644 ansible/vars/virt-manager/Ubuntu-16.yml
create mode 100644 ansible/vars/virt-viewer/CentOS-7.yml
create mode 100644 ansible/vars/virt-viewer/Debian-8.yml
create mode 100644 ansible/vars/virt-viewer/Debian-9.yml
create mode 100644 ansible/vars/virt-viewer/Fedora-25.yml
create mode 100644 ansible/vars/virt-viewer/Fedora-26.yml
create mode 100644 ansible/vars/virt-viewer/Fedora-Rawhide.yml
create mode 100644 ansible/vars/virt-viewer/FreeBSD-11.yml
create mode 100644 ansible/vars/virt-viewer/Ubuntu-14.yml
create mode 100644 ansible/vars/virt-viewer/Ubuntu-16.yml
--
2.13.6
7 years, 1 month
[libvirt] [PATCH] docs, rng: Allow a pool name to be line domain name
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1475250
It's possible to define and start a pool with a '.' in the
name; however, when trying to add a volume to a domain using
the storage pool source with a name with a '.' in the name,
the domain RNG validation fails because RNG uses 'genericName'
which does not allow a '.' in the name. Pool definition has
no similar call to virXMLValidateAgainstSchema. Pool name
validation occurs in storagePoolDefineXML and only calls
virXMLCheckIllegalChars using the same parameter "\n" as
qemuDomainDefineXMLFlags would check after the RNG check
could be succesful.
So in order to resolve this, create a poolName definition
in the RNG and allow the pool name and the volume source
pool name to use that definition.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
docs/schemas/domaincommon.rng | 2 +-
docs/schemas/storagecommon.rng | 8 ++++++++
docs/schemas/storagepool.rng | 4 ++--
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 76852abb3..2cc8dcecf 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1669,7 +1669,7 @@
<optional>
<element name="source">
<attribute name="pool">
- <ref name="genericName"/>
+ <ref name="poolName"/>
</attribute>
<attribute name="volume">
<ref name="volName"/>
diff --git a/docs/schemas/storagecommon.rng b/docs/schemas/storagecommon.rng
index 717f3c603..49578312e 100644
--- a/docs/schemas/storagecommon.rng
+++ b/docs/schemas/storagecommon.rng
@@ -6,6 +6,14 @@
<!-- This schema is not designed for standalone use; another file
must include both this file and basictypes.rng -->
+ <define name="poolName">
+ <data type="string">
+ <!-- Use literal newline instead of \n for bug in libxml2 2.7.6 -->
+ <param name="pattern">[^
+]+</param>
+ </data>
+ </define>
+
<define name='encryption'>
<element name='encryption'>
<attribute name='format'>
diff --git a/docs/schemas/storagepool.rng b/docs/schemas/storagepool.rng
index f0117bd69..52b2044be 100644
--- a/docs/schemas/storagepool.rng
+++ b/docs/schemas/storagepool.rng
@@ -209,7 +209,7 @@
<interleave>
<optional>
<element name='name'>
- <ref name='genericName'/>
+ <ref name='poolName'/>
</element>
</optional>
<optional>
@@ -223,7 +223,7 @@
<define name='commonmetadata'>
<interleave>
<element name='name'>
- <ref name='genericName'/>
+ <ref name='poolName'/>
</element>
<optional>
<element name='uuid'>
--
2.13.5
7 years, 1 month
[libvirt] [PATCH] docs: Document the real behaviour of suspend-to-{mem, disk}
by Martin Kletzander
We get a question every now and then about why hibernation works when
suspend-to-disk is disabled and similar. Let's hope that, by documenting the
obvious more blatantly, people will get more informed.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
docs/formatdomain.html.in | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 5bdcb569c4c0..5dcf2fedb01c 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1664,7 +1664,11 @@
<dd>These elements enable ('yes') or disable ('no') BIOS support
for S3 (suspend-to-mem) and S4 (suspend-to-disk) ACPI sleep
states. If nothing is specified, then the hypervisor will be
- left with its default value.</dd>
+ left with its default value.<br/>
+ Note: This setting cannot prevent the guest OS from performing
+ a suspend as the guest OS itself can choose to circumvent the
+ unavailability of the sleep states (e.g. S4 by turning off
+ completely).</dd>
</dl>
<h3><a id="elementsFeatures">Hypervisor features</a></h3>
--
2.14.2
7 years, 1 month
[libvirt] [PATCH go-xml] extend chardev source to include networking
by Jeroen Simonetti
This will extend the DomainChardevSource to also support
networked backends.
Signed-off-by: Jeroen Simonetti <jeroen(a)simonetti.nl>
---
domain.go | 26 +++++++++++++++++---------
domain_test.go | 20 ++++++++++++++++++++
2 files changed, 37 insertions(+), 9 deletions(-)
diff --git a/domain.go b/domain.go
index 8c2cc1b..8392322 100644
--- a/domain.go
+++ b/domain.go
@@ -255,9 +255,12 @@ type DomainInterface struct {
}
type DomainChardevSource struct {
- Mode string `xml:"mode,attr,omitempty"`
- Path string `xml:"path,attr"`
- Append string `xml:"append,attr,omitempty"`
+ Mode string `xml:"mode,attr,omitempty"`
+ Path string `xml:"path,attr,omitempty"`
+ Append string `xml:"append,attr,omitempty"`
+ Host string `xml:"host,attr,omitempty"`
+ Service string `xml:"service,attr,omitempty"`
+ TLS string `xml:"tls,attr,omitempty"`
}
type DomainChardevTarget struct {
@@ -309,12 +312,17 @@ type DomainConsole struct {
}
type DomainSerial struct {
- XMLName xml.Name `xml:"serial"`
- Type string `xml:"type,attr"`
- Source *DomainChardevSource `xml:"source"`
- Target *DomainSerialTarget `xml:"target"`
- Alias *DomainAlias `xml:"alias"`
- Address *DomainAddress `xml:"address"`
+ XMLName xml.Name `xml:"serial"`
+ Type string `xml:"type,attr"`
+ Source *DomainChardevSource `xml:"source"`
+ Protocol *DomainSerialProtocol `xml:"protocol"`
+ Target *DomainSerialTarget `xml:"target"`
+ Alias *DomainAlias `xml:"alias"`
+ Address *DomainAddress `xml:"address"`
+}
+
+type DomainSerialProtocol struct {
+ Type string `xml:"type,attr"`
}
type DomainChannel struct {
diff --git a/domain_test.go b/domain_test.go
index 4fe6bfe..a7d8348 100644
--- a/domain_test.go
+++ b/domain_test.go
@@ -322,6 +322,21 @@ var domainTestData = []struct {
Port: &serialPort,
},
},
+ DomainSerial{
+ Type: "tcp",
+ Source: &DomainChardevSource{
+ Mode: "bind",
+ Host: "127.0.0.1",
+ Service: "1234",
+ TLS: "yes",
+ },
+ Protocol: &DomainSerialProtocol{
+ Type: "telnet",
+ },
+ Target: &DomainSerialTarget{
+ Port: &serialPort,
+ },
+ },
},
Channels: []DomainChannel{
DomainChannel{
@@ -385,6 +400,11 @@ var domainTestData = []struct {
` <source path="/tmp/serial.log" append="off"></source>`,
` <target port="0"></target>`,
` </serial>`,
+ ` <serial type="tcp">`,
+ ` <source mode="bind" host="127.0.0.1" service="1234" tls="yes"></source>`,
+ ` <protocol type="telnet"></protocol>`,
+ ` <target port="0"></target>`,
+ ` </serial>`,
` <console type="pty">`,
` <target type="virtio" port="0"></target>`,
` </console>`,
--
2.14.2
7 years, 1 month
[libvirt] [PATCH v2] qemu: add the print of page size in cmd domjobinfo
by Chao Fan
The command "info migrate" of qemu outputs the dirty-pages-rate during
migration, but page size is different in different architectures. So
page size should be output to calculate dirty pages in bytes.
Page size is already implemented with commit
030ce1f8612215fcbe9d353dfeaeb2937f8e3f94 in qemu.
Now Implement the counter-part in libvirt.
Signed-off-by: Chao Fan <fanc.fnst(a)cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian(a)cn.fujitsu.com>
---
v1 -> v2:
Follow the suggestion of John Ferlan:
1. Drop the fix for unrelated coding style problem.
2. Fix typo.
3. Improve a judgment logic when failing to get page size.
---
include/libvirt/libvirt-domain.h | 7 +++++++
src/qemu/qemu_domain.c | 6 ++++++
src/qemu/qemu_migration_cookie.c | 7 +++++++
src/qemu/qemu_monitor.h | 1 +
src/qemu/qemu_monitor_json.c | 2 ++
tools/virsh-domain.c | 8 ++++++++
6 files changed, 31 insertions(+)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 030a62c43..1f4ddcf66 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -3336,6 +3336,13 @@ typedef enum {
# define VIR_DOMAIN_JOB_MEMORY_DIRTY_RATE "memory_dirty_rate"
/**
+ * VIR_DOMAIN_JOB_MEMORY_PAGE_SIZE:
+ *
+ * virDomainGetJobStats field: page size of the memory in this domain
+ */
+# define VIR_DOMAIN_JOB_MEMORY_PAGE_SIZE "page_size"
+
+/**
* VIR_DOMAIN_JOB_MEMORY_ITERATION:
*
* virDomainGetJobStats field: current iteration over domain's memory
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index cb371f1e8..ce342b670 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -570,6 +570,12 @@ qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo,
stats->ram_iteration) < 0)
goto error;
+ if (stats->ram_page_size && (!(stats->ram_pag_size > 0) ||
+ virTypedParamsAddULLong(&par, &npar, &maxpar,
+ VIR_DOMAIN_JOB_MEMORY_PAGE_SIZE,
+ stats->ram_page_size) < 0))
+ goto error;
+
if (virTypedParamsAddULLong(&par, &npar, &maxpar,
VIR_DOMAIN_JOB_DISK_TOTAL,
stats->disk_total +
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index eef40a6cd..bc6a8dc55 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -654,6 +654,10 @@ qemuMigrationCookieStatisticsXMLFormat(virBufferPtr buf,
stats->ram_iteration);
virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n",
+ VIR_DOMAIN_JOB_MEMORY_PAGE_SIZE,
+ stats->ram_page_size);
+
+ virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n",
VIR_DOMAIN_JOB_DISK_TOTAL,
stats->disk_total);
virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n",
@@ -1014,6 +1018,9 @@ qemuMigrationCookieStatisticsXMLParse(xmlXPathContextPtr ctxt)
virXPathULongLong("string(./" VIR_DOMAIN_JOB_MEMORY_ITERATION "[1])",
ctxt, &stats->ram_iteration);
+ virXPathULongLong("string(./" VIR_DOMAIN_JOB_MEMORY_PAGE_SIZE "[1])",
+ ctxt, &stats->ram_page_size);
+
virXPathULongLong("string(./" VIR_DOMAIN_JOB_DISK_TOTAL "[1])",
ctxt, &stats->disk_total);
virXPathULongLong("string(./" VIR_DOMAIN_JOB_DISK_PROCESSED "[1])",
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 6414d2483..1e3322433 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -677,6 +677,7 @@ struct _qemuMonitorMigrationStats {
unsigned long long ram_normal;
unsigned long long ram_normal_bytes;
unsigned long long ram_dirty_rate;
+ unsigned long long ram_page_size;
unsigned long long ram_iteration;
unsigned long long disk_transferred;
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 63b855920..625cbc134 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -2892,6 +2892,8 @@ qemuMonitorJSONGetMigrationStatsReply(virJSONValuePtr reply,
&stats->ram_normal_bytes));
ignore_value(virJSONValueObjectGetNumberUlong(ram, "dirty-pages-rate",
&stats->ram_dirty_rate));
+ ignore_value(virJSONValueObjectGetNumberUlong(ram, "page-size",
+ &stats->ram_page_size));
ignore_value(virJSONValueObjectGetNumberUlong(ram, "dirty-sync-count",
&stats->ram_iteration));
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index a3f3b7c7b..a50713d6e 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -6021,6 +6021,14 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd)
}
if ((rc = virTypedParamsGetULLong(params, nparams,
+ VIR_DOMAIN_JOB_MEMORY_PAGE_SIZE,
+ &value)) < 0) {
+ goto save_error;
+ } else if (rc) {
+ vshPrint(ctl, "%-17s %-12llu bytes\n", _("Page size:"), value);
+ }
+
+ if ((rc = virTypedParamsGetULLong(params, nparams,
VIR_DOMAIN_JOB_MEMORY_ITERATION,
&value)) < 0) {
goto save_error;
--
2.13.5
7 years, 1 month
[libvirt] [PATCH 0/2] Fix another possible memory leak in nwfilter
by John Ferlan
Oh lucky me - why am I stuck in nwfilter land....
The first patch just cleans up the code and the second one resolves the
memory leak problem as well as a general error path problem.
Coverity noted that the error path wasn't checked - this is because
other recent changes in the module caused Coverity to decide to rethink
about this one noticing the lack of an error check. Of course upon more
visual inspection, the memory leak was obvious too.
John Ferlan (2):
nwfilter: Clean up virNWFilterDetermineMissingVarsRec returns
nwfilter: Fix memory leak and error path
src/nwfilter/nwfilter_gentech_driver.c | 30 +++++++++++++-----------------
1 file changed, 13 insertions(+), 17 deletions(-)
--
2.13.5
7 years, 1 month