From bcf62c747219f9b44eb23e377807b3c205b388b3 Mon Sep 17 00:00:00 2001 From: frrist Date: Mon, 11 Dec 2023 10:44:37 -0800 Subject: [PATCH] docs: add comment describing dependency of startup --- ops/tf/main.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ops/tf/main.tf b/ops/tf/main.tf index 013daeb12c..d1496fd425 100644 --- a/ops/tf/main.tf +++ b/ops/tf/main.tf @@ -31,6 +31,12 @@ module "compute_instance" { zone = var.gcp_zone cloud_init_content = "" + // This creates an implicit dependency, meaning Terraform will create the requester_instance before the compute_instance. + // In the event the bacalhau process on the compute instance stars BEFORE the requester instance (which would be + // abnormal but possible) the compute will fail to bootstrap to the requester and fail to start. + // This can happen if setting up the requester VM takes longer than settin up the compute. So there is a TODO here: + // Bacalhau should not stop the node if it fails to connect to a peer, it should instead continue to try until is + // succeeds and complain loudly along the way as it fails. requester_ip = module.requester_instance.requester_private_ips[0] compute_instance_count = var.compute_count compute_instance_type = var.compute_machine_type