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 1447903 - bundle resources are missing meta attributes
Summary: bundle resources are missing meta attributes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pacemaker
Version: 7.4
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 7.4
Assignee: Ken Gaillot
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1447910
TreeView+ depends on / blocked
 
Reported: 2017-05-04 08:18 UTC by Tomas Jelinek
Modified: 2017-08-01 17:57 UTC (History)
8 users (show)

Fixed In Version: pacemaker-1.1.16-11.el7
Doc Type: No Doc Update
Doc Text:
This is part of a new feature that will be documented for Bug 1432722.
Clone Of:
: 1447910 (view as bug list)
Environment:
Last Closed: 2017-08-01 17:57:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1862 0 normal SHIPPED_LIVE pacemaker bug fix and enhancement update 2017-08-01 18:04:15 UTC

Description Tomas Jelinek 2017-05-04 08:18:49 UTC
It is not possible to disable a bundle resource by setting target-role=stopped because bundle resources have no meta attributes. This leads to the following issues:

a) Users cannot stop a bundle resource.

b) "crm_resource --restart --resource <bundle resource>" doesn't work:
# crm_resource --restart --resource http-bundle
Could not set target-role for http-bundle: Update does not conform to the configured schema (-203)

c) When deleting a bundle resource, the bundle cannot be stopped beforehand, leaving orphaned resources behind. When stop-orphan-resources is set to false, these resources just stay there.


Ken:
Yes, this is a known limitation. It also applies to is-managed.


Andrew:
My original thoughts were to not have a meta block and instead enumerate the specific options (as was done for masters and replicas) that we need.

Happy to leave the decision in your hands though.

Comment 3 Ken Gaillot 2017-05-04 14:51:25 UTC
I do think we should implement these as meta-attributes, so tooling doesn't need to have special cases for bundles. My idea is that meta-attributes set on a bundle will have no effect on the bundle per se, but will be inherited by all its components. That way, target-role, is-managed, priority, resource-stickiness, requires, etc, can all work as expected (hopefully with a minimum of extra coding). This inheritance is comparable to what is done for groups.

Instance attributes will be allowed by the schema to gain the benefits of reduced code duplication in the schema, but they will be undocumented, and ignored by the source code.

Comment 4 Jan Pokorný [poki] 2017-05-04 14:56:58 UTC
I hope no special special-casing would be needed as they are
optional, afterall :-)

Unfortunately, there's a precedence with superfluous instance_attributes
-- groups.

It might make sense then to procede with tolerating them, and queue the
cleanup for both for version 3 of schemas.

Comment 5 Jan Pokorný [poki] 2017-05-04 14:58:14 UTC
* precedent, proceed

Comment 6 Ken Gaillot 2017-05-04 15:12:10 UTC
To clarify, the choice is between implementing is-managed, target-role, etc., as meta-attributes (as is done with every other type of pacemaker resource), or as XML attributes of the bundle tag. If we choose the former, all existing tooling will work without modification. If we choose the latter, all existing tooling will need to be updated with special code paths for bundles.

The argument for using XML attributes is that it would have been a better design from the start, so that meta-properties allowed by pacemaker would be enumerated in (and enforceable by) the schema. However, I think it would be too much of a burden for tooling to switch that model now. It would be something to consider for "pacemaker 2.0" if we ever get to that point.

Groups intentionally have instance_attributes that are inheritable by the group members, though that's only useful for a group of identical resources. That doesn't apply to bundles since the components are always different.

Comment 7 Jan Pokorný [poki] 2017-05-04 15:26:12 UTC
Understood, there was a confusion arising from intermingling two things.

I can only talk of instance_attributes, and I think it would be good to
proceed with dropping instance_attributes for groups and bundles in
3.0 schema at latest -- the corner case with groups can still be
addressed by unrolling, e.g. using templates for simplicity, in XSLT,
while for bundles case, it would plain drop it, as it hasn't ever been
used.  Notice that no change in code would be needed, beside perhaps
spotting and eliminating new dead code.

Comment 8 Ken Gaillot 2017-05-26 16:23:24 UTC
Upstream pacemaker now supports setting meta-attributes on bundles, and having them inherited by the components. At least for target-role, this works as expected.

