You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by pt...@apache.org on 2012/04/16 20:53:34 UTC

svn commit: r1326740 - /incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop-zookeeper/manifests/init.pp

Author: ptr
Date: Mon Apr 16 18:53:33 2012
New Revision: 1326740

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

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

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop-zookeeper/manifests/init.pp
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop-zookeeper/manifests/init.pp?rev=1326740&r1=1326739&r2=1326740&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop-zookeeper/manifests/init.pp (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop-zookeeper/manifests/init.pp Mon Apr 16 18:53:33 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