From 0cfb416780b9e86c26eafd62ee6b99cd2a46b7cd Mon Sep 17 00:00:00 2001
From: Devan Goodwin <dgoodwin@redhat.com>
Date: Fri, 6 Nov 2015 14:33:17 -0400
Subject: Minor upgrade improvements.

Skip some 3.1 checks if doing a 3.0.x to 3.0.2 upgrade.

Improve error message when oc whoami fails (i.e. openshift is down) during
pre-upgrade checks, rather than assuming the binary doesn't exist.
---
 playbooks/adhoc/upgrades/files/pre-upgrade-check | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'playbooks/adhoc/upgrades/files')

diff --git a/playbooks/adhoc/upgrades/files/pre-upgrade-check b/playbooks/adhoc/upgrades/files/pre-upgrade-check
index c8ecae399..ed4ab6d1b 100644
--- a/playbooks/adhoc/upgrades/files/pre-upgrade-check
+++ b/playbooks/adhoc/upgrades/files/pre-upgrade-check
@@ -131,8 +131,11 @@ def main():
         print "found"
     except:
         print(
-            'Can not find oc (%s). Override the path with the '
-            'OC_PATH environment variable. Exiting...' % OC_PATH)
+            'Unable to run "%s whoami"\n'
+            'Please ensure OpenShift is running, and "oc" is on your system '
+            'path.\n'
+            'You can override the path with the OC_PATH environment variable.'
+            % OC_PATH)
         raise SystemExit(1)
 
     # Where the magic happens
-- 
cgit v1.2.3