From 8a0153e992938a9b3441faca77305be1bb42f4d2 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Thu, 26 Nov 2015 12:20:25 -0400 Subject: Test unattended HA quick install. Checking behavior when there is no LB specified, and when the user attempts to re-use a master or node as their LB. --- utils/src/ooinstall/cli_installer.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'utils/src/ooinstall/cli_installer.py') diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py index acfb5065b..82f695fca 100644 --- a/utils/src/ooinstall/cli_installer.py +++ b/utils/src/ooinstall/cli_installer.py @@ -278,22 +278,28 @@ def check_hosts_config(oo_cfg, unattended): # Check for another host with same connect_to? else: message = """ -No HAProxy given in config. Either specify one or provide a load balancing solution -of your choice to balance the master API (port 8443) on all master hosts. +WARNING: No master load balancer specified in config. If you proceed you will +need to provide a load balancing solution of your choice to balance the +API (port 8443) on all master hosts. https://docs.openshift.org/latest/install_config/install/advanced_install.html#multiple-masters """ - if not unattended: + if unattended: + click.echo(message) + else: confirm_continue(message) nodes = [host for host in oo_cfg.hosts if host.node] + # TODO: This looks a little unsafe, maybe look for dedicated nodes only: if len(masters) == len(nodes): message = """ -No dedicated Nodes specified. By default, colocated Masters have their Nodes -set to unscheduleable. Continuing at this point will label all nodes as -scheduleable. +WARNING: No dedicated Nodes specified. By default, colocated Masters have +their Nodes set to unscheduleable. If you proceed all nodes will be labelled +as schedulable. """ - if not unattended: + if unattended: + click.echo(message) + else: confirm_continue(message) return @@ -318,7 +324,8 @@ def get_variant_and_version(multi_master=False): return product, version def confirm_continue(message): - click.echo(message) + if message: + click.echo(message) click.confirm("Are you ready to continue?", default=False, abort=True) return -- cgit v1.2.3