[DOCS-1682] Show example on how to remove nodes using rs.reconfig() Created: 08/Jul/13  Updated: 13/Sep/13  Resolved: 12/Sep/13

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Thomas Rueckstiess Assignee: Bob Grabar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Participants:
Days since reply: 10 years, 22 weeks, 6 days ago

 Description   

In cases where rs.remove() is not available (through driver, or if nodes are down), we don't show any example on how to change the cfg document to remove nodes from the members array and then call rs.reconfig(cfg).

For example:

cfg = rs.conf()
cfg.members.splice(3,1)   // remove 3rd node 
rs.reconfig(cfg)

This is just normal javascript syntax and not specific to MongoDB, but it should be shown as an example somewhere, for example on the rs.reconfig() page. The example could be similar to the example given on the Change All Hostnames at the Same Time page.



 Comments   
Comment by auto [ 12/Sep/13 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1682: edits
Branch: master
https://github.com/mongodb/docs/commit/01b3e4344b93d8efdee810ef01808d5ed57d7759

Comment by auto [ 12/Sep/13 ]

Author:

{u'username': u'bgrabar', u'name': u'Bob Grabar', u'email': u'bob.grabar@10gen.com'}

Message: DOCS-1682 remove member from rs configuration

Signed-off-by: Sam Kleinman <samk@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/87014d46f19175820b749b765623df0e2896f83b

Generated at Thu Feb 08 07:41:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.