Merge "Nova: Replace hiera by lookup"

This commit is contained in:
Zuul 2022-06-09 23:25:58 +00:00 committed by Gerrit Code Review
commit 0a0264fbb5
16 changed files with 110 additions and 110 deletions

View File

@ -20,75 +20,75 @@
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('nova_api_short_bootstrap_node_name')
# Defaults to lookup('nova_api_short_bootstrap_node_name', undef, undef, undef)
#
# [*oslomsg_rpc_proto*]
# Protocol driver for the oslo messaging rpc service
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
# Defaults to lookup('oslo_messaging_rpc_scheme', undef, undef, 'rabbit')
#
# [*oslomsg_rpc_hosts*]
# list of the oslo messaging rpc host fqdns
# Defaults to hiera('oslo_messaging_rpc_node_names')
# Defaults to any2array(lookup('oslo_messaging_rpc_node_names', undef, undef, undef))
#
# [*oslomsg_rpc_port*]
# IP port for oslo messaging rpc service
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
# Defaults to lookup('oslo_messaging_rpc_port', undef, undef, '5672')
#
# [*oslomsg_rpc_username*]
# Username for oslo messaging rpc service
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
# Defaults to lookup('oslo_messaging_rpc_user_name', undef, undef, 'guest')
#
# [*oslomsg_rpc_password*]
# Password for oslo messaging rpc service
# Defaults to hiera('oslo_messaging_rpc_password')
# Defaults to lookup('oslo_messaging_rpc_password')
#
# [*oslomsg_rpc_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
# Defaults to lookup('oslo_messaging_rpc_use_ssl', undef, undef, '0')
#
# [*oslomsg_notify_proto*]
# Protocol driver for the oslo messaging notify service
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
# Defaults to lookup('oslo_messaging_notify_scheme', undef, undef, 'rabbit')
#
# [*oslomsg_notify_hosts*]
# list of the oslo messaging notify host fqdns
# Defaults to hiera('oslo_messaging_notify_node_names')
# Defaults to any2array(lookup('oslo_messaging_notify_node_names', undef, undef, undef))
#
# [*oslomsg_notify_port*]
# IP port for oslo messaging notify service
# Defaults to hiera('oslo_messaging_notify_port', 5672)
# Defaults to lookup('oslo_messaging_notify_port', undef, undef, '5672')
#
# [*oslomsg_notify_username*]
# Username for oslo messaging notify service
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
# Defaults to lookup('oslo_messaging_notify_user_name', undef, undef, 'guest')
#
# [*oslomsg_notify_password*]
# Password for oslo messaging notify service
# Defaults to hiera('oslo_messaging_notify_password')
# Defaults to lookup('oslo_messaging_notify_password')
#
# [*oslomsg_notify_use_ssl*]
# Enable ssl oslo messaging services
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
# Defaults to lookup('oslo_messaging_notify_use_ssl', undef, undef, '0')
#
# [*step*]
# (Optional) The current step of the deployment
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*memcached_hosts*]
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_names', [])
# Defaults to lookup('memcached_node_names', undef, undef, [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_port', 11211)
# Defaults to lookup('memcached_port', undef, undef, 11211)
#
# [*memcached_ipv6*]
# (Optional) Whether Memcached uses IPv6 network instead of IPv4 network.
# Defauls to hiera('memcached_ipv6', false)
# Defauls to lookup('memcached_ipv6', undef, undef, false)
#
# [*cache_backend*]
# (Optional) oslo.cache backend used for caching.
# Defaults to hiera('nova::cache::backend', false)
# Defaults to lookup('nova::cache::backend', undef, undef, false)
#
# DEPRECATED PARAMETERS
#
@ -97,24 +97,24 @@
# Defaults to undef
#
class tripleo::profile::base::nova (
$bootstrap_node = hiera('nova_api_short_bootstrap_node_name', undef),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
$step = Integer(hiera('step')),
$memcached_hosts = hiera('memcached_node_names', []),
$memcached_port = hiera('memcached_port', 11211),
$memcached_ipv6 = hiera('memcached_ipv6', false),
$cache_backend = hiera('nova::cache::backend', false),
$bootstrap_node = lookup('nova_api_short_bootstrap_node_name', undef, undef, undef),
$oslomsg_rpc_proto = lookup('oslo_messaging_rpc_scheme', undef, undef, 'rabbit'),
$oslomsg_rpc_hosts = any2array(lookup('oslo_messaging_rpc_node_names', undef, undef, undef)),
$oslomsg_rpc_password = lookup('oslo_messaging_rpc_password'),
$oslomsg_rpc_port = lookup('oslo_messaging_rpc_port', undef, undef, '5672'),
$oslomsg_rpc_username = lookup('oslo_messaging_rpc_user_name', undef, undef, 'guest'),
$oslomsg_rpc_use_ssl = lookup('oslo_messaging_rpc_use_ssl', undef, undef, '0'),
$oslomsg_notify_proto = lookup('oslo_messaging_notify_scheme', undef, undef, 'rabbit'),
$oslomsg_notify_hosts = any2array(lookup('oslo_messaging_notify_node_names', undef, undef, undef)),
$oslomsg_notify_password = lookup('oslo_messaging_notify_password'),
$oslomsg_notify_port = lookup('oslo_messaging_notify_port', undef, undef, '5672'),
$oslomsg_notify_username = lookup('oslo_messaging_notify_user_name', undef, undef, 'guest'),
$oslomsg_notify_use_ssl = lookup('oslo_messaging_notify_use_ssl', undef, undef, '0'),
$step = Integer(lookup('step')),
$memcached_hosts = lookup('memcached_node_names', undef, undef, []),
$memcached_port = lookup('memcached_port', undef, undef, 11211),
$memcached_ipv6 = lookup('memcached_ipv6', undef, undef, false),
$cache_backend = lookup('nova::cache::backend', undef, undef, false),
# DEPRECATED PARAMETERS
$memcached_ips = undef
) {
@ -129,8 +129,8 @@ class tripleo::profile::base::nova (
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)))
if hiera('nova_is_additional_cell', undef) {
$oslomsg_rpc_hosts_real = any2array(hiera('oslo_messaging_rpc_cell_node_names', undef))
if lookup('nova_is_additional_cell', undef, undef, undef) {
$oslomsg_rpc_hosts_real = any2array(lookup('oslo_messaging_rpc_cell_node_names', undef, undef, undef))
} else {
$oslomsg_rpc_hosts_real = $oslomsg_rpc_hosts
}

View File

@ -18,7 +18,7 @@
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('nova_api_short_bootstrap_node_name')
# Defaults to lookup('nova_api_short_bootstrap_node_name')
#
# [*certificates_specs*]
# (Optional) The specifications to give to certmonger for the certificate(s)
@ -30,38 +30,38 @@
# service_certificate: <service certificate path>
# service_key: <service key path>
# principal: "haproxy/<overcloud controller fqdn>"
# Defaults to hiera('apache_certificate_specs', {}).
# Defaults to lookup('apache_certificates_specs', undef, undef, {}).
#
# [*enable_internal_tls*]
# (Optional) Whether TLS in the internal network is enabled or not.
# Defaults to hiera('enable_internal_tls', false)
# Defaults to lookup('enable_internal_tls', undef, undef, false)
#
# [*nova_api_network*]
# (Optional) The network name where the nova API endpoint is listening on.
# This is set by t-h-t.
# Defaults to hiera('nova_api_network', undef)
# Defaults to lookup('nova_api_network', undef, undef, undef)
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*nova_enable_db_archive*]
# (Optional) Wheter to enable db archiving
# Defaults to hiera('nova_enable_db_archive', true)
# Defaults to lookup('nova_enable_db_archive', undef, undef, true)
#
# [*nova_enable_db_purge*]
# (Optional) Wheter to enable db purging
# Defaults to hiera('nova_enable_db_purge', true)
# Defaults to lookup('nova_enable_db_purge', undef, undef, true)
#
class tripleo::profile::base::nova::api (
$bootstrap_node = hiera('nova_api_short_bootstrap_node_name', undef),
$certificates_specs = hiera('apache_certificates_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
$nova_api_network = hiera('nova_api_network', undef),
$step = Integer(hiera('step')),
$nova_enable_db_archive = hiera('nova_enable_db_archive', true),
$nova_enable_db_purge = hiera('nova_enable_db_purge', true),
$bootstrap_node = lookup('nova_api_short_bootstrap_node_name', undef, undef, undef),
$certificates_specs = lookup('apache_certificates_specs', undef, undef, {}),
$enable_internal_tls = lookup('enable_internal_tls', undef, undef, false),
$nova_api_network = lookup('nova_api_network', undef, undef, undef),
$step = Integer(lookup('step')),
$nova_enable_db_archive = lookup('nova_enable_db_archive', undef, undef, true),
$nova_enable_db_purge = lookup('nova_enable_db_purge', undef, undef, true),
) {
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
$sync_db = true

View File

@ -21,28 +21,28 @@
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*memcached_hosts*]
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_names', [])
# Defaults to lookup('memcached_node_names', undef, undef, [])
#
# [*memcached_port*]
# (Optional) Memcached port to use.
# Defaults to hiera('memcached_authtoken_port', 11211)
# Defaults to lookup('memcached_authtoken_port', undef, undef, 11211)
#
# [*memcached_ipv6*]
# (Optional) Whether Memcached uses IPv6 network instead of IPv4 network.
# Defauls to hiera('memcached_ipv6', false)
# Defauls to lookup('memcached_ipv6', undef, undef, false)
#
# [*security_strategy*]
# (Optional) Memcached (authtoken) security strategy.
# Defaults to hiera('memcached_authtoken_security_strategy', undef)
# Defaults to lookup('memcached_authtoken_security_strategy', undef, undef, undef)
#
# [*secret_key*]
# (Optional) Memcached (authtoken) secret key, used with security_strategy.
# The key is hashed with a salt, to isolate services.
# Defaults to hiera('memcached_authtoken_secret_key', undef)
# Defaults to lookup('memcached_authtoken_secret_key', undef, undef, undef)
#
# DEPRECATED PARAMETERS
#
@ -51,12 +51,12 @@
# Defaults to undef
#
class tripleo::profile::base::nova::authtoken (
$step = Integer(hiera('step')),
$memcached_hosts = hiera('memcached_node_names', []),
$memcached_port = hiera('memcached_authtoken_port', 11211),
$memcached_ipv6 = hiera('memcached_ipv6', false),
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
$secret_key = hiera('memcached_authtoken_secret_key', undef),
$step = Integer(lookup('step')),
$memcached_hosts = lookup('memcached_node_names', undef, undef, []),
$memcached_port = lookup('memcached_authtoken_port', undef, undef, 11211),
$memcached_ipv6 = lookup('memcached_ipv6', undef, undef, false),
$security_strategy = lookup('memcached_authtoken_security_strategy', undef, undef, undef),
$secret_key = lookup('memcached_authtoken_secret_key', undef, undef, undef),
# DEPRECATED PARAMETERS
$memcached_ips = undef
) {

View File

@ -21,20 +21,20 @@
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*cinder_nfs_backend*]
# (Optional) Whether or not Cinder is backed by NFS.
# Defaults to hiera('cinder_enable_nfs_backend', false)
# Defaults to lookup('cinder_enable_nfs_backend', undef, undef, false)
#
# [*nova_nfs_enabled*]
# (Optional) Whether or not Nova is backed by NFS.
# Defaults to false
# Defaults to lookup('nova_nfs_enabled', undef, undef, false)
#
class tripleo::profile::base::nova::compute (
$step = Integer(hiera('step')),
$cinder_nfs_backend = hiera('cinder_enable_nfs_backend', false),
$nova_nfs_enabled = hiera('nova_nfs_enabled', false),
$step = Integer(lookup('step')),
$cinder_nfs_backend = lookup('cinder_enable_nfs_backend', undef, undef, false),
$nova_nfs_enabled = lookup('nova_nfs_enabled', undef, undef, false),
) {
if $step >= 4 {

View File

@ -21,10 +21,10 @@
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
class tripleo::profile::base::nova::compute::ironic (
$step = Integer(hiera('step')),
$step = Integer(lookup('step')),
) {
if $step >= 4 {
include tripleo::profile::base::nova::compute

View File

@ -21,10 +21,10 @@
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
class tripleo::profile::base::nova::compute::libvirt (
$step = Integer(hiera('step')),
$step = Integer(lookup('step')),
) {
if $step >= 4 {
include tripleo::profile::base::nova::compute

View File

@ -21,14 +21,14 @@
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*enabled*]
# (Optional) Whether libvirt-guests should be configured and enabled or not.
# Defaults to undef
#
class tripleo::profile::base::nova::compute::libvirt_guests (
$step = Integer(hiera('step')),
$step = Integer(lookup('step')),
$enabled = undef,
) {
# only configure libvirt-guests if enabled

View File

@ -21,25 +21,25 @@
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*rbd_ephemeral_storage*]
# (Optional) Use Ceph as ephmeral disk backend.
# Defaults to hiera('nova::compute::rbd::ephemeral_storage', false)
# Defaults to lookup('nova::compute::rbd::ephemeral_storage', undef, undef, false)
#
# [*rbd_persistent_storage*]
# (Optional) Use Ceph as volume backend.
# Defaults to hiera('rbd_persistent_storage', false)
# Defaults to lookup('rbd_persistent_storage', undef, undef, false)
#
# [*rbd_disk_cachemodes*]
# (Optional) Cache mode of rbd volumes.
# Defaults to hiera('rbd_disk_cachemodes', ['network=writeback'])
# Defaults to lookup('rbd_disk_cachemodes', undef, undef, ['network=writeback'])
#
class tripleo::profile::base::nova::compute_libvirt_shared (
$step = Integer(hiera('step')),
$rbd_ephemeral_storage = hiera('nova::compute::rbd::ephemeral_storage', false),
$rbd_persistent_storage = hiera('rbd_persistent_storage', false),
$rbd_disk_cachemodes = hiera('rbd_disk_cachemodes', ['network=writeback']),
$step = Integer(lookup('step')),
$rbd_ephemeral_storage = lookup('nova::compute::rbd::ephemeral_storage', undef, undef, false),
$rbd_persistent_storage = lookup('rbd_persistent_storage', undef, undef, false),
$rbd_disk_cachemodes = lookup('rbd_disk_cachemodes', undef, undef, ['network=writeback']),
) {
if $step >= 4 {
# Ceph + Libvirt

View File

@ -20,16 +20,16 @@
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('nova_conductor_short_bootstrap_node_name')
# Defaults to lookup('nova_conductor_short_bootstrap_node_name', undef, undef, undef)
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
class tripleo::profile::base::nova::conductor (
$bootstrap_node = hiera('nova_conductor_short_bootstrap_node_name', undef),
$step = Integer(hiera('step')),
$bootstrap_node = lookup('nova_conductor_short_bootstrap_node_name', undef, undef, undef),
$step = Integer(lookup('step')),
) {
include tripleo::profile::base::nova
include nova::db

View File

@ -21,7 +21,7 @@
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*libvirtd_config*]
# (Optional) Overrides for libvirtd config options
@ -62,7 +62,7 @@
# Defaults to false
#
class tripleo::profile::base::nova::libvirt (
$step = Integer(hiera('step')),
$step = Integer(lookup('step')),
$libvirtd_config = {},
$virtlogd_config = {},
$virtproxyd_config = {},

View File

@ -18,7 +18,7 @@
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('nova_metadata_short_bootstrap_node_name')
# Defaults to lookup('nova_metadata_short_bootstrap_node_name', undef, undef, undef)
#
# [*certificates_specs*]
# (Optional) The specifications to give to certmonger for the certificate(s)
@ -30,28 +30,28 @@
# service_certificate: <service certificate path>
# service_key: <service key path>
# principal: "haproxy/<overcloud controller fqdn>"
# Defaults to hiera('apache_certificate_specs', {}).
# Defaults to lookup('apache_certificates_specs', undef, undef, {}).
#
# [*enable_internal_tls*]
# (Optional) Whether TLS in the internal network is enabled or not.
# Defaults to hiera('enable_internal_tls', false)
# Defaults to lookup('enable_internal_tls', undef, undef, false)
#
# [*nova_metadata_network*]
# (Optional) The network name where the nova metadata endpoint is listening on.
# This is set by t-h-t.
# Defaults to hiera('nova_metadata_network', undef)
# Defaults to lookup('nova_metadata_network', undef, undef, undef)
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
class tripleo::profile::base::nova::metadata (
$bootstrap_node = hiera('nova_metadata_short_bootstrap_node_name', undef),
$certificates_specs = hiera('apache_certificates_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
$nova_metadata_network = hiera('nova_metadata_network', undef),
$step = Integer(hiera('step')),
$bootstrap_node = lookup('nova_metadata_short_bootstrap_node_name', undef, undef, undef),
$certificates_specs = lookup('apache_certificates_specs', undef, undef, {}),
$enable_internal_tls = lookup('enable_internal_tls', undef, undef, false),
$nova_metadata_network = lookup('nova_metadata_network', undef, undef, undef),
$step = Integer(lookup('step')),
) {
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
$is_bootstrap = true

View File

@ -20,11 +20,11 @@
#
# [*step*]
# (Optional) The current step of the deployment
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
class tripleo::profile::base::nova::migration (
$step = Integer(hiera('step')),
$step = Integer(lookup('step')),
) {
if $step >= 3 {
package { 'openstack-nova-migration':

View File

@ -28,7 +28,7 @@
#
# [*step*]
# (Optional) The current step of the deployment
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*ssh_private_key*]
# (Optional) SSH private_key for migration SSH tunnel.
@ -45,7 +45,7 @@
class tripleo::profile::base::nova::migration::client (
$libvirt_enabled = false,
$nova_compute_enabled = false,
$step = Integer(hiera('step')),
$step = Integer(lookup('step')),
$ssh_private_key = '',
$ssh_port = 22,
$libvirt_tls = false,

View File

@ -20,7 +20,7 @@
#
# [*step*]
# (Optional) The current step of the deployment
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*ssh_authorized_keys*]
# (Optional) List of SSH public keys authorized for migration.
@ -32,7 +32,7 @@
# Defaults to /bin/nova-migration-wrapper
#
class tripleo::profile::base::nova::migration::target (
$step = Integer(hiera('step')),
$step = Integer(lookup('step')),
$ssh_authorized_keys = [],
$wrapper_command = '/bin/nova-migration-wrapper',
) {

View File

@ -21,10 +21,10 @@
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
class tripleo::profile::base::nova::scheduler (
$step = Integer(hiera('step')),
$step = Integer(lookup('step')),
) {
if $step >= 4 {
include tripleo::profile::base::nova

View File

@ -21,10 +21,10 @@
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
class tripleo::profile::base::nova::vncproxy (
$step = Integer(hiera('step')),
$step = Integer(lookup('step')),
) {
if $step >= 4 {
include tripleo::profile::base::nova