Improve db sync dependencies
This commit adds a couple of dependencies related to db sync. Previously, it was possible that the nova-scheduler could be started before the db was synced. This would result in the service failing. This could only happen if none of the nova::manage::* defines were used. This commit adds a few extra dependencies to ensure that the initial db sync occurs before any services are started and also that the nova-db-sync call is only made after the nova-command package is installed and nova is configured to connect to the db.
This commit is contained in:
parent
a39bead88d
commit
6c9cb5159b
|
@ -14,9 +14,6 @@ class nova::api(
|
||||||
|
|
||||||
$auth_uri = "${auth_protocol}://${auth_host}:${auth_port}/v2.0"
|
$auth_uri = "${auth_protocol}://${auth_host}:${auth_port}/v2.0"
|
||||||
|
|
||||||
# TODO what exactly is this for?
|
|
||||||
# This resource is adding a great deal of comlexity to the overall
|
|
||||||
# modules. Removing it would be great
|
|
||||||
exec { 'initial-db-sync':
|
exec { 'initial-db-sync':
|
||||||
command => '/usr/bin/nova-manage db sync',
|
command => '/usr/bin/nova-manage db sync',
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
|
|
|
@ -31,6 +31,7 @@ define nova::generic_service(
|
||||||
Exec['post-nova_config'] ~> Service<| title == $nova_title |>
|
Exec['post-nova_config'] ~> Service<| title == $nova_title |>
|
||||||
# ensure that the service has only been started
|
# ensure that the service has only been started
|
||||||
# after the initial db sync
|
# after the initial db sync
|
||||||
|
Exec<| title == 'initial-db-sync' |> ~> Service<| title == $nova_title |>
|
||||||
Exec['nova-db-sync'] ~> Service<| title == $nova_title |>
|
Exec['nova-db-sync'] ~> Service<| title == $nova_title |>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,7 @@ class nova(
|
||||||
exec { "nova-db-sync":
|
exec { "nova-db-sync":
|
||||||
command => "/usr/bin/nova-manage db sync",
|
command => "/usr/bin/nova-manage db sync",
|
||||||
refreshonly => "true",
|
refreshonly => "true",
|
||||||
|
require => [Package['nova-common'], Nova_config['sql_connection']],
|
||||||
}
|
}
|
||||||
|
|
||||||
# used by debian/ubuntu in nova::network_bridge to refresh
|
# used by debian/ubuntu in nova::network_bridge to refresh
|
||||||
|
|
Loading…
Reference in New Issue