Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Fix etcd mount race
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Addison committed Jun 19, 2018
1 parent 726f3d7 commit 3d99073
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions puppet/modules/etcd/manifests/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Integer $members = 1,
String $nodename= $::fqdn,
Boolean $tls = false,
Boolean $external_disk = true,
String $tls_cert_path = nil,
String $tls_key_path = nil,
String $tls_ca_path = nil,
Expand Down
3 changes: 3 additions & 0 deletions puppet/modules/etcd/spec/acceptance/single_node_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,23 @@
etcd::instance{'k8s-main':
version => '3.2.17',
advertise_client_network => $advertise_client_network,
external_disk => false,
}
etcd::instance{'k8s-events':
version => '3.2.17',
client_port => 2389,
peer_port => 2390,
advertise_client_network => $advertise_client_network,
external_disk => false,
}
etcd::instance{'k8s-overlay':
version => '3.2.17',
client_port => 2399,
peer_port => 2400,
advertise_client_network => $advertise_client_network,
external_disk => false,
}
EOS

Expand Down
3 changes: 3 additions & 0 deletions puppet/modules/etcd/spec/acceptance/three_node_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
members => $members,
initial_cluster => $initial_cluster,
advertise_client_network => $advertise_client_network,
external_disk => false,
}
etcd::instance{'k8s-events':
Expand All @@ -37,6 +38,7 @@
advertise_client_network => $advertise_client_network,
client_port => 2389,
peer_port => 2390,
external_disk => false,
}
etcd::instance{'k8s-overlay':
Expand All @@ -47,6 +49,7 @@
advertise_client_network => $advertise_client_network,
client_port => 2399,
peer_port => 2400,
external_disk => false,
}
EOS

Expand Down
4 changes: 4 additions & 0 deletions puppet/modules/etcd/templates/etcd.service.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Description=etcd server <%= @cluster_name %>
Wants=network-online.target
After=network.target network-online.target
<% if @external_disk -%>
After=var-lib-etcd.mount
Requires=var-lib-etcd.mount
<% end -%>

[Service]
User=<%= @user %>
Expand Down

0 comments on commit 3d99073

Please sign in to comment.