summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-08-12 10:18:00 -0400
committerGitHub <noreply@github.com>2016-08-12 10:18:00 -0400
commit34c9ba2d290cb84a79315343f9155d5081f2896f (patch)
treeee9150c1e8dd8a651a040bc9e5e3aa75034e9e96 /utils
parent7060379b8e9344a882678f59a3677034436c0905 (diff)
parentfe43a8d46b47a103a4daff7d933c61a62ec42e1d (diff)
downloadopenshift-34c9ba2d290cb84a79315343f9155d5081f2896f.tar.gz
openshift-34c9ba2d290cb84a79315343f9155d5081f2896f.tar.bz2
openshift-34c9ba2d290cb84a79315343f9155d5081f2896f.tar.xz
openshift-34c9ba2d290cb84a79315343f9155d5081f2896f.zip
Merge pull request #2290 from smunilla/BZ1357627
a-o-i: Fix broken upgrades
Diffstat (limited to 'utils')
-rw-r--r--utils/src/ooinstall/cli_installer.py7
-rw-r--r--utils/src/ooinstall/openshift_ansible.py4
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']