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

set_db_and_ix_paths and ns_server:restart are raceful which may cause couch_db to fail to start

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: ns_server
    • Security Level: Public
    • Labels:
      None
    • Environment:
      build 1888

      Description

      Installing couchbase on a node after uninstalling previous installation with non-default data path gives error "Got no response from save request"
      Screenshot attached.

      Steps to reproduce:

      On a CentOS VM:
      1. rm -Rf /opt/couchbase/*
      2. rm -Rf /data/*
      3. sudo rpm -i couchbase-server-community_x86_64_2.0.0-beta.rpm
      4. Setup the cluster with data/index path set to /data and create default bucket
      5. Create a couple of documents
      6. sudo rpm -e couchbase-server-2.0.0-1723
      7. sudo rpm -i couchbase-server-community_x86_64_2.0.0-1888-rel.rpm
      8. Setting up the cluster again with data/index path set to /data gives error and couchdb fails to initialize with below crash report

      =========================CRASH REPORT=========================
      crasher:
      initial call: couch_db:init/1
      pid: <0.5333.0>
      registered_name: []
      exception exit: {function_clause,
      [{couch_server,'terminate/2-fun-0',
      [

      {<<"_replicator">>,<0.693.0>}

      ]},

      {lists,foreach,2}

      ,

      {gen_server,terminate,6}

      ,

      {proc_lib,init_p_do_apply,3}

      ]}
      in function gen_server:terminate/6
      ancestors: [couch_server,couch_primary_services,couch_server_sup,
      cb_couch_sup,ns_server_cluster_sup,<0.58.0>]
      messages: []
      links: []
      dictionary: []
      trap_exit: true
      status: running
      heap_size: 610
      stack_size: 24
      reductions: 376
      neighbours:

      Diagnostics attached.

      1. collect_info.gz
        814 kB
        Deepkaran Salooja
      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        deepkaran.salooja Deepkaran Salooja created issue -
        Hide
        steve Steve Yen added a comment -

        first guess assignment on this one

        Show
        steve Steve Yen added a comment - first guess assignment on this one
        steve Steve Yen made changes -
        Field Original Value New Value
        Assignee Aleksey Kondratenko [ alkondratenko ]
        Aliaksey Artamonau Aliaksey Artamonau made changes -
        Assignee Aleksey Kondratenko [ alkondratenko ] Aliaksey Artamonau [ aliaksey artamonau ]
        Hide
        farshid Farshid Ghods (Inactive) added a comment -


        we dont support offline or online upgrade of 2.0 beta to 2.0 server.

        Show
        farshid Farshid Ghods (Inactive) added a comment - we dont support offline or online upgrade of 2.0 beta to 2.0 server.
        farshid Farshid Ghods (Inactive) made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        Hide
        steve Steve Yen added a comment -

        It seems the user's missing step 6.5 – rm -rf /opt/couchbase/*

        Show
        steve Steve Yen added a comment - It seems the user's missing step 6.5 – rm -rf /opt/couchbase/*
        farshid Farshid Ghods (Inactive) made changes -
        Summary Installing couchbase on a node after uninstalling previous installation with non-default data path gives error offline or online upgrade from 2.0 beta installation to 2.0 is not supported
        Labels 2.0-release-notes
        Hide
        Aliaksey Artamonau Aliaksey Artamonau added a comment -

        As far as I can tell from the logs it has nothing to do with upgrade. It's a genuine race condition that can happen whenever database and index paths are set up.

        Show
        Aliaksey Artamonau Aliaksey Artamonau added a comment - As far as I can tell from the logs it has nothing to do with upgrade. It's a genuine race condition that can happen whenever database and index paths are set up.
        Aliaksey Artamonau Aliaksey Artamonau made changes -
        Resolution Won't Fix [ 2 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Aliaksey Artamonau Aliaksey Artamonau made changes -
        Summary offline or online upgrade from 2.0 beta installation to 2.0 is not supported set_db_and_ix_paths and ns_server:restart are raceful which may cause couch_db to fail to start
        Component/s ns_server [ 10019 ]
        Component/s installer [ 10221 ]
        Aliaksey Artamonau Aliaksey Artamonau made changes -
        Labels 2.0-release-notes
        Aliaksey Artamonau Aliaksey Artamonau made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        thuan Thuan Nguyen added a comment -

        Integrated in github-couchdb-preview #526 (See http://qa.hq.northscale.net/job/github-couchdb-preview/526/)
        MB-6995 Don't restart couch_

        {server,set_view}

        on dir changes. (Revision 18bce935e8cf0d31316495b5462ed9429801a84e)
        MB-6995 Stop related apps when couchdb application is stopped. (Revision a5a033c9edc81ed7a1acfd3c0d05745215973dca)

        Result = SUCCESS
        Farshid Ghods :
        Files :

        • src/couch_set_view/src/couch_set_view.erl
        • src/couchdb/couch_server.erl
        • src/couchdb/couch_view.erl

        Farshid Ghods :
        Files :

        • src/couchdb/couch_app.erl
        Show
        thuan Thuan Nguyen added a comment - Integrated in github-couchdb-preview #526 (See http://qa.hq.northscale.net/job/github-couchdb-preview/526/ ) MB-6995 Don't restart couch_ {server,set_view} on dir changes. (Revision 18bce935e8cf0d31316495b5462ed9429801a84e) MB-6995 Stop related apps when couchdb application is stopped. (Revision a5a033c9edc81ed7a1acfd3c0d05745215973dca) Result = SUCCESS Farshid Ghods : Files : src/couch_set_view/src/couch_set_view.erl src/couchdb/couch_server.erl src/couchdb/couch_view.erl Farshid Ghods : Files : src/couchdb/couch_app.erl
        Hide
        deepkaran.salooja Deepkaran Salooja added a comment -

        Verified with build 1901

        Show
        deepkaran.salooja Deepkaran Salooja added a comment - Verified with build 1901
        deepkaran.salooja Deepkaran Salooja made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        kzeller kzeller added a comment -

        Added to RN as:

        In the past if you set the disk path for data to be the same path as that for index files,
        Couchbase Server would fail to start. This is fixed.

        Show
        kzeller kzeller added a comment - Added to RN as: In the past if you set the disk path for data to be the same path as that for index files, Couchbase Server would fail to start. This is fixed.
        maria Maria McDuff (Inactive) made changes -
        Affects Version/s 2.0 [ 10114 ]
        Affects Version/s recent-builds-2.0 [ 10349 ]

          People

          • Assignee:
            Aliaksey Artamonau Aliaksey Artamonau
            Reporter:
            deepkaran.salooja Deepkaran Salooja
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes