Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-21537

chainingAllowed = false not being enforced after rs.stepDown()

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 3.0.6, 3.0.7
    • Fix Version/s: Backlog
    • Component/s: Replication
    • Labels:
    • Operating System:
      ALL
    • Backport Requested:
      v3.4, v3.2
    • Steps To Reproduce:
      Hide

      Setup a RS
      Reconfigure it to disallow Replication chaining.

      cfg = rs.config()
      cfg.settings.chainingAllowed = false
      rs.reconfig(cfg)
      

      Step down the primary.
      The RS is chaining again.

      The issue can be reproduce also if the RS is started having the chainingAllowed parameter = false. The initial configuration is ok, after the StepDown the cluster is chained.

      Show
      Setup a RS Reconfigure it to disallow Replication chaining. cfg = rs.config() cfg.settings.chainingAllowed = false rs.reconfig(cfg) Step down the primary. The RS is chaining again. The issue can be reproduce also if the RS is started having the chainingAllowed parameter = false. The initial configuration is ok, after the StepDown the cluster is chained.
    • Sprint:
      Repl E (01/08/16), Repl F (01/29/16), Repl 10 (02/19/16), Repl 11 (03/11/16), Repl 12 (04/01/16), Repl 18 (08/05/16), Repl 2016-08-29

      Description

      The parameter chainingAllowed = false is not enforced after a rs.stepDown() command.

      The secondaries are chained with the old primary connecting to the new primary directly but the other secondary syncing from the old primary.

      Before stepDown()

      abc:PRIMARY> rs.status()
      {
      	"set" : "abc",
      	"date" : ISODate("2015-11-18T21:30:38.767Z"),
      	"myState" : 1,
      	"members" : [
      		{
      			"_id" : 0,
      			"name" : "Rubens-MacBook-Pro.local:27117",
      			"health" : 1,
      			"state" : 1,
      			"stateStr" : "PRIMARY",
      			"uptime" : 45,
      			"optime" : Timestamp(1447881863, 1),
      			"optimeDate" : ISODate("2015-11-18T21:24:23Z"),
      			"electionTime" : Timestamp(1447882202, 1),
      			"electionDate" : ISODate("2015-11-18T21:30:02Z"),
      			"configVersion" : 4,
      			"self" : true
      		},
      		{
      			"_id" : 1,
      			"name" : "Rubens-MacBook-Pro.local:27118",
      			"health" : 1,
      			"state" : 2,
      			"stateStr" : "SECONDARY",
      			"uptime" : 36,
      			"optime" : Timestamp(1447881863, 1),
      			"optimeDate" : ISODate("2015-11-18T21:24:23Z"),
      			"lastHeartbeat" : ISODate("2015-11-18T21:30:38.370Z"),
      			"lastHeartbeatRecv" : ISODate("2015-11-18T21:30:38.282Z"),
      			"pingMs" : 0,
      			"syncingTo" : "Rubens-MacBook-Pro.local:27117",
      			"configVersion" : 4
      		},
      		{
      			"_id" : 2,
      			"name" : "Rubens-MacBook-Pro.local:27119",
      			"health" : 1,
      			"state" : 2,
      			"stateStr" : "SECONDARY",
      			"uptime" : 32,
      			"optime" : Timestamp(1447881863, 1),
      			"optimeDate" : ISODate("2015-11-18T21:24:23Z"),
      			"lastHeartbeat" : ISODate("2015-11-18T21:30:38.724Z"),
      			"lastHeartbeatRecv" : ISODate("2015-11-18T21:30:38.685Z"),
      			"pingMs" : 8,
      			"syncingTo" : "Rubens-MacBook-Pro.local:27117",
      			"configVersion" : 4
      		}
      	],
      	"ok" : 1
      }
      

      After stepDown()

      abc:SECONDARY> rs.status()
      {
      	"set" : "abc",
      	"date" : ISODate("2015-11-18T21:30:51.041Z"),
      	"myState" : 2,
      	"syncingTo" : "Rubens-MacBook-Pro.local:27119",
      	"members" : [
      		{
      			"_id" : 0,
      			"name" : "Rubens-MacBook-Pro.local:27117",
      			"health" : 1,
      			"state" : 2,
      			"stateStr" : "SECONDARY",
      			"uptime" : 58,
      			"optime" : Timestamp(1447881863, 1),
      			"optimeDate" : ISODate("2015-11-18T21:24:23Z"),
      			"syncingTo" : "Rubens-MacBook-Pro.local:27119",
      			"configVersion" : 4,
      			"self" : true
      		},
      		{
      			"_id" : 1,
      			"name" : "Rubens-MacBook-Pro.local:27118",
      			"health" : 1,
      			"state" : 2,
      			"stateStr" : "SECONDARY",
      			"uptime" : 48,
      			"optime" : Timestamp(1447881863, 1),
      			"optimeDate" : ISODate("2015-11-18T21:24:23Z"),
      			"lastHeartbeat" : ISODate("2015-11-18T21:30:50.383Z"),
      			"lastHeartbeatRecv" : ISODate("2015-11-18T21:30:50.302Z"),
      			"pingMs" : 0,
      			"syncingTo" : "Rubens-MacBook-Pro.local:27117",
      			"configVersion" : 4
      		},
      		{
      			"_id" : 2,
      			"name" : "Rubens-MacBook-Pro.local:27119",
      			"health" : 1,
      			"state" : 1,
      			"stateStr" : "PRIMARY",
      			"uptime" : 44,
      			"optime" : Timestamp(1447881863, 1),
      			"optimeDate" : ISODate("2015-11-18T21:24:23Z"),
      			"lastHeartbeat" : ISODate("2015-11-18T21:30:50.744Z"),
      			"lastHeartbeatRecv" : ISODate("2015-11-18T21:30:50.700Z"),
      			"pingMs" : 1,
      			"electionTime" : Timestamp(1447882246, 1),
      			"electionDate" : ISODate("2015-11-18T21:30:46Z"),
      			"configVersion" : 4
      		}
      	],
      	"ok" : 1
      }
      

      This issue can't be reproduced on 3.2.0-rc2

        Attachments

        1. rs1.log
          175 kB
        2. rs2.log
          27 kB
        3. rs3.log
          25 kB

          Issue Links

            Activity

              People

              • Votes:
                4 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated: