[virttools-web PATCH 0/3] Switch www.virt-tools.org over to use GitLab Pages
by Daniel P. Berrangé
This introduces use of GitLab CI + Pages to replace the current
OpenShift application which is only admin accessible by myself.
It also has automatic integration with LetsEncrypt guaranteeing
that we'll never have expired certificates.
Daniel P. Berrangé (3):
Convert README to markdown format
Introduce use of GitLab CI for publishing to GitLab Pages
Remove obsolete openshift hosting configuration
.gitlab-ci.yml | 9 +
README | 19 --
README.md | 15 ++
openshift/templates/.gitignore | 2 -
openshift/templates/update-tls.sh | 16 --
openshift/templates/virttools-web-tls.json | 82 -------
openshift/templates/virttools-web.json | 272 ---------------------
{web => public}/header-bg.png | Bin
{web => public}/index.css | 0
{web => public}/index.html | 4 +-
{web => public}/logo-kvm.png | Bin
{web => public}/logo-libguestfs.png | Bin
{web => public}/logo-libosinfo.png | Bin
{web => public}/logo-libvirt.png | Bin
{web => public}/logo-qemu.png | Bin
{web => public}/logo-virt-manager.png | Bin
{web => public}/logo.png | Bin
{web => public}/logo.xcf | Bin
18 files changed, 25 insertions(+), 394 deletions(-)
create mode 100644 .gitlab-ci.yml
delete mode 100644 README
create mode 100644 README.md
delete mode 100644 openshift/templates/.gitignore
delete mode 100755 openshift/templates/update-tls.sh
delete mode 100644 openshift/templates/virttools-web-tls.json
delete mode 100644 openshift/templates/virttools-web.json
rename {web => public}/header-bg.png (100%)
rename {web => public}/index.css (100%)
rename {web => public}/index.html (93%)
rename {web => public}/logo-kvm.png (100%)
rename {web => public}/logo-libguestfs.png (100%)
rename {web => public}/logo-libosinfo.png (100%)
rename {web => public}/logo-libvirt.png (100%)
rename {web => public}/logo-qemu.png (100%)
rename {web => public}/logo-virt-manager.png (100%)
rename {web => public}/logo.png (100%)
rename {web => public}/logo.xcf (100%)
--
2.24.1
4 years, 8 months
[PATCH v3 00/10] Another round of qemu:///embed fixes
by Michal Privoznik
v3 of:
https://www.redhat.com/archives/libvir-list/2020-March/msg01112.html
diff to v2:
- Patch 2/10 is new; after discussion to v2 we can access
driver->privileged and driver->embeddedRoot directly
- Patch 3/10 is slightly reworked; it still drops unnecessary layers of
nesting in the default case (/var/lib/libvirt/qemu/ram) but it doesn't
do that if user provides a path via qemu.conf
Michal Prívozník (10):
tests: Fix virQEMUDriverConfigNew() calling with respect to @root
qemu: Drop virQEMUDriverIsPrivileged()
qemu: Drop two layers of nesting of memoryBackingDir
conf: Move virDomainGenerateMachineName to hypervisor/
virDomainDriverGenerateMachineName: Factor out embed path hashing
qemuDomainGetMachineName: Access embeddedRoot from driver rather than
cfg
Revert "qemu_conf: Track embed root dir"
qemu: Make hugepages path generation embed driver aware
qemu: Make memory path generation embed driver aware
qemu: Make auto dump path generation embed driver aware
src/conf/domain_conf.c | 72 ---------------
src/conf/domain_conf.h | 7 --
src/hypervisor/domain_driver.c | 88 +++++++++++++++++++
src/hypervisor/domain_driver.h | 11 +++
src/libvirt_private.syms | 3 +-
src/lxc/lxc_domain.c | 3 +-
src/qemu/qemu_cgroup.c | 4 +-
src/qemu/qemu_command.c | 23 +++--
src/qemu/qemu_conf.c | 76 +++++++++-------
src/qemu/qemu_conf.h | 23 +++--
src/qemu/qemu_domain.c | 19 ++--
src/qemu/qemu_driver.c | 42 ++++-----
src/qemu/qemu_interface.c | 6 +-
src/qemu/qemu_process.c | 7 +-
tests/domaincapstest.c | 2 +-
.../qemuxml2argvdata/cpu-numa-memshared.args | 8 +-
.../fd-memory-no-numa-topology.args | 2 +-
.../fd-memory-numa-topology.args | 4 +-
.../fd-memory-numa-topology2.args | 8 +-
.../fd-memory-numa-topology3.args | 12 +--
.../hugepages-memaccess2.args | 12 +--
.../qemuxml2argvdata/pages-dimm-discard.args | 4 +-
...vhost-user-fs-fd-memory.x86_64-latest.args | 2 +-
tests/testutilsqemu.c | 2 +-
tests/virsystemdtest.c | 5 +-
25 files changed, 235 insertions(+), 210 deletions(-)
--
2.24.1
4 years, 8 months
[libvirt-jenkins-ci PATCH 0/5] Introduce the new 'gitlab' flavor
by Erik Skultety
Erik Skultety (5):
guests: templates: Introduce a gitlab-runner systemd service template
guests: templates: Introduce a gitlab-runner RC init service template
guests: Introduce the new 'gitlab' flavor
playbooks: gitlab: Force a random password for the root account
guests: lcitool: Enable the new 'gitlab' flavor in the lcitool script
guests/group_vars/all/main.yml | 3 +
guests/lcitool | 29 ++++++--
guests/playbooks/update/main.yml | 5 ++
guests/playbooks/update/tasks/gitlab.yml | 68 +++++++++++++++++++
.../update/templates/gitlab-runner.j2 | 32 +++++++++
.../update/templates/gitlab-runner.service.j2 | 12 ++++
6 files changed, 144 insertions(+), 5 deletions(-)
create mode 100644 guests/playbooks/update/tasks/gitlab.yml
create mode 100644 guests/playbooks/update/templates/gitlab-runner.j2
create mode 100644 guests/playbooks/update/templates/gitlab-runner.service.j2
--
2.25.1
4 years, 8 months
[PATCH] tools: variables clean-up in libvirt-guests script
by Prathamesh Chavan
Redeclared variables in script functions marked as local.
Variables `guest_running` and `guests_shutting_down` in the
functions 'guest_is_on` and `check_guests_shutdown` were
untouched, as the functions returned values in these
variables.
Signed-off-by: Prathamesh Chavan <pc44800(a)gmail.com>
---
I'm submitting this as my BiteSizedTask for GSoC'20
I've cc'd Martin Kletzander, as he is mentor for this task,
and to ensure that the needful was done by me.
After running `make check`, I received "PASS: 98 and
SKIP: 7" as the result.
Travis-ci build report can be found at [1].
For my project, 'Introducing job control to the storage driver',
right now I'm going through the `/src/qemu/THREADS.txt` as well
as previous work done by Tucker DiNapoli during GSoC'14, as well
as the proposal of Taowei Luo for GSoC'15. Their email threads
are surely helping me get a better picture of the project.
Apart from this, please let me know if there is anything else,
which could help me with this project. Thansk!
[1]: https://travis-ci.org/github/pratham-pc/libvirt/builds/668209157
tools/libvirt-guests.sh.in | 104 +++++++++++++++++++------------------
1 file changed, 54 insertions(+), 50 deletions(-)
diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in
index a881f6266e..90a18fee49 100644
--- a/tools/libvirt-guests.sh.in
+++ b/tools/libvirt-guests.sh.in
@@ -65,7 +65,7 @@ retval() {
# If URI is "default" virsh is called without the "-c" argument
# (using libvirt's default connection)
run_virsh() {
- uri=$1
+ local uri=$1
shift
if [ "x$uri" = xdefault ]; then
@@ -86,7 +86,7 @@ run_virsh_c() {
# check if URI is reachable
test_connect()
{
- uri=$1
+ local uri=$1
if run_virsh "$uri" connect 2>/dev/null; then
return 0;
@@ -103,8 +103,8 @@ test_connect()
# --transient: list only transient guests
# [none]: list both persistent and transient guests
list_guests() {
- uri=$1
- persistent=$2
+ local uri=$1
+ local persistent=$2
list=$(run_virsh_c "$uri" list --uuid $persistent)
if [ $? -ne 0 ]; then
@@ -118,8 +118,8 @@ list_guests() {
# guest_name URI UUID
# return name of guest UUID on URI
guest_name() {
- uri=$1
- uuid=$2
+ local uri=$1
+ local uuid=$2
run_virsh "$uri" domname "$uuid" 2>/dev/null
}
@@ -128,8 +128,8 @@ guest_name() {
# check if guest UUID on URI is running
# Result is returned by variable "guest_running"
guest_is_on() {
- uri=$1
- uuid=$2
+ local uri=$1
+ local uuid=$2
guest_running=false
id=$(run_virsh "$uri" domid "$uuid")
@@ -161,13 +161,13 @@ start() {
return 0
fi
- isfirst=true
- bypass=
- sync_time=false
+ local isfirst=true
+ local bypass=
+ local sync_time=false
test "x$BYPASS_CACHE" = x0 || bypass=--bypass-cache
test "x$SYNC_TIME" = x0 || sync_time=true
while read uri list; do
- configured=false
+ local configured=false
set -f
for confuri in $URIS; do
set +f
@@ -186,7 +186,7 @@ start() {
eval_gettext "Resuming guests on \$uri URI..."; echo
for guest in $list; do
- name=$(guest_name "$uri" "$guest")
+ local name=$(guest_name "$uri" "$guest")
eval_gettext "Resuming guest \$name: "
if guest_is_on "$uri" "$guest"; then
if "$guest_running"; then
@@ -217,17 +217,17 @@ start() {
# was saved.
suspend_guest()
{
- uri=$1
- guest=$2
+ local uri=$1
+ local guest=$2
- name=$(guest_name "$uri" "$guest")
- label=$(eval_gettext "Suspending \$name: ")
- bypass=
- slept=0
+ local name=$(guest_name "$uri" "$guest")
+ local label=$(eval_gettext "Suspending \$name: ")
+ local bypass=
+ local slept=0
test "x$BYPASS_CACHE" = x0 || bypass=--bypass-cache
printf '%s...\n' "$label"
run_virsh "$uri" managedsave $bypass "$guest" >/dev/null &
- virsh_pid=$!
+ local virsh_pid=$!
while true; do
sleep 1
kill -0 "$virsh_pid" >/dev/null 2>&1 || break
@@ -251,15 +251,17 @@ suspend_guest()
# was successfully shutdown or the timeout defined by $SHUTDOWN_TIMEOUT expired.
shutdown_guest()
{
- uri=$1
- guest=$2
+ local uri=$1
+ local guest=$2
- name=$(guest_name "$uri" "$guest")
+ local name=$(guest_name "$uri" "$guest")
eval_gettext "Starting shutdown on guest: \$name"
echo
retval run_virsh "$uri" shutdown "$guest" >/dev/null || return
- timeout=$SHUTDOWN_TIMEOUT
- check_timeout=false
+ local timeout=$SHUTDOWN_TIMEOUT
+ local check_timeout=false
+ local format=
+ local slept=
if [ $timeout -gt 0 ]; then
check_timeout=true
format=$(eval_gettext "Waiting for guest %s to shut down, %d seconds left\n")
@@ -300,8 +302,8 @@ shutdown_guest()
# was issued to libvirt to allow parallel shutdown.
shutdown_guest_async()
{
- uri=$1
- guest=$2
+ local uri=$1
+ local guest=$2
name=$(guest_name "$uri" "$guest")
eval_gettext "Starting shutdown on guest: \$name"
@@ -323,8 +325,8 @@ guest_count()
# Result is returned in "guests_shutting_down"
check_guests_shutdown()
{
- uri=$1
- guests_to_check=$2
+ local uri=$1
+ local guests_to_check=$2
guests_shutting_down=
for guest in $guests_to_check; do
@@ -344,16 +346,16 @@ check_guests_shutdown()
# a shutdown complete notice for guests that have finished
print_guests_shutdown()
{
- uri=$1
- before=$2
- after=$3
+ local uri=$1
+ local before=$2
+ local after=$3
for guest in $before; do
case " $after " in
*" $guest "*) continue;;
esac
- name=$(guest_name "$uri" "$guest")
+ local name=$(guest_name "$uri" "$guest")
if [ -n "$name" ]; then
eval_gettext "Shutdown of guest \$name complete."
echo
@@ -365,12 +367,14 @@ print_guests_shutdown()
# Shutdown guests GUESTS on machine URI in parallel
shutdown_guests_parallel()
{
- uri=$1
- guests=$2
-
- on_shutdown=
- check_timeout=false
- timeout=$SHUTDOWN_TIMEOUT
+ local uri=$1
+ local guests=$2
+
+ local on_shutdown=
+ local check_timeout=false
+ local timeout=$SHUTDOWN_TIMEOUT
+ local slept=
+ local format=
if [ $timeout -gt 0 ]; then
check_timeout=true
format=$(eval_gettext "Waiting for %d guests to shut down, %d seconds left\n")
@@ -382,7 +386,7 @@ shutdown_guests_parallel()
while [ -n "$guests" ] &&
[ $(guest_count "$on_shutdown") -lt "$PARALLEL_SHUTDOWN" ]; do
set -- $guests
- guest=$1
+ local guest=$1
shift
guests=$*
if [ -z "$(echo $on_shutdown | grep $guest)" ] &&
@@ -394,9 +398,9 @@ shutdown_guests_parallel()
sleep 1
set -- $guests
- guestcount=$#
+ local guestcount=$#
set -- $on_shutdown
- shutdowncount=$#
+ local shutdowncount=$#
if $check_timeout; then
if [ $(($timeout % 5)) -eq 0 ]; then
@@ -415,7 +419,7 @@ shutdown_guests_parallel()
fi
fi
- on_shutdown_prev=$on_shutdown
+ local on_shutdown_prev=$on_shutdown
check_guests_shutdown "$uri" "$on_shutdown"
on_shutdown="$guests_shutting_down"
print_guests_shutdown "$uri" "$on_shutdown_prev" "$on_shutdown"
@@ -428,8 +432,8 @@ stop() {
# last stop was not followed by start
[ -f "$LISTFILE" ] && return 0
- suspending=true
- if [ "x$ON_SHUTDOWN" = xshutdown ]; then
+ local suspending=true
+ if [ "/x$ON_SHUTDOWN" = xshutdown ]; then
suspending=false
if [ $SHUTDOWN_TIMEOUT -lt 0 ]; then
gettext "SHUTDOWN_TIMEOUT must be equal or greater than 0"
@@ -448,9 +452,9 @@ stop() {
eval_gettext "Running guests on \$uri URI: "
- list=$(list_guests "$uri")
+ local list=$(list_guests "$uri")
if [ $? -eq 0 ]; then
- empty=true
+ local empty=true
for uuid in $list; do
"$empty" || printf ", "
printf %s "$(guest_name "$uri" "$uuid")"
@@ -464,9 +468,9 @@ stop() {
fi
if "$suspending"; then
- transient=$(list_guests "$uri" "--transient")
+ local transient=$(list_guests "$uri" "--transient")
if [ $? -eq 0 ]; then
- empty=true
+ local empty=true
for uuid in $transient; do
if "$empty"; then
eval_gettext "Not suspending transient guests on URI: \$uri: "
@@ -563,7 +567,7 @@ rh_status() {
# usage [val]
# Display usage string, then exit with VAL (defaults to 2).
usage() {
- program_name=$0
+ local program_name=$0
eval_gettext "Usage: \$program_name {start|stop|status|restart|"\
"condrestart|try-restart|reload|force-reload|gueststatus|shutdown}"; echo
exit ${1-2}
--
2.17.1
4 years, 8 months
[PATCH] qemu_cgroup.c: use VIR_AUTOSTRINGLIST, g_autofree and g_autoptr
by Seeteena Thoufeek
Signed-off-by: Seeteena Thoufeek <s1seetee(a)linux.vnet.ibm.com>
---
src/qemu/qemu_cgroup.c | 91 +++++++++++++++++++-------------------------------
1 file changed, 35 insertions(+), 56 deletions(-)
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index c0e30f6..d34c515 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -62,7 +62,7 @@ qemuSetupImagePathCgroup(virDomainObjPtr vm,
{
qemuDomainObjPrivatePtr priv = vm->privateData;
int perms = VIR_CGROUP_DEVICE_READ;
- char **targetPaths = NULL;
+ VIR_AUTOSTRINGLIST targetPaths = NULL;
size_t i;
int rv;
int ret = -1;
@@ -82,12 +82,11 @@ qemuSetupImagePathCgroup(virDomainObjPtr vm,
virCgroupGetDevicePermsString(perms),
rv);
if (rv < 0)
- goto cleanup;
+ return ret;
if (rv > 0) {
/* @path is neither character device nor block device. */
- ret = 0;
- goto cleanup;
+ return 0;
}
if (virDevMapperGetTargets(path, &targetPaths) < 0 &&
@@ -95,7 +94,7 @@ qemuSetupImagePathCgroup(virDomainObjPtr vm,
virReportSystemError(errno,
_("Unable to get devmapper targets for %s"),
path);
- goto cleanup;
+ return ret;
}
for (i = 0; targetPaths && targetPaths[i]; i++) {
@@ -105,13 +104,10 @@ qemuSetupImagePathCgroup(virDomainObjPtr vm,
virCgroupGetDevicePermsString(perms),
rv);
if (rv < 0)
- goto cleanup;
+ return ret;
}
- ret = 0;
- cleanup:
- virStringListFree(targetPaths);
- return ret;
+ return 0;
}
@@ -739,7 +735,7 @@ static int
qemuSetupDevicesCgroup(virDomainObjPtr vm)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
- virQEMUDriverConfigPtr cfg = NULL;
+ g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(priv->driver);
const char *const *deviceACL = NULL;
int rv = -1;
int ret = -1;
@@ -757,15 +753,15 @@ qemuSetupDevicesCgroup(virDomainObjPtr vm)
return 0;
}
- goto cleanup;
+ return ret;
}
if (qemuSetupFirmwareCgroup(vm) < 0)
- goto cleanup;
+ return ret;
for (i = 0; i < vm->def->ndisks; i++) {
if (qemuSetupImageChainCgroup(vm, vm->def->disks[i]->src) < 0)
- goto cleanup;
+ return ret;
}
rv = virCgroupAllowDevice(priv->cgroup, 'c', DEVICE_PTY_MAJOR, -1,
@@ -773,9 +769,8 @@ qemuSetupDevicesCgroup(virDomainObjPtr vm)
virDomainAuditCgroupMajor(vm, priv->cgroup, "allow", DEVICE_PTY_MAJOR,
"pty", "rw", rv == 0);
if (rv < 0)
- goto cleanup;
+ return ret;
- cfg = virQEMUDriverGetConfig(priv->driver);
deviceACL = cfg->cgroupDeviceACL ?
(const char *const *)cfg->cgroupDeviceACL :
defaultDeviceACL;
@@ -791,7 +786,7 @@ qemuSetupDevicesCgroup(virDomainObjPtr vm)
virDomainAuditCgroupMajor(vm, priv->cgroup, "allow", DEVICE_SND_MAJOR,
"sound", "rw", rv == 0);
if (rv < 0)
- goto cleanup;
+ return ret;
}
for (i = 0; deviceACL[i] != NULL; i++) {
@@ -805,57 +800,54 @@ qemuSetupDevicesCgroup(virDomainObjPtr vm)
virDomainAuditCgroupPath(vm, priv->cgroup, "allow", deviceACL[i], "rw", rv);
if (rv < 0 &&
!virLastErrorIsSystemErrno(ENOENT))
- goto cleanup;
+ return ret;
}
if (virDomainChrDefForeach(vm->def,
true,
qemuSetupChardevCgroupCB,
vm) < 0)
- goto cleanup;
+ return ret;
if (vm->def->tpm && qemuSetupTPMCgroup(vm) < 0)
- goto cleanup;
+ return ret;
for (i = 0; i < vm->def->nhostdevs; i++) {
/* This may allow /dev/vfio/vfio multiple times, but that
* is not a problem. Kernel will have only one record. */
if (qemuSetupHostdevCgroup(vm, vm->def->hostdevs[i]) < 0)
- goto cleanup;
+ return ret;
}
for (i = 0; i < vm->def->nmems; i++) {
if (qemuSetupMemoryDevicesCgroup(vm, vm->def->mems[i]) < 0)
- goto cleanup;
+ return ret;
}
for (i = 0; i < vm->def->ngraphics; i++) {
if (qemuSetupGraphicsCgroup(vm, vm->def->graphics[i]) < 0)
- goto cleanup;
+ return ret;
}
for (i = 0; i < vm->def->nvideos; i++) {
if (qemuSetupVideoCgroup(vm, vm->def->videos[i]) < 0)
- goto cleanup;
+ return ret;
}
for (i = 0; i < vm->def->ninputs; i++) {
if (qemuSetupInputCgroup(vm, vm->def->inputs[i]) < 0)
- goto cleanup;
+ return ret;
}
for (i = 0; i < vm->def->nrngs; i++) {
if (qemuSetupRNGCgroup(vm, vm->def->rngs[i]) < 0)
- goto cleanup;
+ return ret;
}
if (vm->def->sev && qemuSetupSEVCgroup(vm) < 0)
- goto cleanup;
+ return ret;
- ret = 0;
- cleanup:
- virObjectUnref(cfg);
- return ret;
+ return 0;
}
@@ -924,13 +916,13 @@ qemuInitCgroup(virDomainObjPtr vm,
{
int ret = -1;
qemuDomainObjPrivatePtr priv = vm->privateData;
- virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(priv->driver);
+ g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(priv->driver);
if (!virQEMUDriverIsPrivileged(priv->driver))
- goto done;
+ return 0;
if (!virCgroupAvailable())
- goto done;
+ return 0;
virCgroupFree(&priv->cgroup);
@@ -938,7 +930,7 @@ qemuInitCgroup(virDomainObjPtr vm,
virDomainResourceDefPtr res;
if (VIR_ALLOC(res) < 0)
- goto cleanup;
+ return ret;
res->partition = g_strdup("/machine");
@@ -949,7 +941,7 @@ qemuInitCgroup(virDomainObjPtr vm,
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Resource partition '%s' must start with '/'"),
vm->def->resource->partition);
- goto cleanup;
+ return ret;
}
if (virCgroupNewMachine(priv->machineName,
@@ -964,16 +956,9 @@ qemuInitCgroup(virDomainObjPtr vm,
cfg->maxThreadsPerProc,
&priv->cgroup) < 0) {
if (virCgroupNewIgnoreError())
- goto done;
-
- goto cleanup;
+ return 0;
}
-
- done:
- ret = 0;
- cleanup:
- virObjectUnref(cfg);
- return ret;
+ return ret;
}
static void
@@ -1058,14 +1043,14 @@ int
qemuConnectCgroup(virDomainObjPtr vm)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
- virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(priv->driver);
+ g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(priv->driver);
int ret = -1;
if (!virQEMUDriverIsPrivileged(priv->driver))
- goto done;
+ return 0;
if (!virCgroupAvailable())
- goto done;
+ return 0;
virCgroupFree(&priv->cgroup);
@@ -1075,14 +1060,9 @@ qemuConnectCgroup(virDomainObjPtr vm)
cfg->cgroupControllers,
priv->machineName,
&priv->cgroup) < 0)
- goto cleanup;
+ return ret;
qemuRestoreCgroupState(vm);
-
- done:
- ret = 0;
- cleanup:
- virObjectUnref(cfg);
return ret;
}
@@ -1269,7 +1249,7 @@ qemuCgroupEmulatorAllNodesAllow(virCgroupPtr cgroup,
qemuCgroupEmulatorAllNodesDataPtr *retData)
{
qemuCgroupEmulatorAllNodesDataPtr data = NULL;
- char *all_nodes_str = NULL;
+ g_autofree char *all_nodes_str = NULL;
virBitmapPtr all_nodes = NULL;
int ret = -1;
@@ -1298,7 +1278,6 @@ qemuCgroupEmulatorAllNodesAllow(virCgroupPtr cgroup,
ret = 0;
cleanup:
- VIR_FREE(all_nodes_str);
virBitmapFree(all_nodes);
qemuCgroupEmulatorAllNodesDataFree(data);
--
1.8.3.1
4 years, 8 months
[PATCH v3 0/3] add support for QEMU 9pfs 'multidevs' option
by Christian Schoenebeck
QEMU 4.2 added a new option 'multidevs' for 9pfs. The following patch adds
support for this new option to libvirt.
In short, what is this about: to distinguish files uniquely from each other
in general, numeric file IDs are typically used for comparison, which in
practice is the combination of a file's device ID and the file's inode
number. Unfortunately 9p protocol's QID field used for this purpose,
currently is too small to fit both the device ID and inode number in, which
hence is a problem if one 9pfs export contains multiple devices and may
thus lead to misbheaviours on guest (e.g. with SAMBA file servers) in that
case due to potential file ID collisions.
To mitigate this problem with 9pfs a 'multidevs' option was introduced in
QEMU 4.2 for defining how to deal with this, e.g. multidevs=remap will cause
QEMU's 9pfs implementation to remap all inodes from host side to different
inode numbers on guest side in a way that prevents file ID collisions.
NOTE: In the libvirt docs changes of this libvirt patch I simply assumed
"since 6.2.0". So the final libvirt version number would need to be adjusted
in that text if necessary.
See QEMU discussion with following Message-ID for details:
8a2ffe17fda3a86b9a5a437e1245276881f1e235.1567680121.git.qemu_oss(a)crudebyte.com
v2->v3:
* Rebased to master (SHA-1 e4bf03b8ff).
* Auto sense QEMU capability for command line option fsdev.multidevs
instead of checking for QEMU version 4.2. [patch 1]
* Auto regenerated capabilities data for all archs (fixes capability
test). [patch 1]
* Added XML test. [patch 2]
* Added argv test. [patch 3]
Message-ID of v2: cover.1584723662.git.qemu_oss(a)crudebyte.com
Christian Schoenebeck (3):
qemu: capabilities: add QEMU_CAPS_VIRTFS_MULTIDEVS
conf: add 'multidevs' option
qemu: add support for 'multidevs' option
docs/formatdomain.html.in | 40 ++++++++++++-
docs/schemas/domaincommon.rng | 10 ++++
src/conf/domain_conf.c | 29 ++++++++++
src/conf/domain_conf.h | 13 +++++
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 7 +++
src/qemu/qemu_domain.c | 12 ++++
.../caps_4.2.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 +
.../caps_4.2.0.x86_64.xml | 1 +
.../caps_5.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
.../caps_5.0.0.x86_64.xml | 1 +
.../virtio-9p-multidevs.x86_64-latest.args | 45 +++++++++++++++
.../qemuxml2argvdata/virtio-9p-multidevs.xml | 53 ++++++++++++++++++
tests/qemuxml2argvtest.c | 2 +
.../virtio-9p-multidevs.x86_64-latest.xml | 56 +++++++++++++++++++
tests/qemuxml2xmltest.c | 2 +
19 files changed, 277 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/virtio-9p-multidevs.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/virtio-9p-multidevs.xml
create mode 100644 tests/qemuxml2xmloutdata/virtio-9p-multidevs.x86_64-latest.xml
--
2.20.1
4 years, 8 months
[PATCH 0/4] support for virtio packed virtqueues
by Bjoern Walk
QEMU recently (86044b24e) introduced packed virtqueues for virtio that
supposedly have better cache utilization and performance compared to the
default split queues. So here's a patch set that expose the virtio
parameter as a optional libvirt XML attribute to virtio-backed devices,
e.g.:
<interface type='user'>
<mac address='00:11:22:33:44:55'/>
<model type='virtio'/>
<driver packed='on'/>
</interface>
The default value if the attribute is omitted is still 'off' and regular
split virtqueues are used.
Bjoern Walk (4):
qemu: capabilities: add 'packed' capability
conf: domain: support for virtio packed option
qemu: command: support for virtio packed option
docs: documentation for virtio packed option
docs/formatdomain.html.in | 8 +++++
docs/schemas/domaincommon.rng | 5 +++
src/conf/domain_conf.c | 28 ++++++++++++++++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 6 ++++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 10 ++++++
.../caps_4.2.0.aarch64.xml | 1 +
.../caps_4.2.0.x86_64.xml | 1 +
.../caps_5.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
.../caps_5.0.0.x86_64.xml | 1 +
tests/qemuxml2argvdata/virtio-options.args | 32 ++++++++++---------
tests/qemuxml2argvdata/virtio-options.xml | 26 +++++++--------
tests/qemuxml2argvtest.c | 3 +-
tests/qemuxml2xmltest.c | 3 +-
16 files changed, 98 insertions(+), 30 deletions(-)
--
2.24.1
4 years, 8 months
[PATCH 00/15] move validations out of qemu_domain.c
by Daniel Henrique Barboza
This is a suggestion made by Peter in [1], in the review
discussion of a series in which I started moving qemuCaps
validation from qemu_command.c to qemu_domain.c [2]. I'll
quote here what he said back then:
"My only suggestion is that after this we should move all
validation into a separate file. qemu_domain was a code dumping
place for a long time and since we now have a lot of common code
moving it out would be benficial for cleaning up an making it
more obvious."
This is my first go at it with a new file called 'qemu_validate.c'.
The code changes are trivial - just moving stuff from qemu_domain
to qemu_validate - but the amount of changes can sure make for
really tedious reviews. Patches were split according to my own
criteria of how annoying would it be to review each one. The
maintainer is, as always, welcome to squash them up as necessary.
There are still validations to be moved inside qemu_domain.c
after this series. I chose to do this first round to validate
the idea instead of rocking a 40-something patch series all of a
sudden. Once this is figured out we can proceed with the moving.
After all this is settled I intend to continue the work I started
in [2], but using qemu_validate.c instead of qemu_domain.c as
destination.
[1] https://www.redhat.com/archives/libvir-list/2019-December/msg00608.html
[2] https://www.redhat.com/archives/libvir-list/2019-December/msg00570.html
Daniel Henrique Barboza (15):
qemu: introducing qemu_validate.c/h
qemu: move static functions of qemuDomainDefValidate()
qemu: move qemuDomainValidateDef() to qemu_validate.c
qemu: move qemuDomainDeviceDefValidateAddress() to qemu_validation.c
qemu: move qemuDomainDeviceDefValidateAddress() to qemu_validate.c
qemu: move qemuDomainChrDefValidate() to qemu_validate.c
qemu: move qemuDomainDeviceDefValidateHostdev() to qemu_validate.c
qemu: move qemuDomainDeviceDefValidateVideo() to qemu_validate.c
qemu: move qemuDomainDeviceDefValidateDisk() to qemu_validate.c
qemu: move qemuValidateDomainDeviceDefController() to qemu_validate.c
qemu: move qemuDomainDeviceDefValidateGraphics() to qemu_validate.c
qemu: move qemuDomainDeviceDefValidateFS() to qemu_validate.c
qemu: move qemuDomainDeviceDefValidateSound() to qemu_validate.c
qemu: move remaining qemuDomainDeviceDefValidate() helpers
qemu: move qemuValidateDomainDeviceDef() to qemu_validate.c
po/POTFILES.in | 1 +
src/qemu/Makefile.inc.am | 2 +
src/qemu/qemu_domain.c | 3895 ++------------------------------------
src/qemu/qemu_validate.c | 3592 +++++++++++++++++++++++++++++++++++
src/qemu/qemu_validate.h | 34 +
tests/qemublocktest.c | 3 +-
6 files changed, 3801 insertions(+), 3726 deletions(-)
create mode 100644 src/qemu/qemu_validate.c
create mode 100644 src/qemu/qemu_validate.h
--
2.25.1
4 years, 8 months
[PATCH v4 0/7] Tighten qemu-img rules on missing backing format
by Eric Blake
v3 was here:
https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg01730.html
In v4:
- old patch 1 was reworked into new patch 1-3, with stricter rules
on which backing formats are accepted [Kevin]
- patch 4 is new: amend is handled differently from rebase [Kashyap]
- rebase to master
Eric Blake (7):
sheepdog: Add trivial backing_fmt support
vmdk: Add trivial backing_fmt support
qcow: Tolerate backing_fmt=, but warn on backing_fmt=raw
qcow2: Deprecate use of qemu-img amend to change backing file
iotests: Specify explicit backing format where sensible
block: Add support to warn on backing file change without format
qemu-img: Deprecate use of -b without -F
docs/system/deprecated.rst | 31 +++++++++++++++
docs/tools/qemu-img.rst | 4 ++
include/block/block.h | 4 +-
block.c | 34 +++++++++++++++--
block/qcow.c | 16 +++++++-
block/qcow2.c | 7 +++-
block/sheepdog.c | 14 +++++++
block/stream.c | 2 +-
block/vmdk.c | 14 +++++++
blockdev.c | 3 +-
qemu-img.c | 4 +-
tests/qemu-iotests/017 | 2 +-
tests/qemu-iotests/017.out | 2 +-
tests/qemu-iotests/018 | 2 +-
tests/qemu-iotests/018.out | 2 +-
tests/qemu-iotests/019 | 5 ++-
tests/qemu-iotests/019.out | 2 +-
tests/qemu-iotests/020 | 4 +-
tests/qemu-iotests/020.out | 4 +-
tests/qemu-iotests/024 | 8 ++--
tests/qemu-iotests/024.out | 5 ++-
tests/qemu-iotests/028 | 4 +-
tests/qemu-iotests/028.out | 2 +-
tests/qemu-iotests/030 | 26 +++++++++----
tests/qemu-iotests/034 | 2 +-
tests/qemu-iotests/034.out | 2 +-
tests/qemu-iotests/037 | 2 +-
tests/qemu-iotests/037.out | 2 +-
tests/qemu-iotests/038 | 2 +-
tests/qemu-iotests/038.out | 2 +-
tests/qemu-iotests/039 | 3 +-
tests/qemu-iotests/039.out | 2 +-
tests/qemu-iotests/040 | 47 ++++++++++++++++-------
tests/qemu-iotests/041 | 37 ++++++++++++------
tests/qemu-iotests/042 | 4 +-
tests/qemu-iotests/043 | 18 ++++-----
tests/qemu-iotests/043.out | 16 +++++---
tests/qemu-iotests/046 | 2 +-
tests/qemu-iotests/046.out | 2 +-
tests/qemu-iotests/050 | 4 +-
tests/qemu-iotests/050.out | 2 +-
tests/qemu-iotests/051 | 2 +-
tests/qemu-iotests/051.out | 2 +-
tests/qemu-iotests/051.pc.out | 2 +-
tests/qemu-iotests/056 | 3 +-
tests/qemu-iotests/060 | 2 +-
tests/qemu-iotests/060.out | 2 +-
tests/qemu-iotests/061 | 10 ++---
tests/qemu-iotests/061.out | 11 +++---
tests/qemu-iotests/069 | 2 +-
tests/qemu-iotests/069.out | 2 +-
tests/qemu-iotests/073 | 2 +-
tests/qemu-iotests/073.out | 2 +-
tests/qemu-iotests/082 | 10 +++--
tests/qemu-iotests/082.out | 14 ++++---
tests/qemu-iotests/085 | 4 +-
tests/qemu-iotests/085.out | 6 +--
tests/qemu-iotests/089 | 2 +-
tests/qemu-iotests/089.out | 2 +-
tests/qemu-iotests/095 | 4 +-
tests/qemu-iotests/095.out | 4 +-
tests/qemu-iotests/097 | 4 +-
tests/qemu-iotests/097.out | 16 ++++----
tests/qemu-iotests/098 | 2 +-
tests/qemu-iotests/098.out | 8 ++--
tests/qemu-iotests/110 | 4 +-
tests/qemu-iotests/110.out | 4 +-
tests/qemu-iotests/114 | 11 ++++++
tests/qemu-iotests/114.out | 8 ++++
tests/qemu-iotests/122 | 27 +++++++------
tests/qemu-iotests/122.out | 8 ++--
tests/qemu-iotests/126 | 4 +-
tests/qemu-iotests/126.out | 4 +-
tests/qemu-iotests/127 | 4 +-
tests/qemu-iotests/127.out | 4 +-
tests/qemu-iotests/129 | 3 +-
tests/qemu-iotests/133 | 2 +-
tests/qemu-iotests/133.out | 2 +-
tests/qemu-iotests/139 | 2 +-
tests/qemu-iotests/141 | 4 +-
tests/qemu-iotests/141.out | 4 +-
tests/qemu-iotests/142 | 2 +-
tests/qemu-iotests/142.out | 2 +-
tests/qemu-iotests/153 | 14 +++----
tests/qemu-iotests/153.out | 35 +++++++++--------
tests/qemu-iotests/154 | 42 ++++++++++----------
tests/qemu-iotests/154.out | 42 ++++++++++----------
tests/qemu-iotests/155 | 12 ++++--
tests/qemu-iotests/156 | 9 +++--
tests/qemu-iotests/156.out | 6 +--
tests/qemu-iotests/158 | 2 +-
tests/qemu-iotests/158.out | 2 +-
tests/qemu-iotests/161 | 8 ++--
tests/qemu-iotests/161.out | 8 ++--
tests/qemu-iotests/176 | 4 +-
tests/qemu-iotests/176.out | 32 ++++++++--------
tests/qemu-iotests/177 | 2 +-
tests/qemu-iotests/177.out | 2 +-
tests/qemu-iotests/179 | 2 +-
tests/qemu-iotests/179.out | 2 +-
tests/qemu-iotests/189 | 2 +-
tests/qemu-iotests/189.out | 2 +-
tests/qemu-iotests/191 | 12 +++---
tests/qemu-iotests/191.out | 12 +++---
tests/qemu-iotests/195 | 6 +--
tests/qemu-iotests/195.out | 6 +--
tests/qemu-iotests/198 | 2 +-
tests/qemu-iotests/198.out | 3 +-
tests/qemu-iotests/204 | 2 +-
tests/qemu-iotests/204.out | 2 +-
tests/qemu-iotests/216 | 2 +-
tests/qemu-iotests/224 | 4 +-
tests/qemu-iotests/225 | 2 +-
tests/qemu-iotests/225.out | 2 +-
tests/qemu-iotests/228 | 5 ++-
tests/qemu-iotests/245 | 3 +-
tests/qemu-iotests/249 | 4 +-
tests/qemu-iotests/249.out | 4 +-
tests/qemu-iotests/252 | 2 +-
tests/qemu-iotests/257 | 3 +-
tests/qemu-iotests/267 | 4 +-
tests/qemu-iotests/267.out | 6 +--
tests/qemu-iotests/270 | 2 +-
tests/qemu-iotests/270.out | 2 +-
tests/qemu-iotests/273 | 4 +-
tests/qemu-iotests/273.out | 4 +-
tests/qemu-iotests/279 | 4 +-
tests/qemu-iotests/279.out | 4 +-
tests/qemu-iotests/290 | 72 +++++++++++++++++++++++++++++++++++
tests/qemu-iotests/290.out | 45 ++++++++++++++++++++++
tests/qemu-iotests/group | 1 +
131 files changed, 671 insertions(+), 348 deletions(-)
create mode 100755 tests/qemu-iotests/290
create mode 100644 tests/qemu-iotests/290.out
--
2.25.1
4 years, 8 months
[PATCH 0/2] Optimize initialization of storage files
by Peter Krempa
See 2/2.
Peter Krempa (2):
qemuSecurityChownCallback: Remove 'cleanup' section
qemuSecurityChownCallback: Don't initialize storage file subsystem for
local file
src/qemu/qemu_driver.c | 31 +++++++++++++------------------
1 file changed, 13 insertions(+), 18 deletions(-)
--
2.24.1
4 years, 8 months