• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#windowsobjective-ccocoaqtpython誰得phprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

UltraMonkey-L7 V3(multi-thread implementation)


Commit MetaInfo

Revisiónecd02872c6f427f01cb27bf90d73fa4a1e2f429d (tree)
Tiempo2013-12-24 10:15:53
AutorMichiro Hibari <l05102@shib...>
CommiterMichiro Hibari

Log Message

Change of the output level of the log of the resource agents.

The resource agents of L7vsd and L7directord outputs error log
every time in probe,start.

Dec 20 15:44:19 LB01 L7directord(prmL7directord)[9900]: ERROR: [/usr/lib/ocf/resource.d//heartbeat/L7directord monitor] NG;return=7 l7direcotrd is not running.
Dec 20 15:44:19 LB01 L7vsd(prmL7vsd:0)[9913]: ERROR: [/usr/lib/ocf/resource.d//heartbeat/L7vsd monitor] NG;return=7 l7vsd is not running.
Dec 20 15:44:24 LB01 L7vsd(prmL7vsd:0)[9984]: ERROR: [/usr/lib/ocf/resource.d//heartbeat/L7vsd start] NG;return=7 l7vsd is not running.
Dec 20 15:44:34 LB01 L7directord(prmL7directord)[10963]: ERROR: [/usr/lib/ocf/resource.d//heartbeat/L7directord start] NG;return=7 l7direcotrd is not running.

When a resource does not start, the resource agent changes the level of the log and should output it.

Cambiar Resumen

Diferencia incremental

--- a/doc/heartbeat-ra/L7directord
+++ b/doc/heartbeat-ra/L7directord
@@ -145,6 +145,12 @@ l7directord_status(){
145145 # Get Resource Monitor Method
146146 ###############################
147147 l7directord_monitor() {
148+ local loglevel
149+ loglevel=${1:-err}
150+ if ocf_is_probe; then
151+ loglevel="info"
152+ fi
153+
148154 isRunning;
149155 RET=$?
150156 if [ $RET -eq 1 ]; then
@@ -158,7 +164,7 @@ l7directord_monitor() {
158164 fi
159165 elif [ $RET -eq 0 ]; then
160166 MSG="l7direcotrd is not running."
161- outputLog err ${OCF_NOT_RUNNING} ${MSG}
167+ outputLog $loglevel ${OCF_NOT_RUNNING} ${MSG}
162168 return ${OCF_NOT_RUNNING}
163169 fi
164170 MSG="l7direcotrd does not work. (ps=$RET) "
@@ -171,7 +177,7 @@ l7directord_monitor() {
171177 ###############################
172178 l7directord_start() {
173179 outputLog info "l7directord is starting ..."
174- l7directord_monitor
180+ l7directord_monitor info
175181 RET=$?
176182 if [ $RET -eq ${OCF_SUCCESS} ]; then
177183 MSG="l7directord is already running."
--- a/doc/heartbeat-ra/L7vsd
+++ b/doc/heartbeat-ra/L7vsd
@@ -67,7 +67,7 @@ END
6767 ###############################
6868 l7vsd_start() {
6969 ocf_log info "l7vsd is starting ..."
70- l7vsd_monitor
70+ l7vsd_monitor info
7171 RET=$?
7272 if [ $RET -eq $OCF_SUCCESS ]; then
7373 ocf_log info "l7vsd is already running."
@@ -182,6 +182,12 @@ l7vsd_status(){
182182 # Get Resource Monitor Method
183183 ###############################
184184 l7vsd_monitor() {
185+ local loglevel
186+ loglevel=${1:-err}
187+ if ocf_is_probe; then
188+ loglevel="info"
189+ fi
190+
185191 isRunning;
186192 RET=$?
187193 if [ $RET -eq 1 ]; then
@@ -195,7 +201,7 @@ l7vsd_monitor() {
195201 fi
196202 elif [ $RET -eq 0 ]; then
197203 MSG="l7vsd is not running."
198- outputLog err ${OCF_NOT_RUNNING} ${MSG}
204+ outputLog $loglevel ${OCF_NOT_RUNNING} ${MSG}
199205 return $OCF_NOT_RUNNING
200206 fi
201207 MSG="l7vsd does not work. (ps=$RET) "