Mailing List Archive

Antw: How to modify crm configure by command line
>>> "Dang Zhiqiang" <c_dddd@163.com> schrieb am 28.07.2014 um 11:18 in Nachricht
<76475614.116ab.1477c4397e2.Coremail.c_dddd@163.com>:
> hi,
> 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"

"crm configure edit test-ip"?

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



_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Antw: How to modify crm configure by command line [ In reply to ]
thanks,
I know this method, but I want to modify it by command line, provides an interface for other user.



At 2014-07-28 05:25:15, "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de> wrote:
>>>> "Dang Zhiqiang" <c_dddd@163.com> schrieb am 28.07.2014 um 11:18 in Nachricht
><76475614.116ab.1477c4397e2.Coremail.c_dddd@163.com>:
>> hi,
>> 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"
>
>"crm configure edit test-ip"?
>
>>
>> _______________________________________________
>> Linux-HA mailing list
>> Linux-HA@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
>
>
>
>_______________________________________________
>Linux-HA mailing list
>Linux-HA@lists.linux-ha.org
>http://lists.linux-ha.org/mailman/listinfo/linux-ha
>See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Antw: How to modify crm configure by command line [ In reply to ]
On Mon, 28 Jul 2014 17:45:44 +0800 (CST)
"Dang Zhiqiang" <c_dddd@163.com> wrote:

> thanks,
> I know this method, but I want to modify it by command line, provides
> an interface for other user.
>

This is a bit of a hack, but you can achieve this with the filter
command:

crm configure filter "sed '/op start/s/60s/600s/'" test-ip

It would probably be good to have an update mode for the configure
commands so that crm configure primitive could make changes like these,
I will see about adding it in future versions.

// Kristoffer

>
>
> At 2014-07-28 05:25:15, "Ulrich Windl"
> <Ulrich.Windl@rz.uni-regensburg.de> wrote:
> >>>> "Dang Zhiqiang" <c_dddd@163.com> schrieb am 28.07.2014 um 11:18
> >>>> in Nachricht
> ><76475614.116ab.1477c4397e2.Coremail.c_dddd@163.com>:
> >> hi,
> >> 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"
> >
> >"crm configure edit test-ip"?
> >
> >>
> >> _______________________________________________
> >> Linux-HA mailing list
> >> Linux-HA@lists.linux-ha.org
> >> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> >> See also: http://linux-ha.org/ReportingProblems
> >
> >
> >
> >_______________________________________________
> >Linux-HA mailing list
> >Linux-HA@lists.linux-ha.org
> >http://lists.linux-ha.org/mailman/listinfo/linux-ha
> >See also: http://linux-ha.org/ReportingProblems
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>



--
// Kristoffer Grönlund
// kgronlund@suse.com
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Antw: How to modify crm configure by command line [ In reply to ]
>>> Kristoffer Grönlund<kgronlund@suse.com> schrieb am 28.07.2014 um 12:10 in
Nachricht <20140728121056.06228063@ultralix>:
> On Mon, 28 Jul 2014 17:45:44 +0800 (CST)
> "Dang Zhiqiang" <c_dddd@163.com> wrote:
>
>> thanks,
>> I know this method, but I want to modify it by command line, provides
>> an interface for other user.
>>
>
> This is a bit of a hack, but you can achieve this with the filter
> command:
>
> crm configure filter "sed '/op start/s/60s/600s/'" test-ip
>
> It would probably be good to have an update mode for the configure
> commands so that crm configure primitive could make changes like these,
> I will see about adding it in future versions.

The interesting part is the question whether such a change will cause a
restart of the resource. IMHO it shouldn't, but it looks like a configuration
change for the resource. If a restart of the resource is triggered, we don't
need a special command, as "edit" / "filter" will do already.

>
> // Kristoffer
>
>>
>>
>> At 2014-07-28 05:25:15, "Ulrich Windl"
>> <Ulrich.Windl@rz.uni-regensburg.de> wrote:
>> >>>> "Dang Zhiqiang" <c_dddd@163.com> schrieb am 28.07.2014 um 11:18
>> >>>> in Nachricht
>> ><76475614.116ab.1477c4397e2.Coremail.c_dddd@163.com>:
>> >> hi,
>> >> 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"
>> >
>> >"crm configure edit test-ip"?
>> >
>> >>
>> >> _______________________________________________
>> >> Linux-HA mailing list
>> >> Linux-HA@lists.linux-ha.org
>> >> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> >> See also: http://linux-ha.org/ReportingProblems
>> >
>> >
>> >
>> >_______________________________________________
>> >Linux-HA mailing list
>> >Linux-HA@lists.linux-ha.org
>> >http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> >See also: http://linux-ha.org/ReportingProblems
>> _______________________________________________
>> Linux-HA mailing list
>> Linux-HA@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
>>
>
>
>
> --
> // Kristoffer Grönlund
> // kgronlund@suse.com
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems


