[libvirt] [PATCH] virfile: added GPFS as shared fs
by Diego Michelotto
From: dmichelotto <diego.michelotto(a)cnaf.infn.it>
Added GPFS as shared file system recognized during live migration
security checks.
GPFS is 'IBM General Parallel File System' also called
'IBM Spectrum Scale'
BUG: https://bugzilla.redhat.com/show_bug.cgi?id=1679528
Signed-off-by: Diego Michelotto <diego.michelotto(a)cnaf.infn.it>
---
src/util/virfile.c | 9 ++++++++-
src/util/virfile.h | 1 +
tests/virfiledata/mounts3.txt | 1 +
tests/virfilemock.c | 5 +++++
tests/virfiletest.c | 1 +
5 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/util/virfile.c b/src/util/virfile.c
index 271bf5e796..615c287104 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -3468,6 +3468,9 @@ int virFilePrintf(FILE *fp, const char *msg, ...)
# ifndef CEPH_SUPER_MAGIC
# define CEPH_SUPER_MAGIC 0x00C36400
# endif
+# ifndef GPFS_SUPER_MAGIC
+# define GPFS_SUPER_MAGIC 0x47504653
+# endif
# define PROC_MOUNTS "/proc/mounts"
@@ -3613,6 +3616,9 @@ virFileIsSharedFSType(const char *path,
if ((fstypes & VIR_FILE_SHFS_CEPH) &&
(f_type == CEPH_SUPER_MAGIC))
return 1;
+ if ((fstypes & VIR_FILE_SHFS_GPFS) &&
+ (f_type == GPFS_SUPER_MAGIC))
+ return 1;
return 0;
}
@@ -3776,7 +3782,8 @@ int virFileIsSharedFS(const char *path)
VIR_FILE_SHFS_AFS |
VIR_FILE_SHFS_SMB |
VIR_FILE_SHFS_CIFS |
- VIR_FILE_SHFS_CEPH);
+ VIR_FILE_SHFS_CEPH |
+ VIR_FILE_SHFS_GPFS);
}
diff --git a/src/util/virfile.h b/src/util/virfile.h
index be612af770..0b946fe1ca 100644
--- a/src/util/virfile.h
+++ b/src/util/virfile.h
@@ -221,6 +221,7 @@ enum {
VIR_FILE_SHFS_SMB = (1 << 4),
VIR_FILE_SHFS_CIFS = (1 << 5),
VIR_FILE_SHFS_CEPH = (1 << 6),
+ VIR_FILE_SHFS_GPFS = (1 << 7),
};
int virFileIsSharedFSType(const char *path, int fstypes) ATTRIBUTE_NONNULL(1);
diff --git a/tests/virfiledata/mounts3.txt b/tests/virfiledata/mounts3.txt
index 68eded048c..4377e5d471 100644
--- a/tests/virfiledata/mounts3.txt
+++ b/tests/virfiledata/mounts3.txt
@@ -35,3 +35,4 @@ host:/gv0 /gluster fuse.glusterfs rw 0 0
root@host:/tmp/mkdir /gluster/sshfs fuse.sshfs rw 0 0
192.168.0.1:/ceph/data /ceph ceph rw,noatime,name=cephfs,secret=<hidden>,acl,wsize=16777216 0 0
192.168.0.1,192.168.0.2,192.168.0.3:/ceph/data2 /ceph/multi ceph rw,noatime,name=cephfs,secret=<hidden>,acl,wsize=16777216 0 0
+gpfs_data /gpfs/data gpfs rw,relatime 0 0
diff --git a/tests/virfilemock.c b/tests/virfilemock.c
index 499135d773..89e14c5b67 100644
--- a/tests/virfilemock.c
+++ b/tests/virfilemock.c
@@ -89,6 +89,9 @@ setmntent(const char *filename, const char *type)
#ifndef CEPH_SUPER_MAGIC
# define CEPH_SUPER_MAGIC 0x00c36400
#endif
+#ifndef GPFS_SUPER_MAGIC
+# define GPFS_SUPER_MAGIC 0x47504653
+#endif
static int
@@ -137,6 +140,8 @@ statfs_mock(const char *mtab,
ftype = FUSE_SUPER_MAGIC;
} else if (STRPREFIX(mb.mnt_type, "ceph")) {
ftype = CEPH_SUPER_MAGIC;
+ } else if (STRPREFIX(mb.mnt_type, "gpfs")) {
+ ftype = GPFS_SUPER_MAGIC;
} else {
/* Everything else is EXT4. We don't care really for other paths. */
ftype = EXT4_SUPER_MAGIC;
diff --git a/tests/virfiletest.c b/tests/virfiletest.c
index f90c611ac4..e2bd4953ed 100644
--- a/tests/virfiletest.c
+++ b/tests/virfiletest.c
@@ -457,6 +457,7 @@ mymain(void)
DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/some/symlink/file", true);
DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/ceph/file", true);
DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/ceph/multi/file", true);
+ DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/gpfs/data", true);
return ret != 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}
--
2.20.1
6 years, 2 months
[libvirt] [PATCH 0/2] Get rid of virDomainChrSourceDefFree
by Marc Hartmayer
Marc Hartmayer (2):
qemu: Use refcounting for priv->monConfig
qemu: Replace virDomainChrSourceDefFree with virObjectUnref
cfg.mk | 1 -
src/conf/domain_conf.c | 17 +++++------------
src/conf/domain_conf.h | 1 -
src/libvirt_private.syms | 1 -
src/qemu/qemu_domain.c | 4 ++--
src/qemu/qemu_driver.c | 5 +----
src/qemu/qemu_parse_command.c | 4 ++--
src/qemu/qemu_process.c | 11 +++++------
8 files changed, 15 insertions(+), 29 deletions(-)
--
2.17.0
6 years, 2 months
[libvirt] [libvirt-perl] Remove-the-unused-parameter-in-document
by Dan Zheng
>From d3b0044699732dba54ff0360e626ea1738bfe872 Mon Sep 17 00:00:00 2001
From: Dan Zheng <dzheng(a)redhat.com>
Date: Tue, 26 Feb 2019 17:35:49 +0800
Subject: [PATCH] Remove the unused parameter in document
Signed-off-by: Dan Zheng <dzheng(a)redhat.com>
---
lib/Sys/Virt/Domain.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Sys/Virt/Domain.pm b/lib/Sys/Virt/Domain.pm
index 7b43e7f..1e3a3a2 100644
--- a/lib/Sys/Virt/Domain.pm
+++ b/lib/Sys/Virt/Domain.pm
@@ -1448,7 +1448,7 @@ Delete an existing IOThread by the C<$iothread> value
from the guest domain.
The C<$flags> parameter accepts one or more the CONFIG OPTION constants
documented later, and defaults to 0 if omitted.
-=item $dom->set_iothread($iothread, $params, $nparams, $flags=0)
+=item $dom->set_iothread($iothread, $params, $flags=0)
Set parameters for the IOThread by the C<$iothread> value on the guest
domain.
The C<$params> parameter is a hash reference whose keys are the
--
1.8.3.1
Regards,
Dan Zheng (dzheng(a)redhat.com)
Libvirt, Virtualization
Redhat Beijing R&D
6 years, 2 months
[libvirt] [PATCH 0/1] update copyright notice
by David Kiarie
it looks sensible that the copyright notice on the affected files in
updated as in this patch so as to also cover another party who hugely
participated in writing the code.
David Kiarie (1):
src/xenconfig: update copyright notice
src/xenconfig/xen_xl.c | 1 +
src/xenconfig/xen_xl.h | 1 +
tests/xlconfigtest.c | 1 +
3 files changed, 3 insertions(+)
--
2.20.1
6 years, 2 months
[libvirt] [jenkins-ci PATCH v4 0/5] Add support for cross compiling libvirt via Debian
by Daniel P. Berrangé
Changed in v4:
- Pull in change to use argparse sub-parsers
- Refactor way architecture specific package rules are stored
to be in the main package mappings data
Changed in v3:
- Remove sheepdog more generally
- Use .format() style printf
- Split config to cross-build.yml
- Make glusterfs name per-distro customized
- Misc code style changes
- Rename fields in cross-build.yml
- Don't use crossbuild-essential packages
Changed in v2:
- Fix multiple package name mistakes
- Modify lcitool to generate cross-arch docker files
- Add --no-install-recommended flag to apt-get
- Add DEBIAN_FRONTEND=noninteractive env to apt-get
- Improve error reporting in lcitool
- Add make rule for generating dockerfiles locally
Daniel P. Berrangé (5):
lcitool: use subparsers for commands
lcitool: avoid repetition when expanding package mappings
lcitool: avoid intermediate list of packages
mappings: extend mapping to allow per-arch entries
lcitool: support generating cross compiler dockerfiles
guests/host_vars/libvirt-debian-9/main.yml | 44 ++++
guests/host_vars/libvirt-debian-sid/main.yml | 45 ++++
guests/lcitool | 236 +++++++++++++------
guests/playbooks/update/tasks/packages.yml | 32 +++
guests/vars/mappings.yml | 101 +++++++-
5 files changed, 379 insertions(+), 79 deletions(-)
--
2.20.1
6 years, 2 months
[libvirt] [PATCH 0/1] virfile: added GPFS as shared fs
by dmichelotto
Added GPFS as shared file system recognized during live migration
security checks.
This patch is based on libvirt-4.5.0 distributed by CentOS 7.6.1810
via source rpm.
The rpms builded fix our bug with GPFS.
BUG: https://bugzilla.redhat.com/show_bug.cgi?id=1679528
dmichelotto (1):
virfile: added GPFS as shared fs
src/util/virfile.c | 9 ++++++++-
src/util/virfile.h | 1 +
tests/virfiledata/mounts3.txt | 1 +
tests/virfilemock.c | 5 +++++
tests/virfiletest.c | 1 +
5 files changed, 16 insertions(+), 1 deletion(-)
--
2.20.1
6 years, 2 months
[libvirt] [PATCH] util: fix heap-buffer-overflow in virFileWrapperFdFree
by Jay Zhou
From: Jing Wu <wujing42(a)huawei.com>
Some functions like doCoreDump call virFileWrapperFdNew to execute async
cmds, if a step after virFileWrapperFdNew failed, the func may skip
virFileWrapperFdClose and jump to cleanup label to call
virFileWrapperFdFree directly. If the child process of the cmd is running
and asyncioThread is polling, cmd->errbuf have been alloced at least one
byte but not yet operate (*cmd->errbuf)[errlen] = '\0', access of
wfd->err_msg in virFileWrapperFdFree at this time will cause risk of
heap-buffer-overflow.
So, we need to put VIR_WARN(wfd->err_msg) after VIR_FREE(wfd->err_msg).
Besides, since virCommandFree has included virCommandAbort, there is no
need to call virCommandAbort extraly.
Signed-off-by: Jing Wu <wujing42(a)huawei.com>
Signed-off-by: Jay Zhou <jianjay.zhou(a)huawei.com>
---
src/util/virfile.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/util/virfile.c b/src/util/virfile.c
index f6f9e4c..d488158 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -347,13 +347,12 @@ virFileWrapperFdFree(virFileWrapperFdPtr wfd)
if (!wfd)
return;
+ virCommandFree(wfd->cmd);
+
if (wfd->err_msg && *wfd->err_msg)
VIR_WARN("iohelper reports: %s", wfd->err_msg);
- virCommandAbort(wfd->cmd);
-
VIR_FREE(wfd->err_msg);
- virCommandFree(wfd->cmd);
VIR_FREE(wfd);
}
--
1.8.3.1
6 years, 2 months
[libvirt] [PATCH 0/2] tools: console: a fix and improvment
by Nikolay Shirokovskiy
Nikolay Shirokovskiy (2):
tools: console: cleanup console on errors in main thread
tools: console: pass stream/fd errors to user
tools/virsh-console.c | 220 ++++++++++++++++++++++++++++++++++++++------------
1 file changed, 169 insertions(+), 51 deletions(-)
--
1.8.3.1
6 years, 2 months