Merge "Stop hard-coding config file for db sync"

This commit is contained in:
Zuul
2024-03-15 03:57:49 +00:00
committed by Gerrit Code Review
3 changed files with 5 additions and 6 deletions

View File

@@ -22,8 +22,7 @@
class ironic::params { class ironic::params {
include openstacklib::defaults include openstacklib::defaults
$dbsync_command = $dbsync_command = 'ironic-dbsync'
'ironic-dbsync --config-file /etc/ironic/ironic.conf'
$inspector_dbsync_command = $inspector_dbsync_command =
'ironic-inspector-dbsync --config-file /etc/ironic-inspector/inspector.conf upgrade' 'ironic-inspector-dbsync --config-file /etc/ironic-inspector/inspector.conf upgrade'
$client_package = 'python3-ironicclient' $client_package = 'python3-ironicclient'

View File

@@ -6,7 +6,7 @@ describe 'ironic::db::online_data_migrations' do
it 'runs ironic-db-sync' do it 'runs ironic-db-sync' do
is_expected.to contain_exec('ironic-db-online-data-migrations').with( is_expected.to contain_exec('ironic-db-online-data-migrations').with(
:command => 'ironic-dbsync --config-file /etc/ironic/ironic.conf online_data_migrations ', :command => 'ironic-dbsync online_data_migrations ',
:path => '/usr/bin', :path => '/usr/bin',
:user => 'ironic', :user => 'ironic',
:refreshonly => 'true', :refreshonly => 'true',
@@ -31,7 +31,7 @@ describe 'ironic::db::online_data_migrations' do
it { it {
is_expected.to contain_exec('ironic-db-online-data-migrations').with( is_expected.to contain_exec('ironic-db-online-data-migrations').with(
:command => 'ironic-dbsync --config-file /etc/ironic/ironic.conf --config-file /etc/ironic/ironic_01.conf online_data_migrations --max-count 100', :command => 'ironic-dbsync --config-file /etc/ironic/ironic_01.conf online_data_migrations --max-count 100',
:path => '/usr/bin', :path => '/usr/bin',
:user => 'ironic', :user => 'ironic',
:refreshonly => 'true', :refreshonly => 'true',

View File

@@ -8,7 +8,7 @@ describe 'ironic::db::sync' do
it 'runs ironic-manage db_sync' do it 'runs ironic-manage db_sync' do
is_expected.to contain_exec('ironic-dbsync').with( is_expected.to contain_exec('ironic-dbsync').with(
:command => 'ironic-dbsync --config-file /etc/ironic/ironic.conf ', :command => 'ironic-dbsync ',
:path => '/usr/bin', :path => '/usr/bin',
:user => 'ironic', :user => 'ironic',
:refreshonly => 'true', :refreshonly => 'true',
@@ -32,7 +32,7 @@ describe 'ironic::db::sync' do
} }
end end
it { is_expected.to contain_exec('ironic-dbsync').with( it { is_expected.to contain_exec('ironic-dbsync').with(
:command => 'ironic-dbsync --config-file /etc/ironic/ironic.conf --config-file /etc/ironic/ironic_01.conf', :command => 'ironic-dbsync --config-file /etc/ironic/ironic_01.conf',
:path => '/usr/bin', :path => '/usr/bin',
:user => 'ironic', :user => 'ironic',
:refreshonly => true, :refreshonly => true,