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

[tools] couchbase-cli broken when upgrade from 6.0.1 to 6.6.0 in Ubuntu 18.04

    XMLWordPrintable

Details

    • Untriaged
    • Ubuntu 64-bit
    • 1
    • No
    • Build Team 2021 Sprint 2, Build Team 2021 Sprint 4

    Description

      Steps to Reproduce

      1. Install Couchbase server 6.0.1 on a Ubuntu 18.04 server.
      2. Use couchbase-cli to initial node and create bucket1.  It works as expected.
      3. Upgrade node to Couchbase server 6.6.0
        #Use couchbase-cli to create a second bucket, bucket2, failed with error: 

        root@ip-172-31-18-93:~# /opt/couchbase/bin/couchbase-cli bucket-create -c localhost:8091 --username Administrator --password password --bucket bucket2 --bucket-type couchbase --bucket-ramsize 256 --bucket-replica 1 --bucket-priority high --bucket-eviction-policy fullEviction --enable-flush 0 --enable-index-replica 1
        Traceback (most recent call last):
          File "/opt/couchbase/lib/python/couchbase-cli", line 8, in <module>
            import cbmgr
          File "/opt/couchbase/lib/python/cbmgr.py", line 17, in <module>
            from argparse import ArgumentError, ArgumentParser, HelpFormatter, Action, SUPPRESS
        ImportError: bad magic number in 'argparse': b'\x03\xf3\r\n'
        root@ip-172-31-18-93:~ 
        

      Workaround

      Remove all file with extension pyc in /opt/couchbase/lib/python/*.pyc as mention in this Forum, it works

      root@ip-172-31-18-93:~# rm -rf /opt/couchbase/lib/python/*.pyc
      root@ip-172-31-18-93:~# /opt/couchbase/bin/couchbase-cli bucket-create -c localhost:8091 --username Administrator --password password --bucket bucket2 --bucket-type couchbase --bucket-ramsize 256 --bucket-replica 1 --bucket-priority high --bucket-eviction-policy fullEviction --enable-flush 0 --enable-index-replica 1
      SUCCESS: Bucket created
      root@ip-172-31-18-93:~#  

      This bug does not affect centos as I confirmed in the forum.

       

       

       

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-43323
          # Subject Branch Project Status CR V

          Activity

            People

              thuan Thuan Nguyen
              thuan Thuan Nguyen
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty