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

ubuntu 10 & 12.04 32-bit unable to upgrade 1.8.1 to 2.0 latest build ( 1969 ) because cbtransfer is unable to open database file

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: installer, tools
    • Security Level: Public
    • Labels:
      None

      Description

      ubuntu@domU-12-31-39-09-A0-B2:/tmp$ dpkg -i couchbase-server-community_x86_2.0.0-1969-rel.deb
      dpkg: error: requested operation requires superuser privilege
      ubuntu@domU-12-31-39-09-A0-B2:/tmp$ sudo dpkg -i couchbase-server-community_x86_2.0.0-1969-rel.deb
      (Reading database ... 31731 files and directories currently installed.)
      Preparing to replace couchbase-server 1.8.1 (using couchbase-server-community_x86_2.0.0-1969-rel.deb) ...

      =INFO REPORT==== 30-Nov-2012::22:33:23 ===
      Initiated server shutdown** at node ns_1@127.0.0.1 **

      =INFO REPORT==== 30-Nov-2012::22:33:33 ===
      Stopped ns_server application** at node ns_1@127.0.0.1 **

      • Stopped couchbase-server
        No packages found matching libssl0.9.8.
        Installing cannot proceed since the package 'libssl0.9.8' is missing.
        Please install libssl0.9.8 and try again.

      $sudo apt-get install libssl0.9.8

      You can also restart couchbase as follows:

      $sudo /etc/init.d/couchbase-server start

      dpkg: error processing couchbase-server-community_x86_2.0.0-1969-rel.deb (--install):
      subprocess new pre-installation script returned error exit status 1
      Errors were encountered while processing:
      couchbase-server-community_x86_2.0.0-1969-rel.deb
      ubuntu@domU-12-31-39-09-A0-B2:/tmp$ cat /opt/couchbase/VERSION.txt
      1.8.1-937-rel
      ubuntu@domU-12-31-39-09-A0-B2:/tmp$ sudo dpkg -i couchbase-server-community_x86_2.0.0-1969-rel.deb sudo apt-get install libssl0.9.8^C
      ubuntu@domU-12-31-39-09-A0-B2:/tmp$ sudo apt-get install libssl0.9.8
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      The following NEW packages will be installed:
      libssl0.9.8
      0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
      Need to get 868 kB of archives.
      After this operation, 2,270 kB of additional disk space will be used.
      Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/universe libssl0.9.8 i386 0.9.8o-7ubuntu3.1 [868 kB]
      Fetched 868 kB in 0s (1,938 kB/s)
      Preconfiguring packages ...
      Selecting previously unselected package libssl0.9.8.
      (Reading database ... 31731 files and directories currently installed.)
      Unpacking libssl0.9.8 (from .../libssl0.9.8_0.9.8o-7ubuntu3.1_i386.deb) ...
      Setting up libssl0.9.8 (0.9.8o-7ubuntu3.1) ...
      Processing triggers for libc-bin ...
      ldconfig deferred processing now taking place
      ubuntu@domU-12-31-39-09-A0-B2:/tmp$ sudo dpkg -i couchbase-server-community_x86_2.0.0-1969-rel.deb
      (Reading database ... 31755 files and directories currently installed.)
      Preparing to replace couchbase-server 1.8.1 (using couchbase-server-community_x86_2.0.0-1969-rel.deb) ...

      • Failed to stop couchbase-server
        libssl0.9.8 is installed. Continue installing
        Upgrading previous couchbase ... (1.8.1)
        Stopping previous couchbase ... (1.8.1)
      • Failed to stop couchbase-server
        Saving previous couchbase config.dat ...
        Cleaning symlinks ...
        Unpacking replacement couchbase-server ...
        Setting up couchbase-server (2.0.0) ...
        Upgrading couchbase-server ...
        /opt/couchbase/bin/install/cbupgrade -c /opt/couchbase/var/lib/couchbase/config -a yes
        Automatic mode: running without interactive questions or confirmations.
        Upgrading your Couchbase Server to 2.0.0-1969-rel.
        The upgrade process might take awhile.
        Analysing...
        Previous config.dat file is /opt/couchbase/var/lib/couchbase/config/config.dat.debsave
        Target node: ns_1@127.0.0.1

      Couchbase should not be running.
      Please use: /etc/init.d/couchbase-server stop

      Database dir: /opt/couchbase/var/lib/couchbase/data

      Buckets to upgrade: default,crap

      Checking disk space available for buckets in directory:
      /opt/couchbase/var/lib/couchbase/data
      Free disk bucket space wanted: 528068608.0
      Free disk bucket space available: 6384177152
      Free disk space factor: 2.0
      Ok.

      Analysis complete.

      Copying /opt/couchbase/var/lib/couchbase/config/config.dat.debsave
      cp /opt/couchbase/var/lib/couchbase/config/config.dat.debsave /opt/couchbase/bin/install/../../var/lib/couchbase/config/config.dat
      Ensuring bucket data directories.
      Ensuring bucket data directory: /opt/couchbase/var/lib/couchbase/data/default
      mkdir -p /opt/couchbase/var/lib/couchbase/data/default
      Ensuring bucket data directory: /opt/couchbase/var/lib/couchbase/data/crap
      mkdir -p /opt/couchbase/var/lib/couchbase/data/crap
      Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data
      chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data
      Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data
      chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data
      Upgrading buckets.
      Upgrading bucket: default
      /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=active --destination-vbucket-state=active
      cbdbupgrade pid: 3463
      cbdbupgrade err: 139
      ERROR: upgrade failed for bucket: default
      dpkg: error processing couchbase-server (--install):
      subprocess installed post-installation script returned error exit status 1
      Processing triggers for ureadahead ...
      Errors were encountered while processing:
      couchbase-server
      ubuntu@domU-12-31-39-09-A0-B2:/tmp$ /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=active --destination-vbucket-state=active
      2012-11-30 22:35:50,229: mt error: could not access user_version from: /opt/couchbase/var/lib/couchbase/data/default-data/default; exception: unable to open database file; perhaps it is being used by another program like couchbase-server
      error: unknown type of source: /opt/couchbase/var/lib/couchbase/data/default-data/default
      ubuntu@domU-12-31-39-09-A0-B2:/tmp$ /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=active --destination-vbucket-state=active^C
      ubuntu@domU-12-31-39-09-A0-B2:/tmp$ top

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

        Activity

        Hide
        steve Steve Yen added a comment - - edited

        (updated this comment)

        It's dying in various places with the first calls down to couchstore python-ctypes wrapper, depending so it seems like a general ctypes issue. After adding some print()'s...

        root@domU-12-31-39-09-A0-B2:/opt/couchbase/lib# rm -rf /tmp/foo/default/

        root@domU-12-31-39-09-A0-B2:/opt/couchbase/lib# PYTHONPATH=/opt/couchbase/lib/python PATH=/opt/couchbase/lib:$PATH LD_LIBRARY_PATH=/opt/couchbase/lib:$LD_LIBRARY_PATH /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///tmp/foo -b default
        open_store(vbucket_id) 1020
        Segmentation fault

        root@domU-12-31-39-09-A0-B2:/opt/couchbase/lib# PYTHONPATH=/opt/couchbase/lib/python PATH=/opt/couchbase/lib:$PATH LD_LIBRARY_PATH=/opt/couchbase/lib:$LD_LIBRARY_PATH /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///tmp/foo -b default
        open_store(vbucket_id) 1020
        open_store(vbucket_id) 1020 0 CouchStore(/tmp/foo/default/1020.couch.1) /tmp/foo/default/1020.couch.1
        couchstore.DocumentInfo(str(key)) 745
        python: malloc.c:2451: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)>bins[((1) - 1) * 2])) - _builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((_builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)>size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
        couchstore.DocumentInfo(str(key)) 745 Aborted

        root@domU-12-31-39-09-A0-B2:/opt/couchbase/lib# PYTHONPATH=/opt/couchbase/lib/python PATH=/opt/couchbase/lib:$PATH LD_LIBRARY_PATH=/opt/couchbase/lib:$LD_LIBRARY_PATH /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///tmp/foo -b default
        open_store(vbucket_id) 1020
        open_store(vbucket_id) 1020 0 CouchStore(/tmp/foo/default/1020.couch.1) /tmp/foo/default/1020.couch.1
        couchstore.DocumentInfo(str(key)) 745
        python: malloc.c:2451: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)>bins[((1) - 1) * 2])) - _builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((_builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)>size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
        couchstore.DocumentInfo(str(key)) 745 Aborted

        Show
        steve Steve Yen added a comment - - edited (updated this comment) It's dying in various places with the first calls down to couchstore python-ctypes wrapper, depending so it seems like a general ctypes issue. After adding some print()'s... root@domU-12-31-39-09-A0-B2:/opt/couchbase/lib# rm -rf /tmp/foo/default/ root@domU-12-31-39-09-A0-B2:/opt/couchbase/lib# PYTHONPATH=/opt/couchbase/lib/python PATH=/opt/couchbase/lib:$PATH LD_LIBRARY_PATH=/opt/couchbase/lib:$LD_LIBRARY_PATH /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///tmp/foo -b default open_store(vbucket_id) 1020 Segmentation fault root@domU-12-31-39-09-A0-B2:/opt/couchbase/lib# PYTHONPATH=/opt/couchbase/lib/python PATH=/opt/couchbase/lib:$PATH LD_LIBRARY_PATH=/opt/couchbase/lib:$LD_LIBRARY_PATH /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///tmp/foo -b default open_store(vbucket_id) 1020 open_store(vbucket_id) 1020 0 CouchStore(/tmp/foo/default/1020.couch.1) /tmp/foo/default/1020.couch.1 couchstore.DocumentInfo(str(key)) 745 python: malloc.c:2451: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av) >bins [((1) - 1) * 2] )) - _ builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)(((( _builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top) >size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed. couchstore.DocumentInfo(str(key)) 745 Aborted root@domU-12-31-39-09-A0-B2:/opt/couchbase/lib# PYTHONPATH=/opt/couchbase/lib/python PATH=/opt/couchbase/lib:$PATH LD_LIBRARY_PATH=/opt/couchbase/lib:$LD_LIBRARY_PATH /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///tmp/foo -b default open_store(vbucket_id) 1020 open_store(vbucket_id) 1020 0 CouchStore(/tmp/foo/default/1020.couch.1) /tmp/foo/default/1020.couch.1 couchstore.DocumentInfo(str(key)) 745 python: malloc.c:2451: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av) >bins [((1) - 1) * 2] )) - _ builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)(((( _builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top) >size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed. couchstore.DocumentInfo(str(key)) 745 Aborted
        Hide
        steve Steve Yen added a comment -

        Dug into couchstore wrapper code and one suspect is that couchstore C api uses things like size_t (which may differs between 32-bit and 64-bit platforms) in its structures.

        But, the python wrapper always uses c_ulonglong (64-bits).

        Quickie fix attempt, though, is still crashing, so still looking.

        Show
        steve Steve Yen added a comment - Dug into couchstore wrapper code and one suspect is that couchstore C api uses things like size_t (which may differs between 32-bit and 64-bit platforms) in its structures. But, the python wrapper always uses c_ulonglong (64-bits). Quickie fix attempt, though, is still crashing, so still looking.
        Hide
        steve Steve Yen added a comment -

        Pushed up a fix to gerrit...

        http://review.couchbase.org/#/c/22969/

        Here's a capture of verifying that the upgrade works manually (using the INSTALL_DONT_AUTO_UPGRADE feature)...

        root@domU-12-31-39-09-A0-B2:/opt/couchbase/lib/python# dpkg -i /tmp/couchbase-server-enterprise_x86_1.8.1.deb
        Setting up couchbase-server (1.8.1) ...

        • Started couchbase-server

        You have successfully installed Couchbase Server.
        Please browse to http://domU-12-31-39-09-A0-B2:8091/ to configure your server.
        Please refer to http://couchbase.com for additional resources.

        Please note that you have to update your firewall configuration to
        allow connections to the following ports: 11211, 11210, 11209, 4369,
        8091 and from 21100 to 21299.

        By using this software you agree to the End User License Agreement.
        See /opt/couchbase/LICENSE.txt.

        Processing triggers for ureadahead ...

        root@domU-12-31-39-09-A0-B2:~# /opt/couchbase/bin/memcachetest -i 1000
        Average with 1 threads
        Get operations:
        #of ops. min max avg max90th max95th max99th
        6716 102 us 70 ms 473 us 164 us 171 us 14 ms

        Set operations:
        #of ops. min max avg max90th max95th max99th
        3284 111 us1266874885 5617157 s 156 us 161 us 10 ms

        Usr: 0.104006
        Sys: 0.680042
        Tot: 5.033724
        Server time:
        Usr: 0.000000
        Sys: 1.000000
        Total gets: 0
        Total sets: 1000

        root@domU-12-31-39-09-A0-B2:~# INSTALL_DONT_AUTO_UPGRADE=1 INSTALL_DONT_START_SERVER=1 dpkg -i /tmp/couchbase-server-community_x86_2.0.0-1969-rel.deb
        (Reading database ... 39239 files and directories currently installed.)
        Preparing to replace couchbase-server 1.8.1 (using .../couchbase-server-community_x86_2.0.0-1969-rel.deb) ...

        =INFO REPORT==== 2-Dec-2012::00:59:33 ===
        Initiated server shutdown** at node ns_1@127.0.0.1 **

        =INFO REPORT==== 2-Dec-2012::00:59:40 ===
        Stopped ns_server application** at node ns_1@127.0.0.1 **

        • Stopped couchbase-server
          libssl0.9.8 is installed. Continue installing
          Upgrading previous couchbase ... (1.8.1)
          Stopping previous couchbase ... (1.8.1)
        • Failed to stop couchbase-server
          Saving previous couchbase config.dat ...
          Cleaning symlinks ...
          Unpacking replacement couchbase-server ...
          Setting up couchbase-server (2.0.0) ...
          Upgrading couchbase-server ...
          /opt/couchbase/bin/install/cbupgrade -c /opt/couchbase/var/lib/couchbase/config -a yes
          Skipping cbupgrade due to INSTALL_DONT_AUTO_UPGRADE ...
          Skipping server start due to INSTALL_DONT_START_SERVER ...

        You have successfully installed Couchbase Server.
        Please browse to http://domU-12-31-39-09-A0-B2:8091/ to configure your server.
        Please refer to http://couchbase.com for additional resources.

        Please note that you have to update your firewall configuration to
        allow connections to the following ports: 11211, 11210, 11209, 4369,
        8091 and from 21100 to 21299.

        By using this software you agree to the End User License Agreement.
        See /opt/couchbase/LICENSE.txt.

        Processing triggers for ureadahead ...

        root@domU-12-31-39-09-A0-B2:~# diff /tmp/couchstore.py /opt/couchbase/lib/python/couchstore.py
        68c68
        < fields = [("buf", POINTER(c_char)), ("size", c_size_t)]

        > fields = [("buf", POINTER(c_char)), ("size", c_ulonglong)]
        93c93
        < ("size", c_size_t) ]

        > ("size", c_ulonglong) ]
        106c106
        < ("header_position", c_size_t) ]

        > ("header_position", c_ulonglong) ]
        226c226
        < _check(_lib.couchstore_open_db(path, c_uint64(flags), byref(db)))

        > _check(_lib.couchstore_open_db(path, flags, byref(db)))

        root@domU-12-31-39-09-A0-B2:~# cp /tmp/couchstore.py /opt/couchbase/lib/python/couchstore.py

        root@domU-12-31-39-09-A0-B2:~# /opt/couchbase/bin/install/cbupgrade -c /opt/couchbase/var/lib/couchbase/config -a yes
        Automatic mode: running without interactive questions or confirmations.
        Upgrading your Couchbase Server to 2.0.0-1969-rel.
        The upgrade process might take awhile.
        Analysing...
        Previous config.dat file is /opt/couchbase/var/lib/couchbase/config/config.dat.debsave
        Target node: ns_1@127.0.0.1

        Couchbase should not be running.
        Please use: /etc/init.d/couchbase-server stop

        Database dir: /opt/couchbase/var/lib/couchbase/data

        Buckets to upgrade: default

        Checking disk space available for buckets in directory:
        /opt/couchbase/var/lib/couchbase/data
        Free disk bucket space wanted: 6834176.0
        Free disk bucket space available: 6290337792
        Free disk space factor: 2.0
        Ok.

        Analysis complete.

        Copying /opt/couchbase/var/lib/couchbase/config/config.dat.debsave
        cp /opt/couchbase/var/lib/couchbase/config/config.dat.debsave /opt/couchbase/bin/install/../../var/lib/couchbase/config/config.dat
        Ensuring bucket data directories.
        Ensuring bucket data directory: /opt/couchbase/var/lib/couchbase/data/default
        mkdir -p /opt/couchbase/var/lib/couchbase/data/default
        Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data
        chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data
        Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data
        chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data
        Upgrading buckets.
        Upgrading bucket: default
        /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=active --destination-vbucket-state=active
        cbdbupgrade pid: 16221
        ################### 100.0% (1000/1000 msgs)
        bucket: default, msgs transferred...
        : total | last | per sec
        batch : 1025 | 1025 | 152.2
        byte : 2098645 | 2098645 | 311698.6
        msg : 1000 | 1000 | 148.5
        done
        cbdbupgrade err: 0
        Upgrading bucket: default
        /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=replica --destination-vbucket-state=replica
        cbdbupgrade pid: 16230
        ..............................................................................................................................................................................................................
        bucket: default, msgs transferred...
        : total | last | per sec
        batch : 1025 | 1025 | 1388.7
        byte : 0 | 0 | 0.0
        msg : 0 | 0 | 0.0
        done
        cbdbupgrade err: 0
        Upgrading bucket: default
        /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=pending --destination-vbucket-state=pending
        cbdbupgrade pid: 16239
        ..............................................................................................................................................................................................................
        bucket: default, msgs transferred...
        : total | last | per sec
        batch : 1025 | 1025 | 1408.2
        byte : 0 | 0 | 0.0
        msg : 0 | 0 | 0.0
        done
        cbdbupgrade err: 0
        Upgrading bucket: default
        /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=dead --destination-vbucket-state=dead
        cbdbupgrade pid: 16248
        ..............................................................................................................................................................................................................
        bucket: default, msgs transferred...
        : total | last | per sec
        batch : 1025 | 1025 | 1540.9
        byte : 0 | 0 | 0.0
        msg : 0 | 0 | 0.0
        done
        cbdbupgrade err: 0
        Ensuring bucket owner/group: /opt/couchbase/var/lib/couchbase/data/default
        chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data/default

        Done.

        At this point the offline upgrade node running 2.0.0 has 1000 items.

        Show
        steve Steve Yen added a comment - Pushed up a fix to gerrit... http://review.couchbase.org/#/c/22969/ Here's a capture of verifying that the upgrade works manually (using the INSTALL_DONT_AUTO_UPGRADE feature)... root@domU-12-31-39-09-A0-B2:/opt/couchbase/lib/python# dpkg -i /tmp/couchbase-server-enterprise_x86_1.8.1.deb Setting up couchbase-server (1.8.1) ... Started couchbase-server You have successfully installed Couchbase Server. Please browse to http://domU-12-31-39-09-A0-B2:8091/ to configure your server. Please refer to http://couchbase.com for additional resources. Please note that you have to update your firewall configuration to allow connections to the following ports: 11211, 11210, 11209, 4369, 8091 and from 21100 to 21299. By using this software you agree to the End User License Agreement. See /opt/couchbase/LICENSE.txt. Processing triggers for ureadahead ... root@domU-12-31-39-09-A0-B2:~# /opt/couchbase/bin/memcachetest -i 1000 Average with 1 threads Get operations: #of ops. min max avg max90th max95th max99th 6716 102 us 70 ms 473 us 164 us 171 us 14 ms Set operations: #of ops. min max avg max90th max95th max99th 3284 111 us1266874885 5617157 s 156 us 161 us 10 ms Usr: 0.104006 Sys: 0.680042 Tot: 5.033724 Server time: Usr: 0.000000 Sys: 1.000000 Total gets: 0 Total sets: 1000 root@domU-12-31-39-09-A0-B2:~# INSTALL_DONT_AUTO_UPGRADE=1 INSTALL_DONT_START_SERVER=1 dpkg -i /tmp/couchbase-server-community_x86_2.0.0-1969-rel.deb (Reading database ... 39239 files and directories currently installed.) Preparing to replace couchbase-server 1.8.1 (using .../couchbase-server-community_x86_2.0.0-1969-rel.deb) ... =INFO REPORT==== 2-Dec-2012::00:59:33 === Initiated server shutdown** at node ns_1@127.0.0.1 ** =INFO REPORT==== 2-Dec-2012::00:59:40 === Stopped ns_server application** at node ns_1@127.0.0.1 ** Stopped couchbase-server libssl0.9.8 is installed. Continue installing Upgrading previous couchbase ... (1.8.1) Stopping previous couchbase ... (1.8.1) Failed to stop couchbase-server Saving previous couchbase config.dat ... Cleaning symlinks ... Unpacking replacement couchbase-server ... Setting up couchbase-server (2.0.0) ... Upgrading couchbase-server ... /opt/couchbase/bin/install/cbupgrade -c /opt/couchbase/var/lib/couchbase/config -a yes Skipping cbupgrade due to INSTALL_DONT_AUTO_UPGRADE ... Skipping server start due to INSTALL_DONT_START_SERVER ... You have successfully installed Couchbase Server. Please browse to http://domU-12-31-39-09-A0-B2:8091/ to configure your server. Please refer to http://couchbase.com for additional resources. Please note that you have to update your firewall configuration to allow connections to the following ports: 11211, 11210, 11209, 4369, 8091 and from 21100 to 21299. By using this software you agree to the End User License Agreement. See /opt/couchbase/LICENSE.txt. Processing triggers for ureadahead ... root@domU-12-31-39-09-A0-B2:~# diff /tmp/couchstore.py /opt/couchbase/lib/python/couchstore.py 68c68 < fields = [("buf", POINTER(c_char)), ("size", c_size_t)] — > fields = [("buf", POINTER(c_char)), ("size", c_ulonglong)] 93c93 < ("size", c_size_t) ] — > ("size", c_ulonglong) ] 106c106 < ("header_position", c_size_t) ] — > ("header_position", c_ulonglong) ] 226c226 < _check(_lib.couchstore_open_db(path, c_uint64(flags), byref(db))) — > _check(_lib.couchstore_open_db(path, flags, byref(db))) root@domU-12-31-39-09-A0-B2:~# cp /tmp/couchstore.py /opt/couchbase/lib/python/couchstore.py root@domU-12-31-39-09-A0-B2:~# /opt/couchbase/bin/install/cbupgrade -c /opt/couchbase/var/lib/couchbase/config -a yes Automatic mode: running without interactive questions or confirmations. Upgrading your Couchbase Server to 2.0.0-1969-rel. The upgrade process might take awhile. Analysing... Previous config.dat file is /opt/couchbase/var/lib/couchbase/config/config.dat.debsave Target node: ns_1@127.0.0.1 Couchbase should not be running. Please use: /etc/init.d/couchbase-server stop Database dir: /opt/couchbase/var/lib/couchbase/data Buckets to upgrade: default Checking disk space available for buckets in directory: /opt/couchbase/var/lib/couchbase/data Free disk bucket space wanted: 6834176.0 Free disk bucket space available: 6290337792 Free disk space factor: 2.0 Ok. Analysis complete. Copying /opt/couchbase/var/lib/couchbase/config/config.dat.debsave cp /opt/couchbase/var/lib/couchbase/config/config.dat.debsave /opt/couchbase/bin/install/../../var/lib/couchbase/config/config.dat Ensuring bucket data directories. Ensuring bucket data directory: /opt/couchbase/var/lib/couchbase/data/default mkdir -p /opt/couchbase/var/lib/couchbase/data/default Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data Upgrading buckets. Upgrading bucket: default /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=active --destination-vbucket-state=active cbdbupgrade pid: 16221 ################### 100.0% (1000/1000 msgs) bucket: default, msgs transferred... : total | last | per sec batch : 1025 | 1025 | 152.2 byte : 2098645 | 2098645 | 311698.6 msg : 1000 | 1000 | 148.5 done cbdbupgrade err: 0 Upgrading bucket: default /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=replica --destination-vbucket-state=replica cbdbupgrade pid: 16230 .............................................................................................................................................................................................................. bucket: default, msgs transferred... : total | last | per sec batch : 1025 | 1025 | 1388.7 byte : 0 | 0 | 0.0 msg : 0 | 0 | 0.0 done cbdbupgrade err: 0 Upgrading bucket: default /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=pending --destination-vbucket-state=pending cbdbupgrade pid: 16239 .............................................................................................................................................................................................................. bucket: default, msgs transferred... : total | last | per sec batch : 1025 | 1025 | 1408.2 byte : 0 | 0 | 0.0 msg : 0 | 0 | 0.0 done cbdbupgrade err: 0 Upgrading bucket: default /opt/couchbase/bin/install/../cbtransfer /opt/couchbase/var/lib/couchbase/data/default-data/default couchstore-files:///opt/couchbase/var/lib/couchbase/data -b default --source-vbucket-state=dead --destination-vbucket-state=dead cbdbupgrade pid: 16248 .............................................................................................................................................................................................................. bucket: default, msgs transferred... : total | last | per sec batch : 1025 | 1025 | 1540.9 byte : 0 | 0 | 0.0 msg : 0 | 0 | 0.0 done cbdbupgrade err: 0 Ensuring bucket owner/group: /opt/couchbase/var/lib/couchbase/data/default chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data/default Done. At this point the offline upgrade node running 2.0.0 has 1000 items.
        Hide
        steve Steve Yen added a comment -

        Also, did the same (INSTALL_DONT_AUTO_UPGRADE) verification steps on 64-bit ubuntu and it worked.

        Show
        steve Steve Yen added a comment - Also, did the same (INSTALL_DONT_AUTO_UPGRADE) verification steps on 64-bit ubuntu and it worked.
        Hide
        steve Steve Yen added a comment -

        (reopening - i forgot the policy is to not resolve until after it makes it past gerrit)

        Show
        steve Steve Yen added a comment - (reopening - i forgot the policy is to not resolve until after it makes it past gerrit)

          People

          • Assignee:
            steve Steve Yen
            Reporter:
            farshid Farshid Ghods (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes