Mailing List Archive

Antw: Re: Antw: Re: crmsh fails to stop already stopped resource
>>> Dejan Muhamedagic <dejanmm@fastmail.fm> schrieb am 18.02.2015 um 11:04 in
Nachricht <20150218100410.GA30682@tuttle.linbit>:
> Hi,
>
> On Wed, Feb 18, 2015 at 08:21:10AM +0100, Ulrich Windl wrote:
>> >>> Kristoffer Grönlund<kgronlund@suse.com> schrieb am 16.02.2015 um 09:15
in
>> Nachricht <87oaougtlw.fsf@krigpad.kri.gs>:
>> > Vladislav Bogdanov <bubble@hoster-ok.com> writes:
>> >
>> >> Hi Kristoffer,
>> >>
>> >> may be it is worth to silently (or at least with rc=0) allow deletion of

>> >> non-existing or already-deleted configuration statements?
>> >>
>> >> Background for that is that I keep track of the all configuration
>> >> statements myself, and, when I delete some resources (together with
>> >> accompanying constraints), they may go "out-of-order" to 'crm configure

>> >> delete', thus some constraints are automatically deleted when deleting
>> >> "lower" resource before the "upper" one. That leads to the whole crm
>> >> script to fail.
>> >
>> > Hmm, I am not sure about doing this by default, since we would want to
>> > show some kind of indication that a resource name may have been
>> > misspelled for example... But I can imagine having a command line flag
>> > for being more flexible in this regard.
>>
>> I'd agree: Stopping a stopped resource is different from deleting a
resource
>> that does not exist (maybe never existed). Maybe (for scripting) crm shell
>> would benefit from a "crm resource exists <rsc_name>" returning a status
>> (yes/no/error).
>
> You could use crm resource status for that. It should exit with
> error only if the resource doesn't exist.

Ah! I haven't ried, but from what I thought "crm resource status" would output
all resources, and I thought one had to parse the output for a single resource.
Your answer suggests I can add a resource name to get just the resource I'm
interested in. (Dind't know that)

Trying that I found a minor problem for a clone resource with on node bing
standby:
--
crm(live)resource# status cln_cLVMd
resource cln_cLVMd is running on: h01
resource cln_cLVMd is running on: h05
resource cln_cLVMd is NOT running
--
Here it's not obvious on which node the resource is not running (missing " on:
h??").

Regards,
Ulrich

>
> Thanks,
>
> Dejan
>
> _______________________________________________
> 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: Re: Antw: Re: crmsh fails to stop already stopped resource [ In reply to ]
On Wed, Feb 18, 2015 at 12:44:39PM +0100, Ulrich Windl wrote:
> >>> Dejan Muhamedagic <dejanmm@fastmail.fm> schrieb am 18.02.2015 um 11:04 in
> Nachricht <20150218100410.GA30682@tuttle.linbit>:
> > Hi,
> >
> > On Wed, Feb 18, 2015 at 08:21:10AM +0100, Ulrich Windl wrote:
> >> >>> Kristoffer Grönlund<kgronlund@suse.com> schrieb am 16.02.2015 um 09:15
> in
> >> Nachricht <87oaougtlw.fsf@krigpad.kri.gs>:
> >> > Vladislav Bogdanov <bubble@hoster-ok.com> writes:
> >> >
> >> >> Hi Kristoffer,
> >> >>
> >> >> may be it is worth to silently (or at least with rc=0) allow deletion of
>
> >> >> non-existing or already-deleted configuration statements?
> >> >>
> >> >> Background for that is that I keep track of the all configuration
> >> >> statements myself, and, when I delete some resources (together with
> >> >> accompanying constraints), they may go "out-of-order" to 'crm configure
>
> >> >> delete', thus some constraints are automatically deleted when deleting
> >> >> "lower" resource before the "upper" one. That leads to the whole crm
> >> >> script to fail.
> >> >
> >> > Hmm, I am not sure about doing this by default, since we would want to
> >> > show some kind of indication that a resource name may have been
> >> > misspelled for example... But I can imagine having a command line flag
> >> > for being more flexible in this regard.
> >>
> >> I'd agree: Stopping a stopped resource is different from deleting a
> resource
> >> that does not exist (maybe never existed). Maybe (for scripting) crm shell
> >> would benefit from a "crm resource exists <rsc_name>" returning a status
> >> (yes/no/error).
> >
> > You could use crm resource status for that. It should exit with
> > error only if the resource doesn't exist.
>
> Ah! I haven't ried, but from what I thought "crm resource status" would output
> all resources, and I thought one had to parse the output for a single resource.
> Your answer suggests I can add a resource name to get just the resource I'm
> interested in. (Dind't know that)

Right.

> Trying that I found a minor problem for a clone resource with on node bing
> standby:
> --
> crm(live)resource# status cln_cLVMd
> resource cln_cLVMd is running on: h01
> resource cln_cLVMd is running on: h05
> resource cln_cLVMd is NOT running
> --
> Here it's not obvious on which node the resource is not running (missing " on:
> h??").

Heh. Looks like you should file an enhancement bug. I suppose
that if the resource is running on some node(s) then the "not
running" could just be omitted. BTW, crmsh is just invoking
crm_resource -W.

Thanks,

Dejan

> Regards,
> Ulrich
>
> >
> > Thanks,
> >
> > Dejan
> >
> > _______________________________________________
> > 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: Re: Antw: Re: crmsh fails to stop already stopped resource [ In reply to ]
Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> writes:

>
> Trying that I found a minor problem for a clone resource with on node bing
> standby:
> --
> crm(live)resource# status cln_cLVMd
> resource cln_cLVMd is running on: h01
> resource cln_cLVMd is running on: h05
> resource cln_cLVMd is NOT running
> --
> Here it's not obvious on which node the resource is not running (missing " on:
> h??").
>

This is a very odd result, that output is generated by crm_resource, and
you shouldn't get the "NOT running" line if the resource really is
running somewhere.

Do you get the same output if you run

crm_resource -W -r cln_cLVMd

directly?

Also, which version of pacemaker are you running?

Cheers,
Kristoffer


> Regards,
> Ulrich
>
>>
>> Thanks,
>>
>> Dejan
>>
>> _______________________________________________
>> 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