Author Topic: Debuging resource Failures in Pacemaker heartbeat howto  (Read 5250 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Debuging resource Failures in Pacemaker heartbeat howto
« on: มีนาคม 28, 2013, 01:56:10 PM »
Debuggin resource Failures in Pacemaker heartbeat howto

วันนี้มีโอกาสได้ลอง การ debug ของ pacemaker ดังนี้ครับ
ถ้าเจอปัญหา pacemaker ไม่สามารถทำงานได้ใน resource ใดตัวหนึ่ง เช่น apache บน heartbeat ปกติแล้วเรามีวิธีการ แก้ปัญหาได้คือ

Unmanage the resource, so Pacemaker won't try to do anything with it:
#crm resource unmanage <RESOURCE>
เช่น
#crm resource unmanage RG_www

# export OCF_ROOT=/usr/lib/ocf
# export OCF_RESKEY_<param>=<value>
# ... (likewise for all other resource parameters, run
       "crm configure show <RESOURCE>" to verify what
       params you need to set here)

เริ่มทำการ debug ได้เลยครับ
#/usr/lib/ocf/resource.d/heartbeat/apache start ; echo $?

ถ้าไม่ชัดให้เปิด debug output ออกมาเลย
# /usr/lib/ocf/resource.d/heartbeat/apache stop
# sh -x /usr/lib/ocf/resource.d/heartbeat/apache start ; echo $?

Once you've figured out what the problem is and solved it, give the resource back to Pacemaker:
ถ้าเสร็จแล้วก็ทำการ manage resource ได้เหมือนเดิมครับ
# crm resource manage <RESOURCE>
ในที่นี้ resource ผมคือ RG_WWW
# crm resource manage RG_WWW


##Special thank to
http://clusterlabs.org/wiki/Debugging_Resource_Failures
« Last Edit: มีนาคม 28, 2013, 02:00:05 PM by golfreeze »