[libvirt] [PATCH] virFileIsSharedFSType: Check for fuse.glusterfs too
by Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1632711
GlusterFS is typically safe when it comes to migration. It's a
network FS after all. However, it can be mounted via FUSE driver
they provide. If that is the case we fail to identify it and
think migration is not safe and require VIR_MIGRATE_UNSAFE flag.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virfile.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 75 insertions(+), 2 deletions(-)
diff --git a/src/util/virfile.c b/src/util/virfile.c
index f8ae07fe4a..ccffa063a6 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -3458,6 +3458,75 @@ int virFilePrintf(FILE *fp, const char *msg, ...)
# ifndef HUGETLBFS_MAGIC
# define HUGETLBFS_MAGIC 0x958458f6
# endif
+# ifndef FUSE_SUPER_MAGIC
+# define FUSE_SUPER_MAGIC 0x65735546
+# endif
+
+# define PROC_MOUNTS "/proc/mounts"
+
+static int
+virFileIsShareFixFUSE(const char *path,
+ long *f_type)
+{
+ char *dirpath = NULL;
+ const char **mounts = NULL;
+ size_t nmounts = 0;
+ size_t i;
+ char *p;
+ FILE *f = NULL;
+ struct mntent mb;
+ char mntbuf[1024];
+ bool found = false;
+ int ret = -1;
+
+ if (VIR_STRDUP(dirpath, path) < 0)
+ return -1;
+
+ if (!(f = setmntent(PROC_MOUNTS, "r"))) {
+ virReportSystemError(errno,
+ _("Unable to open %s"),
+ PROC_MOUNTS);
+ goto cleanup;
+ }
+
+ while (getmntent_r(f, &mb, mntbuf, sizeof(mntbuf))) {
+ if (STRNEQ("fuse.glusterfs", mb.mnt_type))
+ continue;
+
+ if (VIR_APPEND_ELEMENT_COPY(mounts, nmounts, mb.mnt_dir) < 0)
+ goto cleanup;
+ }
+
+ do {
+ if ((p = strrchr(dirpath, '/')) == NULL) {
+ virReportSystemError(EINVAL,
+ _("Invalid relative path '%s'"), path);
+ goto cleanup;
+ }
+
+ if (p == dirpath)
+ *(p+1) = '\0';
+ else
+ *p = '\0';
+
+ for (i = 0; i < nmounts; i++) {
+ if (STREQ(dirpath, mounts[i])) {
+ found = true;
+ VIR_DEBUG("Found gluster FUSE mountpoint=%s for path=%s. "
+ "Fixing shared FS type", mounts[i], path);
+ *f_type = GFS2_MAGIC;
+ }
+ }
+ } while (!found && p != dirpath);
+
+ ret = 0;
+ cleanup:
+ endmntent(f);
+ VIR_FREE(mounts);
+ VIR_FREE(dirpath);
+ return ret;
+}
+
int
virFileIsSharedFSType(const char *path,
@@ -3503,6 +3572,12 @@ virFileIsSharedFSType(const char *path,
return -1;
}
+ if (sb.f_type == FUSE_SUPER_MAGIC) {
+ VIR_DEBUG("Found FUSE mount for path=%s. Trying to fix it", path);
+ if (virFileIsShareFixFUSE(path, (long *) &sb.f_type) < 0)
+ return -1;
+ }
+
VIR_DEBUG("Check if path %s with FS magic %lld is shared",
path, (long long int)sb.f_type);
@@ -3594,8 +3669,6 @@ virFileGetDefaultHugepageSize(unsigned long long *size)
return 0;
}
-# define PROC_MOUNTS "/proc/mounts"
-
int
virFileFindHugeTLBFS(virHugeTLBFSPtr *ret_fs,
size_t *ret_nfs)
--
2.16.4
6 years, 1 month
[libvirt] [PATCH] tests: reintroduce tests for libxl's legacy nested setting
by Jim Fehlig
The preferred location for setting the nested CPU flag changed in
Xen 4.10 and is advertised via the LIBXL_HAVE_BUILDINFO_NESTED_HVM
define. Commit 95d19cd0 changed libxl to use the new preferred
location but unconditionally changed the tests, causing 'make check'
failures against Xen < 4.10 that do not contain the new location.
Commit e94415d5 fixed the failures by only running the tests when
LIBXL_HAVE_BUILDINFO_NESTED_HVM is defined. Since libvirt supports
several versions of Xen that use the old nested location, it is
prudent to test the flag is set correctly. This patch reintroduces
the tests for the legacy location of the nested setting.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
We could probably get by with one test for the old nested location,
in which case I'd drop vnuma-hvm-legacy-nest. Any opinions on that?
.../fullvirt-cpuid-legacy-nest.json | 60 ++++++
.../fullvirt-cpuid-legacy-nest.xml | 34 ++++
.../vnuma-hvm-legacy-nest.json | 178 ++++++++++++++++++
.../vnuma-hvm-legacy-nest.xml | 100 ++++++++++
tests/libxlxml2domconfigtest.c | 3 +
5 files changed, 375 insertions(+)
diff --git a/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.json b/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.json
new file mode 100644
index 0000000000..cdc8b9867d
--- /dev/null
+++ b/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.json
@@ -0,0 +1,60 @@
+{
+ "c_info": {
+ "type": "hvm",
+ "name": "XenGuest2",
+ "uuid": "c7a5fdb2-cdaf-9455-926a-d65c16db1809"
+ },
+ "b_info": {
+ "max_vcpus": 1,
+ "avail_vcpus": [
+ 0
+ ],
+ "max_memkb": 592896,
+ "target_memkb": 403456,
+ "shadow_memkb": 5656,
+ "cpuid": [
+ {
+ "leaf": 1,
+ "ecx": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0",
+ "edx": "xxxxxxxxxxxxxxxxxxxxxxxxxxx1xxxx"
+ }
+ ],
+ "sched_params": {
+ },
+ "type.hvm": {
+ "pae": "True",
+ "apic": "True",
+ "acpi": "True",
+ "nested_hvm": "False",
+ "nographic": "True",
+ "vnc": {
+ "enable": "False"
+ },
+ "sdl": {
+ "enable": "False"
+ },
+ "spice": {
+
+ },
+ "boot": "c",
+ "rdm": {
+
+ }
+ },
+ "arch_arm": {
+
+ }
+ },
+ "disks": [
+ {
+ "pdev_path": "/dev/HostVG/XenGuest2",
+ "vdev": "hda",
+ "backend": "phy",
+ "format": "raw",
+ "removable": 1,
+ "readwrite": 1
+ }
+ ],
+ "on_reboot": "restart",
+ "on_crash": "restart"
+}
diff --git a/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.xml b/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.xml
new file mode 100644
index 0000000000..4f06db0714
--- /dev/null
+++ b/tests/libxlxml2domconfigdata/fullvirt-cpuid-legacy-nest.xml
@@ -0,0 +1,34 @@
+<domain type='xen'>
+ <name>XenGuest2</name>
+ <uuid>c7a5fdb2-cdaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>592896</memory>
+ <currentMemory unit='KiB'>403456</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='xenfv'>hvm</type>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode='host-passthrough'>
+ <feature policy='forbid' name='pni'/>
+ <feature policy='forbid' name='vmx'/>
+ <feature policy='require' name='tsc'/>
+ </cpu>
+ <clock offset='variable' adjustment='0' basis='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <disk type='block' device='disk'>
+ <driver name='phy' type='raw'/>
+ <source dev='/dev/HostVG/XenGuest2'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ </devices>
+</domain>
diff --git a/tests/libxlxml2domconfigdata/vnuma-hvm-legacy-nest.json b/tests/libxlxml2domconfigdata/vnuma-hvm-legacy-nest.json
new file mode 100644
index 0000000000..3b2fc5f40f
--- /dev/null
+++ b/tests/libxlxml2domconfigdata/vnuma-hvm-legacy-nest.json
@@ -0,0 +1,178 @@
+{
+ "c_info": {
+ "type": "hvm",
+ "name": "test-hvm",
+ "uuid": "2147d599-9cc6-c0dc-92ab-4064b5446e9b"
+ },
+ "b_info": {
+ "max_vcpus": 6,
+ "avail_vcpus": [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5
+ ],
+ "vnuma_nodes": [
+ {
+ "memkb": 2097152,
+ "distances": [
+ 10,
+ 21,
+ 31,
+ 41,
+ 51,
+ 61
+ ],
+ "vcpus": [
+ 0
+ ]
+ },
+ {
+ "memkb": 2097152,
+ "distances": [
+ 21,
+ 10,
+ 21,
+ 31,
+ 41,
+ 51
+ ],
+ "vcpus": [
+ 1
+ ]
+ },
+ {
+ "memkb": 2097152,
+ "distances": [
+ 31,
+ 21,
+ 10,
+ 21,
+ 31,
+ 41
+ ],
+ "vcpus": [
+ 2
+ ]
+ },
+ {
+ "memkb": 2097152,
+ "distances": [
+ 41,
+ 31,
+ 21,
+ 10,
+ 21,
+ 31
+ ],
+ "vcpus": [
+ 3
+ ]
+ },
+ {
+ "memkb": 2097152,
+ "distances": [
+ 51,
+ 41,
+ 31,
+ 21,
+ 10,
+ 21
+ ],
+ "vcpus": [
+ 4
+ ]
+ },
+ {
+ "memkb": 2097152,
+ "distances": [
+ 61,
+ 51,
+ 41,
+ 31,
+ 21,
+ 10
+ ],
+ "vcpus": [
+ 5
+ ]
+ }
+ ],
+ "max_memkb": 1048576,
+ "target_memkb": 1048576,
+ "video_memkb": 8192,
+ "shadow_memkb": 14336,
+ "device_model_version": "qemu_xen",
+ "device_model": "/bin/true",
+ "sched_params": {
+
+ },
+ "type.hvm": {
+ "pae": "True",
+ "apic": "True",
+ "acpi": "True",
+ "nested_hvm": "True",
+ "vga": {
+ "kind": "cirrus"
+ },
+ "vnc": {
+ "enable": "True",
+ "listen": "0.0.0.0",
+ "findunused": "False"
+ },
+ "sdl": {
+ "enable": "False"
+ },
+ "spice": {
+
+ },
+ "boot": "c",
+ "rdm": {
+
+ }
+ },
+ "arch_arm": {
+
+ }
+ },
+ "disks": [
+ {
+ "pdev_path": "/var/lib/xen/images/test-hvm.img",
+ "vdev": "hda",
+ "backend": "qdisk",
+ "format": "raw",
+ "removable": 1,
+ "readwrite": 1
+ }
+ ],
+ "nics": [
+ {
+ "devid": 0,
+ "mac": "00:16:3e:66:12:b4",
+ "bridge": "br0",
+ "script": "/etc/xen/scripts/vif-bridge",
+ "nictype": "vif_ioemu"
+ }
+ ],
+ "vfbs": [
+ {
+ "devid": -1,
+ "vnc": {
+ "enable": "True",
+ "listen": "0.0.0.0",
+ "findunused": "False"
+ },
+ "sdl": {
+ "enable": "False"
+ }
+ }
+ ],
+ "vkbs": [
+ {
+ "devid": -1
+ }
+ ],
+ "on_reboot": "restart"
+}
diff --git a/tests/libxlxml2domconfigdata/vnuma-hvm-legacy-nest.xml b/tests/libxlxml2domconfigdata/vnuma-hvm-legacy-nest.xml
new file mode 100644
index 0000000000..6e265e31a9
--- /dev/null
+++ b/tests/libxlxml2domconfigdata/vnuma-hvm-legacy-nest.xml
@@ -0,0 +1,100 @@
+<domain type='xen'>
+ <name>test-hvm</name>
+ <description>None</description>
+ <uuid>2147d599-9cc6-c0dc-92ab-4064b5446e9b</uuid>
+ <memory>1048576</memory>
+ <currentMemory>1048576</currentMemory>
+ <vcpu>6</vcpu>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <clock offset='utc'/>
+ <os>
+ <type>hvm</type>
+ <loader>/usr/lib/xen/boot/hvmloader</loader>
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <apic/>
+ <acpi/>
+ <pae/>
+ </features>
+ <cpu mode='host-passthrough'>
+ <numa>
+ <cell id='0' cpus='0' memory='2097152' unit='KiB'>
+ <distances>
+ <sibling id='0' value='10'/>
+ <sibling id='1' value='21'/>
+ <sibling id='2' value='31'/>
+ <sibling id='3' value='41'/>
+ <sibling id='4' value='51'/>
+ <sibling id='5' value='61'/>
+ </distances>
+ </cell>
+ <cell id='1' cpus='1' memory='2097152' unit='KiB'>
+ <distances>
+ <sibling id='0' value='21'/>
+ <sibling id='1' value='10'/>
+ <sibling id='2' value='21'/>
+ <sibling id='3' value='31'/>
+ <sibling id='4' value='41'/>
+ <sibling id='5' value='51'/>
+ </distances>
+ </cell>
+ <cell id='2' cpus='2' memory='2097152' unit='KiB'>
+ <distances>
+ <sibling id='0' value='31'/>
+ <sibling id='1' value='21'/>
+ <sibling id='2' value='10'/>
+ <sibling id='3' value='21'/>
+ <sibling id='4' value='31'/>
+ <sibling id='5' value='41'/>
+ </distances>
+ </cell>
+ <cell id='3' cpus='3' memory='2097152' unit='KiB'>
+ <distances>
+ <sibling id='0' value='41'/>
+ <sibling id='1' value='31'/>
+ <sibling id='2' value='21'/>
+ <sibling id='3' value='10'/>
+ <sibling id='4' value='21'/>
+ <sibling id='5' value='31'/>
+ </distances>
+ </cell>
+ <cell id='4' cpus='4' memory='2097152' unit='KiB'>
+ <distances>
+ <sibling id='0' value='51'/>
+ <sibling id='1' value='41'/>
+ <sibling id='2' value='31'/>
+ <sibling id='3' value='21'/>
+ <sibling id='4' value='10'/>
+ <sibling id='5' value='21'/>
+ </distances>
+ </cell>
+ <cell id='5' cpus='5' memory='2097152' unit='KiB'>
+ <distances>
+ <sibling id='0' value='61'/>
+ <sibling id='1' value='51'/>
+ <sibling id='2' value='41'/>
+ <sibling id='3' value='31'/>
+ <sibling id='4' value='21'/>
+ <sibling id='5' value='10'/>
+ </distances>
+ </cell>
+ </numa>
+ </cpu>
+ <devices>
+ <emulator>/bin/true</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu'/>
+ <source file='/var/lib/xen/images/test-hvm.img'/>
+ <target dev='hda'/>
+ </disk>
+ <interface type='bridge'>
+ <source bridge='br0'/>
+ <mac address='00:16:3e:66:12:b4'/>
+ <script path='/etc/xen/scripts/vif-bridge'/>
+ </interface>
+ <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
+ </devices>
+</domain>
diff --git a/tests/libxlxml2domconfigtest.c b/tests/libxlxml2domconfigtest.c
index 22f9c2c871..cf2132563e 100644
--- a/tests/libxlxml2domconfigtest.c
+++ b/tests/libxlxml2domconfigtest.c
@@ -212,6 +212,9 @@ mymain(void)
# ifdef LIBXL_HAVE_BUILDINFO_NESTED_HVM
DO_TEST("vnuma-hvm");
DO_TEST("fullvirt-cpuid");
+# else
+ DO_TEST("vnuma-hvm-legacy-nest");
+ DO_TEST("fullvirt-cpuid-legacy-nest");
# endif
--
2.18.0
6 years, 1 month
[libvirt] Release of libvirt-4.8.0
by Daniel Veillard
It is out, as planned, tagged in git, the signed tarball and rpms are
at the usual place:
ftp://libvirt.org/libvirt/
I also make a python binding release which include event testing updates,
you can find those at
ftp://libvirt.org/libvirt/python/
This is a relatively large release considering the number of patches going in
please note the Removed Feature section below:
New features:
- Xen: Support PM Suspend and Wakeup
The libxl driver now supports the virDomainPMSuspendForDuration and
virDomainPMWakeup APIs.
Removed features:
- Xen: Drop support for Xen 4.4 and 4.5
Xen 4.4 and 4.5 are no longer supported by the Xen community. Drop
support for these older versions and require Xen >= 4.6.
- nwfilter: Disallow binding creation in session mode
Ensure that a filter binding creation is not attempted in session mode
and generates a proper error message.
Improvements:
- qemu: Retrieve guest hostname through QEMU Guest Agent command
QEMU is now able to retrieve the guest hostname using a new QEMU-GA
command called 'guest-get-host-name'. Virsh users can execute
'domhostname' for QEMU driver for domains configured to use the Guest
Agent.
- virsh: Implement vsh-table in virsh and virsh-admin
The new API fixes problems with table-alignment, making the tables more
readable and deals with unicode.
Bug fixes:
- storage: Allow inputvol to be encrypted
When creating a storage volume based on another volume, the base input
volume is allowed to be encrypted.
- virsh: Require explicit --domain for domxml-to-native
The --domain option for domxml-to-native virsh command has always been
documented as required, but commit v4.3.0-127-gd86531daf2 accidentally
made it optional.
- lxc_monitor: Avoid AB / BA lock race
A deadlock situation could occur when autostarting a LXC domain 'guest'
due to two threads attempting to take opposing locks while holding
opposing locks (AB BA problem).
Thanks everybody for your help with this release.
Enjoy !
Daniel
--
Daniel Veillard | Red Hat Developers Tools http://developer.redhat.com/
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
6 years, 1 month
[libvirt] [libvirt PATCH v4] news: Update for 4.8.0 release
by Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio <fidencio(a)redhat.com>
---
I went through the commits since last release and added a few notes
which seem to be relevant for the news.
In case you notice there's something missing, please, either send me the
text to add it (and I'll re-sping this patch) and add the text before
merging this one.
Changes since v1:
- Actually run make-check in order to be sure the changes are fine.
Changes since v2:
- Fixed and reworded some parts according to John's and Erik's
suggestions.
- Added, according to Erik's suggestion:
- util: Introduce VIR_AUTOCLOSE macro to automatically close files' fds
- virsh: Implement vsh-table in virsh and virsh-admin
Changes since v3:
- Dropped:
- util: Introduce VIR_AUTOCLOSE macro to automatically close files' fds
(by Peter's suggestion)
- utils: Introduce resource monitor capability interface
(by John's suggestion as this work is still a on-going work)
- libxl: Add support to set shadow memory for any guest type
(after a face-to-face discussion with Peter and Erik)
--
docs/news.xml | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 3ed6ff8aeb..166e641811 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -55,6 +55,15 @@
Drop support for these older versions and require Xen >= 4.6.
</description>
</change>
+ <change>
+ <summary>
+ nwfilter: Disallow binding creation in session mode
+ </summary>
+ <description>
+ Ensure that a filter binding creation is not attempted in session
+ mode and generates a proper error message.
+ </description>
+ </change>
</section>
<section title="Improvements">
<change>
@@ -68,8 +77,46 @@
Guest Agent.
</description>
</change>
+ <change>
+ <summary>
+ virsh: Implement vsh-table in virsh and virsh-admin
+ </summary>
+ <description>
+ The new API fixes problems with table-alignment, making the tables
+ more readable and deals with unicode.
+ </description>
+ </change>
</section>
<section title="Bug fixes">
+ <change>
+ <summary>
+ storage: Allow inputvol to be encrypted
+ </summary>
+ <description>
+ When creating a storage volume based on another volume, the base
+ input volume is allowed to be encrypted.
+ </description>
+ </change>
+ <change>
+ <summary>
+ virsh: Require explicit --domain for domxml-to-native
+ </summary>
+ <description>
+ The --domain option for domxml-to-native virsh command has always
+ been documented as required, but commit v4.3.0-127-gd86531daf2
+ accidentally made it optional.
+ </description>
+ </change>
+ <change>
+ <summary>
+ lxc_monitor: Avoid AB / BA lock race
+ </summary>
+ <description>
+ A deadlock situation could occur when autostarting a LXC domain
+ 'guest' due to two threads attempting to take opposing locks while
+ holding opposing locks (AB BA problem).
+ </description>
+ </change>
</section>
</release>
<release version="v4.7.0" date="2018-09-03">
--
2.19.0
6 years, 1 month
[libvirt] [PATCH] security: dac: also label listen UNIX sockets
by Ján Tomko
We switched to opening mode='bind' sockets ourselves:
commit 30fb2276d88b275dc2aad6ddd28c100d944b59a5
qemu: support passing pre-opened UNIX socket listen FD
in v4.5.0-rc1~251
Then fixed qemuBuildChrChardevStr to change libvirtd's label
while creating the socket:
commit b0c6300fc42bbc3e5eb0b236392f7344581c5810
qemu: ensure FDs passed to QEMU for chardevs have correct SELinux labels
v4.5.0-rc1~52
Also add labeling of these sockets to the DAC driver.
Instead of trying to figure out which one was created by libvirt,
label it if it exists.
https://bugzilla.redhat.com/show_bug.cgi?id=1633389
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/security/security_dac.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/security/security_dac.c b/src/security/security_dac.c
index 62442745dd..da4a6c72fe 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -1308,7 +1308,12 @@ virSecurityDACSetChardevLabel(virSecurityManagerPtr mgr,
break;
case VIR_DOMAIN_CHR_TYPE_UNIX:
- if (!dev_source->data.nix.listen) {
+ if (!dev_source->data.nix.listen ||
+ (dev_source->data.nix.path &&
+ virFileExists(dev_source->data.nix.path))) {
+ /* Also label mode='bind' sockets if they exist,
+ * e.g. because they were created by libvirt
+ * and passed via FD */
if (virSecurityDACSetOwnership(mgr, NULL,
dev_source->data.nix.path,
user, group) < 0)
--
2.16.4
6 years, 1 month
[libvirt] [libvirt PATCH v3] news: Update for 4.8.0 release
by Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio <fidencio(a)redhat.com>
---
I went through the commits since last release and added a few notes
which seem to be relevant for the news.
In case you notice there's something missing, please, either send me the
text to add it (and I'll re-sping this patch) and add the text before
merging this one.
Changes since v1:
- Actually run make-check in order to be sure the changes are fine.
Changes since v2:
- Fixed and reworded some parts according to John's and Erik's
suggestions.
- Added, according to Erik's suggestion:
- util: Introduce VIR_AUTOCLOSE macro to automatically close files' fds
- virsh: Implement vsh-table in virsh and virsh-admin
---
docs/news.xml | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 3ed6ff8aeb..36692ba456 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -44,6 +44,18 @@
and virDomainPMWakeup APIs.
</description>
</change>
+ <change>
+ <summary>
+ utils: Introduce monitor capability interface
+ </summary>
+ <description>
+ The resource monitor has been introduced and it creates the interface
+ for getting the host capability of the resource monitor from the system
+ resource control.
+ The resource monitor takes the role of RDT monitoring groups and could
+ be used to monitor the resource consumption information.
+ </description>
+ </change>
</section>
<section title="Removed features">
<change>
@@ -55,6 +67,15 @@
Drop support for these older versions and require Xen >= 4.6.
</description>
</change>
+ <change>
+ <summary>
+ nwfilter: Disallow binding creation in session mode
+ </summary>
+ <description>
+ Ensure that a filter binding creation is not attempted in session
+ mode and generates a proper error message.
+ </description>
+ </change>
</section>
<section title="Improvements">
<change>
@@ -68,8 +89,64 @@
Guest Agent.
</description>
</change>
+ <change>
+ <summary>
+ storage: Allow to use any format as input volume for encryption
+ </summary>
+ <description>
+ Libvirt has supported 'raw' input volumes for encryption since 4.5.0.
+ Now, it's not going to limit the usage to 'raw' only anymore.
+ </description>
+ </change>
+ <change>
+ <summary>
+ libxl: Add support to set shadow memory for any guest type
+ </summary>
+ <description>
+ PVH guests now can take advantage of using shadow memory.
+ </description>
+ </change>
+ <change>
+ <summary>
+ util: Introduce VIR_AUTOCLOSE macro to automatically close files' fds
+ </summary>
+ <description>
+ The Macro automatically force closes the fds by calling
+ <code>virForceCloseHelper</code> when the fd goes out of scope and is
+ used to eliminate <code>VIR_FORCE_CLOSE</code> in cleanup sections.
+ </description>
+ </change>
+ <change>
+ <summary>
+ virsh: Implement vsh-table in virsh and virsh-admin
+ </summary>
+ <description>
+ The new API fixes problems with table-alignment, making the tables
+ more readable and deals with unicode.
+ </description>
+ </change>
</section>
<section title="Bug fixes">
+ <change>
+ <summary>
+ virsh: Require explicit --domain for domxml-to-native
+ </summary>
+ <description>
+ The --domain option for domxml-to-native virsh command has always
+ been documented as required, but commit v4.3.0-127-gd86531daf2
+ accidentally made it optional.
+ </description>
+ </change>
+ <change>
+ <summary>
+ lxc_monitor: Avoid AB / BA lock race
+ </summary>
+ <description>
+ A deadlock situation could occur when autostarting a LXC domain
+ 'guest' due to two threads attempting to take opposing locks while
+ holding opposing locks (AB BA problem).
+ </description>
+ </change>
</section>
</release>
<release version="v4.7.0" date="2018-09-03">
--
2.19.0
6 years, 1 month
[libvirt] [PATCH v2] news: Update for 4.8.0 release
by Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio <fidencio(a)redhat.com>
---
I went through the commits since last release and added a few notes
which seem to be relevant for the news.
In case you notice there's something missing, please, either send me the
text to add it (and I'll re-sping this patch) and add the text before
merging this one.
Changes since v1:
- Actually run make-check in order to be sure the changes are fine.
---
docs/news.xml | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 3ed6ff8aeb..62148d28af 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -44,6 +44,26 @@
and virDomainPMWakeup APIs.
</description>
</change>
+ <change>
+ <summary>
+ utils: Introduce monitor capability interface
+ </summary>
+ <description>
+ The resource monitor has been introduces and it creates the interface
+ for getting the host capability of the resource monitor from the system
+ resource control.
+ The resource monitor takes the role of RDT monitoring groups and could
+ be used to monitor the resource consumption information.
+ </description>
+ </change>
+ <change>
+ <summary>
+ conf: Introduce RDT monitor host capability
+ </summary>
+ <description>
+ Introduce cache monitor (CMT) and memory bandwidth monitor (MBM).
+ </description>
+ </change>
</section>
<section title="Removed features">
<change>
@@ -55,6 +75,15 @@
Drop support for these older versions and require Xen >= 4.6.
</description>
</change>
+ <change>
+ <summary>
+ nwfilter: Disallow binding creation in session mode
+ </summary>
+ <description>
+ Ensure that a filter binding creation is not attempted in session
+ mode and generate the proper error message.
+ </description>
+ </change>
</section>
<section title="Improvements">
<change>
@@ -68,8 +97,48 @@
Guest Agent.
</description>
</change>
+ <change>
+ <summary>
+ storage: Allow to use any format as input volume for encryption
+ </summary>
+ <description>
+ Since v4.5.0 libvirt has support to use a 'raw' input volume for
+ encryption. From now on, let's not limit this to 'raw' only.
+ </description>
+ </change>
+ <change>
+ <summary>
+ libxl: Add support to set shadow memory for any guest type
+ </summary>
+ <description>
+ PVH guests now can take advantage of using shadow memory.
+ </description>
+ </change>
</section>
<section title="Bug fixes">
+ <change>
+ <summary>
+ virsh: Require explicit --domain for domxml-to-native
+ </summary>
+ <description>
+ The domxml-to-native virsh command accepts either --xml or --domain
+ option followed by a file or domain name respectively, The --domain
+ option is documented as required, which means an argument with no
+ option is treated as --xml. Commit v4.3.0-127-gd86531daf2 broke this
+ by making --domain optional and thus an argument with no option was
+ treated as --domain.
+ </description>
+ </change>
+ <change>
+ <summary>
+ lxc_monitor: Avoid AB / BA lock race
+ </summary>
+ <description>
+ A dealock situation could occur when autostarting a LXC domain 'guest'
+ due to two threads attempting to take opposing locks while holding
+ opposing locks (AB BA problem).
+ </description>
+ </change>
</section>
</release>
<release version="v4.7.0" date="2018-09-03">
--
2.19.0
6 years, 1 month
[libvirt] [PATCH] uml: Fix weird logic inside umlConnectOpen() function.
by Julio Faracco
The pointer related to uml_driver needs to be checked before its usage
inside the function. Some attributes of the driver are being accessed
while the pointer is NULL considering the current logic.
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
src/uml/uml_driver.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index fcd468243e..d1c71d8521 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -1193,6 +1193,13 @@ static virDrvOpenStatus umlConnectOpen(virConnectPtr conn,
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
+ /* URI was good, but driver isn't active */
+ if (uml_driver == NULL) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("uml state driver is not active"));
+ return VIR_DRV_OPEN_ERROR;
+ }
+
/* Check path and tell them correct path if they made a mistake */
if (uml_driver->privileged) {
if (STRNEQ(conn->uri->path, "/system") &&
@@ -1211,13 +1218,6 @@ static virDrvOpenStatus umlConnectOpen(virConnectPtr conn,
}
}
- /* URI was good, but driver isn't active */
- if (uml_driver == NULL) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("uml state driver is not active"));
- return VIR_DRV_OPEN_ERROR;
- }
-
if (virConnectOpenEnsureACL(conn) < 0)
return VIR_DRV_OPEN_ERROR;
--
2.17.1
6 years, 1 month
[libvirt] [libvirt PATCH] news: Update for 4.8.0 release
by Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio <fidencio(a)redhat.com>
---
I went through the commits since last release and added a few notes
which seem to be relevant for the news.
In case you notice there's something missing, please, either send me the
text to add it (and I'll re-sping this patch) and add the text before
merging this one.
---
docs/news.xml | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 88 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 3ed6ff8aeb..29b12cb04d 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -44,6 +44,50 @@
and virDomainPMWakeup APIs.
</description>
</change>
+ <change>
+ utils: Introduce monitor capability interface
+ </change>
+ <description>
+ The resource monitor has been introduced and it creates the interface
+ for getting the host capability of the resource monitor from the system
+ resource control.
+ The resource monitor takes the role of RDT monitoring groups and could
+ be used to monitor the resource consumption information.
+ </description>
+ <change>
+ conf: Introduce RDT monitor host capability
+ </change>
+ <description>
+ Introduce cache monitor (CMT) and memory bandwidth monitor (MBM).
+ For the former (CMT), the host capability is shown like:
+ <host>
+ ...
+ <cache>
+ <bank id='0' level='3' type='both' size='15' unit='MiB' cpus='0-5'>
+ <control granularity='768' min='1536' unit='KiB' type='both' maxAllocs='4'/>
+ </bank>
+ <monitor level='3' 'reuseThreshold'='270336' maxMonitors='176'>
+ <feature name='llc_occupancy'/>
+ </monitor>
+ </cache>
+ ...
+ </host>
+
+ For the latter (MBM), the capability is shown like this:
+ <host>
+ ...
+ <memory_bandwidth>
+ <node id='1' cpus='6-11'>
+ <control granularity='10' min ='10' maxAllocs='4'/>
+ </node>
+ <monitor maxMonitors='176'>
+ <feature name='mbm_total_bytes'/>
+ <feature name='mbm_local_bytes'/>
+ </monitor>
+ </memory_bandwidth>
+ ...
+ </host>
+ </description>
</section>
<section title="Removed features">
<change>
@@ -55,6 +99,15 @@
Drop support for these older versions and require Xen >= 4.6.
</description>
</change>
+ <change>
+ <summary>
+ nwfilter: Disallow binding creation in session mode
+ </summary>
+ <description>
+ Ensure that a filter binding creation is not attempted in session
+ mode and generate the proper error message.
+ </description>
+ </change>
</section>
<section title="Improvements">
<change>
@@ -68,8 +121,43 @@
Guest Agent.
</description>
</change>
+ <change>
+ storage: Allow to use any format as input volume for encryption
+ </change>
+ <description>
+ Since v4.5.0 libvirt has support to use a 'raw' input volume for
+ encryption. From now on, let's not limit this to 'raw' only.
+ </description>
+ <change>
+ libxl: Add support to set shadow memory for any guest type, not only
+ HVM
+ </change>
+ <description>
+ PVH guests now can take advantage of using shadow memory.
+ </description>
</section>
<section title="Bug fixes">
+ <change>
+ <summary>
+ virsh: Require explicit --domain for domxml-to-native
+ </summary>
+ <description>
+ The domxml-to-native virsh command accepts either --xml or --domain
+ option followed by a file or domain name respectively, The --domain
+ option is documented as required, which means an argument with no
+ option is treated as --xml. Commit v4.3.0-127-gd86531daf2 broke this
+ by making --domain optional and thus an argument with no option was
+ treated as --domain.
+ </description>
+ </change>
+ <change>
+ lxc_monitor: Avoid AB / BA lock race
+ </change>
+ <description>
+ A dealock situation could occur when autostarting a LXC domain 'guest'
+ due to two threads attempting to take opposing locks while holding
+ opposing locks (AB BA problem).
+ </description>
</section>
</release>
<release version="v4.7.0" date="2018-09-03">
--
2.19.0
6 years, 1 month
[libvirt] [PATCH 0/7] Various Coverity based concerns
by John Ferlan
I'm sure it'll be felt one or two could just be false positives,
but I have 35-40 of true false positives and it seems at least
these go above just noise on the channel.
Perhaps the most difficult one to immediately see was the libxl
refcnt patch. That involves a little bit of theory and has been
in my noise pile for a while until I noted that the @args is
being added in a loop to a callback function that just Unref's
it when done. So if there was more than 1 IP Address, then all
sorts of fun things could happen. Without any change, the Alloc
is matched by the Unref, but with the change we add a Ref to
match each Unref in the I/O loop and we just ensure the Unref
is done for the path that put @args into the I/O callback.
I also think the nwfilter patch was "interesting" insomuch as
it has my "favorite" 'if (int-value) {' condition. IOW, if
not zero, then do something. What became "interesting" is that
the virNWFilterIPAddrMapDelIPAddr could return -1 if the
virHashLookup on @req->binding->portdevname returned NULL,
so when "shrinking" the code to only call the instantiation
for/when there was an IP Address found resolves a couple of
issues in the code.
John Ferlan (7):
lxc: Only check @nparams in lxcDomainBlockStatsFlags
libxl: Fix possible object refcnt issue
tests: Inline a sysconf call for linuxCPUStatsToBuf
util: Data overrun may lead to divide by zero
tests: Alter logic in testCompareXMLToDomConfig
tests: Use STRNEQ_NULLABLE
nwfilter: Alter virNWFilterSnoopReqLeaseDel logic
src/libxl/libxl_migration.c | 4 ++--
src/lxc/lxc_driver.c | 2 +-
src/nwfilter/nwfilter_dhcpsnoop.c | 9 ++++-----
src/util/virutil.c | 11 +++++------
tests/commandtest.c | 4 ++--
tests/libxlxml2domconfigtest.c | 11 +++++------
tests/virhostcputest.c | 12 ++++++++++--
7 files changed, 29 insertions(+), 24 deletions(-)
--
2.17.1
6 years, 1 month