Re: Session expiration caused by time change

2010-08-19 Thread Martin Waite
Hi, In our testing of Red Hat Cluster, we could reproduce the NTP impact by jumping the clock backwards and forwards, just using the date command in a tight-ish loop: use strict; my $dir = 1; while (1) { jump_time( $dir ); $dir = $dir * -1; } sub jump_time { my ($dir) = @_; my $step

Re: Session expiration caused by time change

2010-08-19 Thread Martin Waite
some unspecified starting point. Although re-reading that now, I might have applied wishful thinking to my interpretation. regards, Martin On 19 August 2010 16:13, Benjamin Reed wrote: > do you have a pointer to those timers? > > thanx > ben > > > On 08/18/2010 11:58 PM, Ma

Re: Session expiration caused by time change

2010-08-18 Thread Martin Waite
Hi, I have tripped over similar problems testing Red Hat Cluster in virtualised environments. I don't know whether recent linux kernels have improved their interaction with VMWare, but in our environments clock drift caused by lost ticks can be substantial, requiring NTP to sometimes jump the clo

Re: issues with ipv6 on debian squeeze

2010-08-16 Thread Martin Waite
ew hours stuck on this myself last week. > > -Ivan > > > > > On 16 Aug 2010, at 13:28, Martin Waite wrote: > > Hi, >> >> I have spent a few hours getting zookeeper election to work on debian >> squeeze. >> >> The zookeeper log contained the

issues with ipv6 on debian squeeze

2010-08-16 Thread Martin Waite
Hi, I have spent a few hours getting zookeeper election to work on debian squeeze. The zookeeper log contained the following error when trying to run an election: 2010-08-16 11:14:51,316 - WARN [WorkerSender Thread:quorumcnxmana...@361] - Cannot open channel to 2 at election address vm-024-sque

zkperl - skipped tests

2010-08-04 Thread Martin Waite
Hi, I built the perl module and ran the test suite. For test 50_access, 3 tests are skipped. vm-026-lenny-mw$ ZK_TEST_HOSTS=127.0.0.1:2181 make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/10_invalid..ok 1/107# no Zoo

Re: unit test failure

2010-08-04 Thread Martin Waite
t which will build the server code. > After that run either "make run-check" from src/c, or "ant > test-core-cppunit" from the main dir. > > On Tue, Aug 3, 2010 at 7:51 PM, Martin Waite wrote: > > > Hi Sergey, > > > > Thanks for the hints. > >

Re: unit test failure

2010-08-03 Thread Martin Waite
rocesses running? I usually do > "ps -ef | grep zoo" and it always helps > > On Tue, Aug 3, 2010 at 6:45 PM, Martin Waite wrote: > > > Hi, > > > > A little more information. > > > > The file TEST-Zookeeper_simpleSystem-st.txt contains some log d

Re: unit test failure

2010-08-03 Thread Martin Waite
then run tests against that ? Or are the underlying libraries being tested without using a zk server ? regards, Martin On 3 August 2010 13:02, Martin Waite wrote: > Hi Mahadev, > > Sorry for the delay in replying: I have been away. > > I have rebuilt my debian lenny machin

Re: unit test failure

2010-08-03 Thread Martin Waite
va process (ZooKeeperServer) running > on your machine? That might cause some issues with the tests. > > > Thanks > mahadev > > > On 7/14/10 8:03 AM, "Martin Waite" wrote: > > > Hi, > > > > I am attempting to build the C client on debian lenn

unit test failure

2010-07-14 Thread Martin Waite
Hi, I am attempting to build the C client on debian lenny. autoconf, configure, make and make install all appear to work cleanly. I ran: autoreconf -if ./configure make make install make run-check However, the unit tests fail: $ make run-check make zktest-st zktest-mt make[1]: Entering direc

Re: building client tools

2010-07-14 Thread Martin Waite
n be done without > cppunit being installed but there has been a open bug regarding this. So > cppunit is required as of now. > > Thanks > mahadev > > > On 7/13/10 10:09 AM, "Martin Waite" wrote: > > > Hi, > > > > I am trying to build the c cl

Re: building client tools

2010-07-14 Thread Martin Waite
I believe that should be enough but I don't really remember > > what else I've installed the first time I compiled the c client. > > > > Let me know what else was needed. I would like to submit a patch to > > update the README file in order to avoid this problem

Re: building client tools

2010-07-14 Thread Martin Waite
submit a patch to > update the README file in order to avoid this problem in the future. > > Thanks. > > On Tue, Jul 13, 2010 at 8:09 PM, Martin Waite wrote: > > Hi, > > > > I am trying to build the c client on debian lenny for zookeeper 3.3.1. > > > &

building client tools

2010-07-13 Thread Martin Waite
Hi, I am trying to build the c client on debian lenny for zookeeper 3.3.1. autoreconf -if configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in library configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in library configure.ac:33: error: possibly undefined macro: AM_PATH_CPPUNIT

Re: Managing multi-site clusters with Zookeeper

2010-03-08 Thread Martin Waite
) > 9) A gets the commit in 100ms > 10) A responds to client (< 1ms) > > write latency: 100 + 100 + 100 + 100 = 400ms > > Obviously keeping these writes small is also critical. > > Patrick > > > Martin Waite wrote: > >> Hi Ted, >> >> If the lin

