Remove the "is_ssh_address" option from inventory

The key **is_ssh_address** has been removed from the
`openstack_user_config.yml` and the dynamic inventory. This key was
responsible mapping an address to the container which was used for SSH
connectivity. Because we've created the SSH connectivity plugin, which
allows us the ability to connect to remote containers without SSH, this
option is no longer useful. To keep the `openstack_user_config.yml` clean
deployers can remove the option however moving forward it no longer has any
effect.

Change-Id: I9264b73dcef71eba9ac29b238683a3a8c53e7121
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-03-01 05:53:15 -06:00 committed by Kevin Carter (cloudnull)
parent 882d98c94b
commit beb36b8ab9
10 changed files with 19 additions and 28 deletions

View File

@ -38,7 +38,6 @@ global_overrides:
- all_containers
- hosts
is_container_address: true
is_ssh_address: true
- network:
container_bridge: "br-vxlan"
container_type: "veth"

View File

@ -46,7 +46,6 @@ global_overrides:
- all_containers
- hosts
is_container_address: true
is_ssh_address: true
- network:
container_bridge: "br-vxlan"
container_type: "veth"

View File

@ -179,10 +179,6 @@
# If true, the load balancer uses this IP address to access services
# in the container. Only valid for networks with 'ip_from_q' option.
#
# Option: is_ssh_address (required, boolean)
# If true, Ansible uses this IP address to access the container via SSH.
# Only valid for networks with 'ip_from_q' option.
#
# Option: group_binds (required, string)
# List of one or more Ansible groups that contain this
# network. For more information, see the env.d YAML files.
@ -254,7 +250,6 @@
# container_type: "veth"
# ip_from_q: "container"
# is_container_address: true
# is_ssh_address: true
# - network:
# group_binds:
# - glance_api

View File

@ -51,7 +51,6 @@ global_overrides:
- hosts
reference_group: "pod1_hosts"
is_container_address: true
is_ssh_address: true
# Containers in pod1 need routes to the container networks of other pods
static_routes:
# Route to container networks
@ -69,7 +68,6 @@ global_overrides:
- hosts
reference_group: "pod2_hosts"
is_container_address: true
is_ssh_address: true
# Containers in pod2 need routes to the container networks of other pods
static_routes:
# Route to container networks
@ -87,7 +85,6 @@ global_overrides:
- hosts
reference_group: "pod3_hosts"
is_container_address: true
is_ssh_address: true
# Containers in pod3 need routes to the container networks of other pods
static_routes:
# Route to container networks
@ -105,7 +102,6 @@ global_overrides:
- hosts
reference_group: "pod4_hosts"
is_container_address: true
is_ssh_address: true
# Containers in pod4 need routes to the container networks of other pods
static_routes:
# Route to container networks

View File

@ -33,7 +33,6 @@ global_overrides:
- all_containers
- hosts
is_container_address: true
is_ssh_address: true
- network:
container_bridge: "br-vxlan"
container_type: "veth"

View File

@ -32,7 +32,6 @@ global_overrides:
- all_containers
- hosts
is_container_address: true
is_ssh_address: true
- network:
container_bridge: "br-vxlan"
container_type: "veth"

View File

@ -28,7 +28,6 @@ global_overrides:
- all_containers
- hosts
is_container_address: true
is_ssh_address: true
- network:
container_bridge: "br-vxlan"
container_type: "veth"

View File

@ -72,8 +72,8 @@ class ProviderNetworkMisconfiguration(Exception):
self.queue_name = queue_name
error_msg = ("Provider network with queue '{queue}' "
"requires 'is_container_address' and "
"'is_ssh_address' to be set to True.")
"requires 'is_container_address' "
"to be set to True.")
self.message = error_msg.format(queue=self.queue_name)
@ -533,8 +533,8 @@ def network_entry(is_metal, interface,
def _add_additional_networks(key, inventory, ip_q, q_name, netmask, interface,
bridge, net_type, net_mtu, user_config,
is_ssh_address, is_container_address,
static_routes, reference_group, address_prefix):
is_container_address, static_routes,
reference_group, address_prefix):
"""Process additional ip adds and append then to hosts as needed.
If the host is found to be "is_metal" it will be marked as "on_metal"
@ -548,7 +548,6 @@ def _add_additional_networks(key, inventory, ip_q, q_name, netmask, interface,
:param netmask: ``str`` netmask to use.
:param interface: ``str`` interface name to set for the network.
:param user_config: ``dict`` user defined configuration details.
:param is_ssh_address: ``bol`` set this address as ansible_host.
:param is_container_address: ``bol`` set this address to container_address.
:param static_routes: ``list`` List containing static route dicts.
:param reference_group: ``str`` group to filter membership of host against.
@ -571,7 +570,6 @@ def _add_additional_networks(key, inventory, ip_q, q_name, netmask, interface,
net_type,
net_mtu,
user_config,
is_ssh_address,
is_container_address,
static_routes,
reference_group,
@ -640,7 +638,7 @@ def _add_additional_networks(key, inventory, ip_q, q_name, netmask, interface,
elif is_metal:
network = networks[old_address] = _network
network['netmask'] = netmask
if is_ssh_address or is_container_address:
if is_container_address:
# Container physical host group
cphg = container.get('physical_host_group')
@ -651,7 +649,7 @@ def _add_additional_networks(key, inventory, ip_q, q_name, netmask, interface,
phg = user_config[cphg][physical_host]
network['address'] = phg['ip']
if is_ssh_address is True:
if is_container_address is True:
container['ansible_host'] = networks[old_address]['address']
if is_container_address is True:
@ -738,7 +736,6 @@ def container_skel_load(container_skel, inventory, config):
net_type=p_net.get('container_type'),
net_mtu=p_net.get('container_mtu'),
user_config=config,
is_ssh_address=p_net.get('is_ssh_address'),
is_container_address=p_net.get('is_container_address'),
static_routes=p_net.get('static_routes'),
reference_group=p_net.get('reference_group'),
@ -1007,8 +1004,7 @@ def _check_config_settings(cidr_networks, config, container_skel):
)
if (p_net.get('container_bridge') ==
overrides.get('management_bridge')):
if (not p_net.get('is_ssh_address') or
not p_net.get('is_container_address')):
if not p_net.get('is_container_address'):
raise ProviderNetworkMisconfiguration(q_name)
logger.debug("Provider network information OK")

View File

@ -0,0 +1,10 @@
---
upgrade:
- The key **is_ssh_address** has been removed from the
`openstack_user_config.yml` and the dynamic inventory. This key was
responsible mapping an address to the container which was used for SSH
connectivity. Because we've created the SSH connectivity plugin, which
allows us the ability to connect to remote containers without SSH, this
option is no longer useful. To keep the `openstack_user_config.yml` clean
deployers can remove the option however moving forward it no longer has any
effect.

View File

@ -641,14 +641,13 @@ class TestConfigChecks(TestConfigCheckBase):
def test_management_network_malformed(self):
self.delete_provider_network_key('container', 'is_container_address')
self.delete_provider_network_key('container', 'is_ssh_address')
self.write_config()
with self.assertRaises(di.ProviderNetworkMisconfiguration) as context:
get_inventory()
expectedLog = ("Provider network with queue 'container' "
"requires 'is_container_address' and "
"'is_ssh_address' to be set to True.")
"requires 'is_container_address' "
"to be set to True.")
self.assertEqual(str(context.exception), expectedLog)
self.restore_config()