diff options
Diffstat (limited to 'playbooks/common')
| -rw-r--r-- | playbooks/common/openshift-cluster/upgrades/pre/verify_etcd3_backend.yml | 22 | ||||
| -rw-r--r-- | playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml | 4 | 
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: | 
