From: SourceForge.net <no...@so...> - 2008-06-10 22:49:03
|
Patches item #1951806, was opened at 2008-04-25 10:10 Message generated for change (Comment added) made by phunt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1008546&aid=1951806&group_id=209147 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Resolution: None Priority: 7 Private: No Submitted By: Ted Dunning (tedunning) Assigned to: Mahadev Konar (mahadevkonar) Summary: Sample startup script Initial Comment: This may be useful as a temporary script. Eventually there are several things that should be improved: a) the log rotation hack should go away when real logging get implemented b) the kill hack should go away when there is a good way to kill the process. In the meantime, this may be handy to people at least as a starting point. ---------------------------------------------------------------------- >Comment By: Patrick Hunt (phunt) Date: 2008-06-10 15:49 Message: Logged In: YES user_id=12853 Originator: NO Moved to Apache https://issues.apache.org/jira/browse/ZOOKEEPER-41 ---------------------------------------------------------------------- Comment By: Mahadev Konar (mahadevkonar) Date: 2008-05-29 14:24 Message: Logged In: YES user_id=1926680 Originator: NO the start up scripts will be broken after we remove the log4j file from the zookeeper.jar. I will upload a patch to fix that as a consequence of http://sourceforge.net/tracker/index.php?func=detail&aid=1978290&group_id=209147&atid=1008546 ---------------------------------------------------------------------- Comment By: Mahadev Konar (mahadevkonar) Date: 2008-05-07 11:45 Message: Logged In: YES user_id=1926680 Originator: NO Committed revision 152. committed the patch. Thanks Ben and Ted!! Am not closing the bug -- Ill update the twiki and then close the bug. ---------------------------------------------------------------------- Comment By: Benjamin Reed (breed) Date: 2008-05-07 11:39 Message: Logged In: YES user_id=154690 Originator: NO +1 make it happen ---------------------------------------------------------------------- Comment By: Mahadev Konar (mahadevkonar) Date: 2008-05-06 15:58 Message: Logged In: YES user_id=1926680 Originator: NO i am uploading a patch that makes log4j configurable in the scripts and also made changes to the script so that it works in the developer environment as well . File Added: log4j_build_script_1.patch ---------------------------------------------------------------------- Comment By: Patrick Hunt (phunt) Date: 2008-05-06 12:46 Message: Logged In: YES user_id=12853 Originator: NO +1 but should also include update to the wiki to document: a) the commands b) usage, in particular env variables and default expected locations (for example ZOOLIBDIR is bin/../lib + should have all necessary libs, zoo.cfg + log4j.properties are in ZOOCFGDIR, etc...) ---------------------------------------------------------------------- Comment By: Patrick Hunt (phunt) Date: 2008-05-06 10:43 Message: Logged In: YES user_id=12853 Originator: NO The assignee is responsible for closing (committing) this patch (see ZooKeeperPatches on wiki) -- this includes getting additional review if necessary. ---------------------------------------------------------------------- Comment By: Mahadev Konar (mahadevkonar) Date: 2008-05-05 23:22 Message: Logged In: YES user_id=1926680 Originator: NO nice scripts ben... i was supposed to do this ... in http://sourceforge.net/tracker/index.php?func=detail&aid=1958195&group_id=209147&atid=1008544 but looks like this is going to be sufficient. thanks for doing my work :)... (as always) i was surprised to see that readlink is installed by default on cygwin as well. So this should be good enough for cygwin as well. Also, maybe we can add zookeeper.root.logger as a system property which the scripts can set so the lo4j.properties looks like root.Logger = ${zookeeper.root.logger} and make it configurable via the script -Dzookeeper.root.logger=${ZOOKEEPER_ROOT_LOGGER:-INFO,console}" ---------------------------------------------------------------------- Comment By: Ted Dunning (tedunning) Date: 2008-05-05 16:08 Message: Logged In: YES user_id=972206 Originator: YES Much nicer. Thanks. ---------------------------------------------------------------------- Comment By: Benjamin Reed (breed) Date: 2008-05-05 14:12 Message: Logged In: YES user_id=154690 Originator: NO Okay, I've enhanced your patch a lot Ted. It assumes an installation directory structure of bin, lib, and conf as siblings. It finds the directory based on the realpath of the script being run. (This is how things like firefox and java are setup on Linux usually.) zkServer.sh is designed to be run from init.d zkCleanup.sh is designed to run from cron zkCli.sh is designed to run from a shell. File Added: scripts.patch ---------------------------------------------------------------------- Comment By: Ted Dunning (tedunning) Date: 2008-05-01 15:58 Message: Logged In: YES user_id=972206 Originator: YES Ben, Your comments are good, but this is a place-holder. I would hope that you guys would have something much better soon. a) regarding logging, the logging system should do log rotation and cleanup. Until logging is available in a released version (and I build a log configuration file), I will just do the rotation in this script. It is a placeholder and work-around, after all. b) regarding dirname, please change anything like that you like. It is a good idea. c) regarding zoo.cfg in /etc, I can't comment if that really is a good place or not. If you would like to standardize on that, fine. Perhaps, I should put in a bit of baby logic to look first in /etc/zoo.cfg and then in $ZOO/zoo.cfg. d) regarding zoo.cfg instead of ZOO/zoo.cfg, that is just an error. Thanks for catching it. ---------------------------------------------------------------------- Comment By: Benjamin Reed (breed) Date: 2008-05-01 15:00 Message: Logged In: YES user_id=154690 Originator: NO Thanx Ted. I think ZOO should be set using dirname $0 Log cleanup shouldn't really be done in the startup scripts right? Finally, I think we should get the config from /etc/zookeeper/zoo.cfg right? In your script you use $ZOO/zoo.cfg and zoo.cfg, but both seem wrong (with the latter more wrong :) ---------------------------------------------------------------------- Comment By: Benjamin Reed (breed) Date: 2008-05-01 14:20 Message: Logged In: YES user_id=154690 Originator: NO Deleted old version so it was clear what we were reviewing. ---------------------------------------------------------------------- Comment By: Ted Dunning (tedunning) Date: 2008-04-30 10:47 Message: Logged In: YES user_id=972206 Originator: YES Here is an updated script that uses the kill command. I am quite dubious of the wisdom of allowing arbitrary processes anywhere on the net to kill a zookeeper. It definitely means that zookeepers cannot be exposed at all to anything except a very friendly environment. File Added: zookeeper.sh ---------------------------------------------------------------------- Comment By: Ted Dunning (tedunning) Date: 2008-04-29 16:42 Message: Logged In: YES user_id=972206 Originator: YES The kill hack is interesting. Good thing to know about. Kind of a dangerous feature, though. It also requires that I know something about the config or write something clever in the script that turns the config file into the telnet or nc command. The logs I am talking about are the accumulation of what currently comes out of standard output, not the transactional logs. I think that there is an enhancement coming that will use log4J. That would be vastly better than my hack of putting standard out to a file. ---------------------------------------------------------------------- Comment By: Andrew Kornev (akornev) Date: 2008-04-29 15:34 Message: Logged In: YES user_id=1926652 Originator: NO A better way to kill a server to send a kill command to the server's client port (the clientPort parameter in zoo.cfg), for example: echo kill|nc localhost 1234 ---------------------------------------------------------------------- Comment By: Patrick Hunt (phunt) Date: 2008-04-25 11:52 Message: Logged In: YES user_id=12853 Originator: NO Ted, be aware that there is also the following to be managed. The "log files" reference are transacitonal log files - not logging log files. "The ZooKeeper server creates snapshot and log files, but never deletes them. The retention policy of the data and log files is implemented outside of the ZooKeeper server. The server itself only needs the latest complete fuzzy snapshot and the log files from the start of that snapshot. The PurgeTxnLog utility implements a simple retention policy that administrators can use." http://zookeeper.wiki.sourceforge.net/ZooKeeperDataFormat ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1008546&aid=1951806&group_id=209147 |