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

rpm -U does not restore the data after upgrade for 1.6.4

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7 beta
    • Fix Version/s: 1.7.0
    • Component/s: installer
    • Security Level: Public
    • Labels:
      None
    • Environment:
      basestar-350

      Description

      I will post more logs later.

      rpm -U reports that it has moved over 850 items but after upgrading to 1.7.0 default bucket does not have any data.

        Issue Links

          Activity

          Hide
          steve Steve Yen added a comment - - edited

          The mbdbconvert utility relies on the user_version metadata (sqlite 'pragma user_version') to decide how to upgrade. This value is inconsistently maintained.

          mbdbconvert checks whether the user_version is < 2 in order to decide to convert the single kv table to multiple kv_<vbucketid> tables.

          A freshly installed and configured membase 1.6.4 (surprisingly) has user_version of 2 already, although it only has a single kv table.

          After installation and configuration of 1.6.4 (linux, 64-bit)...

          1. /opt/membase/bin/ep_engine/management/sqlite3 /var/opt/membase/1.6.4/data/ns_1/default
            SQLite version 3.7.2
            Enter ".help" for instructions
            Enter SQL statements terminated with a ";"
            sqlite> pragma user_version;
            2
            sqlite>
          Show
          steve Steve Yen added a comment - - edited The mbdbconvert utility relies on the user_version metadata (sqlite 'pragma user_version') to decide how to upgrade. This value is inconsistently maintained. mbdbconvert checks whether the user_version is < 2 in order to decide to convert the single kv table to multiple kv_<vbucketid> tables. A freshly installed and configured membase 1.6.4 (surprisingly) has user_version of 2 already, although it only has a single kv table. After installation and configuration of 1.6.4 (linux, 64-bit)... /opt/membase/bin/ep_engine/management/sqlite3 /var/opt/membase/1.6.4/data/ns_1/default SQLite version 3.7.2 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> pragma user_version; 2 sqlite>
          Hide
          steve Steve Yen added a comment -

          CURRENT_SCHEMA_VERSION in ep-engine across some versions (sqlite-strategies.cc)

          1.6.1 == undefined
          1.6.4 == 2
          1.6.5 == 2
          1.6.5.1 == 2
          1.6.5.4 == 2
          basestar == 2

          Show
          steve Steve Yen added a comment - CURRENT_SCHEMA_VERSION in ep-engine across some versions (sqlite-strategies.cc) 1.6.1 == undefined 1.6.4 == 2 1.6.5 == 2 1.6.5.1 == 2 1.6.5.4 == 2 basestar == 2
          Hide
          farshid Farshid Ghods (Inactive) added a comment -

          [2011-05-30 11:03:13,426] - [remote_util] [47264785109232] - INFO - running command rpm -U /tmp/membase-server-enterprise_x86_64_basestar-351-g7f6cf4d.rpm
          [2011-05-30 11:03:25,169] - [remote_util] [47264785109232] - INFO - command executed successfully
          [2011-05-30 11:03:25,169] - [remote_util] [47264785109232] - ERROR - warning: /etc/opt/membase/1.6.1/ns_1/config.dat saved as /etc/opt/membase/1.6.1/ns_1/config.dat.rpmsave
          [2011-05-30 11:03:25,169] - [remote_util] [47264785109232] - INFO - Stopping membase ...
          [2011-05-30 11:03:25,169] - [remote_util] [47264785109232] - INFO - Stopping Membase server[ OK ]
          [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO - Upgrading membase ...
          [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO - /opt/membase/bin/mbupgrade -c /etc/opt/membase/1.6* -a yes
          [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO - src = multiDB@/opt/membase/1.6.1/data/ns_1/default
          [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO - dest = multiMTVBDB@/opt/membase/1.6.1/data/ns_1/default-data/default
          [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO - Each . represents 10000 items moved.
          [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO -
          [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO - Moved 850 items.
          [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO - Source version from "/opt/membase/1.6.1/data/ns_1/default" is 0
          [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO - Automatic mode: running without interactive questions or confirmations.
          [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO - Upgrading your Membase Server to basestar-351-g7f6cf4d.
          [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO - The upgrade process might take awhile.
          [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO - Analysing...
          [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO - Target node: ns_1@127.0.0.1
          [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO -
          [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO - Membase should not be running.
          [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO - Please use: /etc/init.d/membase-server stop
          [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO -
          [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO - Database dir: /opt/membase/1.6.1/data/ns_1
          [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO -
          [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO - Buckets to upgrade: default
          [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO -
          [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO - Checking disk space available for buckets in directory:
          [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO - /opt/membase/1.6.1/data/ns_1
          [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO - Free disk bucket space wanted: 1433600.0
          [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO - Free disk bucket space available: 7786844160
          [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO - Free disk space factor: 2.0
          [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO - Ok.
          [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO -
          [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO - Analysis complete.
          [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO -
          [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO - Copying /etc/opt/membase/1.6.1/ns_1/config.dat
          [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO - cp /etc/opt/membase/1.6.1/ns_1/config.dat /opt/membase/var/lib/membase/config/config.dat
          [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO - Ensuring bucket data directories.
          [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO - Ensuring bucket data directory: /opt/membase/1.6.1/data/ns_1/default-data
          [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO - mkdir -p /opt/membase/1.6.1/data/ns_1/default-data
          [2011-05-30 11:03:25,175] - [remote_util] [47264785109232] - INFO - Ensuring dbdir owner/group: /opt/membase/1.6.1/data/ns_1
          [2011-05-30 11:03:25,175] - [remote_util] [47264785109232] - INFO - chown -R membase:membase /opt/membase/1.6.1/data/ns_1
          [2011-05-30 11:03:25,175] - [remote_util] [47264785109232] - INFO - Upgrading buckets.
          [2011-05-30 11:03:25,175] - [remote_util] [47264785109232] - INFO - Upgrading bucket: default
          [2011-05-30 11:03:25,176] - [remote_util] [47264785109232] - INFO - /opt/membase/bin/mbdbupgrade /opt/membase/1.6.1/data/ns_1/default /opt/membase/1.6.1/data/ns_1/default-data
          [2011-05-30 11:03:25,176] - [remote_util] [47264785109232] - INFO - mbdbupgrade pid: 14228
          [2011-05-30 11:03:25,176] - [remote_util] [47264785109232] - INFO - mbdbupgrade err: 0
          [2011-05-30 11:03:25,176] - [remote_util] [47264785109232] - INFO - Ensuring bucket owner/group: /opt/membase/1.6.1/data/ns_1/default-data
          [2011-05-30 11:03:25,176] - [remote_util] [47264785109232] - INFO - chown -R membase:membase /opt/membase/1.6.1/data/ns_1/default-data
          [2011-05-30 11:03:25,177] - [remote_util] [47264785109232] - INFO -
          [2011-05-30 11:03:25,177] - [remote_util] [47264785109232] - INFO - Done.
          [2011-05-30 11:03:25,177] - [remote_util] [47264785109232] - INFO - Starting Membase server[ OK ]
          [2011-05-30 11:03:25,177] - [remote_util] [47264785109232] - INFO -
          [2011-05-30 11:03:25,177] - [remote_util] [47264785109232] - INFO - You have successfully installed Membase Server.
          [2011-05-30 11:03:25,178] - [remote_util] [47264785109232] - INFO - Please browse to http://localhost.localdomain:8091/ to configure your server.
          [2011-05-30 11:03:25,178] - [remote_util] [47264785109232] - INFO - Please refer to http://couchbase.com for additional resources.
          [2011-05-30 11:03:25,178] - [remote_util] [47264785109232] - INFO -
          [2011-05-30 11:03:25,178] - [remote_util] [47264785109232] - INFO - Please note that you have to update your firewall configuration to
          [2011-05-30 11:03:25,178] - [remote_util] [47264785109232] - INFO - allow connections to the following ports: 11211, 11210, 4369, 8091
          [2011-05-30 11:03:25,179] - [remote_util] [47264785109232] - INFO - and from 21100 to 21299.
          [2011-05-30 11:03:25,179] - [remote_util] [47264785109232] - INFO -
          [2011-05-30 11:03:25,179] - [remote_util] [47264785109232] - INFO - By using this software you agree to the End User License Agreement.
          [2011-05-30 11:03:25,179] - [remote_util] [47264785109232] - INFO - See /opt/membase/LICENSE.txt.
          [2011-05-30 11:03:25,179] - [remote_util] [47264785109232] - INFO -
          [2011-05-30 11:03:25,180] - [remote_util] [47264785109232] - INFO - Stopping Membase server[FAILED]
          [2011-05-30 11:03:25,285] - [rest_client] [47264785109232] - INFO - settings/web params : username=Ad

          Show
          farshid Farshid Ghods (Inactive) added a comment - [2011-05-30 11:03:13,426] - [remote_util] [47264785109232] - INFO - running command rpm -U /tmp/membase-server-enterprise_x86_64_basestar-351-g7f6cf4d.rpm [2011-05-30 11:03:25,169] - [remote_util] [47264785109232] - INFO - command executed successfully [2011-05-30 11:03:25,169] - [remote_util] [47264785109232] - ERROR - warning: /etc/opt/membase/1.6.1/ns_1/config.dat saved as /etc/opt/membase/1.6.1/ns_1/config.dat.rpmsave [2011-05-30 11:03:25,169] - [remote_util] [47264785109232] - INFO - Stopping membase ... [2011-05-30 11:03:25,169] - [remote_util] [47264785109232] - INFO - Stopping Membase server[ OK ] [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO - Upgrading membase ... [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO - /opt/membase/bin/mbupgrade -c /etc/opt/membase/1.6* -a yes [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO - src = multiDB@/opt/membase/1.6.1/data/ns_1/default [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO - dest = multiMTVBDB@/opt/membase/1.6.1/data/ns_1/default-data/default [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO - Each . represents 10000 items moved. [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO - [2011-05-30 11:03:25,170] - [remote_util] [47264785109232] - INFO - Moved 850 items. [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO - Source version from "/opt/membase/1.6.1/data/ns_1/default" is 0 [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO - Automatic mode: running without interactive questions or confirmations. [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO - Upgrading your Membase Server to basestar-351-g7f6cf4d. [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO - The upgrade process might take awhile. [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO - Analysing... [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO - Target node: ns_1@127.0.0.1 [2011-05-30 11:03:25,171] - [remote_util] [47264785109232] - INFO - [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO - Membase should not be running. [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO - Please use: /etc/init.d/membase-server stop [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO - [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO - Database dir: /opt/membase/1.6.1/data/ns_1 [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO - [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO - Buckets to upgrade: default [2011-05-30 11:03:25,172] - [remote_util] [47264785109232] - INFO - [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO - Checking disk space available for buckets in directory: [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO - /opt/membase/1.6.1/data/ns_1 [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO - Free disk bucket space wanted: 1433600.0 [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO - Free disk bucket space available: 7786844160 [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO - Free disk space factor: 2.0 [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO - Ok. [2011-05-30 11:03:25,173] - [remote_util] [47264785109232] - INFO - [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO - Analysis complete. [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO - [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO - Copying /etc/opt/membase/1.6.1/ns_1/config.dat [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO - cp /etc/opt/membase/1.6.1/ns_1/config.dat /opt/membase/var/lib/membase/config/config.dat [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO - Ensuring bucket data directories. [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO - Ensuring bucket data directory: /opt/membase/1.6.1/data/ns_1/default-data [2011-05-30 11:03:25,174] - [remote_util] [47264785109232] - INFO - mkdir -p /opt/membase/1.6.1/data/ns_1/default-data [2011-05-30 11:03:25,175] - [remote_util] [47264785109232] - INFO - Ensuring dbdir owner/group: /opt/membase/1.6.1/data/ns_1 [2011-05-30 11:03:25,175] - [remote_util] [47264785109232] - INFO - chown -R membase:membase /opt/membase/1.6.1/data/ns_1 [2011-05-30 11:03:25,175] - [remote_util] [47264785109232] - INFO - Upgrading buckets. [2011-05-30 11:03:25,175] - [remote_util] [47264785109232] - INFO - Upgrading bucket: default [2011-05-30 11:03:25,176] - [remote_util] [47264785109232] - INFO - /opt/membase/bin/mbdbupgrade /opt/membase/1.6.1/data/ns_1/default /opt/membase/1.6.1/data/ns_1/default-data [2011-05-30 11:03:25,176] - [remote_util] [47264785109232] - INFO - mbdbupgrade pid: 14228 [2011-05-30 11:03:25,176] - [remote_util] [47264785109232] - INFO - mbdbupgrade err: 0 [2011-05-30 11:03:25,176] - [remote_util] [47264785109232] - INFO - Ensuring bucket owner/group: /opt/membase/1.6.1/data/ns_1/default-data [2011-05-30 11:03:25,176] - [remote_util] [47264785109232] - INFO - chown -R membase:membase /opt/membase/1.6.1/data/ns_1/default-data [2011-05-30 11:03:25,177] - [remote_util] [47264785109232] - INFO - [2011-05-30 11:03:25,177] - [remote_util] [47264785109232] - INFO - Done. [2011-05-30 11:03:25,177] - [remote_util] [47264785109232] - INFO - Starting Membase server[ OK ] [2011-05-30 11:03:25,177] - [remote_util] [47264785109232] - INFO - [2011-05-30 11:03:25,177] - [remote_util] [47264785109232] - INFO - You have successfully installed Membase Server. [2011-05-30 11:03:25,178] - [remote_util] [47264785109232] - INFO - Please browse to http://localhost.localdomain:8091/ to configure your server. [2011-05-30 11:03:25,178] - [remote_util] [47264785109232] - INFO - Please refer to http://couchbase.com for additional resources. [2011-05-30 11:03:25,178] - [remote_util] [47264785109232] - INFO - [2011-05-30 11:03:25,178] - [remote_util] [47264785109232] - INFO - Please note that you have to update your firewall configuration to [2011-05-30 11:03:25,178] - [remote_util] [47264785109232] - INFO - allow connections to the following ports: 11211, 11210, 4369, 8091 [2011-05-30 11:03:25,179] - [remote_util] [47264785109232] - INFO - and from 21100 to 21299. [2011-05-30 11:03:25,179] - [remote_util] [47264785109232] - INFO - [2011-05-30 11:03:25,179] - [remote_util] [47264785109232] - INFO - By using this software you agree to the End User License Agreement. [2011-05-30 11:03:25,179] - [remote_util] [47264785109232] - INFO - See /opt/membase/LICENSE.txt. [2011-05-30 11:03:25,179] - [remote_util] [47264785109232] - INFO - [2011-05-30 11:03:25,180] - [remote_util] [47264785109232] - INFO - Stopping Membase server [FAILED] [2011-05-30 11:03:25,285] - [rest_client] [47264785109232] - INFO - settings/web params : username=Ad
          Hide
          steve Steve Yen added a comment -

          Changing title here since the reasons for 1.6.4 upgrade failure here is different than 1.6.1 upgrade failure. Will create or find another bug to track 1.6.1 upgrade failure.

          Show
          steve Steve Yen added a comment - Changing title here since the reasons for 1.6.4 upgrade failure here is different than 1.6.1 upgrade failure. Will create or find another bug to track 1.6.1 upgrade failure.
          Hide
          steve Steve Yen added a comment -
          Show
          steve Steve Yen added a comment - MB-3921
          Hide
          farshid Farshid Ghods (Inactive) added a comment -

          Integrated in github-ep-engine #102 (See http://qa.hq.northscale.net/job/github-ep-engine/102/)
          MB-3921 - Run mbdbconvert when kv_VBUCKET tables are missing

          Steve Yen :
          Files :

          • management/mbdbupgrade
          Show
          farshid Farshid Ghods (Inactive) added a comment - Integrated in github-ep-engine #102 (See http://qa.hq.northscale.net/job/github-ep-engine/102/ ) MB-3921 - Run mbdbconvert when kv_VBUCKET tables are missing Steve Yen : Files : management/mbdbupgrade

            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