summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-09-25 14:50:45 -0700
committerGitHub <noreply@github.com>2017-09-25 14:50:45 -0700
commitc16d16d082ae992df3dd63d120622d9179371b17 (patch)
treeea30234e6f6bab5606a1e4e2a8d583caeb6a96ea /playbooks
parent1a181eb827c2037c95f794c835f1777f2dff76ec (diff)
parentf2669d64113bcdc0c16f7205cbaf42a062f596a9 (diff)
downloadopenshift-c16d16d082ae992df3dd63d120622d9179371b17.tar.gz
openshift-c16d16d082ae992df3dd63d120622d9179371b17.tar.bz2
openshift-c16d16d082ae992df3dd63d120622d9179371b17.tar.xz
openshift-c16d16d082ae992df3dd63d120622d9179371b17.zip
Merge pull request #5520 from ingvagabund/check-etcd-storage-backend
Automatic merge from submit-queue check if the storage backend is set to etcd3 before upgrading to 3.7 SSIA
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/common/openshift-cluster/upgrades/pre/verify_etcd3_backend.yml22
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml4
2 files changed, 26 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/pre/verify_etcd3_backend.yml b/playbooks/common/openshift-cluster/upgrades/pre/verify_etcd3_backend.yml
new file mode 100644
index 000000000..f75ae3b15
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/pre/verify_etcd3_backend.yml
@@ -0,0 +1,22 @@
+---
+- name: Verify all masters has etcd3 storage backend set
+ hosts: oo_masters_to_config
+ gather_facts: no
+ roles:
+ - lib_utils
+ tasks:
+ - name: Read master storage backend setting
+ yedit:
+ state: list
+ src: /etc/origin/master/master-config.yaml
+ key: kubernetesMasterConfig.apiServerArguments.storage-backend
+ register: _storage_backend
+
+ - fail:
+ msg: "Storage backend in /etc/origin/master/master-config.yaml must be set to 'etcd3' before the upgrade can continue"
+ when:
+ # assuming the master-config.yml is properly configured, i.e. the value is a list
+ - _storage_backend.result | default([], true) | length == 0 or _storage_backend.result[0] != "etcd3"
+
+ - debug:
+ msg: "Storage backend is set to etcd3"
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml
index 3549cf6c3..6cd3bd3e5 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml
@@ -29,6 +29,10 @@
tags:
- pre_upgrade
+- include: ../pre/verify_etcd3_backend.yml
+ tags:
+ - pre_upgrade
+
- name: Update repos on control plane hosts
hosts: oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config
tags: