Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-264

Post Upgrade "fails" in a cluster with no query nodes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • 2.6.0
    • 2.1.0
    • SyncGateway
    • Security Level: Public
    • None
    • CBG Sprint 19
    • 5

    Description

      Since 2.1, we obviously have to check for obsolete GSI indexes as well as views on _post_upgrade, but we return any error we get from trying this as a failure, e.g. :

      http POST :4985/_post_upgrade
      HTTP/1.1 500 Internal Server Error
      Content-Length: 85
      Content-Type: application/json
      Date: Mon, 11 Mar 2019 19:46:33 GMT
      Server: Couchbase Sync Gateway/2.1 branch/HEAD(nobranch) commit/a036bd8
       
      {
          "error": "Internal Server Error",
          "reason": "Internal error: No available N1QL nodes."
      }
      

      2019-03-11T19:46:33.577Z [INF] HTTP:  #002: POST /_post_upgrade (as ADMIN)
      2019-03-11T19:46:33.587Z [INF] HTTP: #002:     --> 500 Internal error: No available N1QL nodes.  (10.3 ms)
      

      It's worth noting though, that as we check ddocs first, they do get processed but this isn't reported as we only return the error.

      Maybe the nicest thing to do here would be to try return the failure wrapped in the overall object:

      		postUpgradeResults[name] = PostUpgradeDatabaseResult{
      			RemovedDDocs:   removedDDocs,
      			RemovedIndexes: removedIndexes,
      		}
      

      That does raise a slight question about what the status code should be if only one fails, but that's probably overthinking it a bit

      Attachments

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

        Activity

          People

            jacques.rascagneres Jacques Rascagneres
            James Flather James Flather (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty