Skip to content

Commit

Permalink
docs: add comment describing dependency of startup
Browse files Browse the repository at this point in the history
  • Loading branch information
frrist committed Dec 11, 2023
1 parent 6d13153 commit bcf62c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ops/tf/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bcf62c7

Please sign in to comment.