Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-2585

Zookeeper service does not start if kerberos is disabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • deployment
    • None

    Description

      When I tried ./docker-hadoop.sh -c specifying zookeeper as a component to be installed with the default hiera settings, I encountered the following error.

      Error: kadmin -w secure -p kadmin/admin -q 'addprinc -randkey zookeeper/fa326ae884d4.bigtop.apache.org' returned 1 instead of one of [0]
      Error: /Stage[main]/Hadoop_zookeeper::Server/Kerberos::Host_keytab[zookeeper]/Kerberos::Principal[zookeeper]/Exec[addprinc.zookeeper]/returns: change from notrun to 0 failed: kadmin -w secure -p kadmin/admin -q 'addprinc -randkey zookeeper/fa326ae884d4.bigtop.apache.org' returned 1 instead of one of [0]
      Notice: /Stage[main]/Hadoop_zookeeper::Server/Kerberos::Host_keytab[zookeeper]/Kerberos::Principal[zookeeper]/Exec[xst.zookeeper]: Dependency Exec[addprinc.zookeeper] has failures: true
      Warning: /Stage[main]/Hadoop_zookeeper::Server/Kerberos::Host_keytab[zookeeper]/Kerberos::Principal[zookeeper]/Exec[xst.zookeeper]: Skipping because of failed dependencies
      Notice: /Stage[main]/Hadoop_zookeeper::Server/Kerberos::Host_keytab[zookeeper]/Exec[ktinject.zookeeper]: Dependency Exec[addprinc.zookeeper] has failures: true
      Warning: /Stage[main]/Hadoop_zookeeper::Server/Kerberos::Host_keytab[zookeeper]/Exec[ktinject.zookeeper]: Skipping because of failed dependencies
      Notice: /Stage[main]/Hadoop_zookeeper::Server/Kerberos::Host_keytab[zookeeper]/Exec[aquire zookeeper keytab]: Dependency Exec[addprinc.zookeeper] has failures: true
      Warning: /Stage[main]/Hadoop_zookeeper::Server/Kerberos::Host_keytab[zookeeper]/Exec[aquire zookeeper keytab]: Skipping because of failed dependencies
      Notice: /Stage[main]/Hadoop_zookeeper::Server/Service[zookeeper-server]: Dependency Exec[addprinc.zookeeper] has failures: true
      Warning: /Stage[main]/Hadoop_zookeeper::Server/Service[zookeeper-server]: Skipping because of failed dependencies
      

      It seems that the following if statements doesn't work as expected. $kerberos_realm is set to "", but "" is evaluated as true by puppet 4.x and 3.x w/ future parser.

      bigtop-deploy/puppet/modules/hadoop_zookeeper/manifests/init.pp
       30   class common (
       31     $kerberos_realm = $hadoop_zookeeper::kerberos_realm,
       32   ) inherits hadoop_zookeeper {
       33     if ($kerberos_realm) {
                ...
       40     }
       41   }
      
       43   class client (
       44     $kerberos_realm = $hadoop_zookeeper::kerberos_realm,
       45   ) inherits hadoop_zookeeper {
              ...
       53     if ($kerberos_realm) {
                ...
       58     }
       59   }
       60 
       61   class server($myid,
       62                 $port = "2181",
       63                 $datadir = "/var/lib/zookeeper",
       64                 $ensemble = [$myid, "localhost:2888:3888"],
       65                 $kerberos_realm = $hadoop_zookeeper::kerberos_realm,
       66   ) inherits hadoop_zookeeper {
              ...
      101     if ($kerberos_realm) {
                ...
      115     }
      

      Attachments

        1. BIGTOP-2585.1.patch
          5 kB
          Kengo Seki

        Activity

          People

            sekikn Kengo Seki
            sekikn Kengo Seki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: