Uploaded image for project: 'Percona Backup for MongoDB'
  1. Percona Backup for MongoDB
  2. PBM-978

PSMDB can't be started after physical restore if there is a hidden node in RS

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • None
    • 2.0.1
    • None
    • None
    • Yes

    Description

      Hi,
      PSMDB: 5.0.11
      PBM: built from main

      STR:
      1) configure rs with hidden node, status before restore

      {
      	"_id" : "rs1",
      	"version" : 1,
      	"term" : 1,
      	"members" : [
      		{
      			"_id" : 1,
      			"host" : "192.168.4.55:27017",
      			"arbiterOnly" : false,
      			"buildIndexes" : true,
      			"hidden" : false,
      			"priority" : 1,
      			"tags" : {
      				
      			},
      			"secondaryDelaySecs" : NumberLong(0),
      			"votes" : 1
      		},
      		{
      			"_id" : 2,
      			"host" : "192.168.4.55:27018",
      			"arbiterOnly" : false,
      			"buildIndexes" : true,
      			"hidden" : false,
      			"priority" : 1,
      			"tags" : {
      				
      			},
      			"secondaryDelaySecs" : NumberLong(0),
      			"votes" : 1
      		},
      		{
      			"_id" : 3,
      			"host" : "192.168.4.55:27019",
      			"arbiterOnly" : false,
      			"buildIndexes" : true,
      			"hidden" : true,
      			"priority" : 0,
      			"tags" : {
      				
      			},
      			"secondaryDelaySecs" : NumberLong(0),
      			"votes" : 1
      		}
      	],
      ....................
      }
      

      2) restore physical backup

      pbm describe-restore 2022-09-30T14:26:18.957457518Z -c pbm_config.yaml 
      name: "2022-09-30T14:26:18.957457518Z"
      opid: 6336fc8abb6455741054b984
      backup: "2022-09-30T13:54:50Z"
      type: physical
      status: done
      last_transition_time: "2022-09-30T14:28:10Z"
      replsets:
      - name: rs1
        status: done
        last_transition_time: "2022-09-30T14:28:04Z"
        nodes:
        - name: 192.168.4.55:27017
          status: done
          last_transition_time: "2022-09-30T14:27:42Z"
        - name: 192.168.4.55:27018
          status: done
          last_transition_time: "2022-09-30T14:27:57Z"
        - name: 192.168.4.55:27019
          status: done
          last_transition_time: "2022-09-30T14:27:33Z"
      

      3) start PSMDB

      Actual result: PSMDB fails with error

      {"t":{"$date":"2022-09-30T14:29:40.739+00:00"},"s":"F",  "c":"REPL",     "id":28545,   "ctx":"initandlisten","msg":"Locally stored replica set configuration does not parse; See http://www.mongodb.org/dochub/core/recover-replica-set-from-invalid-config for information on how to recover from this","attr":{"error":{"code":2,"codeName":"BadValue","errmsg":"member: { _id: 3, host: \"192.168.4.55:27019\", buildIndexes: true, hidden: true, slaveDelay: 0, secondaryDelaySecs: 0 } :: caused by :: priority must be 0 when hidden=true"},"config":{"_id":"rs1","version":1,"members":[{"_id":1,"host":"192.168.4.55:27017","buildIndexes":true,"priority":1,"slaveDelay":0,"secondaryDelaySecs":0},{"_id":2,"host":"192.168.4.55:27018","buildIndexes":true,"priority":1,"slaveDelay":0,"secondaryDelaySecs":0},{"_id":3,"host":"192.168.4.55:27019","buildIndexes":true,"hidden":true,"slaveDelay":0,"secondaryDelaySecs":0}],"settings":{"chainingAllowed":true,"heartbeatIntervalMillis":2000,"heartbeatTimeoutSecs":10,"electionTimeoutMillis":10000,"catchUpTimeoutMillis":-1}}}}
      {"t":{"$date":"2022-09-30T14:29:40.739+00:00"},"s":"F",  "c":"-",        "id":23091,   "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":28545,"file":"src/mongo/db/repl/replication_coordinator_impl.cpp","line":509}}
      {"t":{"$date":"2022-09-30T14:29:40.739+00:00"},"s":"F",  "c":"-",        "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}
      

      Attachments

        Activity

          People

            andrew.pogrebnoi Andrew Pogrebnoi
            sandra.romanchenko Sandra Romanchenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Smart Checklist