Mailing List Archive

Antw: Re: RA spec: explicit "probe" operation?
>>> Andrew Beekhof <andrew@beekhof.net> schrieb am 08.07.2011 um 02:54 in Nachricht
<CAEDLWG014utN21v6ekk=0Sm160NzuUwig9zOCy1iCtBeCNbXjQ@mail.gmail.com>:
> On Thu, Jul 7, 2011 at 8:42 PM, Lars Marowsky-Bree <lmb@suse.de> wrote:
> > On 2011-07-06T17:43:01, Florian Haas <florian.haas@linbit.com> wrote:
[...]
> Either:
>
> 1) start must always call validate-all, or
> 2) RA writers duplicate the validate-all checks in start

I disagree on that: Once the parameters are configured, they are not expected to change without revalidation. So there's little sense to check the SYNTAX gaian in "start". To my understanding "validate-all" may only do syntax checks, because any semantic checks may rely on resources that are not started at the moment when "validate-all" is called.

Also, if you demand a validation for "start", you could also demand one for "stop", etc.

>
> Otherwise your assertion that:
>
> > > Calling
> > > "validate-all" doesn't provide any additional information that calling
> > > "start" directly wouldn't; it is superfluous.

I think "start" can do semantic checks (like: "does the user exist?", "does the file exist?", "does the process exist?"). So these are not duplicated checks from validate-all, but 2nd-level checks.

>
> Is incorrect.
>
> I think most of us are agreeing that neither are desirable and that
>
> 3) we automatically call validate-all before start

No that's wrong IMHO. validate-all should be called before a resource's configuration is committed. Then the committed parameters are validated. Further testing involves real actions.

Wouldn't you agree?

Regards,
Ulrich


_______________________________________________
ha-wg-technical mailing list
ha-wg-technical@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/ha-wg-technical
Re: RA spec: explicit "probe" operation? [ In reply to ]
On Fri, Jul 8, 2011 at 5:20 PM, Ulrich Windl
<Ulrich.Windl@rz.uni-regensburg.de> wrote:
>>>> Andrew Beekhof <andrew@beekhof.net> schrieb am 08.07.2011 um 02:54 in Nachricht
> <CAEDLWG014utN21v6ekk=0Sm160NzuUwig9zOCy1iCtBeCNbXjQ@mail.gmail.com>:
>> On Thu, Jul 7, 2011 at 8:42 PM, Lars Marowsky-Bree <lmb@suse.de> wrote:
>> > On 2011-07-06T17:43:01, Florian Haas <florian.haas@linbit.com> wrote:
> [...]
>> Either:
>>
>> 1) start must always call validate-all, or
>> 2) RA writers duplicate the validate-all checks in start
>
> I disagree on that: Once the parameters are configured, they are not expected to change without revalidation. So there's little sense to check the SYNTAX gaian in "start". To my understanding "validate-all" may only do syntax checks, because any semantic checks may rely on resources that are not started at the moment when "validate-all" is called.

I don't believe you understand what you're replying to.

>
> Also, if you demand a validation for "start", you could also demand one for "stop", etc.
>
>>
>> Otherwise your assertion that:
>>
>> > > Calling
>> > > "validate-all" doesn't provide any additional information that calling
>> > > "start" directly wouldn't; it is superfluous.
>
> I think "start" can do semantic checks (like: "does the user exist?", "does the file exist?", "does the process exist?"). So these are not duplicated checks from validate-all, but 2nd-level checks.
>
>>
>> Is incorrect.
>>
>> I think most of us are agreeing that neither are desirable and that
>>
>> 3) we automatically call validate-all before start
>
> No that's wrong IMHO. validate-all should be called before a resource's configuration is committed. Then the committed parameters are validated. Further testing involves real actions.
>
> Wouldn't you agree?
>
> Regards,
> Ulrich
>
>
>
_______________________________________________
ha-wg-technical mailing list
ha-wg-technical@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/ha-wg-technical
Antw: Re: RA spec: explicit "probe" operation? [ In reply to ]
>>> Dejan Muhamedagic <dejan@suse.de> schrieb am 09.07.2011 um 15:09 in
Nachricht
<20110709130937.GA10935@rondo.homenet>:
> On Fri, Jul 08, 2011 at 11:40:03PM +0200, Lars Marowsky-Bree wrote:
[...]
> > validate-all was never meant to be an automatic operation. It was meant
> > as a UI aid, not as a mandatory step. We _can_ redefine that, but then
> > most likely all RAs out there will need fixing. (More than they already
> > do.) For little to negative gain.
>
> I'd agree.

