• R/O
  • SSH

pm_logconv-hb: Commit

※リポジトリは、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


Commit MetaInfo

Revision6ef8abc62bd81cc012ee9c82377b5102ac66c3f6 (tree)
Time2013-05-22 18:14:32
AuthorYoshihiko SATO <satoyoshi@inte...>
CommiterYoshihiko SATO

Log Message

DC状態取得コマンドの常時実行を回避するため、内部ステータス確認処理を追加

Change Summary

Incremental Difference

diff -r cd2a2a90a18d -r 6ef8abc62bd8 pm_logconv.py
--- a/pm_logconv.py Wed May 22 18:00:38 2013 +0900
+++ b/pm_logconv.py Wed May 22 18:14:32 2013 +0900
@@ -1329,6 +1329,10 @@
13291329 self.last_reset_t = datetime.datetime.now()
13301330 pm_log.debug("check_dc_and_reset(): try to reset log convert status.")
13311331 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
13321336 ret = self.is_idle()
13331337 if ret == True:
13341338 self.funcs.clear_status()
@@ -2343,6 +2347,23 @@
23432347 cstat.attrDict = dict()
23442348 self.debug_status()
23452349
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+
23462367 ##########
23472368 # General-purpose functions.
23482369 ##########
Show on old repository browser