_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Antw: How to modify crm configure by command line [ In reply to ]
Hi
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 ..."

Alain

Le 28/07/2014 11:45, Dang Zhiqiang a écrit :
> thanks,
> I know this method, but I want to modify it by command line, provides an interface for other user.
>
>
>
> At 2014-07-28 05:25:15, "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de> wrote:
>>>>> "Dang Zhiqiang" <c_dddd@163.com> schrieb am 28.07.2014 um 11:18 in Nachricht
>> <76475614.116ab.1477c4397e2.Coremail.c_dddd@163.com>:
>>> hi,
>>> 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"
>> "crm configure edit test-ip"?
>>
>>> _______________________________________________
>>> Linux-HA mailing list
>>> Linux-HA@lists.linux-ha.org
>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>> See also: http://linux-ha.org/ReportingProblems
>>
>>
>> _______________________________________________
>> Linux-HA mailing list
>> Linux-HA@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems

_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Antw: How to modify crm configure by command line [ In reply to ]
Thank you.
My pacemaker version is 1.0.13, don't have filter subcommand,
but I think I will implement this function by "delete resource and create same resoure", although doing it more complex, because I need it.



At 2014-07-28 06:10:56, "Kristoffer Grönlund" <kgronlund@suse.com> wrote:
>On Mon, 28 Jul 2014 17:45:44 +0800 (CST)
>"Dang Zhiqiang" <c_dddd@163.com> wrote:
>
>> thanks,
>> I know this method, but I want to modify it by command line, provides
>> an interface for other user.
>>
>
>This is a bit of a hack, but you can achieve this with the filter
>command:
>
>crm configure filter "sed '/op start/s/60s/600s/'" test-ip
>
>It would probably be good to have an update mode for the configure
>commands so that crm configure primitive could make changes like these,
>I will see about adding it in future versions.
>
>// Kristoffer
>
>>
>>
>> At 2014-07-28 05:25:15, "Ulrich Windl"
>> <Ulrich.Windl@rz.uni-regensburg.de> wrote:
>> >>>> "Dang Zhiqiang" <c_dddd@163.com> schrieb am 28.07.2014 um 11:18
>> >>>> in Nachricht
>> ><76475614.116ab.1477c4397e2.Coremail.c_dddd@163.com>:
>> >> hi,
>> >> 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"
>> >
>> >"crm configure edit test-ip"?
>> >
>> >>
>> >> _______________________________________________
>> >> Linux-HA mailing list
>> >> Linux-HA@lists.linux-ha.org
>> >> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> >> See also: http://linux-ha.org/ReportingProblems
>> >
>> >
>> >
>> >_______________________________________________
>> >Linux-HA mailing list
>> >Linux-HA@lists.linux-ha.org
>> >http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> >See also: http://linux-ha.org/ReportingProblems
>> _______________________________________________
>> Linux-HA mailing list
>> Linux-HA@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
>>
>
>
>
>--
>// Kristoffer Grönlund
>// kgronlund@suse.com


_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Antw: How to modify crm configure by command line [ In reply to ]
To delete resource, I think you mus stop running it first.
Is it problem with your running resource ?