Initial tests with is-managed did not work as expected, so I'm continuing to investigate that. But at least some support will already be available with the current proposed 7.4 packages.

Comment 9 Ken Gaillot 2017-05-26 23:06:59 UTC
Implemented upstream with https://github.com/ClusterLabs/pacemaker/pull/1283

Comment 10 Ken Gaillot 2017-06-09 22:37:42 UTC
QA: In case the pcs interface for setting meta-attributes on bundles is not ready, here is how to test it without pcs:

1. Configure a cluster with a bundle resource (for example, the test procedure for Bug 1432722).

2. Ensure you have your EDITOR shell variable set and exported (e.g. "export EDITOR=vi").

3. Run "pcs cluster edit" to manually edit the CIB.
3a. Find your bundle resource, and enclosed in the bundle tag, add this:

        <meta_attributes id="test-meta">
          <nvpair id="test-target-role" name="target-role" value="Started"/>
          <nvpair id="test-is-managed" name="is-managed" value="true"/>
        </meta_attributes>
3b. Save and exit.

4. As desired, run "pcs cluster edit" and try combinations of target-role = Started or Stopped and is-managed = true or false, watching "pcs status" to see how it affects the cluster. The most important thing is that all the component parts of the bundle respect the target-role (i.e. all of them start or stop as specified).

Comment 13 Damien Ciabrini 2017-06-21 15:38:14 UTC
Additionally, Michele Baldessari and myself are testing the new features from this build, so I can say that's it's working as expected for us.

We're following different instructions [1] to deploy a cluster with containerized ocf resources, and this is the result:

[root@rhelz ~]# crm_mon -1
Stack: corosync
Current DC: rhelz (version 1.1.16-11.el7-94ff4df) - partition with quorum
Last updated: Wed Jun 21 09:48:16 2017
Last change: Wed Jun 21 09:29:42 2017 by root via cibadmin on rhelz

4 nodes configured
16 resources configured

Online: [ rhelz ]
GuestOnline: [ galera-bundle-0@rhelz rabbitmq-bundle-0@rhelz redis-bundle-0@rhelz ]

Active resources:

 Docker container: rabbitmq-bundle [192.168.24.1:8787/rhosp12/openstack-rabbitmq-docker:2017-06-19.1]
   rabbitmq-bundle-0    (ocf::heartbeat:rabbitmq-cluster):      Started rhelz
 Docker container: galera-bundle [192.168.24.1:8787/rhosp12/openstack-mariadb-docker:2017-06-19.1]
   galera-bundle-0      (ocf::heartbeat:galera):        Master rhelz
 Docker container: redis-bundle [192.168.24.1:8787/rhosp12/openstack-redis-docker:2017-06-19.1]
   redis-bundle-0       (ocf::heartbeat:redis): Master rhelz
 ip-192.168.122.254     (ocf::heartbeat:IPaddr2):       Started rhelz
 ip-192.168.122.250     (ocf::heartbeat:IPaddr2):       Started rhelz
 ip-192.168.122.249     (ocf::heartbeat:IPaddr2):       Started rhelz
 ip-192.168.122.253     (ocf::heartbeat:IPaddr2):       Started rhelz
 ip-192.168.122.247     (ocf::heartbeat:IPaddr2):       Started rhelz
 ip-192.168.122.248     (ocf::heartbeat:IPaddr2):       Started rhelz
 Docker container: haproxy-bundle [192.168.24.1:8787/rhosp12/openstack-haproxy-docker:2017-06-19.1]
   haproxy-bundle-docker-0      (ocf::heartbeat:docker):        Started rhelz


In this setup, the bundle resources are created in "disabled" mode, we then create location constraint and associate them with the bundle. Ultimately we enable the bundles.

All those operation are implemented via the regular pcs argument "--disable" and "--enable", implemented for bundles in https://bugzilla.redhat.com/show_bug.cgi?id=1447910.
Internally, those pcs operation make use of the target-role meta attribute, so this confirms that this new package fixes the bug.

[1] https://github.com/dciabrin/undercloud_ha_containers

Comment 15 errata-xmlrpc 2017-08-01 17:57:08 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/RHEA-2017:1862


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