diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2015-11-26 12:20:25 -0400 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2015-11-26 12:20:25 -0400 |
commit | 8a0153e992938a9b3441faca77305be1bb42f4d2 (patch) | |
tree | 3e0585b29bd671814ce152b92da78dd224053f65 /utils/src | |
parent | e6054d0ef7d07f370496dac82975b17dc3dfce70 (diff) | |
download | openshift-8a0153e992938a9b3441faca77305be1bb42f4d2.tar.gz openshift-8a0153e992938a9b3441faca77305be1bb42f4d2.tar.bz2 openshift-8a0153e992938a9b3441faca77305be1bb42f4d2.tar.xz openshift-8a0153e992938a9b3441faca77305be1bb42f4d2.zip |
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.
Diffstat (limited to 'utils/src')
-rw-r--r-- | utils/src/ooinstall/cli_installer.py | 23 | ||||
-rw-r--r-- | utils/src/ooinstall/openshift_ansible.py | 2 |
2 files changed, 16 insertions, 9 deletions
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 diff --git a/utils/src/ooinstall/openshift_ansible.py b/utils/src/ooinstall/openshift_ansible.py index 84e4db61d..866590c49 100644 --- a/utils/src/ooinstall/openshift_ansible.py +++ b/utils/src/ooinstall/openshift_ansible.py @@ -106,7 +106,7 @@ def write_inventory_vars(base_inventory, multiple_masters, proxy): base_inventory.write('ansible_ssh_user={}\n'.format(CFG.settings['ansible_ssh_user'])) if CFG.settings['ansible_ssh_user'] != 'root': base_inventory.write('ansible_become=true\n') - if multiple_masters: + if multiple_masters and proxy is not None: base_inventory.write('openshift_master_cluster_method=native\n') base_inventory.write("openshift_master_cluster_hostname={}\n".format(proxy.hostname)) base_inventory.write("openshift_master_cluster_public_hostname={}\n".format(proxy.public_hostname)) |