Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-921

zkPython incorrectly checks for existence of required ACL elements

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.1, 3.4.0
    • Fix Version/s: 3.3.3, 3.4.0
    • Component/s: contrib-bindings
    • Labels:
      None
    • Environment:

      Mac OS X 10.6.4, included Python 2.6.1

    • Hadoop Flags:
      Reviewed

      Description

      Calling zookeeper.create() seems, under certain circumstances, to be corrupting a subsequent call to Python's logging module.

      Specifically, if the node does not exist (but its parent does), I end up with a traceback like this when I try to make the logging call:

      Traceback (most recent call last):
        File "zktest.py", line 21, in <module>
          logger.error("Boom?")
        File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py", line 1046, in error
          if self.isEnabledFor(ERROR):
        File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py", line 1206, in isEnabledFor
          return level >= self.getEffectiveLevel()
        File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py", line 1194, in getEffectiveLevel
          while logger:
      TypeError: an integer is required
      

      But if the node already exists, or the parent does not exist, I get the appropriate NodeExists or NoNode exceptions.

      I'll be attaching a test script that can be used to reproduce this behavior.

        Attachments

        1. zktest.py
          0.4 kB
          Nicholas Knight
        2. ZOOKEEPER-921.patch
          1 kB
          Nicholas Knight

          Activity

            People

            • Assignee:
              nknight Nicholas Knight
              Reporter:
              nknight Nicholas Knight
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: