diff --git a/manifests/all.pp b/manifests/all.pp index 46356b007..487700397 100644 --- a/manifests/all.pp +++ b/manifests/all.pp @@ -1,5 +1,6 @@ # # TODO - this is currently hardcoded to be a xenserver +# TODO - this needs to be updated class nova::all( $db_password, $db_name = 'nova', diff --git a/manifests/db.pp b/manifests/db.pp index fc99b476c..9cbba13f5 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -11,8 +11,8 @@ class nova::db( Mysql::Db[$dbname] -> Anchor<| title == "nova-start" |> Mysql::Db[$dbname] ~> Exec<| title == 'initial-db-sync' |> - # now this requires storedconfigs # TODO - worry about the security implications + # I am not sure if I want to use storeconfigs for this... @@nova_config { 'database_url': value => "mysql://${user}:${password}@${host}/${dbname}", tag => $zone, @@ -25,7 +25,6 @@ class nova::db( charset => 'latin1', # I may want to inject some sql require => Class['mysql::server'], -# notify => Exec["initial-db-sync"], } if $allowed_hosts { diff --git a/manifests/init.pp b/manifests/init.pp index 2d740f224..f11dca212 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -28,6 +28,10 @@ class nova( $root_helper = $::nova::params::root_helper ) inherits nova::params { + # all nova_config resources should be applied + # after the nova common package + # before the file resource for nova.conf is managed + # and before the post config resource Nova_config<| |> { require +> Package[$::nova::params::common_package_name], before +> File['/etc/nova/nova.conf'], @@ -40,7 +44,8 @@ class nova( group => 'nova', } - # TODO - why is this required? + # TODO - see if these packages can be removed + # they should be handled as package deps by the OS package { 'python': ensure => present, } @@ -77,6 +82,7 @@ class nova( system => true, require => Package['nova-common'], } + file { $logdir: ensure => directory, mode => '0751', @@ -84,6 +90,9 @@ class nova( file { '/etc/nova/nova.conf': 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", diff --git a/manifests/rabbitmq.pp b/manifests/rabbitmq.pp index 21404f384..f39b7bb9a 100644 --- a/manifests/rabbitmq.pp +++ b/manifests/rabbitmq.pp @@ -14,6 +14,7 @@ class nova::rabbitmq( Class['rabbitmq::service'] -> Anchor<| title == 'nova-start' |> # work around hostname bug, LP #653405 + # TODO - see if this is still required host { $hostname: ip => $ipaddress, host_aliases => $fqdn, diff --git a/spec/classes/nova_init_spec.rb b/spec/classes/nova_init_spec.rb index 57914b328..d83e7d1d7 100644 --- a/spec/classes/nova_init_spec.rb +++ b/spec/classes/nova_init_spec.rb @@ -1,6 +1,7 @@ require 'spec_helper' describe 'nova' do + let :facts do { :osfamily => 'Debian' } end