Bug 1741056
Summary: | [RFE] Make it possible to set custom (promotable) clone id | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Tomas Jelinek <tojeline> | ||||||
Component: | pcs | Assignee: | Miroslav Lisik <mlisik> | ||||||
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||||
Severity: | unspecified | Docs Contact: | Steven J. Levine <slevine> | ||||||
Priority: | medium | ||||||||
Version: | 8.1 | CC: | cfeist, cluster-maint, idevat, mlisik, mmazoure, nhostako, omular, slevine, tojeline | ||||||
Target Milestone: | rc | Keywords: | FutureFeature | ||||||
Target Release: | 8.4 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | pcs-0.10.7-1.el8 | Doc Type: | Enhancement | ||||||
Doc Text: |
.Ability to specify a custom clone ID when creating a clone resource or promotable clone resource
When you create a clone resource or a promotable clone resource, the clone resource is named _resource-id_ `-clone` by default. If that ID is already in use, PCS adds the suffix -_integer_, starting with an integer value of `1` and incrementing by one for each additional clone. You can now override this default by specifying a name for a clone resource ID or promotable clone resource ID with the _clone-id_ option when creating a clone resource with the `pcs resource create` or the `pcs resource clone` command. For information on creating clone resources, see link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_high_availability_clusters/assembly_creating-multinode-resources-configuring-and-managing-high-availability-clusters[Creating cluster resources that are active on multiple nodes].
|
Story Points: | --- | ||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2021-05-18 15:12:05 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: | |||||||||
Attachments: |
|
Description
Tomas Jelinek
2019-08-14 07:37:51 UTC
Created attachment 1715552 [details]
proposed fix + tests
Affected commands:
* pcs resource create ... clone
* pcs resource create ... promotable
* pcs resource clone
* pcs resource promotable
Test:
[root@r8-node-01 pcs]# pcs resource create c1 ocf:pacemaker:Dummy clone MyCloneId globally-unique=true
[root@r8-node-01 pcs]# pcs resource create p1 ocf:pacemaker:Stateful promotable MyPromotableId
[root@r8-node-01 pcs]# pcs resource
* Clone Set: MyCloneId [c1] (unique):
* c1:0 (ocf::pacemaker:Dummy): Started r8-node-01
* c1:1 (ocf::pacemaker:Dummy): Started r8-node-02
* Clone Set: MyPromotableId [p1] (promotable):
* Masters: [ r8-node-01 ]
* Slaves: [ r8-node-02 ]
[root@r8-node-01 pcs]# pcs resource unclone MyCloneId
[root@r8-node-01 pcs]# pcs resource unclone MyPromotableId
[root@r8-node-01 pcs]# pcs resource
* c1 (ocf::pacemaker:Dummy): Started r8-node-01
* p1 (ocf::pacemaker:Stateful): Started r8-node-02
[root@r8-node-01 pcs]# pcs resource clone c1 ClonedDummy
[root@r8-node-01 pcs]# pcs resource clone p1 PromotableStateful
[root@r8-node-01 pcs]# pcs resource
* Clone Set: ClonedDummy [c1]:
* Started: [ r8-node-01 r8-node-02 ]
* Clone Set: PromotableStateful [p1]:
* Started: [ r8-node-01 r8-node-02 ]
[root@r8-node-01 pcs]# pcs resource create c2 ocf:pacemaker:Dummy clone ClonedDummy
Error: 'ClonedDummy' already exists
Error: Errors have occurred, therefore pcs is unable to continue
[root@r8-node-01 pcs]# echo $?
1
Created attachment 1715687 [details]
additional fix
Add missing '>' to the 'pcs resource clone' help.
[root@r8-node-01 pcs]# pcs resource clone --help
Usage: pcs resource clone...
clone <resource id | group id> [<clone id>] [clone options]... [--wait[=n]]
Set up the specified resource or group as a clone. If --wait is
specified, pcs will wait up to 'n' seconds for the operation to finish
(including starting clone instances if appropriate) and then return 0
on success or 1 on error. If 'n' is not specified it defaults to 60
minutes.
Test: [root@r8-node-01 ~]# rpm -q pcs pcs-0.10.7-1.el8.x86_64 [root@r8-node-01 ~]# pcs resource create c1 ocf:pacemaker:Dummy clone MyCloneId globally-unique=true [root@r8-node-01 ~]# pcs resource * Clone Set: MyCloneId [c1] (unique): * c1:0 (ocf::pacemaker:Dummy): Started r8-node-01 * c1:1 (ocf::pacemaker:Dummy): Started r8-node-02 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 (pcs bug fix and enhancement update), 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-2021:1737 |