Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1831953

Summary: [RFE] 'pcs resource create' does not copy 'op timeout' value from resource agent's metadata to CIB if 'op interval' is specified
Product: Red Hat Enterprise Linux 8 Reporter: Seunghwan Jung <jseunghw>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED MIGRATED QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: ---CC: cluster-maint, idevat, mlisik, mpospisi, omular, sbradley, tojeline
Target Milestone: rcKeywords: FutureFeature, MigratedToJIRA, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-22 18:38:24 UTC Type: Story
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Seunghwan Jung 2020-05-06 02:17:07 UTC
Description of problem:

'pcs resource config <resource>' does not show 'op monitor timeout' when only 'op monitor interval' is specified  


Version-Release number of selected component (if applicable):

pcs-0.10.4-6.el8.x86_64
pacemaker-2.0.3-5.el8.x86_64


How reproducible:
Always

Steps to Reproduce:

create a resource with only 'op monitor interval' specified.

# pcs resource create test1 ocf:pacemaker:Dummy op monitor interval=10




Actual results:

# pcs resource config test1
 Resource: test1 (class=ocf provider=pacemaker type=Dummy)
  Operations: migrate_from interval=0s timeout=20s (test1-migrate_from-interval-0s)
              migrate_to interval=0s timeout=20s (test1-migrate_to-interval-0s)
              monitor interval=10 (test1-monitor-interval-10)                   <===== timeout value is not displayed
              reload interval=0s timeout=20s (test1-reload-interval-0s)
              start interval=0s timeout=20s (test1-start-interval-0s)
              stop interval=0s timeout=20s (test1-stop-interval-0s)

you can not check timeout value. with 'pcs resource config <resource>' 



Expected results:

'pcs resource config <resource>' shows timeout value like other conditions.


When 'op monitor timeout' value is specified, you can see the interval and timeout settings. 

# pcs resource create test2 ocf:pacemaker:Dummy  op monitor timeout=10
# pcs resource config test2
 Resource: test2 (class=ocf provider=pacemaker type=Dummy)
  Operations: migrate_from interval=0s timeout=20s (test2-migrate_from-interval-0s)
              migrate_to interval=0s timeout=20s (test2-migrate_to-interval-0s)
              monitor interval=60s timeout=10 (test2-monitor-interval-60s)               <===========
              reload interval=0s timeout=20s (test2-reload-interval-0s)
              start interval=0s timeout=20s (test2-start-interval-0s)
              stop interval=0s timeout=20s (test2-stop-interval-0s)




When none is specified, you can see the op monitor interval and timeout settings. 

# pcs resource create test3 ocf:pacemaker:Dummy
# pcs resource config test3
 Resource: test3 (class=ocf provider=pacemaker type=Dummy)
  Operations: migrate_from interval=0s timeout=20s (test3-migrate_from-interval-0s)
              migrate_to interval=0s timeout=20s (test3-migrate_to-interval-0s)
              monitor interval=10s timeout=20s (test3-monitor-interval-10s)          <===========
              reload interval=0s timeout=20s (test3-reload-interval-0s)
              start interval=0s timeout=20s (test3-start-interval-0s)
              stop interval=0s timeout=20s (test3-stop-interval-0s)



Additional info:

The customer is confused with the output of 'pcs resource show <resource>' running pacemaker on RHEL7. 
Considering RHEL7 will step into it's Maintenance Support 2 soon, I wish we can have this issue addressed with RHEL8.

Comment 2 Tomas Jelinek 2020-05-06 09:31:26 UTC
The displaying actually works correctly and as intended. Let me elaborate each case:

(In reply to Seunghwan Jung from comment #0)
> # pcs resource config test1
>  Resource: test1 (class=ocf provider=pacemaker type=Dummy)
>   Operations: migrate_from interval=0s timeout=20s (test1-migrate_from-interval-0s)
>               migrate_to interval=0s timeout=20s (test1-migrate_to-interval-0s)
>               monitor interval=10 (test1-monitor-interval-10)                <===== timeout value is not displayed
>               reload interval=0s timeout=20s (test1-reload-interval-0s)
>               start interval=0s timeout=20s (test1-start-interval-0s)
>               stop interval=0s timeout=20s (test1-stop-interval-0s)
> 
> you can not check timeout value. with 'pcs resource config <resource>'

Since no timeout value has been specified, no timeout value is present in the CIB, and therefore it is not displayed.
Similarly, ocf:pacemaker:Dummy's fake, state, passwd and other attributes are not displayed either.

 
> When 'op monitor timeout' value is specified, you can see the interval and timeout settings. 
>
> # pcs resource create test2 ocf:pacemaker:Dummy  op monitor timeout=10
> # pcs resource config test2
>  Resource: test2 (class=ocf provider=pacemaker type=Dummy)
>   Operations: migrate_from interval=0s timeout=20s (test2-migrate_from-interval-0s)
>               migrate_to interval=0s timeout=20s (test2-migrate_to-interval-0s)
>               monitor interval=60s timeout=10 (test2-monitor-interval-60s)   <===========
>               reload interval=0s timeout=20s (test2-reload-interval-0s)
>               start interval=0s timeout=20s (test2-start-interval-0s)
>               stop interval=0s timeout=20s (test2-stop-interval-0s)

You cannot have a monitor operation without an interval, so pcs sets one up for you. Timeout has been specified by the user, therefore it is present in the CIB and displayed.


> When none is specified, you can see the op monitor interval and timeout settings. 
>
> # pcs resource create test3 ocf:pacemaker:Dummy
> # pcs resource config test3
>  Resource: test3 (class=ocf provider=pacemaker type=Dummy)
>   Operations: migrate_from interval=0s timeout=20s (test3-migrate_from-interval-0s)
>               migrate_to interval=0s timeout=20s (test3-migrate_to-interval-0s)
>               monitor interval=10s timeout=20s (test3-monitor-interval-10s)  <===========
>               reload interval=0s timeout=20s (test3-reload-interval-0s)
>               start interval=0s timeout=20s (test3-start-interval-0s)
>               stop interval=0s timeout=20s (test3-stop-interval-0s)

You cannot have a resource without a monitor operation. If you do not specify any, pcs will take its default configuration from resource agent's metadata and save it in the CIB.



So, the issue is not about displaying the configuration. That works correctly, as shown above.

The issue is: When an operation timeout is not specified (or possibly any other optional operation attribute), it is not copied from resource agent's metadata to CIB. We need to take a closer look at this to find out if it is a desired behavior or an actual bug.



There is also a related bz1707069 explaining how pacemaker works regarding defaulting op attributes. It explains, among other useful info, that pacemaker does not access resource agent's metadata as they are not available to it.

Comment 6 Tomas Jelinek 2023-07-26 07:53:56 UTC
Commands 'pcs * config' are meant to display configuration and not the currently applied values. We would create a new command for displaying applied values. However, actual applied values may come from several places (specific resource, operation defaults, pacemaker defaults...) and they can even depend on current time or other variables (as the operation defaults can be specified using rules, see bz1817547 and bz1862966). There is no point in re-implementing pacemaker's evaluation engine in pcs, the only way to do this is to ask pacemaker. Pacemaker currently provides an interface for this, but it's not ideal, yet. It doesn't take into account pacemaker defaults, for example, which is crucial for the very use case described in comment 0. The RFE on pacemaker side is tracked at https://projects.clusterlabs.org/T684

Comment 8 RHEL Program Management 2023-09-22 18:35:55 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 9 RHEL Program Management 2023-09-22 18:38:24 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.