Deprecate customization of PATH environment for db sync
Because we currently support installation by packages, we rarely expect that users may need to override this option. Drop the parameter to reduce complexity and make the implementation more consistent across modules. Change-Id: Iecf00bd3e241eb0c96b309dc18d0776c381146ac
This commit is contained in:
parent
317f62a3bc
commit
f7dfc6abff
@ -12,27 +12,34 @@
|
||||
# to the magnum-dbsync command.
|
||||
# Defaults to ''
|
||||
#
|
||||
# [*exec_path*]
|
||||
# (Optional) The path to use for finding the magnum-db-manage binary.
|
||||
# Defaults to '/usr/bin'
|
||||
#
|
||||
# [*db_sync_timeout*]
|
||||
# (Optional) Timeout for the execution of the db_sync
|
||||
# Defaults to 300
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*exec_path*]
|
||||
# (Optional) The path to use for finding the magnum-db-manage binary.
|
||||
# Defaults to undef
|
||||
#
|
||||
class magnum::db::sync(
|
||||
$user = 'magnum',
|
||||
$extra_params = '',
|
||||
$exec_path = '/usr/bin',
|
||||
$db_sync_timeout = 300,
|
||||
# DEPRECATED PARAMETERS
|
||||
$exec_path = undef,
|
||||
) {
|
||||
|
||||
include magnum::deps
|
||||
include magnum::params
|
||||
|
||||
if $exec_path != undef {
|
||||
warning('The exec_path parameter is deprecated and has no effect')
|
||||
}
|
||||
|
||||
exec { 'magnum-db-sync':
|
||||
command => "magnum-db-manage ${extra_params} upgrade head",
|
||||
path => $exec_path,
|
||||
path => ['/bin', '/usr/bin'],
|
||||
user => $::magnum::params::user,
|
||||
refreshonly => true,
|
||||
try_sleep => 5,
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``magnum::db::sync::exec_path`` parameter has been deprecated and has
|
||||
no effect.
|
@ -9,7 +9,7 @@ describe 'magnum::db::sync' do
|
||||
it 'runs magnum-db-sync' do
|
||||
is_expected.to contain_exec('magnum-db-sync').with(
|
||||
:command => 'magnum-db-manage upgrade head',
|
||||
:path => '/usr/bin',
|
||||
:path => ['/bin', '/usr/bin'],
|
||||
:user => 'magnum',
|
||||
:refreshonly => 'true',
|
||||
:try_sleep => 5,
|
||||
@ -25,17 +25,17 @@ describe 'magnum::db::sync' do
|
||||
end
|
||||
|
||||
describe "overriding params" do
|
||||
let :params do
|
||||
{
|
||||
:extra_params => '--config-file /etc/magnum/magnum.conf',
|
||||
:db_sync_timeout => 750,
|
||||
}
|
||||
end
|
||||
let :params do
|
||||
{
|
||||
:extra_params => '--config-file /etc/magnum/magnum.conf',
|
||||
:db_sync_timeout => 750,
|
||||
}
|
||||
end
|
||||
|
||||
it {
|
||||
it {
|
||||
is_expected.to contain_exec('magnum-db-sync').with(
|
||||
:command => 'magnum-db-manage --config-file /etc/magnum/magnum.conf upgrade head',
|
||||
:path => '/usr/bin',
|
||||
:path => ['/bin', '/usr/bin'],
|
||||
:user => 'magnum',
|
||||
:refreshonly => 'true',
|
||||
:try_sleep => 5,
|
||||
@ -48,33 +48,8 @@ describe 'magnum::db::sync' do
|
||||
:notify => 'Anchor[magnum::dbsync::end]',
|
||||
:tag => 'openstack-db',
|
||||
)
|
||||
}
|
||||
end
|
||||
|
||||
describe "overriding exec_path" do
|
||||
let :params do
|
||||
{
|
||||
:exec_path => '/opt/venvs/magnum/bin',
|
||||
}
|
||||
end
|
||||
|
||||
it {
|
||||
is_expected.to contain_exec('magnum-db-sync').with(
|
||||
:command => 'magnum-db-manage upgrade head',
|
||||
:path => '/opt/venvs/magnum/bin',
|
||||
:user => 'magnum',
|
||||
:refreshonly => 'true',
|
||||
:try_sleep => 5,
|
||||
:tries => 10,
|
||||
:logoutput => 'on_failure',
|
||||
:subscribe => ['Anchor[magnum::install::end]',
|
||||
'Anchor[magnum::config::end]',
|
||||
'Anchor[magnum::dbsync::begin]'],
|
||||
:notify => 'Anchor[magnum::dbsync::end]',
|
||||
)
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
Loading…
Reference in New Issue
Block a user