ironic: Support options to distribute baremetal management
The ironic driver now provides a few options to distribute baremetal node management among multilple nova-compute. Change-Id: I7fbceb00422c2bd6ae7d594321fe09789fe0a3f3
This commit is contained in:
parent
83c9e4b17b
commit
d452e60c7c
manifests/ironic
releasenotes/notes
spec/classes
@ -58,6 +58,16 @@
|
||||
# (Optional) Timeout value for connecting to ironic in seconds.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*conductor_group*]
|
||||
# (Optional) Case-insensitive key to limit the set of the nodes that may be
|
||||
# managed by this service to the set of nodes in Ironic which have a matching
|
||||
# conductor_group property.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*shard*]
|
||||
# (Optional) Specify which ironic shared this nova-compute will manage.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
class nova::ironic::common (
|
||||
$auth_plugin = 'password',
|
||||
$auth_url = 'http://127.0.0.1:5000/',
|
||||
@ -74,6 +84,8 @@ class nova::ironic::common (
|
||||
$service_type = $facts['os_service_default'],
|
||||
$valid_interfaces = $facts['os_service_default'],
|
||||
$timeout = $facts['os_service_default'],
|
||||
$conductor_group = $facts['os_service_default'],
|
||||
$shard = $facts['os_service_default'],
|
||||
) {
|
||||
|
||||
include nova::deps
|
||||
@ -102,6 +114,8 @@ class nova::ironic::common (
|
||||
'ironic/service_type': value => $service_type;
|
||||
'ironic/valid_interfaces': value => join(any2array($valid_interfaces), ',');
|
||||
'ironic/timeout': value => $timeout;
|
||||
'ironic/conductor_group': value => $conductor_group;
|
||||
'ironic/shard': value => $shard;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The ``conductor_group`` parameter and the ``shard`` parameter have been
|
||||
added to the ``ironic::conductor`` class.
|
@ -19,8 +19,10 @@ describe 'nova::ironic::common' do
|
||||
is_expected.to contain_nova_config('ironic/user_domain_name').with_value('Default')
|
||||
is_expected.to contain_nova_config('ironic/project_domain_name').with_value('Default')
|
||||
is_expected.to contain_nova_config('ironic/service_type').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('ironic/timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('ironic/valid_interfaces').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('ironic/timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('ironic/conductor_group').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('ironic/shard').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
@ -40,6 +42,8 @@ describe 'nova::ironic::common' do
|
||||
:service_type => 'baremetal',
|
||||
:timeout => 30,
|
||||
:valid_interfaces => 'internal',
|
||||
:conductor_group => 'mygroup',
|
||||
:shard => 'myshard'
|
||||
}
|
||||
end
|
||||
|
||||
@ -57,8 +61,10 @@ describe 'nova::ironic::common' do
|
||||
is_expected.to contain_nova_config('ironic/user_domain_name').with_value('custom_domain')
|
||||
is_expected.to contain_nova_config('ironic/project_domain_name').with_value('custom_domain')
|
||||
is_expected.to contain_nova_config('ironic/service_type').with_value('baremetal')
|
||||
is_expected.to contain_nova_config('ironic/timeout').with_value(30)
|
||||
is_expected.to contain_nova_config('ironic/valid_interfaces').with_value('internal')
|
||||
is_expected.to contain_nova_config('ironic/timeout').with_value(30)
|
||||
is_expected.to contain_nova_config('ironic/conductor_group').with_value('mygroup')
|
||||
is_expected.to contain_nova_config('ironic/shard').with_value('myshard')
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user