Skip to content

Commit 1e8f65c

Browse files
committed
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 chance 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, optionally replace the "kdevops" string in the storage pool path with the name of the user account running kdevops. Default behavior is to continue using "kdevops". Suggested-by: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent d28e792 commit 1e8f65c

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

kconfigs/Kconfig.libvirt

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,10 +1124,47 @@ config LIBVIRT_GDB_BASEPORT
11241124
/scripts/get_gdb_base_port.sh file and use the last 4 digits of the md5sum
11251125
of the file to assign to libvirt_gdb_baseport.
11261126

1127+
choice
1128+
prompt "Storage pool user name to use"
1129+
default KDEVOPS_STORAGE_POOL_USER_DEFAULT
1130+
help
1131+
The storage pool user is name of the local user ID that has
1132+
access to the libvirt storage pool to be used by kdevops.
1133+
1134+
When there is only one user running kdevops on a system,
1135+
the default setting should work. To enable multiple users
1136+
to run kdevops on the same system, select
1137+
KDEVOPS_STORAGE_POOL_USER_AUTO.
1138+
1139+
config KDEVOPS_STORAGE_POOL_USER_DEFAULT
1140+
bool "default"
1141+
help
1142+
The default storage pool user name is always "kdevops".
1143+
1144+
config KDEVOPS_STORAGE_POOL_USER_AUTO
1145+
bool "auto"
1146+
help
1147+
Kdevops selects the storage pool user name.
1148+
1149+
config KDEVOPS_STORAGE_POOL_USER_CUSTOM
1150+
bool "custom"
1151+
help
1152+
Set a fixed custom storage pool user name.
1153+
1154+
endchoice
1155+
1156+
config KDEVOPS_STORAGE_POOL_USER_CUSTOM_NAME
1157+
string "Storage pool user name"
1158+
depends on KDEVOPS_STORAGE_POOL_USER_CUSTOM
1159+
help
1160+
Set the name of the storage pool user.
1161+
11271162
config KDEVOPS_STORAGE_POOL_USER
11281163
string
11291164
output yaml
1130-
default "kdevops"
1165+
default "kdevops" if KDEVOPS_STORAGE_POOL_USER_DEFAULT
1166+
default $(shell, echo $USER) if KDEVOPS_STORAGE_POOL_USER_AUTO
1167+
default KDEVOPS_STORAGE_POOL_USER_CUSTOM_NAME if KDEVOPS_STORAGE_POOL_USER_CUSTOM
11311168

11321169
config KDEVOPS_STORAGE_POOL_PATH
11331170
string

0 commit comments

Comments
 (0)