diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2016-09-01 14:29:10 -0300 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2016-09-28 11:57:54 -0300 |
commit | 2a830f458e6512c3b6305934a650ba23d234a8ac (patch) | |
tree | 79f2c6e6ab1ec284851f925df488095dffd3375f | |
parent | 43f52e292afac7bde5e588377e56d9c49574806c (diff) | |
download | openshift-2a830f458e6512c3b6305934a650ba23d234a8ac.tar.gz openshift-2a830f458e6512c3b6305934a650ba23d234a8ac.tar.bz2 openshift-2a830f458e6512c3b6305934a650ba23d234a8ac.tar.xz openshift-2a830f458e6512c3b6305934a650ba23d234a8ac.zip |
Support openshift_upgrade_dry_run=true for pre-upgrade checks only.
-rw-r--r-- | inventory/byo/hosts.origin.example | 2 | ||||
-rw-r--r-- | inventory/byo/hosts.ose.example | 3 | ||||
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/pre.yml | 7 |
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 |