We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 402fa11 commit 4630bacCopy full SHA for 4630bac
test/high_availability/ha_tools.py
@@ -363,12 +363,19 @@ def kill_all_secondaries(sig=2):
363
def stepdown_primary():
364
primary = get_primary()
365
if primary:
366
+ if ha_tools_debug:
367
+ print 'stepping down primary:', primary
368
c = pymongo.MongoClient(primary, use_greenlets=use_greenlets)
369
# replSetStepDown causes mongod to close all connections
370
try:
371
c.admin.command('replSetStepDown', 20)
- except:
- pass
372
+ except Exception, e:
373
374
+ print 'Exception from replSetStepDown:', e
375
376
+ print '\tcalled replSetStepDown'
377
+ elif ha_tools_debug:
378
+ print 'stepdown_primary() found no primary'
379
380
381
def set_maintenance(member, value):
0 commit comments