[ClusterLabs] Antw: Re: Rename option group resource id with pcs
Ken Gaillot
kgaillot at redhat.com
Tue Apr 11 09:41:19 EDT 2017
On 04/11/2017 05:48 AM, Ulrich Windl wrote:
>>>> Dejan Muhamedagic <dejanmm at fastmail.fm> schrieb am 11.04.2017 um 11:43 in
> Nachricht <20170411094352.GD8414 at tuttle.homenet>:
>> Hi,
>>
>> On Tue, Apr 11, 2017 at 10:50:56AM +0200, Tomas Jelinek wrote:
>>> Dne 11.4.2017 v 08:53 SAYED, MAJID ALI SYED AMJAD ALI napsal(a):
>>>> Hello,
>>>>
>>>> Is there any option in pcs to rename group resource id?
>>>>
>>>
>>> Hi,
>>>
>>> No, there is not.
>>>
>>> Pacemaker doesn't really cover the concept of renaming a resource.
>>
>> Perhaps you can check how crmsh does resource rename. It's not
>> impossible, but can be rather involved if there are other objects
>> (e.g. constraints) referencing the resource. Also, crmsh will
>> refuse to rename the resource if it's running.
>
> The real problem in pacemaker (as resources are created now) is that the "IDs" have too much semantic, i.e. most are derived from the resource name (while lacking a name attribute or element), and some required elements are IDs are accessed by ID, and not by name.
>
> Examples:
> <cluster_property_set id="cib-bootstrap-options">
> <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="1.1
> .12-f47ea56"/>
>
> A <clone>s and <primitive>s have no name, but only an ID (it seems).
>
> <op id="prm_DLM-start-0" interval="0" name="start" timeout="90"/>
>
> This is redundant: As the <op> is part of a resource (by XML structure) it's unneccessary to put the name of the resource into the ID of the operation.
>
> It all looks like a kind of abuse of XML IMHO.I think the next CIB format should be able to handle IDs that are free of semantics other than to denote (relatively unique) identity. That is: It should be OK to assign IDs like "i1", "i2", "i3", ... and besides from an IDREF the elements should be accessed by structure and/or name.
>
> (If the ID should be the primary identification feature, flatten all structure and drop all (redundant) names.)
>
> Regards,
> Ulrich
That's how it's always been :-)
Pacemaker doesn't care what IDs are, only that they are unique (though
of course they must meet the XML requirements for an ID type as far as
allowed characters). The various tools (CLI, crm shell, pcs)
auto-generate IDs so the user doesn't have to care about them, and they
create IDs like the ones you mention above, because they're easy to
generate.
>>
>> Thanks,
>>
>> Dejan
>>
>>> From
>>> pacemaker's point of view one resource gets removed and another one gets
>>> created.
>>>
>>> This has been discussed recently:
>>> http://lists.clusterlabs.org/pipermail/users/2017-April/005387.html
>>>
>>> Regards,
>>> Tomas
>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> */MAJID SAYED/*
>>>>
>>>> /HPC System Administrator./
>>>>
>>>> /King Abdullah International Medical Research Centre/
>>>>
>>>> /Phone:+96618011111(Ext:40631)/
>>>>
>>>> /Email:sayedma2 at ngha.med.sa/
More information about the Users
mailing list