Support systemd unit management during node join

- Support systemctl enable/start/stop/disable commands during join.sh
  or genesis.sh

Change-Id: I28046afbc55fc1d1af4575778f614f928f0e91c9
This commit is contained in:
Scott Hussey
2018-12-14 12:49:22 -06:00
parent 425d8bdff8
commit c13fc33d85
5 changed files with 103 additions and 1 deletions

View File

@@ -105,6 +105,13 @@ log
log === Starting Docker and Kubelet ===
set -x
systemctl daemon-reload
{% for a in ['enable','start','stop','disable'] %}
{% for u in config.get_units_by_action(a) %}
systemctl {{ a }} {{ u }}
{% endfor %}
{% endfor %}
systemctl restart docker || true
systemctl enable kubelet
systemctl restart kubelet