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 968A630BF69 for ; Tue, 2 Sep 2025 13:54:34 +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=1756821274; cv=none; b=OpwqNEEt5lPHFjNUH6KBtXy5TqmO6Z1SjHyr5hKq8O/Fr1RpEL2h1IHivw3QMblWelMmrn+rZnz7x49PjovBWUSk70LHHpW2j2M16JokiZWUn8rRKghqlYKpbPIgwQd7jicVRt+0136KKxEU4I//SuSV2V4CN/yZl2eCSMkHKJs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756821274; c=relaxed/simple; bh=3UkFpaABiZ0I8WpY66ksPcwyIwUNCeG2zYh7MlKoMIU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D8PvM46hfKct6V61+Hw2MsdcDfiMuPtbVkCKHtafyPE3qpzGxfiBMVfzsKnjW1eFIk7C3uwVHUFdCWRX7k/HnpkqC2rktinm0koU/u6deJ29N+LB4mwM/Q6rGPC8gHn1zNms7m6S95uBP0fCZGXFjifbmVwTerUbkmi40T50Rvs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b1ukzdjY; 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="b1ukzdjY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDB0CC4CEF7; Tue, 2 Sep 2025 13:54:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756821274; bh=3UkFpaABiZ0I8WpY66ksPcwyIwUNCeG2zYh7MlKoMIU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b1ukzdjYwXMqu4jUZiI60Qq0HbyTyghJeC23I1L7IArraHtEXF2PnDGv631J3PInh ylGUwUBTEWNlKvgKFcd92bV6U2QF0puJKYWQLqkSchBQg4xJYQIq2hhfiPaChDVWHQ 8PuKF8ssmG3mbiVwlFqtDc/Dz3OpNMNlgutbBhT88HLoVrd4G2ij5Bxwy9LtJEQR7O 9o6qce/0ztJbxjZEfZOT4BmuBW1HGj+rQcBHdpYTxzDEM11vcAIfrCR0AYQX9E76l0 l4N1pNheemqsmh0nH3z3pM4GfO9c3BjnGBEOt0Ian/YYODKnhOoc6FF2+k4GH4eSdy Qemk82bTyW9rA== From: Chuck Lever To: Cc: Chuck Lever , Luis Chamberlain Subject: [PATCH v2 10/37] terraform/oci: Enable preemptible compute instances Date: Tue, 2 Sep 2025 09:53:57 -0400 Message-ID: <20250902135426.815079-11-cel@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250902135426.815079-1-cel@kernel.org> References: <20250902135426.815079-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 Enabling instance preemption allows the provider to destroy the instance if it needs the resources. The benefit is a 50% reduction in price. Typically, there's nothing on these instances that can't be re-cloned or reproduced. This should really be a Kconfig setting. Reviewed-by: Luis Chamberlain Signed-off-by: Chuck Lever --- terraform/oci/main.tf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/terraform/oci/main.tf b/terraform/oci/main.tf index 1d2d0f82e00f..45a4b4bc0c63 100644 --- a/terraform/oci/main.tf +++ b/terraform/oci/main.tf @@ -37,6 +37,13 @@ resource "oci_core_instance" "kdevops_instance" { ssh_authorized_keys = file(var.ssh_config_pubkey_file) } + preemptible_instance_config { + preemption_action { + type = "TERMINATE" + preserve_boot_volume = false + } + } + preserve_boot_volume = false } -- 2.51.0