From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F344B2BCF5 for ; Fri, 6 Sep 2024 20:10:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725653420; cv=none; b=k5CQbEj+7HcbV1mbTSH76QaNe6idvG4L9ChLT+tApT4gRHH5m8Waj7KzwAT17BEhFLfOePweCyrVKqeux6eqwcxCkLXWGmUsjZEsrhYQWI2U7f70wY7Oleq7WwcANqMCvCqgUIWeiis1JBgdr/XsX9iptQNNjA7rXVRap6R9hF0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725653420; c=relaxed/simple; bh=Kxa4jf9n36WQsW5oGGCEtTJm1+j4bn6HsiH+50uDuSk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: In-Reply-To:Content-Type:Content-Disposition; b=ZMRNE46eVbSS3Z6m68KP88nmPF8/4H/PlWts3B6NFznfGZAYHA38BRc3LPrZ5bPBYbysG4ofC0U5pzt5cbae/qaWOV7fsdlMSdkw+BI9usL0THRe5Ws1qF/KLrgFomsTzmnE1spbz6zdzZMtih5UmR+3bz5nJU/9pUfEVVTPJws= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GxDOB9Hd; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GxDOB9Hd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725653417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cL9t+LPaMAONNHu3EEH2ctuPUUXDoLWmEl+5cl3i0to=; b=GxDOB9HdYoR1YIH1BTb3ybSOTMzvh+qoc5a53Hk0n13vlovwhkZalMndcbadpek0G8T928 d1HGZzAa7eNWP+LB6A09Uy6DhS7/u90Vk2D9NoVamcgpUXAF/Dr06hPc+r6Mkc8KYuu/DV tgolNgxt8NQXuxJ3WHuJLY9kq4dnZvY= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-606-0QHlUtuVPsWe1Mb9mmzlyA-1; Fri, 06 Sep 2024 16:10:16 -0400 X-MC-Unique: 0QHlUtuVPsWe1Mb9mmzlyA-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5DBC51956048; Fri, 6 Sep 2024 20:10:15 +0000 (UTC) Received: from aion.redhat.com (unknown [10.22.64.160]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AD8271956048; Fri, 6 Sep 2024 20:10:14 +0000 (UTC) Received: by aion.redhat.com (Postfix, from userid 1000) id B1CA01F177A; Fri, 6 Sep 2024 16:10:12 -0400 (EDT) Date: Fri, 6 Sep 2024 16:10:12 -0400 From: Scott Mayhew To: cel@kernel.org Cc: kdevops@lists.linux.dev, Chuck Lever Subject: Re: [RFC PATCH] guestfs: Per-user storage pools Message-ID: References: <20240906182641.471661-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240906182641.471661-1-cel@kernel.org> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, 06 Sep 2024, cel@kernel.org wrote: > From: Chuck Lever > > 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 Why don't you just include your user id in CONFIG_KDEVOPS_STORAGE_POOL_PATH? That's what Jeff and I did when he was still at Red Hat and we never ran into issues. -Scott > --- > scripts/bringup_guestfs.sh | 2 +- > scripts/destroy_guestfs.sh | 2 +- > scripts/guestfs.Makefile | 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) > > I'm not sure this is the best way to go about it, but this has > worked well for several weeks. Looking for comments and > suggestions! > > > diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh > index 0cd573ae187b..1c042d5f8b84 100755 > --- a/scripts/bringup_guestfs.sh > +++ b/scripts/bringup_guestfs.sh > @@ -24,7 +24,7 @@ IMG_FMT="qcow2" > if [ "${CONFIG_LIBVIRT_EXTRA_DRIVE_FORMAT_RAW}" = "y" ]; then > IMG_FMT="raw" > fi > -STORAGEDIR="${CONFIG_KDEVOPS_STORAGE_POOL_PATH}/kdevops/guestfs" > +STORAGEDIR="${CONFIG_KDEVOPS_STORAGE_POOL_PATH}/${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 3cdd21a83903..6daff3479250 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_KDEVOPS_STORAGE_POOL_PATH}/kdevops/guestfs" > +STORAGEDIR="${CONFIG_KDEVOPS_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 af901b8ddaa0..147389fd0534 100644 > --- a/scripts/guestfs.Makefile > +++ b/scripts/guestfs.Makefile > @@ -20,7 +20,7 @@ GUESTFS_ARGS += kdevops_storage_pool_group='$(QEMU_GROUP)' > GUESTFS_ARGS += storage_pool_group='$(QEMU_GROUP)' > > STORAGE_POOL_PATH:=$(subst ",,$(CONFIG_KDEVOPS_STORAGE_POOL_PATH)) > -KDEVOPS_STORAGE_POOL_PATH:=$(STORAGE_POOL_PATH)/kdevops > +KDEVOPS_STORAGE_POOL_PATH:=$(STORAGE_POOL_PATH)/$(USER) > GUESTFS_ARGS += storage_pool_path=$(STORAGE_POOL_PATH) > GUESTFS_ARGS += kdevops_storage_pool_path=$(KDEVOPS_STORAGE_POOL_PATH) > > @@ -84,4 +84,4 @@ destroy_guestfs: > PHONY += destroy_guestfs > > cleancache: > - $(Q)rm -f $(subst ",,$(CONFIG_KDEVOPS_STORAGE_POOL_PATH))/kdevops/guestfs/base_images/* > + $(Q)rm -f $(subst ",,$(CONFIG_KDEVOPS_STORAGE_POOL_PATH))/$(USER)/guestfs/base_images/* > -- > 2.46.0 > >