Skip to content

Commit

Permalink
Fix possible deadlock for provisioning bare-metal clusters
Browse files Browse the repository at this point in the history
* Closes #235
  • Loading branch information
dghubble committed Jun 15, 2018
1 parent 51906bf commit ed0b781
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Notable changes between versions.

## Latest

* Update etcd from v3.3.6 to v3.3.7
* Update etcd from v3.3.6 to v3.3.7 ([#243](https://github.com/poseidon/typhoon/pull/243))

#### Bare-Metal

* Fix possible deadlock when provisioning clusters larger than 10 nodes ([#244](https://github.com/poseidon/typhoon/pull/244))

#### Addons

Expand Down
16 changes: 16 additions & 0 deletions bare-metal/container-linux/kubernetes/ssh.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)}"
Expand Down Expand Up @@ -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)}"
Expand Down
16 changes: 16 additions & 0 deletions bare-metal/fedora-atomic/kubernetes/ssh.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)}"
Expand Down Expand Up @@ -68,6 +76,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)}"
Expand Down

0 comments on commit ed0b781

Please sign in to comment.