python-tripleoclient/tripleoclient/v1
Emilien Macchi 098fdb2cd9 undercloud: resolve undercloud_*_host
The problem we're solving here is that our operators using SSL + FQDN
based endpoints will have failures during the deployment because we
don't lookup the FQDN into IP addresses, needed later in the deployment
for proper binding.

This patch transforms undercloud_*_host parameters into IP addresses:

- We raise if lookup returns nothing.
- We raise if lookup returns more than one IP.
- We support both IPv4 and IPv6.
- We raise if the IP is a loopback.
- We raise if the returned IP is invalid.

Utils changes:

* Introduce utils.is_valid_ip.
  Return True if the IP is either v4 or v6. Return False otherwise.

* Introduce utils.is_loopback.
  Return True if the given host is a loopback. Return False otherwise.

* Introduce utils.get_host_ips.
  Returns a list of IPs for a host to lookup.

* Introduce utils.get_single_ip.
  Translate an hostname or FQDN into an IP address if it is valid IP.
  Return it unchanged if it is an IPv4 or IPv6 address.
  If the host is not reachable, it'll raise an exception.
  By default it excludes the loopbacks but it can be allowed by setting
  allow_loopback = True.

* Use utils.get_single_ip to translate undercloud_admin_host and
  undercloud_public_host to IP addresses.

Related-Bug: #1763776
Change-Id: Ic008cc758493aa95e8aa237d23c2f66c0a930509
(cherry picked from commit c925c3b93b)
2019-05-10 06:55:00 +00:00
..
releasenotes/notes New preflight check for the undercloud: disk space 2018-08-03 07:46:00 +02:00
__init__.py Rename rdomanager_oscplugin to tripleoclient 2015-09-08 10:22:22 -04:00
container_image.py Remove service environment file and images file. 2019-04-22 12:51:27 +00:00
overcloud_admin.py Add overcloud admin ssh authorize command. 2019-02-08 14:43:05 +01:00
overcloud_bios.py Create commands for configuring BIOS on given nodes 2019-03-11 12:55:39 +01:00
overcloud_config.py Make overcloud_config working with Python 3 2019-04-11 15:01:18 +00:00
overcloud_credentials.py Remove overcloudrc.v3 generation 2019-03-05 15:39:14 +02:00
overcloud_delete.py Fix stack.name to stack.stack_name 2018-12-17 18:38:54 +01:00
overcloud_deploy.py Add checking mechanism driver during upgrade 2019-04-11 15:05:21 +00:00
overcloud_execute.py Add each command to the history file 2017-11-27 15:37:00 +00:00
overcloud_external_update.py Add support of extra variables. 2019-02-28 10:03:57 +01:00
overcloud_external_upgrade.py Add support of extra variables. 2019-02-28 10:03:57 +01:00
overcloud_ffwd_upgrade.py Add verbosity level to the ansible update/upgrade run 2019-01-18 09:47:18 +01:00
overcloud_image.py Add a progress bar for image upload. 2019-03-19 10:27:07 +01:00
overcloud_netenv_validate.py Add each command to the history file 2017-11-27 15:37:00 +00:00
overcloud_node.py nova-less-deploy: command for deploying nodes with ironic 2019-03-19 10:18:26 +01:00
overcloud_parameters.py Merge "Make ipmi lanplus the default in auto fencing" 2018-06-05 02:45:24 +00:00
overcloud_plan.py plan: export the plan with data in bytes (not string) (python3) 2019-03-07 10:54:11 -05:00
overcloud_plan_roles.py Add workflows-based role listing commands 2018-01-11 15:10:08 +00:00
overcloud_profiles.py Merge "Report node availability from "overcloud profiles list"" 2017-12-27 12:47:31 +00:00
overcloud_raid.py Add each command to the history file 2017-11-27 15:37:00 +00:00
overcloud_roles.py Add workflows-based role listing commands 2018-01-11 15:10:08 +00:00
overcloud_support.py Add each command to the history file 2017-11-27 15:37:00 +00:00
overcloud_update.py Add a comment about nodes and roles options. 2019-05-02 11:21:20 +02:00
overcloud_upgrade.py Add a comment about nodes and roles options. 2019-05-02 11:21:20 +02:00
tripleo_config.py get_parser() should return a parser 2019-02-05 11:18:22 +00:00
tripleo_deploy.py Fix ansible-playbook-3 symlink 2019-02-27 16:12:26 -05:00
tripleo_upgrade.py Replace logging with oslo_log for upgrade classes 2018-05-23 11:45:21 +00:00
tripleo_validator.py Add new CLI option openstack tripleo validate run 2019-03-05 09:27:51 +01:00
undercloud.py Remove instack-undercloud and --use-heat 2018-09-24 19:36:38 +00:00
undercloud_backup.py Use i18n for undercloud installer and utils messages 2018-05-21 16:38:03 +02:00
undercloud_config.py undercloud: resolve undercloud_*_host 2019-05-10 06:55:00 +00:00
undercloud_deploy.py Make standalone role name configurable 2018-05-23 10:36:53 -06:00
undercloud_preflight.py undercloud: python3 support for custom envs 2019-03-18 17:47:10 +00:00