From: cel@kernel.org
To: <kdevops@lists.linux.dev>
Cc: Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH v2 2/2] guestfs: Per-user storage pools
Date: Wed, 9 Apr 2025 11:23:35 -0400 [thread overview]
Message-ID: <20250409152335.890665-3-cel@kernel.org> (raw)
In-Reply-To: <20250409152335.890665-1-cel@kernel.org>
From: Chuck Lever <chuck.lever@oracle.com>
I'd like to be able to run more than one instance of kdevops per
physical host. Currently the kdevops guestfs set-up steers all
storage pool activity into ${STORAGE_POOL}/kdevops/guestfs, which
means there's a good change that two different logged-in users will
create virtual machines whose names (and block devices) conflict.
So far I haven't been able to get the other storage pool-related
settings to add sufficient uniqueness to prevent this conflict.
Instead, replace the "kdevops" string in the storage pool path with
the name of the user account running kdevops.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
kconfigs/Kconfig.libvirt | 2 +-
scripts/bringup_guestfs.sh | 2 +-
scripts/destroy_guestfs.sh | 2 +-
scripts/guestfs.Makefile | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kconfigs/Kconfig.libvirt b/kconfigs/Kconfig.libvirt
index cba8abf1e24b..74a93f177732 100644
--- a/kconfigs/Kconfig.libvirt
+++ b/kconfigs/Kconfig.libvirt
@@ -167,7 +167,7 @@ config LIBVIRT_STORAGE_POOL_PATH
config KDEVOPS_STORAGE_POOL_PATH
string
output yaml
- default "{{ libvirt_storage_pool_path }}/kdevops"
+ default "{{ libvirt_storage_pool_path }}/{{ kdevops_storage_pool_user }}"
config QEMU_BIN_PATH
string
diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh
index bc0176f8f5b4..6019241c8d99 100755
--- a/scripts/bringup_guestfs.sh
+++ b/scripts/bringup_guestfs.sh
@@ -15,7 +15,7 @@ if [ "${CONFIG_LIBVIRT_EXTRA_DRIVE_FORMAT_RAW}" = "y" ]; then
IMG_FMT="raw"
fi
STORAGETOPDIR="${CONFIG_LIBVIRT_STORAGE_POOL_PATH}"
-STORAGEDIR="${STORAGETOPDIR}/kdevops/guestfs"
+STORAGEDIR="${STORAGETOPDIR}/${USER}/guestfs"
QEMU_GROUP=$CONFIG_LIBVIRT_QEMU_GROUP
GUESTFSDIR="${TOPDIR}/guestfs"
OS_VERSION=${CONFIG_VIRT_BUILDER_OS_VERSION}
diff --git a/scripts/destroy_guestfs.sh b/scripts/destroy_guestfs.sh
index ee5dc2b57d6d..8cf58e4d91c8 100755
--- a/scripts/destroy_guestfs.sh
+++ b/scripts/destroy_guestfs.sh
@@ -7,7 +7,7 @@ source ${TOPDIR}/scripts/lib.sh
export LIBVIRT_DEFAULT_URI=$CONFIG_LIBVIRT_URI
-STORAGEDIR="${CONFIG_LIBVIRT_STORAGE_POOL_PATH}/kdevops/guestfs"
+STORAGEDIR="${CONFIG_LIBVIRT_STORAGE_POOL_PATH}/${USER}/guestfs"
GUESTFSDIR="${TOPDIR}/guestfs"
if [ -f "$GUESTFSDIR/kdevops_nodes.yaml" ]; then
diff --git a/scripts/guestfs.Makefile b/scripts/guestfs.Makefile
index e1cf25d62d04..e0a7b4e5341c 100644
--- a/scripts/guestfs.Makefile
+++ b/scripts/guestfs.Makefile
@@ -104,4 +104,4 @@ destroy_guestfs:
PHONY += destroy_guestfs
cleancache:
- $(Q)rm -f $(subst ",,$(CONFIG_LIBVIRT_STORAGE_POOL_PATH))/kdevops/guestfs/base_images/*
+ $(Q)rm -f $(subst ",,$(CONFIG_LIBVIRT_STORAGE_POOL_PATH))/$(USER)/guestfs/base_images/*
--
2.49.0
next prev parent reply other threads:[~2025-04-09 15:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 15:23 [PATCH v2 0/2] Add uniquifier to storage pool path cel
2025-04-09 15:23 ` [PATCH v2 1/2] guestfs: Fix definition of guestfs_storage_dir cel
2025-04-10 8:41 ` Daniel Gomez
2025-04-10 14:39 ` Chuck Lever
2025-04-09 15:23 ` cel [this message]
2025-04-10 9:11 ` [PATCH v2 2/2] guestfs: Per-user storage pools Daniel Gomez
2025-04-10 15:18 ` Chuck Lever
2025-04-14 7:48 ` Daniel Gomez
2025-04-14 13:41 ` Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250409152335.890665-3-cel@kernel.org \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox