apache / bookkeeper

Apache BookKeeper - a scalable, fault tolerant and low latency storage service optimized for append-only workloads
https://bookkeeper.apache.org/
Apache License 2.0
1.9k stars 901 forks source link

bin/dlog unbind is broken #1961

Closed ivankelly closed 5 years ago

ivankelly commented 5 years ago
root@XXXXX:/bookkeeper# bin/dlog admin unbind -f distributedlog://XXXX:2181/XXXXX
Fail to run tool org.apache.distributedlog.admin.DistributedLogAdmin : 
java.lang.IllegalArgumentException: Zookeeper acl id not set.
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
        at org.apache.distributedlog.ZooKeeperClientBuilder.validateParameters(ZooKeeperClientBuilder.java:199)
        at org.apache.distributedlog.ZooKeeperClientBuilder.buildClient(ZooKeeperClientBuilder.java:215)
        at org.apache.distributedlog.ZooKeeperClientBuilder.build(ZooKeeperClientBuilder.java:209)
        at org.apache.distributedlog.admin.DistributedLogAdmin$UnbindCommand.runCmd(DistributedLogAdmin.java:464)
        at org.apache.distributedlog.tools.Tool$OptsCommand.runCmd(Tool.java:96)
        at org.apache.distributedlog.tools.Tool.run(Tool.java:223)
        at org.apache.distributedlog.tools.Tool.main(Tool.java:239)

It looks like the builder for ZooKeeperClient requires something be set for the acl, even if null.

hugomiguelabreu commented 5 years ago

@ivankelly When unbinding, should the path for the namespace be deleted from ZooKeeper? Indeed adding zkAclId(null) solves this problem. I can make a pull request, I'm just confirming if no further changes are required.

sijie commented 5 years ago

@hugomiguelabreu I don't think we need to delete the path. I think adding zkAclId(null) should fix this problem.

hugomiguelabreu commented 5 years ago

@hugomiguelabreu I don't think we need to delete the path. I think adding zkAclId(null) should fix this problem.

I have the PR ready. I have been testing. It seems that, once unbounded a namespace, if the zookeeper path is not deleted, a new binding to the same namespace wont work. Is this the expected outcome?

sijie commented 5 years ago

It seems that, once unbounded a namespace, if the zookeeper path is not deleted, a new binding to the same namespace wont work. Is this the expected outcome?

You probably can't create the binding. but I think you can update the binding.

hugomiguelabreu commented 5 years ago

It seems that, once unbounded a namespace, if the zookeeper path is not deleted, a new binding to the same namespace wont work. Is this the expected outcome?

You probably can't create the binding. but I think you can update the binding.

That's correct, it is possible to update. Thanks.