Skip to content

Commit 686f0ed

Browse files
author
Tim Vaillancourt
committed
logging when we're dealing with a config svr
1 parent d78c7a2 commit 686f0ed

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

MongoBackup/Replset.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ def find_secondary(self, force=False, quiet=False):
117117
else:
118118
log_msg = "Found SECONDARY %s/%s with too-high replication lag! Skipping" % (rs_name, member['name'])
119119

120+
if 'configsvr' in rs_status and rs_status['configsvr']:
121+
log_data['configsvr'] = True
122+
120123
log_data['lag'] = rep_lag
121124
log_data['optime'] = optime_ts
122125
log_data['score'] = int(score)
@@ -128,10 +131,6 @@ def find_secondary(self, force=False, quiet=False):
128131
secondary_count,
129132
quorum_count
130133
))
131-
132-
import pprint
133-
pprint.pprint(rs_status)
134-
135134
raise Exception, "Not enough secondaries in replset %s to safely take backup!" % rs_name, None
136135

137136
logging.info("Choosing SECONDARY %s for replica set %s (score: %i)" % (self.secondary['host'], rs_name, self.secondary['score']))

0 commit comments

Comments
 (0)