Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Support TLS deployments with KernelDisableIPv6 enabled
Browse files Browse the repository at this point in the history
Bind to 127.0.0.1 in case ipv6 is disabled. Set a hiera value
localhost_address, so that it can be used in tls_proxy.pp to
unambiguously connect to those services.

Change-Id: Ide761c21dc87dadc722e27c9b8a7b68194164cb2
Related: rhbz#1703460
  • Loading branch information
xek authored and EmilienM committed Jul 9, 2019
1 parent 23801a6 commit d48d1bd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions deployment/ec2/ec2-api-container-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ outputs:
ec2api::api::ec2api_listen:
if:
- use_tls_proxy
- 'localhost'
- "%{hiera('localhost_address')}"
- str_replace:
template:
"%{hiera('fqdn_$NETWORK')}"
Expand All @@ -138,7 +138,7 @@ outputs:
ec2api::metadata::metadata_listen:
if:
- use_tls_proxy
- 'localhost'
- "%{hiera('localhost_address')}"
- str_replace:
template:
"%{hiera('fqdn_$NETWORK')}"
Expand Down
2 changes: 1 addition & 1 deletion deployment/glance/glance-api-container-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ outputs:
glance::api::bind_host:
if:
- use_tls_proxy
- 'localhost'
- "%{hiera('localhost_address')}"
- str_replace:
template:
"%{hiera('$NETWORK')}"
Expand Down
8 changes: 8 additions & 0 deletions deployment/kernel/kernel-baremetal-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ parameters:
tags:
- role_specific

conditions:
ipv6_disabled: {equals: [{get_param: KernelDisableIPv6}, 1]}

resources:
# Merging role-specific parameters (RoleParameters) with the default parameters.
# RoleParameters will have the precedence over the default parameters.
Expand All @@ -108,6 +111,11 @@ outputs:
value:
service_name: kernel
config_settings:
localhost_address:
if:
- ipv6_disabled
- '127.0.0.1'
- 'localhost'
kernel_modules:
map_merge:
- nf_conntrack: {}
Expand Down
2 changes: 1 addition & 1 deletion deployment/neutron/neutron-api-container-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ outputs:
neutron::bind_host:
if:
- use_tls_proxy
- 'localhost'
- "%{hiera('localhost_address')}"
- str_replace:
template:
"%{hiera('$NETWORK')}"
Expand Down
2 changes: 1 addition & 1 deletion deployment/swift/swift-proxy-container-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ outputs:
swift::proxy::proxy_local_net_ip:
if:
- use_tls_proxy
- 'localhost'
- "%{hiera('localhost_address')}"
- str_replace:
template:
"%{hiera('$NETWORK')}"
Expand Down

0 comments on commit d48d1bd

Please sign in to comment.