Hi!

"validate-all" is still required. So I expect when having to implement
"vaölidate-all" it should be used. Of course anybody can implement a lousy
"validate-all", but that's up to the RA author.
I think "validate-all" is mean for the "configure phase", while "start",
"stop", "monitor are ment for the execution phase.
I would also think that parameters don't change after a validate-all, without
validate-all being called again. Independent of how light and heavy a
validate-all is, I think it's not necessary to call it (implicitly or
explicitly) before any start, stop, or monitor.

Regards,
Ulrich

_______________________________________________
ha-wg-technical mailing list
ha-wg-technical@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/ha-wg-technical
Re: Antw: Re: RA spec: explicit "probe" operation? [ In reply to ]
On 2011-07-11 08:53, Ulrich Windl wrote:
>>>> Dejan Muhamedagic <dejan@suse.de> schrieb am 09.07.2011 um 15:09 in
> Nachricht
> <20110709130937.GA10935@rondo.homenet>:
>> On Fri, Jul 08, 2011 at 11:40:03PM +0200, Lars Marowsky-Bree wrote:
> [...]
>>> validate-all was never meant to be an automatic operation. It was meant
>>> as a UI aid, not as a mandatory step. We _can_ redefine that, but then
>>> most likely all RAs out there will need fixing. (More than they already
>>> do.) For little to negative gain.
>>
>> I'd agree.
>
> Hi!
>
> "validate-all" is still required. So I expect when having to implement
> "vaölidate-all" it should be used. Of course anybody can implement a lousy
> "validate-all", but that's up to the RA author.
> I think "validate-all" is mean for the "configure phase", while "start",
> "stop", "monitor are ment for the execution phase.
> I would also think that parameters don't change after a validate-all, without
> validate-all being called again.

Even if the parameters don't change, the environment might. So it is
entirely possible that validate-all returns success once, and then
OCF_ERR_INSTALLED on the next invocation, for example. Just fyi.

> Independent of how light and heavy a
> validate-all is, I think it's not necessary to call it (implicitly or
> explicitly) before any start, stop, or monitor.

Oh heck yes it is. Not necessarily all of them, but definitely some. The
question being discussed here is whether the resource agent should take
care of this by itself (by invoking the function in the appropriate
place), or whether the cluster manager should invoke the RA twice, once
with validate-all and then with the followup action.

Florian
Re: Antw: Re: RA spec: explicit "probe" operation? [ In reply to ]
>>> Florian Haas <florian.haas@linbit.com> schrieb am 11.07.2011 um 09:22 in
Nachricht <4E1AA498.5060409@linbit.com>:
> On 2011-07-11 08:53, Ulrich Windl wrote:
>>>>> Dejan Muhamedagic <dejan@suse.de> schrieb am 09.07.2011 um 15:09 in
> > Nachricht
> > <20110709130937.GA10935@rondo.homenet>:

[...]
> > Independent of how light and heavy a
> > validate-all is, I think it's not necessary to call it (implicitly or
> > explicitly) before any start, stop, or monitor.
>
> Oh heck yes it is. Not necessarily all of them, but definitely some. The
> question being discussed here is whether the resource agent should take
> care of this by itself (by invoking the function in the appropriate
> place), or whether the cluster manager should invoke the RA twice, once
> with validate-all and then with the followup action.

Hi!

I think this is a classical example of over-specification (although you avoid the word "specification" as much as possible): A "start" method cann still return OCF_ERR_INSTALLED without "validate-all" ever being used internally.
And if you are worried the configuration might change while a resource is up, it would be preferrable to call "validate-all" periodically (just as with "monitor") to detect that the configuration is invalid, before trying to stop or restart the resource (assuming a misconfigured resource woudn't stop cleanly as well). Still, detecting the problem does not help much; better would be avoiding the problem. "validate-all" cannot help here, however.

Regards,
Ulrich


_______________________________________________
ha-wg-technical mailing list
ha-wg-technical@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/ha-wg-technical