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

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

          Activity

            Build couchbase-server-7.0.0-4272 contains voltron commit 2f9e21f with commit message:
            MB-43323: Fix upgrade problem caused by stray .pyc files

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-4272 contains voltron commit 2f9e21f with commit message: MB-43323 : Fix upgrade problem caused by stray .pyc files

            Turns out my safe, low-impact fix for this breaks upgrade from 6.6.2+ to a higher version. Re-opening to put in proper change - this will require a new 6.6.2 build.

            ceej Chris Hillery added a comment - Turns out my safe, low-impact fix for this breaks upgrade from 6.6.2+ to a higher version. Re-opening to put in proper change - this will require a new 6.6.2 build.

            The second part of this fix - deleting /opt/couchbase/lib/python entirely on uninstall - is the underlying cause of MB-44430. This bug means that python-based tools will be broken after upgrading from any Server with this "fix" in it, which will include 6.6.2 if we don't put in a patch before GA. I've been testing several possible fixes, and I have something that mostly works, but it's still producing a warning message that indicates I still don't entirely understand what's going on.

            ceej Chris Hillery added a comment - The second part of this fix - deleting /opt/couchbase/lib/python entirely on uninstall - is the underlying cause of MB-44430 . This bug means that python-based tools will be broken after upgrading from any Server with this "fix" in it, which will include 6.6.2 if we don't put in a patch before GA. I've been testing several possible fixes, and I have something that mostly works, but it's still producing a warning message that indicates I still don't entirely understand what's going on.

            All new debugging and fixing is tracked on MB-44430, so I'm re-closing this one.

            ceej Chris Hillery added a comment - All new debugging and fixing is tracked on MB-44430 , so I'm re-closing this one.

            Verified with upgrade from 6.0.5 to 6.6.2

            arunkumar Arunkumar Senthilnathan added a comment - Verified with upgrade from 6.0.5 to 6.6.2

            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