Andrew Beekhof | 1 May 2006 22:20
Picon

Re: Draft cibadmin manual page


On May 1, 2006, at 5:58 PM, Joachim Banzhaf wrote:

> Am Montag, 1. Mai 2006 15:54 schrieb Andrew Beekhof:
>> On May 1, 2006, at 2:55 PM, Joachim Banzhaf wrote:
>>> Am Sonntag, 30. April 2006 23:56 schrieb Andrew Beekhof:
>>>> On Apr 30, 2006, at 10:23 PM, Alan Robertson wrote:
>>>>> Andrew Beekhof wrote:
>>>>>> On Apr 29, 2006, at 11:37 PM, Joachim Banzhaf (compuserve) wrote:
>>>>>>>         cibadmin -D -X ’<primitive id="R_10.10.10.101"  
>>>>>>> class="ocf"
>>>>>>>         type="IPaddr" provider="heartbeat">’
>>>>>>>
>>>>>>> I think it should be enough to do
>>>>>>>
>>>>>>>         cibadmin        -D      -X     ’<id="R_10.10.10.101"’
>>>>>>
>>>>>> you need to close the xml tag, but yes.
>>>>>
>>>>> So, are you saying that this is enough?
>>>>>     cibadmin        -D      -X     ’<id="R_10.10.10.101">'
>>>>>
>>>>> ??
>>>>>
>>>>> When I tried that, I got this error:
>>>>> 	Couldn't parse input string: <id="R_10.10.10.101">
>>>>
>>>> you missed the / in "/>
>>>>
>>>>> It seems to me like you would need a tag, not just attributes for
>>>>> it to be a valid XML fragment, more like this...
>>>>>
>>>>>        cibadmin -D -X ’<primitive id="R_10.10.10.101">'
>
> same redundancy problem here: if the ids have to be unique cib wide  
> (are
> they?), then "primitive" is not required from the functional point  
> of view
> (only semantical).

As I have previously stated, tag + id uniquely identifies an object  
in the CIB

>
>>>>
>>>> oh, yes... i hadnt noticed the difference.  its sunday so i'm not
>>>> really working/concentrating.
>>>
>>> You see where redundancy leeds you to ;-)
>>> All that stuff only to make a parser happy, but carrying no  
>>> additional
>>> information.
>>
>> additional?  like '<' and '>'?
>
> Ok, this would be _very_ minor (but not minor enough: again the  
> slash was
> missing ;-) ). Here I meant the tagname.

see above

> More generally I thought about an update of a longish resource  
> constraint,
> where I want to change just the score but have to type the whole  
> constraint

no you dont.
type only the tagname, the id and the fields that changed.

> again. This is not minor but just wrong as I can see now: tags contain
> attributes and subtags. If I want to change/add/delete a subtag, I  
> just
> specify its id not the id of its container.
>
>>> And that's just one of the minor problems.
>>> What if a typo in an attribute I didn't intend to change modifies a
>>> constraint
>>> and shuffles resources around?
>>
>> then dont specify the attribute.
>> only id and the tag name are required because that uniquely
>> identifies an object in the CIB.
>
> Last question remaining: How do I get rid of an optional attribute?
>
>>> This leads me to: Is it possible to ask the PE what it would do
>>> with a new cib
>>> (assuming the LRM would produce no errors and no other side effects
>>> concerning the cib)? It would be very helpful for sure. Own
>>> experience and
>>> list scanning tells me, that it is not always easy to predic.
>>
>> look for the ptest CLI
>
> will do, thanks.
>
>>>>> I also added an example which restores the CIB to the previous
>>>>> version.
>>>>>
>>>>> To restore the CIB to the previous version, issue this command:
>>>>>   cibadmin \-R \-x /var/lib/heartbeat/crm/cib.xml.last
>>>>
>>>> unreliable... for a given manual change you may have *many*  
>>>> automatic
>>>> ones as part of the transition caused by the manual change.
>>>
>>> Can I have a complete history of the config section somewhere? I'd
>>> like to
>>> have something like "diff cib.old cib.new at `date` -> lrm actions
>>> at `date`
>>> (Maybe clever extraction from logfiles?)
>>
>> exactly, its in the logs... but that tends to be quite noisey.
>> alternatively check out the cibmon CLI.
>
> cibmon does snapshots, I was after a complete history, so I will  
> need a good
> noise filter :-)
>
> Regards,
>
> Joachim Banzhaf
> _______________________________________________
> Linux-HA mailing list
> Linux-HA <at> lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems

--
Andrew Beekhof

"Too much knowledge leads to confusion; Too many guitar lessons lead  
to jazz-fusion!" - TISM

_______________________________________________
Linux-HA mailing list
Linux-HA <at> lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


Gmane