summaryrefslogtreecommitdiffstats
path: root/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml')
-rw-r--r--playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml35
1 files changed, 27 insertions, 8 deletions
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 9d29ba1ab..e79df1a02 100644
--- a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml
+++ b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml
@@ -14,9 +14,9 @@
openshift_upgrade_min: "{{ '1.2' if deployment_type == 'origin' else '3.2' }}"
# Pre-upgrade
-- include: ../initialize_facts.yml
+- include: ../../../../common/openshift-cluster/initialize_facts.yml
-- name: Update repos and initialize facts on all hosts
+- name: Update repos on nodes
hosts: oo_masters_to_config:oo_nodes_to_config:oo_etcd_to_config:oo_lb_to_config
roles:
- openshift_repos
@@ -35,7 +35,7 @@
- include: ../../../../common/openshift-cluster/upgrades/pre/verify_inventory_vars.yml
-- include: ../initialize_openshift_version.yml
+- include: ../../../../common/openshift-cluster/initialize_openshift_version.yml
vars:
# Request specific openshift_release and let the openshift_version role handle converting this
# to a more specific version, respecting openshift_image_tag and openshift_pkg_version if
@@ -47,7 +47,20 @@
# docker_version defined, we don't want to actually do it until later)
docker_protect_installed_version: True
-- include: ../../../../common/openshift-cluster/upgrades/pre/verify_control_plane_running
+- 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
+
+- name: Exit upgrade if dry-run specified
+ hosts: oo_all_hosts
+ tasks:
+ - fail:
+ msg: "Pre-upgrade checks completed, exiting due to openshift_upgrade_dry_run variable."
+ when: openshift_upgrade_dry_run is defined and openshift_upgrade_dry_run | bool
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/verify_control_plane_running.yml
- include: ../../../../common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml
@@ -55,8 +68,14 @@
- include: ../../../../common/openshift-cluster/upgrades/pre/gate_checks.yml
-- name: Verify masters are already upgraded
- hosts: oo_masters_to_config
+# Separate step so we can execute in parallel and clear out anything unused
+# before we get into the serialized upgrade process which will then remove
+# remaining images if possible.
+- name: Cleanup unused Docker images
+ hosts: oo_nodes_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
+ - include: ../../../../common/openshift-cluster/upgrades/cleanup_unused_images.yml
+
+- include: ../../../../common/openshift-cluster/upgrades/upgrade_nodes.yml
+ vars:
+ node_config_hook: "v3_3/node_config_upgrade.yml"