Only exit from watch-znode if we managed to communicate with zk (#2127)
Only exit from watch-znode if we managed to communicate with zk (#2127)

The integration tests sometimes fail because the watch-znode script
which is used to set the order of service startup throws an exception
and exits without waiting for initialization to happen.

This patch changes the watch-znode script to only ever exit if
communication with zk has been successful.
ArvinDevel/incubator-pulsar,jai1/pulsar,merlimat/pulsar,yahoo/pulsar,merlimat/pulsar,nkurihar/pulsar,yahoo/pulsar,jai1/pulsar,ArvinDevel/incubator-pulsar,massakam/pulsar,nkurihar/pulsar,nkurihar/pulsar,ArvinDevel/incubator-pulsar,massakam/pulsar,nkurihar/pulsar,nkurihar/pulsar,jai1/pulsar,ArvinDevel/incubator-pulsar,ArvinDevel/incubator-pulsar,nkurihar/pulsar,jai1/pulsar,merlimat/pulsar,jai1/pulsar,nkurihar/pulsar,massakam/pulsar,yahoo/pulsar,jai1/pulsar,merlimat/pulsar,jai1/pulsar,yahoo/pulsar,nkurihar/pulsar,massakam/pulsar,merlimat/pulsar,massakam/pulsar,ArvinDevel/incubator-pulsar,ArvinDevel/incubator-pulsar,jai1/pulsar,jai1/pulsar,yahoo/pulsar,nkurihar/pulsar,yahoo/pulsar,merlimat/pulsar,massakam/pulsar,ArvinDevel/incubator-pulsar