We have development mesos clusters that use the same ZK cluster but chrooted on different paths under /mesos/{dev1,dev2,...}. I tried to spin up the elasticsearch framework on one of these but got stopped by a ZKAddressException.
The reason is that the ZK_NODE_REG part of the full ADDRESS_REGEX that validates ZK URLs in org.apache.mesos.elasticsearch.common.zookeeper.model.ZKAddress only allows for one path segment beneath the root. I.e. /mesos and /my_mesos_cluster are valid, but /mesos/cluster1 isn't.
This PR relaxes the ZK_NODE_REG regex a bit to allow for subpaths in the ZK URL. Commit 52ab30b adds a couple of tests that fail with the current regex, and 57084ed is the actual change to the regex which makes the tests pass.
We have development mesos clusters that use the same ZK cluster but chrooted on different paths under
/mesos/{dev1,dev2,...}
. I tried to spin up the elasticsearch framework on one of these but got stopped by aZKAddressException
.The reason is that the
ZK_NODE_REG
part of the fullADDRESS_REGEX
that validates ZK URLs inorg.apache.mesos.elasticsearch.common.zookeeper.model.ZKAddress
only allows for one path segment beneath the root. I.e./mesos
and/my_mesos_cluster
are valid, but/mesos/cluster1
isn't.This PR relaxes the
ZK_NODE_REG
regex a bit to allow for subpaths in the ZK URL. Commit 52ab30b adds a couple of tests that fail with the current regex, and 57084ed is the actual change to the regex which makes the tests pass.Please let me know what you think! Thanks.