[Ovirt-devel] [PATCH server] add ipv6 postgres trust

Joey Boggs jboggs at redhat.com
Mon Jul 6 21:01:34 UTC 2009


If management server has ipv6 enabled and postgres is not configured to allow localhost access via ::1 the postgres service will fail.

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

diff --git a/installer/modules/ovirt/manifests/postgres.pp b/installer/modules/ovirt/manifests/postgres.pp
index 36bcdc0..12b7764 100644
--- a/installer/modules/ovirt/manifests/postgres.pp
+++ b/installer/modules/ovirt/manifests/postgres.pp
@@ -41,7 +41,7 @@ class postgres::bundled{
         service {"postgresql" :
 		ensure => running,
 		enable => true,
-                require => [Single_exec[initialize_db],Exec[postgres_add_localhost_trust],Exec[postgres_add_all_trust]],
+                require => [Single_exec[initialize_db],Exec[postgres_add_localhost_trust],Exec[postgres_add_all_trust],Exec[postgres_add_ipv6_loopback_trust]],
                 hasstatus => true
         }
 
@@ -79,6 +79,12 @@ class postgres::bundled{
                 notify => Service[postgresql]
         }
 
+        exec {"postgres_add_ipv6_loopback_trust":
+                command => "/bin/echo 'host all all ::1/128 trust' >> /var/lib/pgsql/data/pg_hba.conf",
+                require => Exec[postgres_add_all_trust],
+                notify => Service[postgresql]
+        }
+
 	file { "/etc/ovirt-server/" :
                 ensure => directory,
                 require => Exec[postgres_add_localhost_trust]
-- 
1.6.2.5




More information about the ovirt-devel mailing list