Support ironic-lib package and orchestrate Ironic upgrade
The ironic-lib package is required on all Ironic nodes and is now managed by puppet-ironic. When upgrading Ironic, we need to notify the services if common & lib packages are updated. Change-Id: I7ee4f71ece9908e29a8aa3ad89245500e7827787
This commit is contained in:
parent
43c57a0026
commit
c07444ebfb
@ -380,6 +380,14 @@ class ironic (
|
|||||||
name => $::ironic::params::common_package_name,
|
name => $::ironic::params::common_package_name,
|
||||||
tag => ['openstack', 'ironic-package'],
|
tag => ['openstack', 'ironic-package'],
|
||||||
}
|
}
|
||||||
|
Package['ironic-common'] ~> Service<| tag == 'ironic-service' |>
|
||||||
|
|
||||||
|
package { 'ironic-lib':
|
||||||
|
ensure => $package_ensure,
|
||||||
|
name => $::ironic::params::lib_package_name,
|
||||||
|
tag => ['openstack', 'ironic-package'],
|
||||||
|
}
|
||||||
|
Package['ironic-lib'] ~> Service<| tag == 'ironic-service' |>
|
||||||
|
|
||||||
validate_array($enabled_drivers)
|
validate_array($enabled_drivers)
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ class ironic::params {
|
|||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'RedHat': {
|
'RedHat': {
|
||||||
$common_package_name = 'openstack-ironic-common'
|
$common_package_name = 'openstack-ironic-common'
|
||||||
|
$lib_package_name = 'python-ironic-lib'
|
||||||
$api_package = 'openstack-ironic-api'
|
$api_package = 'openstack-ironic-api'
|
||||||
$api_service = 'openstack-ironic-api'
|
$api_service = 'openstack-ironic-api'
|
||||||
$conductor_package = 'openstack-ironic-conductor'
|
$conductor_package = 'openstack-ironic-conductor'
|
||||||
@ -44,6 +45,7 @@ class ironic::params {
|
|||||||
}
|
}
|
||||||
'Debian': {
|
'Debian': {
|
||||||
$common_package_name = 'ironic-common'
|
$common_package_name = 'ironic-common'
|
||||||
|
$lib_package_name = 'python-ironic-lib'
|
||||||
$api_service = 'ironic-api'
|
$api_service = 'ironic-api'
|
||||||
$api_package = 'ironic-api'
|
$api_package = 'ironic-api'
|
||||||
$conductor_service = 'ironic-conductor'
|
$conductor_service = 'ironic-conductor'
|
||||||
|
4
releasenotes/notes/ironic-lib-3e668497a18a9b2c.yaml
Normal file
4
releasenotes/notes/ironic-lib-3e668497a18a9b2c.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Manage ironic-lib package, called python-ironic-lib.
|
||||||
|
Also make sure the packages notify Ironic services to facilitate upgrade orchestration.
|
@ -76,7 +76,7 @@ describe 'ironic' do
|
|||||||
it { is_expected.to contain_class('ironic::logging') }
|
it { is_expected.to contain_class('ironic::logging') }
|
||||||
it { is_expected.to contain_class('ironic::params') }
|
it { is_expected.to contain_class('ironic::params') }
|
||||||
|
|
||||||
it 'installs ironic package' do
|
it 'installs ironic-common package' do
|
||||||
is_expected.to contain_package('ironic-common').with(
|
is_expected.to contain_package('ironic-common').with(
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
:name => platform_params[:common_package_name],
|
:name => platform_params[:common_package_name],
|
||||||
@ -84,6 +84,14 @@ describe 'ironic' do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'installs ironic-lib package' do
|
||||||
|
is_expected.to contain_package('ironic-lib').with(
|
||||||
|
:ensure => 'present',
|
||||||
|
:name => platform_params[:lib_package_name],
|
||||||
|
:tag => ['openstack', 'ironic-package'],
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
it 'passes purge to resource' do
|
it 'passes purge to resource' do
|
||||||
is_expected.to contain_resources('ironic_config').with({
|
is_expected.to contain_resources('ironic_config').with({
|
||||||
:purge => false
|
:purge => false
|
||||||
@ -285,7 +293,8 @@ describe 'ironic' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :platform_params do
|
let :platform_params do
|
||||||
{ :common_package_name => 'ironic-common' }
|
{ :common_package_name => 'ironic-common',
|
||||||
|
:lib_package_name => 'python-ironic-lib' }
|
||||||
end
|
end
|
||||||
|
|
||||||
it_configures 'ironic'
|
it_configures 'ironic'
|
||||||
@ -306,7 +315,8 @@ describe 'ironic' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :platform_params do
|
let :platform_params do
|
||||||
{ :common_package_name => 'openstack-ironic-common' }
|
{ :common_package_name => 'openstack-ironic-common',
|
||||||
|
:lib_package_name => 'python-ironic-lib' }
|
||||||
end
|
end
|
||||||
|
|
||||||
it_configures 'ironic'
|
it_configures 'ironic'
|
||||||
|
Loading…
Reference in New Issue
Block a user