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

moveprimary does not work when moving a db between replica set shards

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.7.2
    • Component/s: Replication, Sharding
    • Labels:
      None
    • Environment:
    • Operating System:
      ALL

      Description

      moveprimary works for individual server shards but not for replica set shards.

      To reproduce:
      1. Create one replica set, eg. 'repset1/127.0.0.1:30000,127.0.0.1:30001'
      2. Add data to 'test' db in above set.
      2. Create second replica set, eg 'repset2/127.0.0.1:30006,127.0.0.1:30007'
      3. Make them both shards in a sharding set up.
      4. mongosConn.getDB('admin').runCommand (

      {moveprimary: 'test', to: 'repset2/127.0.0.1:30006,127.0.0.1:30007'}

      )

      runCommand yields following error:

      { "ok" : 0, "errmsg" : "clone failed" }

      assert failed :

      { "ok" : 0, "errmsg" : "clone failed" }

      Error("Printing Stack Trace (lines are 0-based in spidermonkey)")@:0
      ()@shell/utils.js:20
      ("assert failed :

      { \"ok\" : 0, \"errmsg\" : \"clone failed\" }

      ")@shell/utils.js:31
      (0,"

      { \"ok\" : 0, \"errmsg\" : \"clone failed\" }

      ")@shell/utils.js:41
      moveDB([object Mongo],"test","repset2/127.0.0.1:30006,127.0.0.1:30007")@jstests/tony/infra.js:80
      @/Users/afsheenb/MongoDB/mongo/jstests/tony/ajh1.js:48
      Tue Aug 31 11:33:13 uncaught exception: assert failed :

      { "ok" : 0, "errmsg" : "clone failed" }

      failed to load: /Users/afsheenb/MongoDB/mongo/jstests/tony/ajh1.js

      mongos log:
      Tue Aug 31 11:33:13 [conn1] movePrimary: moving test primary from: repset1:repset1/127.0.0.1:30000,127.0.0.1:30001 to: repset2:repset2/127.0.0.1:30006,127.0.0.1:30007
      Tue Aug 31 11:33:13 [conn1] clone failed

      { errmsg: "couldn't connect to server repset1/127.0.0.1:30000,127.0.0.1:30001", ok: 0.0 }

        Attachments

          Activity

            People

            Assignee:
            tonyh Tony Hannan
            Reporter:
            tonyh Tony Hannan
            Participants:
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: