My Favorites

Close

Please to see your favorites.

  • Bookmark
  • Email Document
  • Printer Friendly
  • Favorite
  • Rating:

How to enable cluster resource tracing.

This document (7022678) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise High Availability Extension 12
SUSE Linux Enterprise High Availability Extension 11 Service Pack 4
SUSE Linux Enterprise High Availability Extension 11 Service Pack 3

Situation

When you need to understand why a resource is failing, you can enable resource tracing which will provide some debug output files.  Often the OCF return codes are not enough to fully understand the failure.   Enabling resource tracing on the failing operation is often useful and provides debug output from the resource agent script.

Resolution

Enable resource tracing:
crm resource trace <resource name> <operation>
              <resource name> - any defined primitive in the cluster
              <operation>  - start, stop, monitor, probe
Disable resource tracing: 
crm resource untrace <resource name><operation>

Debug trace file location:
     /var/lib/heartbeat/trace_ra/<resource>/*timestamp

 Notes:  
  • If no <operation> is given, it will attempt to trace all operations for the provided resource.
  • If tracing the monitor operation,  number of trace files can grow quickly and should be monitored and cleaned up appropriately and periodically if tracing for extended periods. 
  • Adds the attribute "trace_ra=1" to the operation in the primitive definition.
    Example:   op monitor enabled="true" interval="20" timeout="45" trace_ra="1"
  • crm resource tracing does not work for Stonith resources.  Stonith resources scripts are located in the following directory "/usr/lib64/stonith/plugins/external/" and various methods can be used to debug these various types of scripts (bash, perl, python).  For bash scripts you can modify the script and use "set -x" to enable logging of every command executed and will be logged to SYSLOG and "set +x" to disable logging.
  • Enabling resource trace will trigger resource restart. Pacemaker will stop and start the resource in order to activate tracing. Same apply to untrace command. 

Additional Information

OCF return codes
Additional info:  crm resource help trace
Location of resource scripts:   /usr/lib/ocfs/resource.d/*

Disclaimer

This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7022678
  • Creation Date:22-FEB-18
  • Modified Date:01-OCT-19
    • SUSESUSE Linux Enterprise High Availability Extension
< Back to Support Search

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center