Browse Source

Add ability to specify memcached port

The port defaults to hiera('memcached_authtoken_port', 11211)
for authtoken middleware and hiera('memcached_port', 11211)
for other uses. Different ports might be set for security
and performance tuning.

Change-Id: I567d6b2cd66d5eb98971cd54987c1fbea3c1da78
changes/19/769319/4
Grzegorz Grasza 10 months ago
parent
commit
f460e659ba
  1. 9
      manifests/profile/base/aodh/authtoken.pp
  2. 9
      manifests/profile/base/barbican/authtoken.pp
  3. 9
      manifests/profile/base/cinder/authtoken.pp
  4. 9
      manifests/profile/base/designate/authtoken.pp
  5. 9
      manifests/profile/base/glance/authtoken.pp
  6. 9
      manifests/profile/base/gnocchi/authtoken.pp
  7. 9
      manifests/profile/base/heat.pp
  8. 9
      manifests/profile/base/heat/authtoken.pp
  9. 9
      manifests/profile/base/ironic/authtoken.pp
  10. 9
      manifests/profile/base/ironic_inspector/authtoken.pp
  11. 7
      manifests/profile/base/keystone.pp
  12. 9
      manifests/profile/base/manila/authtoken.pp
  13. 9
      manifests/profile/base/mistral/authtoken.pp
  14. 9
      manifests/profile/base/neutron/authtoken.pp
  15. 9
      manifests/profile/base/nova.pp
  16. 9
      manifests/profile/base/nova/authtoken.pp
  17. 9
      manifests/profile/base/novajoin/authtoken.pp
  18. 9
      manifests/profile/base/octavia/authtoken.pp
  19. 9
      manifests/profile/base/placement/authtoken.pp
  20. 6
      manifests/profile/base/swift.pp
  21. 6
      manifests/profile/base/swift/proxy.pp
  22. 9
      manifests/profile/base/zaqar/authtoken.pp
  23. 6
      releasenotes/notes/add-memcached-port-048959c2f58f0a57.yaml

9
manifests/profile/base/aodh/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::aodh::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'aodh::keystone::authtoken':

9
manifests/profile/base/barbican/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', [])
#
class tripleo::profile::base::barbican::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'barbican::keystone::authtoken':

9
manifests/profile/base/cinder/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::cinder::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'cinder::keystone::authtoken':

9
manifests/profile/base/designate/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::designate::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'designate::keystone::authtoken':

9
manifests/profile/base/glance/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::glance::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'glance::api::authtoken':

9
manifests/profile/base/gnocchi/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::gnocchi::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'gnocchi::keystone::authtoken':

9
manifests/profile/base/heat.pp

@ -83,6 +83,10 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_port', 11211)
#
class tripleo::profile::base::heat (
$bootstrap_node = downcase(hiera('heat_engine_short_bootstrap_node_name')),
$manage_db_purge = hiera('heat_enable_db_purge', true),
@ -100,6 +104,7 @@ class tripleo::profile::base::heat (
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_port', 11211),
) {
include tripleo::profile::base::heat::authtoken
@ -139,9 +144,9 @@ class tripleo::profile::base::heat (
include heat::logging
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'heat::cache':

9
manifests/profile/base/heat/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::heat::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'heat::keystone::authtoken':

9
manifests/profile/base/ironic/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::ironic::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'ironic::api::authtoken':

9
manifests/profile/base/ironic_inspector/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::ironic_inspector::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'ironic::inspector::authtoken':

7
manifests/profile/base/keystone.pp

@ -158,6 +158,10 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_port', 11211)
#
# [*keystone_resources_managed*]
# (Optional) Enable the management of Keystone resources with Puppet.
# Can be disabled if Ansible manages these resources instead of Puppet.
@ -199,6 +203,7 @@ class tripleo::profile::base::keystone (
$keystone_federation_enabled = hiera('keystone_federation_enabled', false),
$keystone_openidc_enabled = hiera('keystone_openidc_enabled', false),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_port', 11211),
$keystone_resources_managed = hiera('keystone_resources_managed', undef),
) {
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
@ -225,7 +230,7 @@ class tripleo::profile::base::keystone (
if $step >= 4 or ( $step >= 3 and $sync_db ) {
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
$memcached_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcached_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
class { 'keystone::cache':
memcache_servers => $memcached_servers,

9
manifests/profile/base/manila/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::manila::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'manila::keystone::authtoken':

9
manifests/profile/base/mistral/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::mistral::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'mistral::keystone::authtoken':

9
manifests/profile/base/neutron/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::neutron::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'neutron::keystone::authtoken':

9
manifests/profile/base/nova.pp

@ -78,6 +78,10 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_port', 11211)
#
class tripleo::profile::base::nova (
$bootstrap_node = hiera('nova_api_short_bootstrap_node_name', undef),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
@ -94,6 +98,7 @@ class tripleo::profile::base::nova (
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_port', 11211),
) {
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
@ -103,9 +108,9 @@ class tripleo::profile::base::nova (
}
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
if $step >= 4 or ($step >= 3 and $sync_db) {

9
manifests/profile/base/nova/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::nova::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'nova::keystone::authtoken':

9
manifests/profile/base/novajoin/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::novajoin::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'nova::metadata::novajoin::authtoken':

9
manifests/profile/base/octavia/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::octavia::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'octavia::keystone::authtoken':

9
manifests/profile/base/placement/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::placement::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'placement::keystone::authtoken':

6
manifests/profile/base/swift.pp

@ -24,8 +24,8 @@
# Defaults to hiera('step')
#
# [*memcache_port*]
# (Optional) memcache port
# Defaults to 11211
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_port', 11211)
#
# [*memcache_servers*]
# (Optional) List of memcache servers
@ -33,7 +33,7 @@
#
class tripleo::profile::base::swift (
$step = Integer(hiera('step')),
$memcache_port = 11211,
$memcache_port = hiera('memcached_port', 11211),
$memcache_servers = hiera('memcached_node_ips', []),
) {
if $step >= 4 {

6
manifests/profile/base/swift/proxy.pp

@ -67,8 +67,8 @@
# Defaults to hiera('enable_internal_tls', false)
#
# [*memcache_port*]
# (Optional) memcache port
# Defaults to 11211
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_port', 11211)
#
# [*memcache_servers*]
# (Optional) List of memcache servers
@ -110,7 +110,7 @@ class tripleo::profile::base::swift::proxy (
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$certificates_specs = hiera('apache_certificates_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
$memcache_port = 11211,
$memcache_port = hiera('memcached_port', 11211),
$memcache_servers = hiera('memcached_node_ips', []),
$step = Integer(hiera('step')),
$swift_proxy_network = hiera('swift_proxy_network', undef),

9
manifests/profile/base/zaqar/authtoken.pp

@ -25,16 +25,21 @@
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_ips', [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
#
class tripleo::profile::base::zaqar::authtoken (
$step = Integer(hiera('step')),
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
) {
if $step >= 3 {
if is_ipv6_address($memcached_ips[0]) {
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
} else {
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
}
class { 'zaqar::keystone::authtoken':

6
releasenotes/notes/add-memcached-port-048959c2f58f0a57.yaml

@ -0,0 +1,6 @@
---
features:
- |
Add ability to specify memcached port for all services. The port defaults
to hiera('memcached_authtoken_port', 11211) for authtoken middleware and
hiera('memcached_port', 11211) for other uses.
Loading…
Cancel
Save