Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

discovery fails if Zookeeper tree is read only #215

Open
bjoernmeier opened this issue Nov 23, 2016 · 0 comments
Open

discovery fails if Zookeeper tree is read only #215

bjoernmeier opened this issue Nov 23, 2016 · 0 comments

Comments

@bjoernmeier
Copy link

Hi,

we are using synapse for service discovery and wanted to use it with a read only Zookeeper.
But during tests we got the following error:

/usr/lib/ruby/vendor_ruby/zk/client/base.rb:1083:in `check_rc': inputs: {:path=>"/level_1/level_2/level_3", :data=>"", :ephemeral=>false, :sequence=>false, :ignore=>:node_exists} (ZK::Exceptions::NoAuth)
	from /usr/lib/ruby/vendor_ruby/zk/client/base.rb:1072:in `call_and_check_rc'
	from /usr/lib/ruby/vendor_ruby/zk/client/threaded.rb:584:in `call_and_check_rc'
	from /usr/lib/ruby/vendor_ruby/zk/client/base.rb:352:in `create'
	from /usr/lib/ruby/vendor_ruby/zk/client/threaded.rb:434:in `create'
	from /usr/lib/ruby/vendor_ruby/synapse/service_watcher/zookeeper.rb:121:in `create'
	from /usr/lib/ruby/vendor_ruby/synapse/service_watcher/zookeeper.rb:245:in `zk_connect'
	from /usr/lib/ruby/vendor_ruby/synapse/service_watcher/zookeeper.rb:39:in `start'
	from /usr/lib/ruby/vendor_ruby/synapse.rb:48:in `block in run'
	from /usr/lib/ruby/vendor_ruby/synapse.rb:48:in `map'
	from /usr/lib/ruby/vendor_ruby/synapse.rb:48:in `run'
	from /usr/bin/synapse:60:in `<main>'

While checking the code we saw that synapse uses zk exists to create nodes if they do not exist (e.g. /level_1 exists it will create level_2/level_3).This fails even if the nodes do exist as synapse does not have create permissions in zookeeper.
It would be great if as long a subtree does not exist only the existing root is watched and on a new node creation the watches are registered on the new subtree instead of creating the subtree.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant