If I define multiple replica set servers in mongo connections settings mdbc will choke and die trying to connect to "192.168.0.1,192.168.0.2" if replica set option is enabled drush should figure out which is primary and connect to that one by default and also allow option for user to connect to any of the secondaries.

Files: 
CommentFileSizeAuthor
#2 mdbc_replica-1823478-2.patch3.5 KBRok Žlender
Test request sent.
[ View ]
#1 mdbc_replica-1823478-1.patch2.82 KBRok Žlender
Test request sent.
[ View ]

Comments

Rok Žlender’s picture

Status:Active» Needs review
StatusFileSize
new2.82 KB
Test request sent.
[ View ]

Patch supports running drush command on replica set configuration options.

Rok Žlender’s picture

StatusFileSize
new3.5 KB
Test request sent.
[ View ]

Revisited patch created new constant for primary member status value and added a msg to users when connecting to secondary how to send queries against it.

fgm’s picture

Issue summary:View changes
Status:Needs review» Needs work

Patch no longer applies, so setting CNW. This is not just a matter of rerolling : the connection process changed in 3 years.

At this point, drush mdbc does not even work on a standalone host.

  • fgm committed 474ddf8 on 7.x-1.x
    Issue #1823478: first step of fix: fixed drush commands no longer...
fgm’s picture

The commit above restores mdbc and the other drush operations on single hosts : the patch is still needed for replicasets.

fgm’s picture

The connection string issue with authenticated users had another partial patch on #1930822: drush mongo shell host scheme error, probably good to merge with this one.