On Tue, Jul 29, 2014 at 10:53 AM, Dang Zhiqiang <c_dddd@163.com> wrote:
> Thank you.
> My pacemaker version is 1.0.13, don't have filter subcommand,
> but I think I will implement this function by "delete resource and create same resoure", although doing it more complex, because I need it.
>
>
>
> At 2014-07-28 06:10:56, "Kristoffer Grönlund" <kgronlund@suse.com> wrote:
>>On Mon, 28 Jul 2014 17:45:44 +0800 (CST)
>>"Dang Zhiqiang" <c_dddd@163.com> wrote:
>>
>>> thanks,
>>> I know this method, but I want to modify it by command line, provides
>>> an interface for other user.
>>>
>>
>>This is a bit of a hack, but you can achieve this with the filter
>>command:
>>
>>crm configure filter "sed '/op start/s/60s/600s/'" test-ip
>>
>>It would probably be good to have an update mode for the configure
>>commands so that crm configure primitive could make changes like these,
>>I will see about adding it in future versions.
>>
>>// Kristoffer
>>
>>>
>>>
>>> At 2014-07-28 05:25:15, "Ulrich Windl"
>>> <Ulrich.Windl@rz.uni-regensburg.de> wrote:
>>> >>>> "Dang Zhiqiang" <c_dddd@163.com> schrieb am 28.07.2014 um 11:18
>>> >>>> in Nachricht
>>> ><76475614.116ab.1477c4397e2.Coremail.c_dddd@163.com>:
>>> >> hi,
>>> >> 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"
>>> >
>>> >"crm configure edit test-ip"?
>>> >
>>> >>
>>> >> _______________________________________________
>>> >> Linux-HA mailing list
>>> >> Linux-HA@lists.linux-ha.org
>>> >> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>> >> See also: http://linux-ha.org/ReportingProblems
>>> >
>>> >
>>> >
>>> >_______________________________________________
>>> >Linux-HA mailing list
>>> >Linux-HA@lists.linux-ha.org
>>> >http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>> >See also: http://linux-ha.org/ReportingProblems
>>> _______________________________________________
>>> Linux-HA mailing list
>>> Linux-HA@lists.linux-ha.org
>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>> See also: http://linux-ha.org/ReportingProblems
>>>
>>
>>
>>
>>--
>>// Kristoffer Grönlund
>>// kgronlund@suse.com
>
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Antw: How to modify crm configure by command line [ In reply to ]
Hi!

BTW, I have a question: What is the difference of crm configure load replace
<file> and using crm configure edit (and replace the contents in the editor
with <file>)? I had a case where the first method showed many errors while the
second version worked. And: <file> was created by crm configure save <file>.

Regards,
Ulrich

>>> "Dang Zhiqiang" <c_dddd@163.com> schrieb am 29.07.2014 um 05:53 in
Nachricht
<180c3553.5974.14780407c42.Coremail.c_dddd@163.com>:
> Thank you.
> My pacemaker version is 1.0.13, don't have filter subcommand,
> but I think I will implement this function by "delete resource and create
> same resoure", although doing it more complex, because I need it.
>
>
>
> At 2014-07-28 06:10:56, "Kristoffer Grönlund" <kgronlund@suse.com> wrote:
>>On Mon, 28 Jul 2014 17:45:44 +0800 (CST)
>>"Dang Zhiqiang" <c_dddd@163.com> wrote:
>>
>>> thanks,
>>> I know this method, but I want to modify it by command line, provides
>>> an interface for other user.
>>>
>>
>>This is a bit of a hack, but you can achieve this with the filter
>>command:
>>
>>crm configure filter "sed '/op start/s/60s/600s/'" test-ip
>>
>>It would probably be good to have an update mode for the configure
>>commands so that crm configure primitive could make changes like these,
>>I will see about adding it in future versions.
>>
>>// Kristoffer
>>
>>>
>>>
>>> At 2014-07-28 05:25:15, "Ulrich Windl"
>>> <Ulrich.Windl@rz.uni-regensburg.de> wrote:
>>> >>>> "Dang Zhiqiang" <c_dddd@163.com> schrieb am 28.07.2014 um 11:18
>>> >>>> in Nachricht
>>> ><76475614.116ab.1477c4397e2.Coremail.c_dddd@163.com>:
>>> >> hi,
>>> >> 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"
>>> >
>>> >"crm configure edit test-ip"?
>>> >
>>> >>
>>> >> _______________________________________________
>>> >> Linux-HA mailing list
>>> >> Linux-HA@lists.linux-ha.org
>>> >> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>> >> See also: http://linux-ha.org/ReportingProblems
>>> >
>>> >
>>> >
>>> >_______________________________________________
>>> >Linux-HA mailing list
>>> >Linux-HA@lists.linux-ha.org
>>> >http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>> >See also: http://linux-ha.org/ReportingProblems
>>> _______________________________________________
>>> Linux-HA mailing list
>>> Linux-HA@lists.linux-ha.org
>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>> See also: http://linux-ha.org/ReportingProblems
>>>
>>
>>
>>
>>--
>>// Kristoffer Grönlund
>>// kgronlund@suse.com
>
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems


