From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A555217A2FB for ; Thu, 24 Apr 2025 14:17:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745504249; cv=none; b=hWyyDI4v+KCJGkG12GcDSHHjU9HdgYybjfdN/Uv3GFvuGnDCvphxEchVAickCvXbivHMARtSmSDq62FoRzoR3hOxUrIbb1MK9OmlHwEHTHkkDBqtXVR3S6KGf2F+hEK1bFc4fYCy41Vja5rSwaktT2RjQ1czD35PNcHbBsfTe8s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745504249; c=relaxed/simple; bh=alRKXj6m/Bha8P1V6fiotwpyJ/cH87QEK6JhmKcmqKI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=U9stpGlEpQQxR5CUzTq0M9SzsP5a4gbHy5gYeUdzjTTjJtqx3mF1qGWcToLYAP8/4+W3K+vgTYa1a1WnWGSuFnmt41SSR/NcZNcSm3KIF6mKdZWeETLkH997guqxDlzwBAOlpPSzMt3bwbUHgaq9dS+Ms4d/g5KmarQgfEA4/18= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EME0yqeJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EME0yqeJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6AE6C4CEEB; Thu, 24 Apr 2025 14:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745504249; bh=alRKXj6m/Bha8P1V6fiotwpyJ/cH87QEK6JhmKcmqKI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EME0yqeJsa5cw+HUtdgYJzTJlCBFAe2+3J3GeJtfDPsv+D1LXOGvJWz56+ssAULvV pLQW++sYJOzsD4gAyR56yoKMnG52cxRkaMh3wrGj/QTIbiqN/a3ruqxqBsQnx5wG7o 7ejBv2t4q84QlIVwSiv6j+sO0Pl4f8Dwy6W3q5q+biiySqmKlmKKEohlnpxm6a2GuE Pbx/LK6+YARcwLMcKPZHWwT/W81LOSPc1iS/MfXM9LpAvq0bpLAEg10AALaFIXv+XV r4cFHSlwhHq6+cNx9qyYkOBcry/ZDM3ScWYpnnIxBJf0oki3yBNqUzVuNwc6Zo48DK vJk+HsAOg+l7A== From: cel@kernel.org To: Cc: Chuck Lever Subject: [PATCH v4 2/3] Kconfig: Define KDEVOPS_STORAGE_POOL_USER via Kconfig Date: Thu, 24 Apr 2025 10:17:24 -0400 Message-ID: <20250424141725.827244-3-cel@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250424141725.827244-1-cel@kernel.org> References: <20250424141725.827244-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chuck Lever Prepare to replace the "kdevops" string in the storage pool path with the name of the user account running kdevops. First step is to define a Kconfig variable for the storage pool user. For the moment, the storage pool user name defaults to the same string it is currently. I would love for there to be a way to provide an actual pathname in CONFIG_KDEVOPS_STORAGE_POOL_PATH. I haven't found a way so far. Signed-off-by: Chuck Lever --- kconfigs/Kconfig.libvirt | 15 ++++++++++----- scripts/bringup_guestfs.sh | 3 +-- scripts/destroy_guestfs.sh | 2 +- scripts/guestfs.Makefile | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/kconfigs/Kconfig.libvirt b/kconfigs/Kconfig.libvirt index cba8abf1e24b..04abadff4e5b 100644 --- a/kconfigs/Kconfig.libvirt +++ b/kconfigs/Kconfig.libvirt @@ -164,11 +164,6 @@ config LIBVIRT_STORAGE_POOL_PATH default LIBVIRT_STORAGE_POOL_PATH_CUSTOM if LIBVIRT && LIBVIRT_STORAGE_POOL_PATH_CUSTOM_MANUAL default VIRTUALBOX_STORAGE_POOL_PATH_CUSTOM if VAGRANT_VIRTUALBOX -config KDEVOPS_STORAGE_POOL_PATH - string - output yaml - default "{{ libvirt_storage_pool_path }}/kdevops" - config QEMU_BIN_PATH string default QEMU_BIN_PATH_LIBVIRT if LIBVIRT @@ -1104,6 +1099,16 @@ config LIBVIRT_STORAGE_POOL_NAME For instance you may want to use a volume name of "data2" for a path on a partition on /data2/ or something like that. +config KDEVOPS_STORAGE_POOL_USER + string + output yaml + default "kdevops" + +config KDEVOPS_STORAGE_POOL_PATH + string + output yaml + default "{{ libvirt_storage_pool_path }}/{{ kdevops_storage_pool_user }}" + source "kconfigs/Kconfig.libvirt.zns" source "kconfigs/Kconfig.libvirt.largeio" source "kconfigs/Kconfig.libvirt.cxl" diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh index 94e0437192be..3ac99bf9f22a 100755 --- a/scripts/bringup_guestfs.sh +++ b/scripts/bringup_guestfs.sh @@ -14,8 +14,7 @@ IMG_FMT="qcow2" if [ "${CONFIG_LIBVIRT_EXTRA_DRIVE_FORMAT_RAW}" = "y" ]; then IMG_FMT="raw" fi -STORAGETOPDIR="${CONFIG_LIBVIRT_STORAGE_POOL_PATH}" -STORAGEDIR="${STORAGETOPDIR}/kdevops/guestfs" +STORAGEDIR="${CONFIG_LIBVIRT_STORAGE_POOL_PATH}/${CONFIG_KDEVOPS_STORAGE_POOL_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 ee5dc2b57d6d..dfbb4f15f4ca 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_LIBVIRT_STORAGE_POOL_PATH}/kdevops/guestfs" +STORAGEDIR="${CONFIG_LIBVIRT_STORAGE_POOL_PATH}/${CONFIG_KDEVOPS_STORAGE_POOL_USER}/guestfs" GUESTFSDIR="${TOPDIR}/guestfs" if [ -f "$GUESTFSDIR/kdevops_nodes.yaml" ]; then diff --git a/scripts/guestfs.Makefile b/scripts/guestfs.Makefile index 43bbea4fda2e..8d4aac3e3669 100644 --- a/scripts/guestfs.Makefile +++ b/scripts/guestfs.Makefile @@ -99,4 +99,4 @@ destroy_guestfs: PHONY += destroy_guestfs cleancache: - $(Q)rm -f $(subst ",,$(CONFIG_LIBVIRT_STORAGE_POOL_PATH))/kdevops/guestfs/base_images/* + $(Q)rm -f $(CONFIG_LIBVIRT_STORAGE_POOL_PATH)/$(CONFIG_KDEVOPS_STORAGE_POOL_USER)/guestfs/base_images/* -- 2.49.0