Stagger the start-daemon
PATCH 1/1 Stagger the start-daemon
My rule of thumb is that magic delays are evil or stupid, so I worked on eliminating them from our scripts. However, in this case it's just not worth it, because the result is that we have to wait way more than 100s for several cycles of CLD timeouts to complete, not just one, before we declare a failure. With this patch, all builds completed that I submitted to Fedora build system.
--- test/start-daemon | 4 ++++ test/wait-for-listen.c | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-)
test/start-daemon +4 -0
@@ -18,6 +18,10 @@ fi # May be different on Solaris... like /usr/libexec or such. cld -d data/cld -P cld.pid -p auto --port-file=cld.port -E + +# With great sadness we have to use a delay, or else "100 s" happens. +sleep 3 + chunkd -C $top_srcdir/test/chunkd-test.conf -E ../server/tabled -C $top_srcdir/test/tabled-test.conf -E
test/wait-for-listen.c +2 -5
@@ -133,12 +133,9 @@ int main(int argc, char **argv)* Vote in DB4 replication takes about 12-13s. * In addition we may have retries when tabled polls for * Chunk daemons to come up. On busy boxes we may miss 20s. -* So, 25s should be plenty, and we used that for a while, -* but sometimes a daemon can fail establishing a session -* with CLD and a retry takes a minute. */ -if (time (NULL ) >= start_time +100 ) { -fprintf (stderr,"server is not up after 100 s\n" ); +if (time (NULL ) >= start_time +25 ) { +fprintf (stderr,"server is not up after 25 s\n" );exit (1 ); }
Jeff Garzik
AppliedQuoted 7 lines · Pete Zaitcev
My rule of thumb is that magic delays are evil or stupid, so I worked on eliminating them from our scripts. However, in this case it's just not worth it, because the result is that we have to wait way more than 100s for several cycles of CLD timeouts to complete, not just one, before we declare a failure. With this patch, all builds completed that I submitted to Fedora build system.
Quoted 6 lines
Signed-off-by Pete Zaitcev<[email protected]>--- test/start-daemon | 4 ++++ test/wait-for-listen.c | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-)
applied