compute: do not manage nova db sync in this module
Nova DB sync is already managed by puppet-nova so to avoid race condition when deploying Nova, we should drop the nova_db_sync exec in this module and let puppet-nova does it job with the right orchestration. Change-Id: Ia4d93cf84accd10a22b33f03e041d0c23aecca38 Closes-bug: #1453968
This commit is contained in:
parent
471b7ea8fa
commit
862d049985
@ -191,17 +191,4 @@ class cloud::compute(
|
||||
'DEFAULT/cinder_catalog_info': value => "volume:cinder:${cinder_endpoint_type}";
|
||||
}
|
||||
|
||||
# Note(EmilienM):
|
||||
# We check if DB tables are created, if not we populate Nova DB.
|
||||
# It's a hack to fit with our setup where we run MySQL/Galera
|
||||
# TODO(Goneri)
|
||||
# We have to do this only on the primary node of the galera cluster to avoid race condition
|
||||
# https://github.com/enovance/puppet-openstack-cloud/issues/156
|
||||
exec {'nova_db_sync':
|
||||
command => 'nova-manage db sync',
|
||||
user => 'nova',
|
||||
path => '/usr/bin',
|
||||
unless => "/usr/bin/mysql nova -h ${nova_db_host} -u ${encoded_user} -p${encoded_password} -e \"show tables\" | /bin/grep Tables"
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -106,15 +106,6 @@ describe 'cloud::compute::api' do
|
||||
)
|
||||
end
|
||||
|
||||
it 'checks if Nova DB is populated' do
|
||||
is_expected.to contain_exec('nova_db_sync').with(
|
||||
:command => 'nova-manage db sync',
|
||||
:user => 'nova',
|
||||
:path => '/usr/bin',
|
||||
:unless => '/usr/bin/mysql nova -h 10.0.0.1 -u nova -psecrete -e "show tables" | /bin/grep Tables'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure nova-api' do
|
||||
is_expected.to contain_class('nova::api').with(
|
||||
:enabled => true,
|
||||
|
@ -76,15 +76,6 @@ describe 'cloud::compute::cert' do
|
||||
)
|
||||
end
|
||||
|
||||
it 'checks if Nova DB is populated' do
|
||||
is_expected.to contain_exec('nova_db_sync').with(
|
||||
:command => 'nova-manage db sync',
|
||||
:user => 'nova',
|
||||
:path => '/usr/bin',
|
||||
:unless => '/usr/bin/mysql nova -h 10.0.0.1 -u nova -psecrete -e "show tables" | /bin/grep Tables'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure nova-cert' do
|
||||
is_expected.to contain_class('nova::cert').with(:enabled => true)
|
||||
end
|
||||
|
@ -76,15 +76,6 @@ describe 'cloud::compute::conductor' do
|
||||
)
|
||||
end
|
||||
|
||||
it 'checks if Nova DB is populated' do
|
||||
is_expected.to contain_exec('nova_db_sync').with(
|
||||
:command => 'nova-manage db sync',
|
||||
:user => 'nova',
|
||||
:path => '/usr/bin',
|
||||
:unless => '/usr/bin/mysql nova -h 10.0.0.1 -u nova -psecrete -e "show tables" | /bin/grep Tables'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure nova-conductor' do
|
||||
is_expected.to contain_class('nova::conductor').with(:enabled => true)
|
||||
end
|
||||
|
@ -76,15 +76,6 @@ describe 'cloud::compute::consoleauth' do
|
||||
)
|
||||
end
|
||||
|
||||
it 'checks if Nova DB is populated' do
|
||||
is_expected.to contain_exec('nova_db_sync').with(
|
||||
:command => 'nova-manage db sync',
|
||||
:user => 'nova',
|
||||
:path => '/usr/bin',
|
||||
:unless => '/usr/bin/mysql nova -h 10.0.0.1 -u nova -psecrete -e "show tables" | /bin/grep Tables'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure nova-consoleauth' do
|
||||
is_expected.to contain_class('nova::consoleauth').with(:enabled => true)
|
||||
end
|
||||
|
@ -80,15 +80,6 @@ describe 'cloud::compute::consoleproxy' do
|
||||
)
|
||||
end
|
||||
|
||||
it 'checks if Nova DB is populated' do
|
||||
is_expected.to contain_exec('nova_db_sync').with(
|
||||
:command => 'nova-manage db sync',
|
||||
:user => 'nova',
|
||||
:path => '/usr/bin',
|
||||
:unless => '/usr/bin/mysql nova -h 10.0.0.1 -u nova -psecrete -e "show tables" | /bin/grep Tables'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure nova-vncproxy' do
|
||||
is_expected.to contain_class('nova::vncproxy').with(
|
||||
:enabled => true,
|
||||
|
@ -175,15 +175,6 @@ describe 'cloud::compute::hypervisor' do
|
||||
)
|
||||
end
|
||||
|
||||
it 'checks if Nova DB is populated' do
|
||||
is_expected.to contain_exec('nova_db_sync').with(
|
||||
:command => 'nova-manage db sync',
|
||||
:path => '/usr/bin',
|
||||
:user => 'nova',
|
||||
:unless => '/usr/bin/mysql nova -h 10.0.0.1 -u nova -psecrete -e "show tables" | /bin/grep Tables'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure nova-compute' do
|
||||
is_expected.to contain_class('nova::compute').with(
|
||||
:enabled => true,
|
||||
|
@ -82,15 +82,6 @@ describe 'cloud::compute::scheduler' do
|
||||
)
|
||||
end
|
||||
|
||||
it 'checks if Nova DB is populated' do
|
||||
is_expected.to contain_exec('nova_db_sync').with(
|
||||
:command => 'nova-manage db sync',
|
||||
:user => 'nova',
|
||||
:path => '/usr/bin',
|
||||
:unless => '/usr/bin/mysql nova -h 10.0.0.1 -u nova -psecrete -e "show tables" | /bin/grep Tables'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure nova-scheduler' do
|
||||
is_expected.to contain_class('nova::scheduler').with(:enabled => true)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user