diff options
author | Clayton Coleman <ccoleman@redhat.com> | 2017-08-07 23:07:34 -0400 |
---|---|---|
committer | Clayton Coleman <ccoleman@redhat.com> | 2017-08-08 12:50:22 -0400 |
commit | 263035e6bec5bf24ba211906c8d6d26873672413 (patch) | |
tree | 27ad51e36dfd198c4ed7d90835205ca50ecf53e3 | |
parent | 0d633e97991aecd9559334ba8fe6a59267efa871 (diff) | |
download | openshift-263035e6bec5bf24ba211906c8d6d26873672413.tar.gz openshift-263035e6bec5bf24ba211906c8d6d26873672413.tar.bz2 openshift-263035e6bec5bf24ba211906c8d6d26873672413.tar.xz openshift-263035e6bec5bf24ba211906c8d6d26873672413.zip |
Disable old openshift-master.service on upgrade
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml | 3 | ||||
-rw-r--r-- | roles/openshift_master/tasks/clean_systemd_units.yml | 5 | ||||
-rw-r--r-- | roles/openshift_master/tasks/main.yml | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml index 6a0471948..abcd21c90 100644 --- a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml +++ b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml @@ -91,6 +91,9 @@ - include_vars: ../../../../roles/openshift_master/vars/main.yml + - name: Remove any legacy systemd units + include: ../../../../roles/openshift_master/tasks/clean_systemd_units.yml + - name: Update systemd units include: ../../../../roles/openshift_master/tasks/systemd_units.yml diff --git a/roles/openshift_master/tasks/clean_systemd_units.yml b/roles/openshift_master/tasks/clean_systemd_units.yml new file mode 100644 index 000000000..590692c10 --- /dev/null +++ b/roles/openshift_master/tasks/clean_systemd_units.yml @@ -0,0 +1,5 @@ +--- + +- name: Disable master service + systemd: name={{ openshift.common.service_type }}-master state=stopped enabled=no masked=yes + ignore_errors: true diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml index 75401a6ce..7e71591d8 100644 --- a/roles/openshift_master/tasks/main.yml +++ b/roles/openshift_master/tasks/main.yml @@ -144,6 +144,9 @@ local_facts: no_proxy_etcd_host_ips: "{{ openshift_no_proxy_etcd_host_ips }}" +- name: Remove the legacy master service if it exists + include: clean_systemd_units.yml + - name: Install the systemd units include: systemd_units.yml |