Skip to content

Commit fc072be

Browse files
chuckleverKPD
authored andcommitted
guestfs: Per-user storage pools
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>
1 parent 979316a commit fc072be

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

kconfigs/Kconfig.libvirt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ config LIBVIRT_STORAGE_POOL_PATH
167167
config KDEVOPS_STORAGE_POOL_PATH
168168
string
169169
output yaml
170-
default "{{ libvirt_storage_pool_path }}/kdevops"
170+
default "{{ libvirt_storage_pool_path }}/{{ kdevops_storage_pool_user }}"
171171

172172
config QEMU_BIN_PATH
173173
string

scripts/bringup_guestfs.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ IMG_FMT="qcow2"
1414
if [ "${CONFIG_LIBVIRT_EXTRA_DRIVE_FORMAT_RAW}" = "y" ]; then
1515
IMG_FMT="raw"
1616
fi
17-
STORAGETOPDIR="${CONFIG_LIBVIRT_STORAGE_POOL_PATH}"
18-
STORAGEDIR="${STORAGETOPDIR}/kdevops/guestfs"
17+
STORAGEDIR="${CONFIG_KDEVOPS_STORAGE_POOL_PATH}/guestfs"
1918
QEMU_GROUP=$CONFIG_LIBVIRT_QEMU_GROUP
2019
GUESTFSDIR="${TOPDIR}/guestfs"
2120
OS_VERSION=${CONFIG_VIRT_BUILDER_OS_VERSION}

scripts/destroy_guestfs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source ${TOPDIR}/scripts/lib.sh
77

88
export LIBVIRT_DEFAULT_URI=$CONFIG_LIBVIRT_URI
99

10-
STORAGEDIR="${CONFIG_LIBVIRT_STORAGE_POOL_PATH}/kdevops/guestfs"
10+
STORAGEDIR="${CONFIG_KDEVOPS_STORAGE_POOL_PATH}/guestfs"
1111
GUESTFSDIR="${TOPDIR}/guestfs"
1212

1313
if [ -f "$GUESTFSDIR/kdevops_nodes.yaml" ]; then

scripts/guestfs.Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ destroy_guestfs:
100100
PHONY += destroy_guestfs
101101

102102
cleancache:
103-
$(Q)rm -f $(subst ",,$(CONFIG_LIBVIRT_STORAGE_POOL_PATH))/kdevops/guestfs/base_images/*
103+
$(Q)rm -f $(subst ",,$("${CONFIG_KDEVOPS_STORAGE_POOL_PATH}/guestfs"))/guestfs/base_images/*

0 commit comments

Comments
 (0)