Bug 1389943

Summary: [RFE][cli] Add ticket details to pcs status --full as provided by crm_ticket -L
Product: Red Hat Enterprise Linux 7 Reporter: Radek Steiger <rsteiger>
Component: pcsAssignee: Ondrej Mular <omular>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: low    
Version: 7.4CC: cfeist, cluster-maint, idevat, omular, royoung, tojeline
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.9.162-1.el7 Doc Type: Bug Fix
Doc Text:
Cause: User wants to display tickets status in the cluster. Consequence: The was no way of displaying tickets status in pcs. Fix: Add tickets status into 'pcs status --full' command. Result: Tickets status is now included in the output of 'pcs status --full' command.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 15:37:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Radek Steiger 2016-10-29 18:31:54 UTC
The crm_ticket tool provides status details on all tickets ever granted within the cluster's run time. Such information is a good candidate on adding into the full status output:

# crm_ticket -l
Ticket1	revoked           last-granted='Wed Oct 19 12:39:38 2016'
MyTicket	granted [standby] last-granted='Sat Oct 29 20:18:42 2016'

# crm_ticket -L
Ticket1	revoked           (granted=false, last-granted='Wed Oct 19 12:39:38 2016', owner=740081096, expires='Thu Oct 27 23:47:40 2016', term=10)
MyTicket	granted [standby] (granted=true, standby=true, last-granted='Sat Oct 29 20:18:42 2016', owner=1858850978, expires='Sat Oct 29 20:22:43 2016', term=21)

Comment 4 Ondrej Mular 2017-11-16 07:01:24 UTC
After fix:
[root@rhel75-node1pcs]# rpm -q pcs
pcs-0.9.162-1.el7.x86_64

> check that no ticket is specified
[root@rhel75-node1 ~]# pcs status --full
Cluster name: rhel75-cluster
Stack: corosync
Current DC: rhel75-node2 (2) (version 1.1.18-5.el7-1a4ef7d180) - partition with quorum
Last updated: Wed Nov 15 13:22:40 2017
Last change: Wed Nov 15 13:22:26 2017 by root via cibadmin on rhel75-node1

2 nodes configured
1 resource configured

Online: [ rhel75-node1 (1) rhel75-node2 (2) ]

Full list of resources:

 fencing	(stonith:fence_xvm):	Started rhel75-node1

Node Attributes:
* Node rhel75-node1 (1):
* Node rhel75-node2 (2):

Migration Summary:
* Node rhel75-node2 (2):
* Node rhel75-node1 (1):

PCSD Status:
  rhel75-node1: Online
  rhel75-node2: Online

Daemon Status:
  corosync: active/disabled
  pacemaker: active/disabled
  pcsd: active/disabled


> grant tickets ticketA and ticketB
[root@rhel75-node1 ~]# crm_ticket --ticket ticketA --grant --force; echo $?
0
[root@rhel75-node2 ~]# crm_ticket --ticket ticketB --grant --force; echo $?
0


> status includes information about ticket
[root@rhel75-node1 ~]# pcs status --full
Cluster name: rhel75-cluster
Stack: corosync
Current DC: rhel75-node2 (2) (version 1.1.18-5.el7-1a4ef7d180) - partition with quorum
Last updated: Wed Nov 15 13:28:00 2017
Last change: Wed Nov 15 13:22:26 2017 by root via cibadmin on rhel75-node1

2 nodes configured
1 resource configured

Online: [ rhel75-node1 (1) rhel75-node2 (2) ]

Full list of resources:

 fencing	(stonith:fence_xvm):	Started rhel75-node1

Node Attributes:
* Node rhel75-node1 (1):
* Node rhel75-node2 (2):

Migration Summary:
* Node rhel75-node2 (2):
* Node rhel75-node1 (1):

Tickets:
  ticketA	granted           (granted=true, last-granted='Wed Nov 15 13:23:36 2017')
  ticketB	granted           (granted=true, last-granted='Wed Nov 15 13:27:58 2017')

PCSD Status:
  rhel75-node1: Online
  rhel75-node2: Online

Daemon Status:
  corosync: active/disabled
  pacemaker: active/disabled
  pcsd: active/disabled

Comment 10 errata-xmlrpc 2018-04-10 15:37:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0866