summaryrefslogtreecommitdiffstats
path: root/utils/src
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2015-11-02 15:17:47 -0400
committerDevan Goodwin <dgoodwin@redhat.com>2015-11-02 15:17:47 -0400
commitef6b36d14a00757754aaf001a8acad8354cf62ff (patch)
treee25a717eb4bb3f4fe6c1664fd76daa558ccaf3a5 /utils/src
parent866dcbe962464a571f24e1e4ae5a9e928f7bbc47 (diff)
downloadopenshift-ef6b36d14a00757754aaf001a8acad8354cf62ff.tar.gz
openshift-ef6b36d14a00757754aaf001a8acad8354cf62ff.tar.bz2
openshift-ef6b36d14a00757754aaf001a8acad8354cf62ff.tar.xz
openshift-ef6b36d14a00757754aaf001a8acad8354cf62ff.zip
Better info prior to initiating upgrade.
Diffstat (limited to 'utils/src')
-rw-r--r--utils/src/ooinstall/cli_installer.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py
index 978259f79..c39eb5cac 100644
--- a/utils/src/ooinstall/cli_installer.py
+++ b/utils/src/ooinstall/cli_installer.py
@@ -468,16 +468,6 @@ def upgrade(ctx):
click.echo("No hosts defined in: %s" % oo_cfg['configuration'])
sys.exit(1)
- click.echo("OpenShift will be upgraded on the following hosts:\n")
- if not ctx.obj['unattended']:
- # Prompt interactively to confirm:
- for host in oo_cfg.hosts:
- click.echo(" * %s" % host.name)
- proceed = click.confirm("\nDo you wish to proceed?")
- if not proceed:
- click.echo("Upgrade cancelled.")
- sys.exit(0)
-
# Update config to reflect the version we're targetting, we'll write
# to disk once ansible completes successfully, not before.
old_variant = oo_cfg.settings['variant']
@@ -486,9 +476,18 @@ def upgrade(ctx):
oo_cfg.settings['variant'] = 'openshift-enterprise'
variant, version = find_variant(oo_cfg.settings['variant'])
oo_cfg.settings['variant_version'] = version.name
- click.echo("Upgrading from %s %s to %s %s" % (
+ click.echo("Openshift will be upgraded from %s %s to %s %s on the following hosts:\n" % (
old_variant, old_version, oo_cfg.settings['variant'],
oo_cfg.settings['variant_version']))
+ for host in oo_cfg.hosts:
+ click.echo(" * %s" % host.name)
+
+ if not ctx.obj['unattended']:
+ # Prompt interactively to confirm:
+ proceed = click.confirm("\nDo you wish to proceed?")
+ if not proceed:
+ click.echo("Upgrade cancelled.")
+ sys.exit(0)
retcode = install_transactions.run_upgrade_playbook()
if retcode > 0: