Changeset 1586
- Timestamp:
- 10/30/08 16:57:26 (2 months ago)
- Files:
-
- branches/0.4.7/shell/state/ddb.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.4.7/shell/state/ddb.py
r1584 r1586 38 38 39 39 from command import swrapper 40 import sys 40 41 41 42 # node masks … … 248 249 self.prefix = prefix 249 250 self.sync = {} 251 self.watch = 0 252 self.fail = 0 250 253 251 254 self.createNodeSet("root") … … 271 274 if self.sync[hostname] > 0: 272 275 self.log("debug","DB resync watchdog for host `%s` started with ttl `%s`" % (hostname,self.sync[hostname])) 273 Timer( 5,self._resync,(hostname,)).start()276 Timer(1,self._resync,(hostname,)).start() 274 277 else: 275 self.log("critical","DB resync watchdog: low watermark touch") 278 self.log("debug","DB resync watchdog: low watermark touch") 279 del self.sync[hostname] 280 self.fail += 1 281 if self.fail == self.watch: 282 self.log("critical","No CX instance responded for DB resync, exiting") 283 self.bus.put("dispatcher2","shutdown") 284 else: 285 self.log("debug","DB resync: failed %i instances from %s" % (self.fail, self.watch)) 286 x = ACoreService(self.bus, self.bus.address) 287 x.nop() 276 288 else: 277 289 self.log("debug","DB resync watchdog for host `%s` terminated" % (hostname)) … … 284 296 if not ring: 285 297 self.log("critical","There are no hostnames (even local hostname) in the ring at DB resync, please check firewall for UDP traffic") 298 self.watch = len(ring) 286 299 for i in ring: 287 self.sync[i] = 20300 self.sync[i] = 5 288 301 self._resync(i) 289 302 yield None
