Remove nova-db-sync

I never really understood why we had 2 resources to
sync the nova db. This commit attempts to remove
one.
This commit is contained in:
Dan Bode 2012-10-09 22:25:00 -07:00
parent 15a434a9fa
commit ad9084b76f
6 changed files with 12 additions and 24 deletions

View File

@ -12,16 +12,6 @@ class nova::api(
include nova::params
$auth_uri = "${auth_protocol}://${auth_host}:${auth_port}/v2.0"
exec { 'initial-db-sync':
command => '/usr/bin/nova-manage db sync',
refreshonly => true,
require => [Package[$::nova::params::common_package_name], Nova_config['sql_connection']],
}
Package<| title == 'nova-api' |> -> Exec['initial-db-sync']
Package<| title == 'nova-api' |> -> File['/etc/nova/api-paste.ini']
Package<| title == 'nova-api' |> -> Exec['nova-db-sync']
Package<| title == 'nova-api' |> -> Nova_paste_api_ini<| |>
@ -45,4 +35,13 @@ class nova::api(
'filter:authtoken/admin_user': value => $admin_user;
'filter:authtoken/admin_password': value => $admin_password;
}
# I need to ensure that I better understand this resource
# this is potentially constantly resyncing a central DB
exec { "nova-db-sync":
command => "/usr/bin/nova-manage db sync",
refreshonly => "true",
subscribe => Exec['post-nova_config'],
}
}

View File

@ -15,7 +15,7 @@ class nova::db::mysql(
require 'mysql::python'
# Create the db instance before openstack-nova if its installed
Mysql::Db[$dbname] -> Anchor<| title == "nova-start" |>
Mysql::Db[$dbname] ~> Exec<| title == 'initial-db-sync' |>
Mysql::Db[$dbname] ~> Exec<| title == 'nova-db-sync' |>
mysql::db { $dbname:
user => $user,

View File

@ -31,7 +31,6 @@ define nova::generic_service(
Exec['post-nova_config'] ~> Service<| title == $nova_title |>
# ensure that the service has only been started
# after the initial db sync
Exec<| title == 'initial-db-sync' |> ~> Service<| title == $nova_title |>
Exec['nova-db-sync'] ~> Service<| title == $nova_title |>

View File

@ -117,14 +117,6 @@ class nova(
mode => '0640',
}
# I need to ensure that I better understand this resource
# this is potentially constantly resyncing a central DB
exec { "nova-db-sync":
command => "/usr/bin/nova-manage db sync",
refreshonly => "true",
require => [Package['nova-common'], Nova_config['sql_connection']],
}
# used by debian/ubuntu in nova::network_bridge to refresh
# interfaces based on /etc/network/interfaces
exec { "networking-refresh":

View File

@ -1,13 +1,12 @@
define nova::manage::floating ( $network ) {
File['/etc/nova/nova.conf'] -> Nova_floating[$name]
Exec<| title == 'initial-db-sync' |> -> Nova_floating[$name]
Exec<| title == 'nova-db-sync' |> -> Nova_floating[$name]
nova_floating { $name:
ensure => present,
network => $network,
provider => 'nova_manage',
notify => Exec["nova-db-sync"],
}
}

View File

@ -12,14 +12,13 @@ define nova::manage::network (
) {
File['/etc/nova/nova.conf'] -> Nova_network[$name]
Exec<| title == 'initial-db-sync' |> -> Nova_network[$name]
Exec<| title == 'nova-db-sync' |> -> Nova_network[$name]
nova_network { $name:
ensure => present,
network => $network,
num_networks => $num_networks,
project => $project,
notify => Exec['nova-db-sync'],
}
}