Files
puppet-nova/manifests/compute/ironic.pp
Takashi Kajinami ca9c045802 Wallaby-only: Fix handling of [DEFAULT] max_concurrent_builds
The change bf1e6fd9c1 introduced
the logic to handle the deprecated max_concurrent_builds parameter but
the logic only works when nova::compute::ironic is included BEFORE
nova::compute. This is not always true and can break the existing
usage.

This change ensures the deprecated parameter works regardless of
the order to include classes. One disadvantage of this change is that
the parameter is not longer cleared out by default, but users can still
ensure it is removed from nova.conf by setting $::os_service_default
explicitly.

The deprecated parameter was removed during stable/xena cycle so this
is submitted as a wallaby-only change.

Change-Id: Ib2d8eaaef0105f32de8efe78b2a7b73a4f1f4201
2022-11-22 15:13:21 +09:00

43 lines
1.1 KiB
Puppet

# == Class: nova::compute::ironic
#
# Configures Nova compute service to use Ironic.
#
# === Parameters:
#
# [*compute_driver*]
# (optional) Compute driver.
# Defaults to 'ironic.IronicDriver'
#
# [*max_concurrent_builds*]
# (optional) Maximum number of instance builds to run concurrently
# Defaults to undef
#
class nova::compute::ironic (
$compute_driver = 'ironic.IronicDriver',
# DEPRECATED PARAMETERS
$max_concurrent_builds = undef,
) {
include nova::deps
require nova::ironic::common
include ironic::client
nova_config {
'DEFAULT/compute_driver': value => $compute_driver;
}
if $max_concurrent_builds != undef {
warning('The nova::compute::ironic::max_concurrent_builds parameter is deprecated \
and will be removed in a future release. Use nova::compute::max_concurrent_builds instead.')
nova_config {
'DEFAULT/max_concurrent_builds': value => $max_concurrent_builds
}
} else {
if defined(Class[nova::compute]) and $::nova::compute::max_concurrent_builds == undef {
nova_config {
'DEFAULT/max_concurrent_builds': value => $::os_service_default
}
}
}
}