enforce db-sync everywhere
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
parent
6f1da69c7e
commit
7aa33e29ac
@ -91,4 +91,13 @@ class cloud::compute(
|
||||
'DEFAULT/resume_guests_state_on_host_boot': value => true;
|
||||
}
|
||||
|
||||
# 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
|
||||
exec {'nova_db_sync':
|
||||
command => 'nova-manage db sync',
|
||||
path => '/usr/bin',
|
||||
unless => "mysql nova -h ${nova_db_host} -u ${encoded_user} -p${encoded_password} -e \"show tables\" | grep Tables"
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -525,6 +525,14 @@ class cloud::identity (
|
||||
password => $ks_heat_password
|
||||
}
|
||||
|
||||
# Note(EmilienM):
|
||||
# We check if DB tables are created, if not we populate Keystone DB.
|
||||
# It's a hack to fit with our setup where we run MySQL/Galera
|
||||
exec {'keystone_db_sync':
|
||||
command => 'keystone-manage db_sync',
|
||||
path => '/usr/bin',
|
||||
unless => "mysql keystone -h ${keystone_db_host} -u ${encoded_user} -p${encoded_password} -e \"show tables\" | grep Tables"
|
||||
}
|
||||
|
||||
@@haproxy::balancermember{"${::fqdn}-keystone_api":
|
||||
listening_service => 'keystone_api_cluster',
|
||||
|
@ -45,6 +45,15 @@ class cloud::network::controller(
|
||||
api_workers => $::processorcount
|
||||
}
|
||||
|
||||
# Note(EmilienM):
|
||||
# We check if DB tables are created, if not we populate Neutron DB.
|
||||
# It's a hack to fit with our setup where we run MySQL/Galera
|
||||
exec {'neutron_db_sync':
|
||||
command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head',
|
||||
path => '/usr/bin',
|
||||
unless => "mysql neutron -h ${neutron_db_host} -u ${encoded_user} -p${encoded_password} -e \"show tables\" | grep Tables"
|
||||
}
|
||||
|
||||
@@haproxy::balancermember{"${::fqdn}-neutron_api":
|
||||
listening_service => 'neutron_api_cluster',
|
||||
server_names => $::hostname,
|
||||
|
@ -52,4 +52,13 @@ class cloud::orchestration(
|
||||
debug => $debug,
|
||||
}
|
||||
|
||||
# Note(EmilienM):
|
||||
# We check if DB tables are created, if not we populate Heat DB.
|
||||
# It's a hack to fit with our setup where we run MySQL/Galera
|
||||
exec {'heat_db_sync':
|
||||
command => 'heat-manage --config-file /etc/heat/heat.conf db_sync',
|
||||
path => '/usr/bin',
|
||||
unless => "mysql heat -h ${heat_db_host} -u ${encoded_user} -p${encoded_password} -e \"show tables\" | grep Tables"
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -46,4 +46,13 @@ class cloud::volume(
|
||||
|
||||
class { 'cinder::ceilometer': }
|
||||
|
||||
# Note(EmilienM):
|
||||
# We check if DB tables are created, if not we populate Cinder DB.
|
||||
# It's a hack to fit with our setup where we run MySQL/Galera
|
||||
exec {'cinder_db_sync':
|
||||
command => 'cinder-manage db sync',
|
||||
path => '/usr/bin',
|
||||
unless => "mysql cinder -h ${cinder_db_host} -u ${encoded_user} -p${encoded_password} -e \"show tables\" | grep Tables"
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user