Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-7466

import sys missed in cbepctl

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0
    • 2.0
    • None
    • Security Level: Public
    • None
    • 2.0.1-110-rel

    Description

      build 2.0.1-110-rel
      http://qa.hq.northscale.net/job/ubuntu-64-2.0-upgrade/44/consoleFull

      2012-12-26 23:52:56,199 - root - INFO - running command.raw /opt/couchbase/bin/cbepctl 10.3.3.19:11210 -b bucket0 -p "password" set flush_param exp_pager_stime 5
      2012-12-26 23:52:56,336 - root - INFO - command executed successfully
      2012-12-26 23:52:56,338 - root - ERROR - Traceback (most recent call last):
      2012-12-26 23:52:56,339 - root - ERROR - File "/opt/couchbase/lib/python/cbepctl", line 174, in <module>
      2012-12-26 23:52:56,339 - root - ERROR - c.execute()
      2012-12-26 23:52:56,340 - root - ERROR - File "/opt/couchbase/lib/python/clitool.py", line 58, in execute
      2012-12-26 23:52:56,340 - root - ERROR - f[0](mc, *args[2:], **opts._dict_)
      2012-12-26 23:52:56,341 - root - ERROR - File "/opt/couchbase/lib/python/cbepctl", line 24, in g
      2012-12-26 23:52:56,341 - root - ERROR - sys.exit(1)
      2012-12-26 23:52:56,342 - root - ERROR - NameError: global name 'sys' is not defined
      2012-12-26 23:52:56,342 - root - INFO - Authentication error for bucket0

      cbepctl :

      #!/usr/bin/env python

      import time
      import clitool
      import mc_bin_client
      import memcacheConstants

      def cmd(f):
      """Decorate a function with code to authenticate based on 1-2
      arguments past the normal number of arguments."""

      def g(*args, **kwargs):
      mc = args[0]
      n = f.func_code.co_argcount

      bucket = kwargs.get('bucketName', None)
      password = kwargs.get('password', None) or ""

      if bucket:
      try:
      mc.sasl_auth_plain(bucket, password)
      except mc_bin_client.MemcachedError:
      print "Authentication error for %s" % bucket
      sys.exit(1) ------------------------ line 24

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tommie Tommie McAfee (Inactive)
            andreibaranouski Andrei Baranouski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty