From 6f056fd9673428c00b5e496a9a084cf09ad777cf Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Mon, 12 Sep 2016 15:16:38 -0300 Subject: Verify masters are upgraded before proceeding with node only upgrade. --- playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_masters.yml | 2 +- playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml | 8 +++++++- playbooks/common/openshift-cluster/upgrades/pre/backup_etcd.yml | 3 --- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'playbooks') diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_masters.yml b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_masters.yml index 5c2bba209..94339dd63 100644 --- a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_masters.yml +++ b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_masters.yml @@ -17,7 +17,7 @@ - include: ../initialize_facts.yml - name: Update repos and initialize facts on all hosts - hosts: oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config + hosts: oo_masters_to_config:oo_nodes_to_config:oo_etcd_to_config:oo_lb_to_config roles: - openshift_repos diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml index d9c82d8dc..9d29ba1ab 100644 --- a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml +++ b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml @@ -17,7 +17,7 @@ - include: ../initialize_facts.yml - name: Update repos and initialize facts on all hosts - hosts: oo_nodes_to_config + hosts: oo_masters_to_config:oo_nodes_to_config:oo_etcd_to_config:oo_lb_to_config roles: - openshift_repos @@ -54,3 +54,9 @@ - include: ../../../../common/openshift-cluster/upgrades/pre/verify_docker_upgrade_targets.yml - include: ../../../../common/openshift-cluster/upgrades/pre/gate_checks.yml + +- name: Verify masters are already upgraded + hosts: oo_masters_to_config + tasks: + - fail: msg="Master running {{ openshift.common.version }} must be upgraded to {{ openshift_version }} before node upgrade can be run." + when: openshift.common.version != openshift_version diff --git a/playbooks/common/openshift-cluster/upgrades/pre/backup_etcd.yml b/playbooks/common/openshift-cluster/upgrades/pre/backup_etcd.yml index 2af73c467..994ac2bb9 100644 --- a/playbooks/common/openshift-cluster/upgrades/pre/backup_etcd.yml +++ b/playbooks/common/openshift-cluster/upgrades/pre/backup_etcd.yml @@ -70,9 +70,6 @@ msg: "Etcd backup created in {{ openshift.common.data_dir }}/etcd-backup-{{ timestamp }}" -############################################################################## -# Gate on etcd backup -############################################################################## - name: Gate on etcd backup hosts: localhost connection: local -- cgit v1.2.3