You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@fluo.apache.org by GitBox <gi...@apache.org> on 2020/02/06 20:15:03 UTC

[GitHub] [fluo-muchos] arvindshmicrosoft commented on a change in pull request #321: Add stat 4lw for zookeeper

arvindshmicrosoft commented on a change in pull request #321: Add stat 4lw for zookeeper
URL: https://github.com/apache/fluo-muchos/pull/321#discussion_r376058384
 
 

 ##########
 File path: ansible/roles/zookeeper/templates/zoo.cfg
 ##########
 @@ -16,7 +16,9 @@ clientPort={{ zookeeper_client_port }}
 # increase this if you need to handle more clients
 maxClientCnxns=100
 # support zk monitoring (for zk >= 3.5)
-4lw.commands.whitelist=mntr
+{% if zookeeper_version.startswith('3.5') %}
 
 Review comment:
   There seems to be a better way in Ansible to compare versions. Specifically we can use the below instead of the string approach:
   
   ```zookeeper_version is version('3.5', '>=')```
   
   I did a quick unit test with the below playbook and it works as intended, including minor version handling.
   ```
   - hosts: localhost
     gather_facts: no
     tasks:
             - set_fact:
                     zookeeper_version: "3.5.6"
             - debug:
                     msg: "needs whitelist"
               when: zookeeper_version is version('3.5', '>=')
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services