Ryan Drew d2657174ce
Fix KeyError raised when max hostname length exceeded
The function osa_toolkit.generate._add_container_hosts contains a bug in
the code used to check if provided hostnames have exceeded their max
allowed length. The logic used to perform this check depends on the
`is_metal` flag within each container's properties. Unfortunately the
`is_metal` flag is accessed within the `properties` dictionary using
bracket notation rather than the safer `dict.get` method, causing a
`KeyError` to be raised when a host's properties dictionary does not
contain the `is_metal` flag.

It is not expected that a `KeyError` would be raised in the function if
hostnames have exceeded their max length. It is instead expected that a
`SystemExit` exception would be raised warning the user of their invalid
hostname(s).

This bug will impacts deployments where hostnames actually do exceed the
max allowed length due to the short circuit logic used in the if-elif
tree.

Closes-Bug: #1886905

Change-Id: Ic1acfea71f27f94e277aa443f0a53ef16b4eb417
2020-07-09 12:01:00 -06:00
2020-03-26 17:42:35 +02:00
2020-06-10 08:13:14 +00:00
2020-07-01 12:07:03 +00:00
2020-06-24 04:16:19 +00:00
2019-04-19 19:48:42 +00:00
2019-10-10 11:19:50 +00:00
2020-05-30 20:49:27 +00:00
2017-03-02 11:51:03 +00:00
2020-04-29 06:20:40 +00:00
2018-12-04 10:08:33 +00:00

Team and repository tags

image

OpenStack-Ansible

OpenStack-Ansible is an official OpenStack project which aims to deploy production environments from source in a way that makes it scalable while also being simple to operate, upgrade, and grow.

For an overview of the mission, repositories and related Wiki home page, please see the formal Home Page for the project.

For those looking to test OpenStack-Ansible using an All-In-One (AIO) build, please see the Quick Start guide.

For more detailed Installation and Operator documentation, please see the Deployment Guide.

If OpenStack-Ansible is missing something you'd like to see included, then we encourage you to see the Developer Documentation for more details on how you can get involved.

Developers wishing to work on the OpenStack-Ansible project should always base their work on the latest code, available from the master GIT repository at Source.

If you have some questions, or would like some assistance with achieving your goals, then please feel free to reach out to us on the OpenStack Mailing Lists (particularly openstack-discuss) or on IRC in #openstack-ansible on the freenode network.

OpenStack-Ansible Roles

OpenStack-Ansible offers separate role repositories for each individual role that OpenStack-Ansible supports. For individual role configuration options, see the Role Documentation.

An individual role's source code can be found at: https://opendev.org/openstack/openstack-ansible-<ROLENAME>.

Resources

Description
Ansible playbooks for deploying OpenStack.
Readme 140 MiB
Languages
Python 61.5%
Shell 27%
Jinja 11.4%
Smarty 0.1%