summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2017-08-28 19:33:01 -0400
committerMichael Gugino <mgugino@redhat.com>2017-08-29 13:38:47 -0400
commit1a0241e889e94567b5d33d89d3210876f0c34c88 (patch)
tree6e4c179bfd8ab0ea2756727507031502241f03e3
parent60d544846d049b85539e7b2ea91a7aee00eb15a0 (diff)
downloadopenshift-1a0241e889e94567b5d33d89d3210876f0c34c88.tar.gz
openshift-1a0241e889e94567b5d33d89d3210876f0c34c88.tar.bz2
openshift-1a0241e889e94567b5d33d89d3210876f0c34c88.tar.xz
openshift-1a0241e889e94567b5d33d89d3210876f0c34c88.zip
Fix openshift_master upgrade
Currently, openshift_master upgrade play imports tasks directly from the openshift_master role. This method does not honor role defaults. This commit changes sets openshift_master_config_dir if undefined.
-rw-r--r--playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml5
-rw-r--r--roles/openshift_master/tasks/main.yml3
-rw-r--r--roles/openshift_master/tasks/systemd_units.yml10
3 files changed, 11 insertions, 7 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
index abcd21c90..fbb355703 100644
--- a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
@@ -91,10 +91,7 @@
- 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
+ - name: Remove any legacy systemd units and update systemd units
include: ../../../../roles/openshift_master/tasks/systemd_units.yml
- name: Check for ca-bundle.crt
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index b80941b48..173b27ce0 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -177,9 +177,6 @@
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
diff --git a/roles/openshift_master/tasks/systemd_units.yml b/roles/openshift_master/tasks/systemd_units.yml
index 72c231e52..782a35abe 100644
--- a/roles/openshift_master/tasks/systemd_units.yml
+++ b/roles/openshift_master/tasks/systemd_units.yml
@@ -3,6 +3,16 @@
# playbooks. For that reason the ha_svc variables are use set_fact instead of
# the vars directory on the role.
+# This play may be consumed outside the role, we need to ensure that
+# openshift_master_config_dir is set.
+- name: Set openshift_master_config_dir if unset
+ set_fact:
+ openshift_master_config_dir: '/var/lib/origin'
+ when: openshift_master_config_dir is not defined
+
+- name: Remove the legacy master service if it exists
+ include: clean_systemd_units.yml
+
- name: Init HA Service Info
set_fact:
containerized_svc_dir: "/usr/lib/systemd/system"