public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: cel@kernel.org
Cc: kdevops@lists.linux.dev, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH v3 1/1] guestfs: Per-user storage pools
Date: Wed, 23 Apr 2025 10:04:26 -0700	[thread overview]
Message-ID: <aAkdmjj54DbZIWNA@bombadil.infradead.org> (raw)
In-Reply-To: <20250423142009.685177-2-cel@kernel.org>

On Wed, Apr 23, 2025 at 10:20:09AM -0400, cel@kernel.org wrote:
> 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 }}"

So what I meant with my feedbakc was to make this an option. So for
instance you can add a new Kconfig choice and the default
KDEVOPS_STORAGE_POOL_USER_COMPAT and when that's true we 
default KDEVOPS_STORAGE_POOL_USER to "kdevops", otherwise it calls
if KDEVOPS_STORAGE_POOL_USER_AUTO is set then the default is $USER.

Then you can wackamole these two lines too:

scripts/guestfs.Makefile:GUESTFS_ARGS += kdevops_storage_pool_user='$(USER)'
scripts/vagrant.Makefile:VAGRANT_ARGS += kdevops_storage_pool_user='$(USER)'

By making KDEVOPS_STORAGE_POOL_USER_COMPAT default it would work with
existing deployments.

  Luis

      reply	other threads:[~2025-04-23 17:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 14:20 [PATCH v3 0/1] Add uniquifier to storage pool path cel
2025-04-23 14:20 ` [PATCH v3 1/1] guestfs: Per-user storage pools cel
2025-04-23 17:04   ` Luis Chamberlain [this message]

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=aAkdmjj54DbZIWNA@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=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