Package: python-zookeeper
Version: 3.3.5+dfsg1-2
Severity: normal
There appears to be a problem with python-zookeeper's handling of nodes with
that have a total path length that is greater than 255 characters. It can
be demonstrated with this simple test program, which creates a node with
path length of 302 characters. The return value from zookeeper.create should
be exactly the same, in this case, but instead, it is trucated at
255 characters:
==
#!/usr/bin/python
import zookeeper
ZOO_OPEN_ACL_UNSAFE = {perms:0x1f, scheme:world, id :anyone}
path = / + x * 300 + X
servers=127.0.0.1:2181
zh = zookeeper.init(servers)
znode = zookeeper.create(zh,path, 'test', [ZOO_OPEN_ACL_UNSAFE], 0)
print path
print znode
zookeeper.delete(zh, znode)
==
# ./ztest.py
/X
/xx
Traceback (most recent call last):
File ./ztest.py, line 20, in module
zookeeper.delete(zh, lockfile)
zookeeper.NoNodeException: no node
Checking in the Zookeeper cli confirms that the node is created successfully,
and it's only the name returned from zookeeper.create that is truncated.
I cannot find any information on what the maximum allowed path length is,
for Zookeeper, but this doesn't really matter, because if paths longer than
256 characters aren't allowed, then it should be throwing an exception at
create time.
I have also checked that it's not just the node-name length that is the
problem - it's definitely the total length of the path.
Thanks,
Paul
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (900, 'testing')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-3-686-pae (SMP w/1 CPU core)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-zookeeper depends on:
ii libc6 2.13-35
ii libzookeeper-mt2 3.3.5+dfsg1-2
ii python2.7.3~rc2-1
ii python2.6 2.6.8-0.2
ii python2.7 2.7.3~rc2-2.1
python-zookeeper recommends no packages.
python-zookeeper suggests no packages.
-- debconf-show failed
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org