Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor bug with puppet-zookeeper/templates/zookeeper.service.erb #103

Closed
tamama opened this issue Aug 31, 2017 · 3 comments
Closed

Minor bug with puppet-zookeeper/templates/zookeeper.service.erb #103

tamama opened this issue Aug 31, 2017 · 3 comments
Labels

Comments

@tamama
Copy link

tamama commented Aug 31, 2017

Hi there,

  1. There is a minor bug with puppet-zookeeper/templates/zookeeper.service.erb, highlighted in bold
[Unit]
  Want=

(should be Wants)

  1. The classpath should include /usr/lib/zookeeper/lib/*:/usr/lib/zookeeper/zookeeper.jar. Otherwise, systemd could not start zookeeper-server.service.

Thank you very much.

Kind regards,
Tamama

Here is the manifest file to reproduce the problem on any Centos/7 VM.

site/profile/manifests/zookeeper.pp

class profile::zookeeper {
    notify { '[profile::zookeeper] Starting ... ' : }

    Package { provider => 'dnf' }
    
    class { 'zookeeper' :
        require                 => [ Class['::profile::base'] , Class['::profile::clouderarepo'] ] ,

        client_ip               => $::ipaddress_tun0 ,

        client_port             => 52181 ,
        election_port           => 52888 ,
        leader_port             => 53888 ,

        packages                => [ 'zookeeper' , 'zookeeper-server'] ,
        service_name            => 'zookeeper-server' ,
        initialize_datastore    => true ,

        service_provider        => 'systemd' ,
        manage_service_file     => true ,
        manage_service          => true ,
        systemd_unit_after      => 'network-online.target [email protected]' ,
        systemd_unit_want       => 'network-online.target [email protected]' ,

        java_opts               => '-cp "/usr/lib/zookeeper/lib/*:/usr/lib/zookeeper/zookeeper.jar"'
    }

    notify { '[profile::zookeeper] ... finished' : }
}
@deric
Copy link
Owner

deric commented Aug 31, 2017

@tamama Thanks for reporting this!

Regarding the second issue, is it possible that this line:

CLASSPATH="$([ -r /usr/lib/zookeeper/bin/zkEnv.sh ] && . /usr/lib/zookeeper/bin/zkEnv.sh ; echo $CLASSPATH)";

overwrites correct path?

@tamama
Copy link
Author

tamama commented Aug 31, 2017

Hi Deric,

You are most welcome.

Regarding your question, nope - that line does not override the correct path. (This conclusion is drawn from an installation on a clean VM).
Please see the following for my reasons.

Kind regards,
Tamama

Before that line - (systemd logs - journalctl -xe -u zookeeper-server)

+ CLASSPATH='/etc/zookeeper/conf:/usr/share/java/jline.jar:
/usr/share/java/log4j-1.2.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xmlParserAPIs.jar:
/usr/share/java/netty.jar:/usr/share/java/slf4j-api.jar:/usr/share/java/slf4j-log4j12.jar:
/usr/share/java/zookeeper.jar

After that line -

+ CLASSPATH='/usr/bin/../build/classes:/usr/bin/../build/lib/*.jar:/usr/bin/../lib/*.jar:
/usr/bin/../zookeeper-*.jar:/usr/bin/../src/java/lib/*.jar:/etc/zookeeper/conf:/usr/share/java/jline.jar:
/usr/share/java/log4j-1.2.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xmlParserAPIs.jar:
/usr/share/java/netty.jar:/usr/share/java/slf4j-api.jar:/usr/share/java/slf4j-log4j12.jar:
/usr/share/java/zookeeper.jar

@deric
Copy link
Owner

deric commented Oct 17, 2017

Should be fixed in v0.7.5 release.

@deric deric closed this as completed Oct 17, 2017
cegeka-jenkins pushed a commit to cegeka/puppet-zookeeper that referenced this issue Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants