summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-10-31 11:33:20 -0700
committerGitHub <noreply@github.com>2017-10-31 11:33:20 -0700
commitfffb5e5e516d018a8d4bd063bc439a0a81447e31 (patch)
treea156ce3c30624db5134d7a49514fac6baa08f8f0
parent4a7f64a2d692ebbeb03d696b648762f4be784f6d (diff)
parentf760a66e8df431336c108dcfee8168b97b1f02d5 (diff)
downloadopenshift-fffb5e5e516d018a8d4bd063bc439a0a81447e31.tar.gz
openshift-fffb5e5e516d018a8d4bd063bc439a0a81447e31.tar.bz2
openshift-fffb5e5e516d018a8d4bd063bc439a0a81447e31.tar.xz
openshift-fffb5e5e516d018a8d4bd063bc439a0a81447e31.zip
Merge pull request #5929 from ingvagabund/remove-master-service-during-non-ha-to-ha-upgrade
Automatic merge from submit-queue. remove master.service during the non-ha to ha upgrade Bug: 1506165
-rw-r--r--roles/openshift_master/tasks/clean_systemd_units.yml9
-rw-r--r--roles/openshift_master/tasks/systemd_units.yml16
2 files changed, 15 insertions, 10 deletions
diff --git a/roles/openshift_master/tasks/clean_systemd_units.yml b/roles/openshift_master/tasks/clean_systemd_units.yml
deleted file mode 100644
index e641f84d4..000000000
--- a/roles/openshift_master/tasks/clean_systemd_units.yml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-
-- 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/systemd_units.yml b/roles/openshift_master/tasks/systemd_units.yml
index fcc66044b..5751723ab 100644
--- a/roles/openshift_master/tasks/systemd_units.yml
+++ b/roles/openshift_master/tasks/systemd_units.yml
@@ -14,8 +14,22 @@
- include: registry_auth.yml
+- name: Disable the legacy master service if it exists
+ systemd:
+ name: "{{ openshift.common.service_type }}-master"
+ state: stopped
+ enabled: no
+ masked: yes
+ ignore_errors: true
+
- name: Remove the legacy master service if it exists
- include: clean_systemd_units.yml
+ file:
+ path: "{{ containerized_svc_dir }}/{{ openshift.common.service_type }}-master.service"
+ state: absent
+ ignore_errors: true
+ when:
+ - openshift.master.cluster_method == "native"
+ - not openshift.common.is_master_system_container | bool
# This is the image used for both HA and non-HA clusters:
- name: Pre-pull master image