Split requirements for multi-node

Many dependencies are only valid when conbinations
of services are installed on the same node.

They have been marked as optional requirements
using collection.
This commit is contained in:
Dan Bode 2011-06-22 16:52:19 -07:00
parent f938c2b140
commit ccce22d87a
4 changed files with 14 additions and 6 deletions

View File

@ -8,7 +8,8 @@ class nova::db(
) { ) {
# Create the db instance before nova-common if its installed # Create the db instance before nova-common if its installed
Mysql::Db[$name] -> Package<| title == "nova-common" |> Mysql::Db[$dbname] -> Package<| title == "nova-common" |>
Mysql::Db[$dbname] ~> Exec<| title == 'initial-db-sync' |>
# now this requires storedconfigs # now this requires storedconfigs
# TODO - worry about the security implications # TODO - worry about the security implications
@ -24,7 +25,7 @@ class nova::db(
charset => 'latin1', charset => 'latin1',
# I may want to inject some sql # I may want to inject some sql
require => Class['mysql::server'], require => Class['mysql::server'],
notify => Exec["initial-db-sync"], # notify => Exec["initial-db-sync"],
} }
if $allowed_hosts { if $allowed_hosts {

View File

@ -1,9 +1,11 @@
define nova::manage::admin { define nova::manage::admin {
File['/etc/nova/nova.conf'] -> Nova::Manage::Admin[$name] File['/etc/nova/nova.conf'] -> Nova::Manage::Admin[$name]
Exec<| title == 'initial-db-sync' |> -> Nova_admin[$name]
nova_admin{ $name: nova_admin{ $name:
ensure => present, ensure => present,
provider => 'nova_manage', provider => 'nova_manage',
notify => Exec["nova-db-sync"], notify => Exec["nova-db-sync"],
require => Class["nova::db"],
} }
} }

View File

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

View File

@ -1,10 +1,13 @@
define nova::manage::project ( $owner ) { define nova::manage::project ( $owner ) {
File['/etc/nova/nova.conf'] -> Nova_project[$name] File['/etc/nova/nova.conf'] -> Nova_project[$name]
Exec<| title == 'initial-db-sync' |> -> Nova_project[$name]
nova_project { $name: nova_project { $name:
ensure => present, ensure => present,
provider => 'nova_manage', provider => 'nova_manage',
owner => $owner, owner => $owner,
notify => Exec["nova-db-sync"], notify => Exec["nova-db-sync"],
require => [Class["nova::db"], Nova::Manage::Admin[$owner]], require => Nova::Manage::Admin[$owner],
} }
} }