Skip to content

Commit e600c64

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 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 c50856d commit e600c64

1 file changed

Lines changed: 38 additions & 1 deletion

File tree

kconfigs/Kconfig.libvirt

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,10 +1099,47 @@ config LIBVIRT_STORAGE_POOL_NAME
10991099
For instance you may want to use a volume name of "data2" for a path
11001100
on a partition on /data2/ or something like that.
11011101

1102+
choice
1103+
prompt "Storage pool user name to use"
1104+
default KDEVOPS_STORAGE_POOL_USER_DEFAULT
1105+
help
1106+
The storage pool user is name of the local user ID that has
1107+
access to the libvirt storage pool to be used by kdevops.
1108+
1109+
When there is only one user running kdevops on a system,
1110+
the default setting should work. To enable multiple users
1111+
to run kdevops on the same system, select
1112+
KDEVOPS_STORAGE_POOL_USER_AUTO.
1113+
1114+
config KDEVOPS_STORAGE_POOL_USER_DEFAULT
1115+
bool "default"
1116+
help
1117+
The default storage pool user name is always "kdevops".
1118+
1119+
config KDEVOPS_STORAGE_POOL_USER_AUTO
1120+
bool "auto"
1121+
help
1122+
Kdevops selects the storage pool user name.
1123+
1124+
config KDEVOPS_STORAGE_POOL_USER_CUSTOM
1125+
bool "custom"
1126+
help
1127+
Set a fixed custom storage pool user name.
1128+
1129+
endchoice
1130+
1131+
config KDEVOPS_STORAGE_POOL_USER_CUSTOM_NAME
1132+
string "Storage pool user name"
1133+
depends on KDEVOPS_STORAGE_POOL_USER_CUSTOM
1134+
help
1135+
Set the name of the storage pool user.
1136+
11021137
config KDEVOPS_STORAGE_POOL_USER
11031138
string
11041139
output yaml
1105-
default "kdevops"
1140+
default "kdevops" if KDEVOPS_STORAGE_POOL_USER_DEFAULT
1141+
default $(shell, echo $USER) if KDEVOPS_STORAGE_POOL_USER_AUTO
1142+
default KDEVOPS_STORAGE_POOL_USER_CUSTOM_NAME if KDEVOPS_STORAGE_POOL_USER_CUSTOM
11061143

11071144
config KDEVOPS_STORAGE_POOL_PATH
11081145
string

0 commit comments

Comments
 (0)