RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1174793 - Formatting of longdesc metadata of resource agent is destroyed when using "pcs resource describe"
Summary: Formatting of longdesc metadata of resource agent is destroyed when using "pc...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pcs
Version: 6.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 6.7
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-16 13:54 UTC by Frank Danapfel
Modified: 2015-07-22 06:15 UTC (History)
4 users (show)

Fixed In Version: pcs-0.9.139-1.el6
Doc Type: Bug Fix
Doc Text:
* The "pcs resource describe" command displayed the resource agent description on one line, which made it difficult to read. Now, pcs displays the description as it is defined in the agent. (BZ#1174793)
Clone Of:
: 1206214 (view as bug list)
Environment:
Last Closed: 2015-07-22 06:15:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix (5.08 KB, patch)
2015-01-08 13:16 UTC, Tomas Jelinek
no flags Details | Diff
proposed fix - test (4.56 KB, patch)
2015-01-08 15:09 UTC, Tomas Jelinek
no flags Details | Diff
proposed fix - backward compatibility in gui (2.21 KB, patch)
2015-01-30 08:34 UTC, Tomas Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1446 0 normal SHIPPED_LIVE pcs bug fix and enhancement update 2015-07-20 18:43:57 UTC

Description Frank Danapfel 2014-12-16 13:54:49 UTC
Description of problem:
When using "pcs resource describe" to display the description and parameters of a resource agent the formatting of the description is destroyed, and all the test is displayed as a single line.

Version-Release number of selected component (if applicable):
pcs-0.9.123-9.el6

How reproducible:
always

Steps to Reproduce:
1. pcs resource describe
2.
3.

Actual results:
[root]# pcs resource describe SAPHana
ocf:heartbeat:SAPHana - Manages two SAP HANA instances in system replication (SR).

 The SAPHanaSR resource agent manages two SAP Hana instances (databases) which are configured in system replication. This first version is limitted to the scale-up scenario. Scale-Up is not
 supported in this version. Managing the two SAP HANA instances means that the resource agent controls the start/stop of the instances. In addition the resource agent is able to monitor the SAP
 HANA databases to check their availability on landscape host configuration level. For this monitoring the resource agent relies on interfaces provided by SAP. A third task of the resource agent is
 to also check the synchronisation status of the two SAP HANA databases. If the synchronisation is not "SOK", than the cluster avoids to failover to the secondary side, if the primary fails. This
 is to improve the data consistency. The resource agent uses the following four interfaces provided by SAP: 1. sapcontrol/sapstartsrv The interface sapcontrol/sapstartsrv is used to start/stop a
 HANA database instance/system 2. landscapeHostConfiguration The interface is used to monitor a HANA system. The python script is named landscapeHostConfiguration.py. landscapeHostConfiguration.py
 has some detailed output about HANA system status and node roles. For our monitor the overall status is relevant. This overall status is reported by the returncode of the script: 0: Internal
 Fatal, 1: ERROR, 2: WARNING, 3: INFO, 4: OK The SAPHana resource agent will interpret returncodes 0 as FATAL, 1 as not-running or ERROR and and returncodes 2+3+4 as RUNNING. 3. hdbnsutil The
 interface hdbnsutil is used to check the "topology" of the system replication as well as the current configuration (primary/secondary) of a SAP HANA database instance. A second task of the
 interface is the posibility to run a system replication takeover (sr_takeover) or to register a former primary to a newer one (sr_register). 4. hdbsql / systemReplicationStatus Interface is SQL
 query into HANA (system replication table). The hdbsql query will be replaced by a python script "systemReplicationStatus.py" in SAP HANA SPS8 or 9. As long as we need to use hdbsql you need to
 setup secure store users for linux user root to be able to access the SAP HANA database. You need to configure a secure store user key "SAPHANASR" which can connect the SAP HANA database: 5.
 saphostctrl The interface saphostctrl uses the function ListInstances to figure out the virtual host name of the SAP HANA instance. This is the hostname used during the HANA installation.


Expected results:
The output of the description should look exactly like it is written in the <longdesc> section of the RA metadata:

<longdesc lang="en">
The SAPHanaSR resource agent manages two SAP Hana instances (databases) which are configured
in system replication. This first version is limitted to the scale-up scenario. Scale-Up is
not supported in this version.

Managing the two SAP HANA instances means that the resource agent controls the start/stop of the
instances. In addition the resource agent is able to monitor the SAP HANA databases to check their
availability on landscape host configuration level. For this monitoring the resource agent relies on interfaces
provided by SAP. A third task of the resource agent is to also check the synchronisation status
of the two SAP HANA databases. If the synchronisation is not "SOK", than the cluster avoids to
failover to the secondary side, if the primary fails. This is to improve the data consistency.

The resource agent uses the following four interfaces provided by SAP:

1. sapcontrol/sapstartsrv
   The interface sapcontrol/sapstartsrv is used to start/stop a HANA database instance/system

2. landscapeHostConfiguration
   The interface is used to monitor a HANA system. The python script is named landscapeHostConfiguration.py.
   landscapeHostConfiguration.py has some detailed output about HANA system status
   and node roles. For our monitor the overall status is relevant. This overall 
   status is reported by the returncode of the script:
   0: Internal Fatal, 1: ERROR, 2: WARNING, 3: INFO, 4: OK
   The SAPHana resource agent will interpret returncodes 0 as FATAL, 1 as not-running or ERROR and and returncodes 2+3+4 as RUNNING.

3. hdbnsutil
   The interface hdbnsutil is used to check the "topology" of the system replication as well as the current configuration
   (primary/secondary) of a SAP HANA database instance. A second task of the interface is the posibility to run a
   system replication takeover (sr_takeover) or to register a former primary to a newer one (sr_register).

4. hdbsql / systemReplicationStatus
   Interface is SQL query into HANA (system replication table).  The hdbsql query will be replaced by a python script 
   "systemReplicationStatus.py" in SAP HANA SPS8 or 9.
   As long as we need to use hdbsql you need to setup secure store users for linux user root to be able to
   access the SAP HANA database. You need to configure a secure store user key "SAPHANA${SID}SR" which can connect the SAP
   HANA database: 

5. saphostctrl
   The interface saphostctrl uses the function ListInstances to figure out the virtual host name of the 
   SAP HANA instance. This is the hostname used during the HANA installation.

</longdesc>


Additional info:

Comment 2 Tomas Jelinek 2015-01-08 13:16:49 UTC
Created attachment 977803 [details]
proposed fix

Before fix:

[root@rh70-node1:~]# pcs resource describe SysInfo
ocf:pacemaker:SysInfo - SysInfo resource agent

 This is a SysInfo Resource Agent. It records (in the CIB) various attributes of
 a node Sample Linux output: arch: i686 os: Linux-2.4.26-gentoo-r14 free_swap:
 1999 cpu_info: Intel(R) Celeron(R) CPU 2.40GHz cpu_speed: 4771.02 cpu_cores: 1
 cpu_load: 0.00 ram_total: 513 ram_free: 117 root_free: 2.4
...


After fix:

[root@rh70-node1:~]# pcs resource describe SysInfo
ocf:pacemaker:SysInfo - SysInfo resource agent

This is a SysInfo Resource Agent.
It records (in the CIB) various attributes of a node
Sample Linux output:
   arch:   i686
   os:     Linux-2.4.26-gentoo-r14
   free_swap:      1999
   cpu_info:       Intel(R) Celeron(R) CPU 2.40GHz
   cpu_speed:      4771.02
   cpu_cores:      1
   cpu_load:       0.00
   ram_total:      513
   ram_free:       117
   root_free:      2.4
...

Comment 3 Tomas Jelinek 2015-01-08 15:09:20 UTC
Created attachment 977815 [details]
proposed fix - test

Comment 4 Tomas Jelinek 2015-01-27 13:51:21 UTC
Before Fix:
[root@rh66-node1 ~]# rpm -q pcs
pcs-0.9.123-9.el6.x86_64

[root@rh66-node1:~]# pcs resource describe SysInfo
ocf:pacemaker:SysInfo - SysInfo resource agent

 This is a SysInfo Resource Agent. It records (in the CIB) various attributes of
 a node Sample Linux output: arch: i686 os: Linux-2.4.26-gentoo-r14 free_swap:
 1999 cpu_info: Intel(R) Celeron(R) CPU 2.40GHz cpu_speed: 4771.02 cpu_cores: 1
 cpu_load: 0.00 ram_total: 513 ram_free: 117 root_free: 2.4 Sample Darwin
 output: arch: i386
...



After Fix:
[root@rh66-node1:~]# rpm -q pcs
pcs-0.9.138-1.el6.x86_64

[root@rh66-node1:~]# pcs resource describe SysInfo
ocf:pacemaker:SysInfo - SysInfo resource agent

This is a SysInfo Resource Agent.
It records (in the CIB) various attributes of a node
Sample Linux output:
   arch:   i686
   os:     Linux-2.4.26-gentoo-r14
   free_swap:      1999
   cpu_info:       Intel(R) Celeron(R) CPU 2.40GHz
   cpu_speed:      4771.02
   cpu_cores:      1
   cpu_load:       0.00
   ram_total:      513
   ram_free:       117
   root_free:      2.4

Sample Darwin output:
   arch:   i386
...

Comment 6 Tomas Jelinek 2015-01-30 08:34:52 UTC
Created attachment 985885 [details]
proposed fix - backward compatibility in gui

Before fix:
Resource agent / fence agent description visible by default when managing a cluster running pcs-0.9.138 remotely by pcs-0.9.137.

After fix:
Resource agent / fence agent description hidden by default.

Comment 7 Tomas Jelinek 2015-02-18 10:25:50 UTC
Before Fix:
[root@rh66-node1 ~]# rpm -q pcs
pcs-0.9.138-1.el6.x86_64

Resource agent / fence agent description visible by default when managing a cluster remotely by pcs-0.9.137.


After Fix:
[root@rh66-node1:~]# rpm -q pcs
pcs-0.9.139-1.el6.x86_64

Resource agent / fence agent description hidden by default when managing a cluster remotely by pcs-0.9.137.

Comment 15 errata-xmlrpc 2015-07-22 06:15:54 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://rhn.redhat.com/errata/RHBA-2015-1446.html


Note You need to log in before you can comment on or make changes to this bug.