ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1335

Add support for --config to zkEnv.sh to specify a config directory different than what is expected

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.0
    • Component/s: None
    • Labels:
      None

      Description

      zkEnv.sh expects ZOOCFGDIR env variable set. If not it looks for the conf dir in the ZOOKEEPER_PREFIX dir or in /etc/zookeeper. It would be great if we can support --config option where at run time you could specify a different config directory. We do the same thing in hadoop.

      With this you should be able to do

      /usr/sbin/zkServer.sh --config /some/conf/dir start|stop

      1. ZOOKEEPER-1335.patch
        1 kB
        Arpit Gupta
      2. ZOOKEEPER-1335.patch
        0.5 kB
        Arpit Gupta

        Activity

        Arpit Gupta created issue -
        Hide
        Arpit Gupta added a comment -

        attached a patch for trunk.

        Show
        Arpit Gupta added a comment - attached a patch for trunk.
        Arpit Gupta made changes -
        Field Original Value New Value
        Attachment ZOOKEEPER-1335.patch [ 12508135 ]
        Arpit Gupta made changes -
        Description zkEnv.sh expects ZOOCFGDIR env variable set. If not it looks for the conf dir in the ZOOKEEPER_PREFIX dir or in /etc/zookeeper. It would be great if we can support --config option where at run time you could specify a different config directory. We do the same thing in hadoop. zkEnv.sh expects ZOOCFGDIR env variable set. If not it looks for the conf dir in the ZOOKEEPER_PREFIX dir or in /etc/zookeeper. It would be great if we can support --config option where at run time you could specify a different config directory. We do the same thing in hadoop.

        With this you should be able to do

        /usr/sbin/zkServer.sh --config /some/conf/dir start|stop
        Mahadev konar made changes -
        Fix Version/s 3.5.0 [ 12316644 ]
        Mahadev konar made changes -
        Assignee Arpit Gupta [ arpitgupta ]
        Arpit Gupta made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12508135/ZOOKEEPER-1335.patch
        against trunk revision 1214571.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/843//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/843//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/843//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12508135/ZOOKEEPER-1335.patch against trunk revision 1214571. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/843//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/843//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/843//console This message is automatically generated.
        Hide
        Arpit Gupta added a comment -

        no tests added as changes are to shell scripts.

        Show
        Arpit Gupta added a comment - no tests added as changes are to shell scripts.
        Hide
        Patrick Hunt added a comment -

        Cancel for now – I like this feature, however the docs are missing from this patch. Usage at the very least needs to be updated. There might also be changes necessary in the forrest docs.

        Also, calling this --config is confusing to me. Given it's the config directory and not the config itself. Can we change this to --configdir instead?

        Show
        Patrick Hunt added a comment - Cancel for now – I like this feature, however the docs are missing from this patch. Usage at the very least needs to be updated. There might also be changes necessary in the forrest docs. Also, calling this --config is confusing to me. Given it's the config directory and not the config itself. Can we change this to --configdir instead?
        Patrick Hunt made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Hide
        Arpit Gupta added a comment -

        @Patric I will take a look at the docs and update the the patch with the doc updates. Regarding the '--config' the reason i choose that is because other projects like hadoop , hbase etc use the same name and it also points to a dir containing the configs. Figured keeping them the same would be better.

        Show
        Arpit Gupta added a comment - @Patric I will take a look at the docs and update the the patch with the doc updates. Regarding the '--config' the reason i choose that is because other projects like hadoop , hbase etc use the same name and it also points to a dir containing the configs. Figured keeping them the same would be better.
        Hide
        Patrick Hunt added a comment -

        @arpit I'd rather use configdir but if you want to use config I'm fine with it. re docs the main issue is the usage information for the scripts themselves, not sure about the forrest docs but yes, it would be good to update those as well if possible/necessary.

        Show
        Patrick Hunt added a comment - @arpit I'd rather use configdir but if you want to use config I'm fine with it. re docs the main issue is the usage information for the scripts themselves, not sure about the forrest docs but yes, it would be good to update those as well if possible/necessary.
        Hide
        Arpit Gupta added a comment -

        Still calling the option '--config' as i prefer usage is similar to other projects.

        Updated the usage information in the zkServer.sh.

        I briefly looked at the existing forrest docs and could not find a place where we talk about where we expect the config directories to be. So dont have any forrest doc updates in this patch.

        Show
        Arpit Gupta added a comment - Still calling the option '--config' as i prefer usage is similar to other projects. Updated the usage information in the zkServer.sh. I briefly looked at the existing forrest docs and could not find a place where we talk about where we expect the config directories to be. So dont have any forrest doc updates in this patch.
        Arpit Gupta made changes -
        Attachment ZOOKEEPER-1335.patch [ 12508785 ]
        Hide
        Arpit Gupta added a comment -

        @Patrik wondering if you could take look at the patch and see if its good to go.

        Show
        Arpit Gupta added a comment - @Patrik wondering if you could take look at the patch and see if its good to go.
        Patrick Hunt made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12508785/ZOOKEEPER-1335.patch
        against trunk revision 1330043.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1052//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1052//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1052//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12508785/ZOOKEEPER-1335.patch against trunk revision 1330043. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1052//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1052//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1052//console This message is automatically generated.
        Hide
        Mahadev konar added a comment -

        +1 for the patch. Looks good to me. Pat doesnt look like we have much documentation in forrest for zkServer.sh so I dont think we need any forrest docs update.

        Show
        Mahadev konar added a comment - +1 for the patch. Looks good to me. Pat doesnt look like we have much documentation in forrest for zkServer.sh so I dont think we need any forrest docs update.
        Hide
        Mahadev konar added a comment -

        Unfortunately it took us one year to get through the patch but fortunately the patch still applies.

        Thanks Arpit.

        Show
        Mahadev konar added a comment - Unfortunately it took us one year to get through the patch but fortunately the patch still applies. Thanks Arpit.
        Mahadev konar made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in ZooKeeper-trunk #1775 (See https://builds.apache.org/job/ZooKeeper-trunk/1775/)
        ZOOKEEPER-1335. Add support for --config to zkEnv.sh to specify a config directory different than what is expected (Arpit Gupta via mahadev) (Revision 1422758)

        Result = SUCCESS
        mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1422758
        Files :

        • /zookeeper/trunk/CHANGES.txt
        • /zookeeper/trunk/bin/zkEnv.sh
        • /zookeeper/trunk/bin/zkServer.sh
        Show
        Hudson added a comment - Integrated in ZooKeeper-trunk #1775 (See https://builds.apache.org/job/ZooKeeper-trunk/1775/ ) ZOOKEEPER-1335 . Add support for --config to zkEnv.sh to specify a config directory different than what is expected (Arpit Gupta via mahadev) (Revision 1422758) Result = SUCCESS mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1422758 Files : /zookeeper/trunk/CHANGES.txt /zookeeper/trunk/bin/zkEnv.sh /zookeeper/trunk/bin/zkServer.sh

          People

          • Assignee:
            Arpit Gupta
            Reporter:
            Arpit Gupta
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development