Re: Antw: How to modify crm configure by command line

"Ulrich Windl" <[email protected]>
Newsgroups gmane.linux.highavailability.user
Message-ID <[email protected]>
>>> Ferenc Wagner <[email protected]> schrieb am 22.08.2014 um 21:13 in Nachricht
<[email protected]>:
> Moullé Alain <[email protected]> writes:
> 
>> Le 28/07/2014 11:45, Dang Zhiqiang a écrit :
>>
>>>>> I want to modify op start timeout value through command line, but I
search
>>>>> on internet find nothing.
>>>>> I try crm_resource  comand, but I only modify params and meta.
>>>>>
>>>>>
>>>>> root@host2:~# crm configure show test-ip
>>>>> primitive test-ip ocf:openindiana:IPaddr \
>>>>>          params ip="192.168.1.253" nic="igb0" cidr_netmask="24" \
>>>>>          op start interval="0s" timeout="60s" on-fail="restart" \
>>>>>          op monitor interval="10s" timeout="60s" on-fail="restart" \
>>>>>          op stop interval="0s" timeout="60s" on-fail="stop" \
>>>>>          meta target-role="Stopped"
>>
>> I think there is no easy command line to modify a timeout, except if
>> you can write a good filter script to be used on
>> command line such as :
>> crm -F configure filter "sed, or whatever ..."
> 
> I guess using XML would be more robust, try something like this:
> 
> # cibadmin --replace 
>
--xpath="/cib/configuration/resources/primitive[@id='test-ip']/operations/op[
> @name='start']" --xml-text '<op name="start" interval="0" timeout="61s" 
> id="test-ip-start-0"/>'

Hi!

It may be more robust, but it's probably much more difficult to get it right.
I don't know how difficult it would be to implement, but a solution like
crm cinfigure edit/set <primitive_or_other_object>.<param_or_meta_or_similar>
[=<value>]

So ``crm configure set test-ip.timeout="61s"´´ would do the job, and ``crm
configure edit test-ip.timeout´´ would start an editor with a narrowed view of
the primitive that just contains " timeout=<whatever>". Changing the latter
would just update that parameter.

The proposed solution would be both, elegant to use and robust, I guess.

Regards,
Ulrich

> -- 
> Regards,
> Feri.
> _______________________________________________
> Linux-HA mailing list
> [email protected] 
> http://lists.linux-ha.org/mailman/listinfo/linux-ha 
> See also: http://linux-ha.org/ReportingProblems 


_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.