summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-07-27 21:33:52 -0400
committerGitHub <noreply@github.com>2017-07-27 21:33:52 -0400
commit4a442d87006bdd535eb5035d122a6b5226555da2 (patch)
treeb988a53a46daee702f5a32049af01b57cedb8c3f /roles
parentb1bbee7f996c28880784fdf91784b14a16873807 (diff)
parent78abbe021170aaa9b463ba177d78654a7c5d42d5 (diff)
downloadopenshift-4a442d87006bdd535eb5035d122a6b5226555da2.tar.gz
openshift-4a442d87006bdd535eb5035d122a6b5226555da2.tar.bz2
openshift-4a442d87006bdd535eb5035d122a6b5226555da2.tar.xz
openshift-4a442d87006bdd535eb5035d122a6b5226555da2.zip
Merge pull request #4897 from ingvagabund/backport-4403-to-openshift-node-upgrade-role
backport 'Add systemctl daemon-reload handler to openshift_node' #4403 to openshift_node_upgrade
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_node_upgrade/handlers/main.yml5
-rw-r--r--roles/openshift_node_upgrade/tasks/systemd_units.yml19
2 files changed, 14 insertions, 10 deletions
diff --git a/roles/openshift_node_upgrade/handlers/main.yml b/roles/openshift_node_upgrade/handlers/main.yml
index f26f5d573..d31b899cf 100644
--- a/roles/openshift_node_upgrade/handlers/main.yml
+++ b/roles/openshift_node_upgrade/handlers/main.yml
@@ -29,3 +29,8 @@
when:
- (not skip_node_svc_handlers | default(False) | bool)
- not (node_service_status_changed | default(false) | bool)
+
+# TODO(jchaloup): once it is verified the systemd module works as expected
+# switch to it: http://docs.ansible.com/ansible/latest/systemd_module.html
+- name: reload systemd units
+ command: systemctl daemon-reload
diff --git a/roles/openshift_node_upgrade/tasks/systemd_units.yml b/roles/openshift_node_upgrade/tasks/systemd_units.yml
index e8f017445..9b3805eea 100644
--- a/roles/openshift_node_upgrade/tasks/systemd_units.yml
+++ b/roles/openshift_node_upgrade/tasks/systemd_units.yml
@@ -22,23 +22,27 @@
template:
dest: "/etc/systemd/system/{{ openshift.common.service_type }}-node-dep.service"
src: openshift.docker.node.dep.service
- register: install_node_dep_result
when: openshift.common.is_containerized | bool
+ notify:
+ - reload systemd units
+ - restart node
- name: Install Node docker service file
template:
dest: "/etc/systemd/system/{{ openshift.common.service_type }}-node.service"
src: openshift.docker.node.service
- register: install_node_result
when: openshift.common.is_containerized | bool
+ notify:
+ - reload systemd units
+ - restart node
- name: Create the openvswitch service env file
template:
src: openvswitch.sysconfig.j2
dest: /etc/sysconfig/openvswitch
when: openshift.common.is_containerized | bool
- register: install_ovs_sysconfig
notify:
+ - reload systemd units
- restart openvswitch
# May be a temporary workaround.
@@ -52,8 +56,8 @@
dest: "/etc/systemd/system/openvswitch.service.d/01-avoid-oom.conf"
src: openvswitch-avoid-oom.conf
when: openshift.common.use_openshift_sdn | default(true) | bool
- register: install_oom_fix_result
notify:
+ - reload systemd units
- restart openvswitch
- name: Install OpenvSwitch docker service file
@@ -62,6 +66,7 @@
src: openvswitch.docker.service
when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | default(true) | bool
notify:
+ - reload systemd units
- restart openvswitch
- name: Configure Node settings
@@ -96,9 +101,3 @@
when: ('http_proxy' in openshift.common and openshift.common.http_proxy != '')
notify:
- restart node
-
-- name: Reload systemd units
- command: systemctl daemon-reload
- when: (openshift.common.is_containerized | bool and (install_node_result | changed or install_ovs_sysconfig | changed or install_node_dep_result | changed)) or install_oom_fix_result | changed
- notify:
- - restart node