_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Antw: How to modify crm configure by command line [ In reply to ]
yes, need to stop resource first.
just as Ulrich Windl said, this change will cause a restart of the resource,
so this process should be:
stop resource >>>> modify crm configure >>>> start resource

At 2014-07-29 01:10:37, "Teerapatr Kittiratanachai" <maillist.tk@gmail.com> wrote:
>To delete resource, I think you mus stop running it first.
>Is it problem with your running resource ?
>
>On Tue, Jul 29, 2014 at 10:53 AM, Dang Zhiqiang <c_dddd@163.com> wrote:
>> Thank you.
>> My pacemaker version is 1.0.13, don't have filter subcommand,
>> but I think I will implement this function by "delete resource and create same resoure", although doing it more complex, because I need it.
>>
>>
>>
>> At 2014-07-28 06:10:56, "Kristoffer Grönlund" <kgronlund@suse.com> wrote:
>>>On Mon, 28 Jul 2014 17:45:44 +0800 (CST)
>>>"Dang Zhiqiang" <c_dddd@163.com> wrote:
>>>
>>>> thanks,
>>>> I know this method, but I want to modify it by command line, provides
>>>> an interface for other user.
>>>>
>>>
>>>This is a bit of a hack, but you can achieve this with the filter
>>>command:
>>>
>>>crm configure filter "sed '/op start/s/60s/600s/'" test-ip
>>>
>>>It would probably be good to have an update mode for the configure
>>>commands so that crm configure primitive could make changes like these,
>>>I will see about adding it in future versions.
>>>
>>>// Kristoffer
>>>
>>>>
>>>>
>>>> At 2014-07-28 05:25:15, "Ulrich Windl"
>>>> <Ulrich.Windl@rz.uni-regensburg.de> wrote:
>>>> >>>> "Dang Zhiqiang" <c_dddd@163.com> schrieb am 28.07.2014 um 11:18
>>>> >>>> in Nachricht
>>>> ><76475614.116ab.1477c4397e2.Coremail.c_dddd@163.com>:
>>>> >> hi,
>>>> >> 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"
>>>> >
>>>> >"crm configure edit test-ip"?
>>>> >
>>>> >>
>>>> >> _______________________________________________
>>>> >> Linux-HA mailing list
>>>> >> Linux-HA@lists.linux-ha.org
>>>> >> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>>> >> See also: http://linux-ha.org/ReportingProblems
>>>> >
>>>> >
>>>> >
>>>> >_______________________________________________
>>>> >Linux-HA mailing list
>>>> >Linux-HA@lists.linux-ha.org
>>>> >http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>>> >See also: http://linux-ha.org/ReportingProblems
>>>> _______________________________________________
>>>> Linux-HA mailing list
>>>> Linux-HA@lists.linux-ha.org
>>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>>> See also: http://linux-ha.org/ReportingProblems
>>>>
>>>
>>>
>>>
>>>--
>>>// Kristoffer Grönlund
>>>// kgronlund@suse.com
>>
>>
>> _______________________________________________
>> Linux-HA mailing list
>> Linux-HA@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
>_______________________________________________
>Linux-HA mailing list
>Linux-HA@lists.linux-ha.org
>http://lists.linux-ha.org/mailman/listinfo/linux-ha
>See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Antw: How to modify crm configure by command line [ In reply to ]
On Tue, 29 Jul 2014 08:11:26 +0200
"Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de> wrote:

> BTW, I have a question: What is the difference of crm configure load
> replace <file> and using crm configure edit (and replace the contents
> in the editor with <file>)? I had a case where the first method
> showed many errors while the second version worked. And: <file> was
> created by crm configure save <file>.

That sounds like a possible bug, if you have a reproducible case it
would be great if you could file an issue at
https://github.com/crmsh/crmsh/issues

Thanks,

--
// Kristoffer Grönlund
// kgronlund@suse.com
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Antw: How to modify crm configure by command line [ In reply to ]
Moullé Alain <alain.moulle@bull.net> 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"/>'
--
Regards,
Feri.
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Antw: How to modify crm configure by command line [ In reply to ]
>>> Ferenc Wagner <wferi@niif.hu> schrieb am 22.08.2014 um 21:13 in Nachricht
<8761hkficj.fsf@lant.ki.iif.hu>:
> Moullé Alain <alain.moulle@bull.net> 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
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems


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