Merge pull request #26 from bodepd/issue/master/ordering_fixes

Resolved ordering issues
This commit is contained in:
Dan Bode 2011-06-20 10:11:46 -07:00
commit e6a30374ee
8 changed files with 24 additions and 19 deletions

View File

@ -1,4 +1,6 @@
class nova::api($enabled=false) inherits nova { class nova::api($enabled=false) {
Nova_config<| |> ~> Service['nova-api']
if $enabled { if $enabled {
$service_ensure = 'running' $service_ensure = 'running'

View File

@ -8,7 +8,7 @@ class nova::compute(
$libvirt_type = 'kvm' $libvirt_type = 'kvm'
) { ) {
Nova_config<| |>~>Service['nova-compute'] Nova_config<| |> ~> Service['nova-compute']
nova_config { 'libvirt_type': value => $libvirt_type } nova_config { 'libvirt_type': value => $libvirt_type }
@ -20,13 +20,14 @@ class nova::compute(
package { "nova-compute": package { "nova-compute":
ensure => present, ensure => present,
require => Class['nova'], require => Package['nova-common'],
} }
service { "nova-compute": service { "nova-compute":
ensure => $service_ensure, ensure => $service_ensure,
enable => $enabled, enable => $enabled,
require => Package["nova-compute"], require => Package["nova-compute"],
before => Exec['networking-refresh'],
} }
# forward guest metadata requests to correct API server # forward guest metadata requests to correct API server

View File

@ -6,6 +6,9 @@ class nova::db(
$cluster_id = 'localzone' $cluster_id = 'localzone'
) { ) {
# only start configuring nova after the database is setup
Mysql::Db[$name] -> Nova_config<| |>
# now this requires storedconfigs # now this requires storedconfigs
# TODO - worry about the security implications # TODO - worry about the security implications
@@nova_config { 'database_url': @@nova_config { 'database_url':

View File

@ -1,4 +1,6 @@
class nova::network( $enabled=false ) inherits nova { class nova::network( $enabled=false ) {
Nova_config<| |> ~> Service['nova-network']
if $enabled { if $enabled {
$service_ensure = 'running' $service_ensure = 'running'
@ -15,6 +17,7 @@ class nova::network( $enabled=false ) inherits nova {
ensure => $service_ensure, ensure => $service_ensure,
enable => $enabled, enable => $enabled,
require => Package["nova-network"], require => Package["nova-network"],
before => Exec['networking-refresh'],
#subscribe => File["/etc/nova/nova.conf"] #subscribe => File["/etc/nova/nova.conf"]
} }
} }

View File

@ -1,4 +1,6 @@
class nova::objectstore( $enabled=false ) inherits nova { class nova::objectstore( $enabled=false ) {
Nova_config<| |> ~> Service['nova-objectstore']
if $enabled { if $enabled {
$service_ensure = 'running' $service_ensure = 'running'

View File

@ -9,6 +9,10 @@ class nova::rabbitmq(
$virtual_host='/', $virtual_host='/',
$install_repo = false $install_repo = false
) { ) {
# only configure nova after the queue is up
Class['rabbitmq::service'] -> Nova_config<| |>
if $install_repo { if $install_repo {
# this is debian specific # this is debian specific
class { 'rabbitmq::repo::apt': class { 'rabbitmq::repo::apt':
@ -32,7 +36,7 @@ class nova::rabbitmq(
write_permission => '.*', write_permission => '.*',
read_permission => '.*', read_permission => '.*',
provider => 'rabbitmqctl', provider => 'rabbitmqctl',
} }->Nova_config<| |>
} }
class { 'rabbitmq::server': class { 'rabbitmq::server':
port => $port, port => $port,

View File

@ -1,4 +1,6 @@
class nova::scheduler( $enabled ) inherits nova { class nova::scheduler( $enabled ) {
Nova_config<| |> ~> Service['nova-scheduler']
if $enabled { if $enabled {
$service_ensure = 'running' $service_ensure = 'running'

View File

@ -1,18 +1,6 @@
resources { 'nova_config': resources { 'nova_config':
purge => true, purge => true,
} }
stage { 'repo-setup':
before => Stage['main'],
}
#class { 'apt':
# disable_keys => true,
# #always_apt_update => true,
# stage => 'repo-setup',
#}
#class { 'nova::repo':
# stage => 'repo-setup',
#}
class { 'mysql::server': } class { 'mysql::server': }
class { 'nova::all': class { 'nova::all':
db_password => 'password', db_password => 'password',