※リポジトリは、https://github.com/linux-ha-japan/pm_logconv-hb-1.0 へ移行しました。
Pacemaker 対応ログメッセージ変換機能。
Heartbeat-2.1.4 用 hb-logconv(*) のPacemaker1.0 + Heartbeat スタック対応版。
(*) http://sourceforge.jp/projects/linux-ha/releases/?package_id=10282
Revision | 6ef8abc62bd81cc012ee9c82377b5102ac66c3f6 (tree) |
---|---|
Time | 2013-05-22 18:14:32 |
Author | Yoshihiko SATO <satoyoshi@inte...> |
Commiter | Yoshihiko SATO |
DC状態取得コマンドの常時実行を回避するため、内部ステータス確認処理を追加
@@ -1329,6 +1329,10 @@ | ||
1329 | 1329 | self.last_reset_t = datetime.datetime.now() |
1330 | 1330 | pm_log.debug("check_dc_and_reset(): try to reset log convert status.") |
1331 | 1331 | self.funcs.debug_status() |
1332 | + if self.funcs.is_init_status() == True: | |
1333 | + pm_log.debug("check_dc_and_reset(): log convert status is initial value. " + | |
1334 | + "Avoid to reset log convert status.") | |
1335 | + return | |
1332 | 1336 | ret = self.is_idle() |
1333 | 1337 | if ret == True: |
1334 | 1338 | self.funcs.clear_status() |
@@ -2343,6 +2347,23 @@ | ||
2343 | 2347 | cstat.attrDict = dict() |
2344 | 2348 | self.debug_status() |
2345 | 2349 | |
2350 | + ''' | |
2351 | + Check ConvertStatus(exclude ino and offset) is initial value or not. | |
2352 | + return : True -> initial value | |
2353 | + False -> not initial value | |
2354 | + ''' | |
2355 | + def is_init_status(self): | |
2356 | + if \ | |
2357 | + cstat.FAILURE_OCCURRED == False and \ | |
2358 | + cstat.IN_CALC == False and \ | |
2359 | + cstat.ACTRSC_MOVE == False and \ | |
2360 | + cstat.IN_FO_PROCESS == False and \ | |
2361 | + len(cstat.timedoutRscopSet) == 0 and \ | |
2362 | + len(cstat.attrDict) == 0 and \ | |
2363 | + len(cstat.nodeDict) == 0: | |
2364 | + return True | |
2365 | + return False | |
2366 | + | |
2346 | 2367 | ########## |
2347 | 2368 | # General-purpose functions. |
2348 | 2369 | ########## |