Bug 1470223

Summary: Per-op instance_attributes in CIB should not count towards attributes affecting pacemaker's internal working (unlike meta_attributes)
Product: Red Hat Enterprise Linux 7 Reporter: Jan Pokorný [poki] <jpokorny>
Component: pacemakerAssignee: Ken Gaillot <kgaillot>
Status: CLOSED WONTFIX QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.4CC: abeekhof, cfeist, cluster-maint, cluster-qe, idevat, omular, tojeline
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1469801 Environment:
Last Closed: 2018-04-03 23:07:26 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:
Bug Depends On: 1469801    
Bug Blocks:    

Description Jan Pokorný [poki] 2017-07-12 14:30:28 UTC
+++ This bug was initially created as a clone of Bug #1469801 +++

--- Additional comment from Jan Pokorný on 2017-07-12 16:25:47 CEST ---

Another note:

There's likely a bug in pacemaker leading to different treatment of
meta_attributes per-op vs. op_defaults:

- per-op:
  this only leads to carrying OCF_RESKEY_CRM_meta_X to the agent
  being executed 

- op_defaults:
  ditto, _but_ also acutally takes those values into account for
  action processing internally

Quick test using "pcs resource restart httpd":

<resources>
  <primitive class="ocf" id="httpd" provider="heartbeat" type="apache">
    <operations>
      <op id="httpd-monitor" name="monitor" interval="30s">
        <meta_attributes id="httpd-monitor-meta">
          <nvpair id="httpd-monitor-meta-start-delay" name="start-delay" value="41s"/>
        </meta_attributes>
      </op>
    </operations>
    <meta_attributes id="httpd-meta_attributes"/>
  </primitive>
</resources>

-->

> httpd successfully restarted

vs.

<op_defaults>
  <meta_attributes id="op_defaults">
    <nvpair id="op_defaults-start-delay" name="start-delay" value="41s"/>
  </meta_attributes>
</op_defaults>
<resources>
  <primitive class="ocf" id="httpd" provider="heartbeat" type="apache">
    <operations>
      <op id="httpd-monitor" name="monitor" interval="30s"/>
    </operations>
    <meta_attributes id="httpd-meta_attributes"/>
  </primitive>
</resources>

-->

> Error: Could not complete shutdown of httpd, 1 resources remaining
> Error performing operation: Timer expired
> 
> Set 'httpd' option: id=httpd-meta_attributes-target-role set=httpd-meta_attributes name=target-role=stopped
> Waiting for 1 resources to stop:
>  * httpd
>  * httpd
> Deleted 'httpd' option: id=httpd-meta_attributes-target-role name=target-role


Hence, I am not getting what's the purpose of per-op meta_attributes.

Comment 1 Jan Pokorný [poki] 2017-07-12 14:35:50 UTC
PEBKAC: if configured meta_attributes per stop, it fails the same way.

Comment 2 Jan Pokorný [poki] 2017-07-12 14:50:33 UTC
Reopening in a slightly different, but very related context,
see bug summary.

Comment 3 Ken Gaillot 2017-08-01 16:25:37 UTC
Due to capacity constraints, this is unlikely to be addressed in the 7.5 timeframe

Comment 4 Ken Gaillot 2018-04-03 23:07:26 UTC
This issue is fixed in upstream version 2.0.0-rc1, so it will be done for RHEL 8 as part of the rebase Bug 1543494. (I am not cloning this bz for RHEL 8 because it does not merit separate QA, due to the lack of pcs support or documentation for setting operation instance attributes.)

As the issue has minimal impact, the fix will not be backported to RHEL 7, to avoid the behavior changing within the RHEL 7 series.

Comment 5 Jan Pokorný [poki] 2018-05-18 15:34:40 UTC
For posterity, upstream fix:
https://github.com/ClusterLabs/pacemaker/commit/3100c0e8b