[Ovirt-devel] [PATCH server] make postgres wait for starting to complete before creating databases

Joey Boggs jboggs at redhat.com
Fri Jun 19 15:14:04 UTC 2009


---
 installer/modules/ovirt/manifests/postgres.pp |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/installer/modules/ovirt/manifests/postgres.pp b/installer/modules/ovirt/manifests/postgres.pp
index 6620a88..a711e32 100644
--- a/installer/modules/ovirt/manifests/postgres.pp
+++ b/installer/modules/ovirt/manifests/postgres.pp
@@ -38,10 +38,15 @@ class postgres::bundled{
 		require => Package[postgresql-server]
 	}
 
+        single_exec {"start_pgsql":
+                command => "/bin/su - postgres -c '/usr/bin/pg_ctl start -w -D /var/lib/pgsql/data'",
+                require => Single_exec["initialize_db"]
+        }
+
         service {"postgresql" :
 		ensure => running,
 		enable => true,
-		require => Single_exec[initialize_db]
+		require => [Single_exec[initialize_db],Single_exec[start_pgsql]]
         }
 
         single_exec {"create_ovirt_db":
-- 
1.6.0.6




More information about the ovirt-devel mailing list