diff --git a/manifests/api.pp b/manifests/api.pp index 681ff0cb8..8401b596b 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -14,9 +14,6 @@ class nova::api( $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': command => '/usr/bin/nova-manage db sync', refreshonly => true, diff --git a/manifests/generic_service.pp b/manifests/generic_service.pp index 3169b02e8..2a45e5f29 100644 --- a/manifests/generic_service.pp +++ b/manifests/generic_service.pp @@ -31,6 +31,7 @@ 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 |> diff --git a/manifests/init.pp b/manifests/init.pp index d31fa56c6..423486c7b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -120,6 +120,7 @@ class nova( 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