Re: Managing multi-site clusters with Zookeeper

2010-03-08 Thread Martin Waite
Hi Ted, If the links do not work for us for zk, then they are unlikely to work with any other solution - such as trying to stretch Pacemaker or Red Hat Cluster with their multicast protocols across the links. If the links are not good enough, we might have to spend some more money to fix this. r

Re: Managing multi-site clusters with Zookeeper

2010-03-08 Thread Martin Waite
was created and the client died, then the > clients > connected to the slow ZooKeeper server (with 2Mb/s links) would lag behind > the other clients connected to the other servers. > > As per my opinion you should do some testing since 2Mb/sec seems a little > dodgy. > > Than

Re: Managing multi-site clusters with Zookeeper

2010-03-07 Thread Martin Waite
lly big task that involves a > lot > > of surprising (it was to me) considerations and considerable hardware and > > time investments. > > > > Good luck! > > > > On Sat, Mar 6, 2010 at 1:50 AM, Martin Waite >wrote: > > > >> Is this a viable approach, or am I taking Zookeeper out of its > application > >> domain and just asking for trouble ? > >> > > > > > >

Re: network requirements

2010-03-06 Thread Martin Waite
SOUNDS like multicast, I know) > it > uses very standard TCP connections. > > For almost any known modern network, ZK should be just fine. Unless you > are > running massive numbers of operations through ZK and you are only using a > dial-up connection, you should be fine.

network requirements

2010-03-06 Thread Martin Waite
Hi, Is there any documentation describing the network requirements for running Zookeeper ? Our network admin has baffled me with all the reasons that multicast might not work in our environment, and then I realised that I do not know what network support Zookeeper requires. regards, Martin

Re: Managing multi-site clusters with Zookeeper

2010-03-06 Thread Martin Waite
ves a lot > of surprising (it was to me) considerations and considerable hardware and > time investments. > > Good luck! > > On Sat, Mar 6, 2010 at 1:50 AM, Martin Waite >wrote: > > > Is this a viable approach, or am I taking Zookeeper out of its > application > > domain and just asking for trouble ? > > > > > > -- > Ted Dunning, CTO > DeepDyve >

Managing multi-site clusters with Zookeeper

2010-03-06 Thread Martin Waite
Hi, We're attempting to build a multi-site cluster: 1. web-tier and application tier is active in all sites 2. only one database is active at a time- normally in the designated "primary" site We want to use 3 sites to maintain a quorum. So, if the Primary site loses sight of both of th

Re: is there a good pattern for leases ?

2010-02-25 Thread Martin Waite
> On Thu, Feb 25, 2010 at 2:50 AM, Martin Waite >wrote: > > > But to do this, would I need to call sync between steps 2 and 3 to ensure > > the node "FN" was up-to-date - assuming I do not know if I am connected > to > > a > > primary ZK instan

