Fix possible deadlock for provisioning bare-metal clusters

* Closes #235
This commit is contained in:
Dalton Hubble
2018-06-14 22:43:01 -07:00
parent 51906bf398
commit ed0b781296
3 changed files with 37 additions and 1 deletions

View File

@ -2,6 +2,14 @@
resource "null_resource" "copy-controller-secrets" {
count = "${length(var.controller_names)}"
# Without depends_on, remote-exec could start and wait for machines before
# matchbox groups are written, causing a deadlock.
depends_on = [
"matchbox_group.install",
"matchbox_group.controller",
"matchbox_group.worker",
]
connection {
type = "ssh"
host = "${element(var.controller_domains, count.index)}"
@ -70,6 +78,14 @@ resource "null_resource" "copy-controller-secrets" {
resource "null_resource" "copy-worker-secrets" {
count = "${length(var.worker_names)}"
# Without depends_on, remote-exec could start and wait for machines before
# matchbox groups are written, causing a deadlock.
depends_on = [
"matchbox_group.install",
"matchbox_group.controller",
"matchbox_group.worker",
]
connection {
type = "ssh"
host = "${element(var.worker_domains, count.index)}"