From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D2140291864 for ; Sat, 6 Dec 2025 16:56:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765040193; cv=none; b=nR4lEvTIBiKlvdKJZzdEnm/7W8e9/5Uj8SzOrrg+3roI6fE4Vd1MrE701KNwynOf8eg/+5EYZLqhi47bgYF6BTjzFooi7FAcwrr8cSYz8T7y6A6OIm6lIYyJAJpksfRaVZQvgTPaWanrcTeeD2/XOhLrwbzZZocOioTeDSlCz7E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765040193; c=relaxed/simple; bh=FqcMRMZUsQ0/AujtdozYrra/16+N8QgR6RdnXMxGcPM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K25iCCfzDm7j98MvAWvzemjtsTcrFlQ2phGy1q0HDqlaAljszCl5WitfRV5KDU6sUoOjPuioyHzHuH2GI5evOkjyCBjEvxgAdCHd7KJIHf3yohB+zAVv9jw2yq0qPgzZ+8QXW43TtpusN/Rm0P1W1pIqrV0UvROCJVXFS6BBtbg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=kh7XBfG0; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="kh7XBfG0" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=PM5rQI2TqW293Qc0VUwySxMcCGNrfKo5potMHJv9dzo=; b=kh7XBfG0H7+kBRu/tTfMYHTtpr 7ld7agI7EJBXm2hXfr+k7ElW3hGu27JptRkWBZ41W6xpD5+PBW7c99B9IR8VaLw8/ajfpb0C6RRi0 OfYZDgqEsl5nt8tgc3V1zXJr9mTW2zL+adh4TO5zrwsGQVY02kCZfm4Fw7epVgBjMKQ3ozXJ2PU37 GQyowDKxDuLEYxxNvskPZmFyowdx4PrhGvzS8FN6NcXfJsMjvDA+wDlY5IRMNMYA477fwPyvOFBRB SJsZaWB9/Gq5tLh5nYOm/c7UXAoSmJyVIPAJN3Gm2MFtmwlvS4hu9XaP4o9pJKH0B5uH3SLaM4VWP S6LkXsXw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vRva5-0000000B4pU-0cxA; Sat, 06 Dec 2025 16:56:25 +0000 From: Luis Chamberlain To: Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: Luis Chamberlain Subject: [PATCH 1/8] terraform: Use directory checksum in SSH key filenames Date: Sat, 6 Dec 2025 08:56:15 -0800 Message-ID: <20251206165624.2640158-2-mcgrof@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251206165624.2640158-1-mcgrof@kernel.org> References: <20251206165624.2640158-1-mcgrof@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 Sender: Luis Chamberlain SSH keys now use directory-based checksums to support multiple kdevops installations coexisting without conflicts. The SSH key filename format is now ~/.ssh/kdevops_terraform_ where checksum is the first 8 characters of the SHA256 hash of the kdevops directory path. This was previously only applied to Lambda Labs provider but is now the default for all providers, as it solves the general problem of multiple installations sharing the same home directory. Also fix OCI Kconfig generation scripts to use --quiet flag correctly to suppress progress output when generating dynamic Kconfig files. Generated-by: Claude AI Signed-off-by: Luis Chamberlain --- terraform/Kconfig.ssh | 7 +++++-- terraform/oci/scripts/gen_kconfig_image | 6 ++++++ terraform/oci/scripts/gen_kconfig_location | 6 ++++++ terraform/oci/scripts/gen_kconfig_shape | 6 ++++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/terraform/Kconfig.ssh b/terraform/Kconfig.ssh index 4e239a35..b03f962f 100644 --- a/terraform/Kconfig.ssh +++ b/terraform/Kconfig.ssh @@ -21,14 +21,17 @@ config TERRAFORM_SSH_CONFIG_USER config TERRAFORM_SSH_CONFIG_PUBKEY_FILE string "File containing Ansible's ssh public key" - default "~/.ssh/kdevops_terraform_$(shell, echo $(TOPDIR_PATH) | sha256sum | cut -c1-8).pub" if TERRAFORM_LAMBDALABS - default "~/.ssh/kdevops_terraform.pub" + default "~/.ssh/kdevops_terraform_$(shell, echo $(TOPDIR_PATH) | sha256sum | cut -c1-8).pub" help The filename of the file containing an ssh public key Ansible is to use to manage its target nodes. The matching private key should be located in a file using the same basename (without the ".pub"). + The filename includes an 8-character hash of the current + directory path, allowing multiple kdevops installations to + use separate SSH keys without conflicts. + config TERRAFORM_SSH_CONFIG_GENKEY bool "Should we create a new random key for you?" default y diff --git a/terraform/oci/scripts/gen_kconfig_image b/terraform/oci/scripts/gen_kconfig_image index 977446fd..55dfcf6c 100755 --- a/terraform/oci/scripts/gen_kconfig_image +++ b/terraform/oci/scripts/gen_kconfig_image @@ -718,6 +718,12 @@ def main(): """Main function to run the program.""" args = parse_arguments() + # Check for OCI config early - exit silently if not configured + if not os.path.exists(os.path.expanduser("~/.oci/config")): + if not args.quiet: + print("OCI not configured - skipping (optional)", file=sys.stderr) + sys.exit(0) + if args.publishers: # Show both known and discovered publishers compartment_ocid = get_default_compartment() diff --git a/terraform/oci/scripts/gen_kconfig_location b/terraform/oci/scripts/gen_kconfig_location index 17ec8266..b397f534 100755 --- a/terraform/oci/scripts/gen_kconfig_location +++ b/terraform/oci/scripts/gen_kconfig_location @@ -432,6 +432,12 @@ def main(): """Main function to run the program.""" args = parse_arguments() + # Check for OCI config early - exit silently if not configured + if not os.path.exists(os.path.expanduser("~/.oci/config")): + if not args.quiet: + print("OCI not configured - skipping (optional)", file=sys.stderr) + sys.exit(0) + if not args.quiet: print("Fetching list of OCI region subscriptions...", file=sys.stderr) regions = get_all_regions() diff --git a/terraform/oci/scripts/gen_kconfig_shape b/terraform/oci/scripts/gen_kconfig_shape index 09dd6d6f..d65ff37d 100755 --- a/terraform/oci/scripts/gen_kconfig_shape +++ b/terraform/oci/scripts/gen_kconfig_shape @@ -887,6 +887,12 @@ def main(): """Main function to run the program.""" args = parse_arguments() + # Check for OCI config early - exit silently if not configured + if not os.path.exists(os.path.expanduser("~/.oci/config")): + if not args.quiet: + print("OCI not configured - skipping (optional)", file=sys.stderr) + sys.exit(0) + compartment_ocid = get_default_compartment() if not compartment_ocid: print("Error: Could not determine compartment OCID", file=sys.stderr) -- 2.51.0