diff options
author | Samuel Munilla <smunilla@redhat.com> | 2016-08-12 09:07:25 -0400 |
---|---|---|
committer | Samuel Munilla <smunilla@redhat.com> | 2016-08-12 09:11:21 -0400 |
commit | fe43a8d46b47a103a4daff7d933c61a62ec42e1d (patch) | |
tree | 6f530fc922ee96caf49e8fdbef9191707bb33151 /utils | |
parent | 16fda8158107f10615bf2685eb8e7c55c1dcda04 (diff) | |
download | openshift-fe43a8d46b47a103a4daff7d933c61a62ec42e1d.tar.gz openshift-fe43a8d46b47a103a4daff7d933c61a62ec42e1d.tar.bz2 openshift-fe43a8d46b47a103a4daff7d933c61a62ec42e1d.tar.xz openshift-fe43a8d46b47a103a4daff7d933c61a62ec42e1d.zip |
a-o-i: Fix broken upgrades
Upgrade was looking for the hosts in the old location. Quick fix to get it looking in the
correct location.
Fixes BZ#1357627.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/src/ooinstall/cli_installer.py | 7 | ||||
-rw-r--r-- | utils/src/ooinstall/openshift_ansible.py | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py index 2975592a1..e197c722d 100644 --- a/utils/src/ooinstall/cli_installer.py +++ b/utils/src/ooinstall/cli_installer.py @@ -1,5 +1,3 @@ -# TODO: Temporarily disabled due to importing old code into openshift-ansible -# repo. We will work on these over time. # pylint: disable=bad-continuation,missing-docstring,no-self-use,invalid-name,no-value-for-parameter,too-many-lines import os @@ -884,7 +882,6 @@ def uninstall(ctx): #pylint: disable=bad-builtin,too-many-statements def upgrade(ctx, latest_minor, next_major): oo_cfg = ctx.obj['oo_cfg'] - verbose = ctx.obj['verbose'] if len(oo_cfg.deployment.hosts) == 0: click.echo("No hosts defined in: %s" % oo_cfg.config_path) @@ -955,7 +952,9 @@ def upgrade(ctx, latest_minor, next_major): click.echo("Upgrade cancelled.") sys.exit(0) - retcode = openshift_ansible.run_upgrade_playbook(playbook, verbose) + retcode = openshift_ansible.run_upgrade_playbook(oo_cfg.deployment.hosts, + playbook, + ctx.obj['verbose']) if retcode > 0: click.echo("Errors encountered during upgrade, please check %s." % oo_cfg.settings['ansible_log_path']) diff --git a/utils/src/ooinstall/openshift_ansible.py b/utils/src/ooinstall/openshift_ansible.py index a121e2e24..ef7906828 100644 --- a/utils/src/ooinstall/openshift_ansible.py +++ b/utils/src/ooinstall/openshift_ansible.py @@ -290,12 +290,12 @@ def run_uninstall_playbook(hosts, verbose=False): return run_ansible(playbook, inventory_file, facts_env, verbose) -def run_upgrade_playbook(playbook, verbose=False): +def run_upgrade_playbook(hosts, playbook, verbose=False): playbook = os.path.join(CFG.settings['ansible_playbook_directory'], 'playbooks/byo/openshift-cluster/upgrades/{}'.format(playbook)) # TODO: Upgrade inventory for upgrade? - inventory_file = generate_inventory(CFG.hosts) + inventory_file = generate_inventory(hosts) facts_env = os.environ.copy() if 'ansible_log_path' in CFG.settings: facts_env['ANSIBLE_LOG_PATH'] = CFG.settings['ansible_log_path'] |