diff options
-rw-r--r-- | utils/src/ooinstall/cli_installer.py | 7 | ||||
-rw-r--r-- | utils/src/ooinstall/install_transactions.py | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py index daac5e388..978259f79 100644 --- a/utils/src/ooinstall/cli_installer.py +++ b/utils/src/ooinstall/cli_installer.py @@ -490,7 +490,12 @@ def upgrade(ctx): old_variant, old_version, oo_cfg.settings['variant'], oo_cfg.settings['variant_version'])) - install_transactions.run_upgrade_playbook() + retcode = install_transactions.run_upgrade_playbook() + if retcode > 0: + click.echo("Errors encountered during upgrade, please check %s." % + oo_cfg.settings['ansible_log_path']) + else: + click.echo("Upgrade completed! Rebooting all hosts is recommended.") @click.command() diff --git a/utils/src/ooinstall/install_transactions.py b/utils/src/ooinstall/install_transactions.py index 1d1dbe340..0754b8ab6 100644 --- a/utils/src/ooinstall/install_transactions.py +++ b/utils/src/ooinstall/install_transactions.py @@ -143,6 +143,7 @@ def run_uninstall_playbook(): facts_env['ANSIBLE_CONFIG'] = CFG.settings['ansible_config'] return run_ansible(playbook, inventory_file, facts_env) + def run_upgrade_playbook(): playbook = os.path.join(CFG.settings['ansible_playbook_directory'], 'playbooks/adhoc/upgrades/upgrade.yml') @@ -154,3 +155,4 @@ def run_upgrade_playbook(): if 'ansible_config' in CFG.settings: facts_env['ANSIBLE_CONFIG'] = CFG.settings['ansible_config'] return run_ansible(playbook, inventory_file, facts_env) + |