1

I have configured corosync cluster with few recources.

There is custom systemd service 'jira' and systemctl corectly returns its status.

QUESTION: How can I configure corosync to respect failed systemd service?

The crm status claims the resource is started even when service jira status sees it is inactive

I don't see anything useful in logs.

[email protected]~# crm status
Stack: corosync
Current DC: vjira1-testing (version 1.1.16-94ff4df) - partition with quorum
Last updated: Tue Dec  5 13:51:42 2017
Last change: Tue Dec  5 12:21:17 2017 by hacluster via crmd on vjira2-testing

2 nodes configured
5 resources configured

Online: [ vjira1-testing vjira2-testing ]

Full list of resources:

 Resource Group: group_jira
     fs_jira    (ocf::heartbeat:Filesystem):    Started vjira1-testing
     fs_attachments (ocf::heartbeat:Filesystem):    Started vjira1-testing
     service_jira   (systemd:jira): Started vjira1-testing
 Master/Slave Set: ms_drbd [drbd]
     Masters: [ vjira1-testing ]
     Slaves: [ vjira2-testing ]
[email protected]~# service jira status
● jira.service - Cluster Controlled jira
   Loaded: loaded (/etc/systemd/system/jira.service; static)
  Drop-In: /run/systemd/system/jira.service.d
           └─50-pacemaker.conf
   Active: failed (Result: exit-code) since Tue 2017-12-05 14:03:59 CET; 1s ago
  Process: 6340 ExecStop=/opt/atlassian/jira/bin/catalina.sh stop 40 (code=exited, status=1/FAILURE)
  Process: 6040 ExecStart=/opt/atlassian/jira/bin/catalina.sh start (code=exited, status=0/SUCCESS)
  Process: 5995 ExecStartPre=/opt/atlassian/jira/bin/catalina.sh configtest (code=exited, status=0/SUCCESS)
 Main PID: 6070 (code=killed, signal=KILL)

Dec 05 14:03:59 vjira1-testing catalina.sh[6340]: .8MMMMM:  :NMMMMN.
Dec 05 14:03:59 vjira1-testing catalina.sh[6340]: .MMMMMM.   .MMMMM~.
Dec 05 14:03:59 vjira1-testing catalina.sh[6340]: .MMMMMN    .MMMMM?.
Dec 05 14:03:59 vjira1-testing catalina.sh[6340]: Atlassian JIRA
Dec 05 14:03:59 vjira1-testing catalina.sh[6340]: Version : 7.2.1
Dec 05 14:03:59 vjira1-testing catalina.sh[6340]: If you encounter issues starting or ...de
Dec 05 14:03:59 vjira1-testing catalina.sh[6340]: Server startup logs are located in /...ut
Dec 05 14:03:59 vjira1-testing catalina.sh[6340]: PID file found but no matching proce...d.
Dec 05 14:03:59 vjira1-testing systemd[1]: jira.service: control process exited, code=...=1
Dec 05 14:03:59 vjira1-testing systemd[1]: Unit jira.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

Thank you.

4

2 Answers 2

1

The pacemaker resource couldn't get the current status of the service because I missed the monitor operation.

op monitor interval=20

Unfortunately I did not find useful documentation on it nor the systemd resource agent implementation. I would appreciate any links.

The working primitive configuration from crm configure show is:

 primitive service_jira systemd:jira \
    op start interval=0 timeout=60 \
    op stop interval=0 timeout=90 \
    op monitor interval=10 \
    meta target-role=Started
0

I have got a link from there you can correlate op monitor interval parameter to how to use it.

Else, there is one more way to get a short description how to use it, here is an example.

[root@cp2 ~]# crm
crm(live)# ra meta systemd:postfix
systemd unit file for postfix (systemd:postfix)

Postfix Mail Transport Agent

Operations' defaults (advisory minimum):

    start         timeout=100
    stop          timeout=100
    status        timeout=100
    monitor       timeout=100 interval=60
1
  • I consider systemd units and LSB scripts run from pacemaker more a work-around rather than a solution: Both lack metadata documentation and the ability to configure resource parameters (other than action timeouts and intervals).
    – U. Windl
    Feb 8, 2021 at 7:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .