summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--inventory/byo/hosts.origin.example2
-rw-r--r--inventory/byo/hosts.ose.example3
-rw-r--r--playbooks/common/openshift-cluster/upgrades/pre.yml7
3 files changed, 12 insertions, 0 deletions
diff --git a/inventory/byo/hosts.origin.example b/inventory/byo/hosts.origin.example
index 8b3a6e403..e1d32b166 100644
--- a/inventory/byo/hosts.origin.example
+++ b/inventory/byo/hosts.origin.example
@@ -99,6 +99,8 @@ openshift_release=v1.2
# modify image streams to point at that registry by setting the following to true
#openshift_examples_modify_imagestreams=true
+# Perform only pre-upgrade checks, and exit.
+# openshift_upgrade_dry_run=true
# Origin copr repo
#openshift_additional_repos=[{'id': 'openshift-origin-copr', 'name': 'OpenShift Origin COPR', 'baseurl': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/epel-7-$basearch/', 'enabled': 1, 'gpgcheck': 1, 'gpgkey': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/pubkey.gpg'}]
diff --git a/inventory/byo/hosts.ose.example b/inventory/byo/hosts.ose.example
index af653f850..433404ddb 100644
--- a/inventory/byo/hosts.ose.example
+++ b/inventory/byo/hosts.ose.example
@@ -99,6 +99,9 @@ openshift_release=v3.2
# modify image streams to point at that registry by setting the following to true
#openshift_examples_modify_imagestreams=true
+# Perform only pre-upgrade checks, and exit.
+# openshift_upgrade_dry_run=true
+
# Additional yum repos to install
#openshift_additional_repos=[{'id': 'ose-devel', 'name': 'ose-devel', 'baseurl': 'http://example.com/puddle/build/AtomicOpenShift/3.1/latest/RH7-RHOSE-3.0/$basearch/os', 'enabled': 1, 'gpgcheck': 0}]
diff --git a/playbooks/common/openshift-cluster/upgrades/pre.yml b/playbooks/common/openshift-cluster/upgrades/pre.yml
index 42a24eaf8..13f6471b5 100644
--- a/playbooks/common/openshift-cluster/upgrades/pre.yml
+++ b/playbooks/common/openshift-cluster/upgrades/pre.yml
@@ -309,3 +309,10 @@
- fail:
msg: "Upgrade cannot continue. The following hosts did not complete etcd backup: {{ etcd_backup_failed | join(',') }}"
when: etcd_backup_failed | length > 0
+
+- name: Exit upgrade if dry-run specified
+ hosts: oo_first_master
+ 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