incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r1326777 - /incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hadoop-zookeeper/manifests/init.pp
Date Mon, 16 Apr 2012 20:01:39 GMT
Author: ptr
Date: Mon Apr 16 20:01:39 2012
New Revision: 1326777

URL: http://svn.apache.org/viewvc?rev=1326777&view=rev
Log:
BIGTOP-529. Format zookeeper server before first run

Modified:
    incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hadoop-zookeeper/manifests/init.pp

Modified: incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hadoop-zookeeper/manifests/init.pp
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hadoop-zookeeper/manifests/init.pp?rev=1326777&r1=1326776&r2=1326777&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hadoop-zookeeper/manifests/init.pp
(original)
+++ incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hadoop-zookeeper/manifests/init.pp
Mon Apr 16 20:01:39 2012
@@ -29,8 +29,10 @@ class hadoop-zookeeper {
 
     service { "zookeeper-server":
       ensure => running,
-      require => Package["zookeeper-server"],
-      subscribe => File["/etc/zookeeper/conf/zoo.cfg"],
+      require => [ Package["zookeeper-server"], 
+                   Exec["zookeeper-server-initialize"] ],
+      subscribe => [ File["/etc/zookeeper/conf/zoo.cfg"],
+                     File["/var/lib/zookeeper/myid"] ],
       hasrestart => true,
       hasstatus => true,
     } 
@@ -44,6 +46,13 @@ class hadoop-zookeeper {
       content => inline_template("<%= myid %>"),
       require => Package["zookeeper-server"],
     }
+    
+    exec { "zookeeper-server-initialize":
+      command => "/usr/bin/zookeeper-server-initialize",
+      user    => "zookeeper",
+      creates => "/var/lib/zookeeper/version-2",
+      require => Package["zookeeper-server"],
+    }
 
     if ($kerberos_realm) {
       require kerberos::client



Mime
View raw message