Re: is there a good pattern for leases ?

2010-02-25 Thread Martin Waite
a primary ZK instance ? Would 10K sync calls within a 2 minute period be excessive ? regards, Martin On 25 February 2010 08:07, Martin Waite wrote: > Hi > > Usually, this would hold about 2k items, pushing to 10k peaks. > > My current understanding is that I cannot lock a node w

Re: is there a good pattern for leases ?

2010-02-25 Thread Martin Waite
gt; > My question would be how many elements you expect to be in that card lock > table. If it is less than 100K, ZK should work pretty well. > > If you need more than that, you might consider putting locks for many cards > in a single file. > > On Wed, Feb 24, 2010 at 11:

Re: how to lock one-of-many ?

2010-02-24 Thread Martin Waite
nk my requirements will stretch Zookeeper even if I take a heavy handed approach. regards, Martin On 24 February 2010 16:53, Patrick Hunt wrote: > > Martin Waite wrote: > >> The watch mechanism is a new feature for me. This gives me a delayed >> notification that something changed in

Re: how to lock one-of-many ?

2010-02-24 Thread Martin Waite
Hi, I take the point that the watch is useful for stopping clients unnecessarily pestering the zk nodes. I think that this is something I will have to experiment with and see how it goes. I only need to place about 10k locks per minute, so I am hoping that whatever approach I take is well within

Re: how to lock one-of-many ?

2010-02-24 Thread Martin Waite
I had not thought of adding latency to the network interface. I have skimmed descriptions of how to do this with iptables (or ipchains - I can't remember which is the standard now) - so it sounds plausible. Whether this is within my capabilities is another matter. I really do not follow the dele

Re: is there a good pattern for leases ?

2010-02-24 Thread Martin Waite
That said the best way is to pick some machine, like Mahadev says, to > retire > old locks by polling every N seconds, where N is the slop you can afford. > > What problem are you actually trying to solve? > > cheers, > Henry > > On 24 February 2010 03:40, Martin Waite

Re: is there a good pattern for leases ?

2010-02-24 Thread Martin Waite
el for leases in the zookeeper library itself. > To implement leases you will have to implement them at your application > side > with timeouts triggers (lease triggers) leading to session close at the > client. > > > Thanks > mahadev > > > On 2/24/10 3:40 AM, &quo

is there a good pattern for leases ?

2010-02-24 Thread Martin Waite
Hi, Is there a good model for implementing leases in Zookeeper ? What I want to achieve is for a client to create a lock, and for that lock to disappear two minutes later - regardless of whether the client is still connected to zk. Like ephemeral nodes - but with a time delay. regards, Martin

Re: how to lock one-of-many ?

2010-02-24 Thread Martin Waite
mber of resources. > > On Tue, Feb 23, 2010 at 9:09 PM, Martin Waite >wrote: > > > I guess another optimisation might be to count the number of locks held > > first: if the count equals the number of resources, try again later. > But > > I > > suppose that m

Re: how to lock one-of-many ?

2010-02-23 Thread Martin Waite
ill have very robust properties, especially with more than a handful > of resources and is easy to code and to analyze. > > It won't work if you really mean "lock first available from this sequence". > > On Tue, Feb 23, 2010 at 4:05 AM, Martin Waite >wrote: > >

Re: how to lock one-of-many ?

2010-02-23 Thread Martin Waite
cess should only use to resource_{i} if its been able to > create /locks/resource_{i}/locks. > > Would that work? > > Thanks > mahadev > > On 2/23/10 4:05 AM, "Martin Waite" wrote: > > > Hi, > > > > I have a set of resources each of which has

how to lock one-of-many ?

2010-02-23 Thread Martin Waite
Hi, I have a set of resources each of which has a unique identifier. Each resource element must be locked before it is used, and unlocked afterwards. The logic of the application is something like: lock any one element; if (none locked) then exit with error; else get resource-id from lock