On Wed, Apr 16, 2008 at 3:07 PM, Michael Schwartzkopff
<[EMAIL PROTECTED]> wrote:
> Am Mittwoch, 16. April 2008 14:55 schrieb Andrew Beekhof:
>
> > > > actually it is implemented - just not that way
> > > >
> > > > you have to advertise the reload function in the RA (see the Dummy RA).
> > > > you also have to set unique=0 for any attribute that causes a reload
> > > > instead of a restart when changed.
> > > >
> > > > then, to cause a reload, just change the attribute you indicated
>
>
> Sorry, I did not get this.
Ok, so right now Dummy only takes one parameter called "state" (no
idea why I called it that).
Add a new one, but make it non-unique.
<parameter name="somename" unique="0">
<longdesc lang="en">
Random parameter that, when changed, causes a reload instead of a restart
</longdesc>
<shortdesc lang="en">Some parameter</shortdesc>
<content type="string" default="" />
</parameter>
And make sure the agent advertises the reload operation:
<action name="reload" timeout="90" />
Then when defining the resource, include an nvpair for "somename". eg
<primitive class="ocf" id="test" provider="heartbeat"
type="Dummy">
<instance_attributes id="test">
<attributes>
<nvpair id="test_someename"
name="someename" value="a"/>
</attributes>
</instance_attributes>
</primitive>
Then just change the value of "somename" and the resource will get reloaded.
>
> I saw the reload action in the Dummy RA but no sample of an attribute which
> would trigger that action. As fas as I understood a change in an attribute of
> the agent would call the reload function. How would you implement this?
>
> Something like:
>
> During start of the agent:
> echo $OCF_RESKEY_trigger > /tmp/dummy_trigger
>
> In the monitor part of the agent:
> if $OCF_RESKEY_trigger != `cat /tmp/dummy_trigger`
> then
> echo $OCF_RESKEY_trigger > /tmp/dummy_trigger
> reload
> fi
>
>
> Greetings,
>
>
> --
> Dr. Michael Schwartzkopff
> MultiNET Services GmbH
> Addresse: Bretonischer Ring 7; 85630 Grasbrunn; Germany
> Tel: +49 - 89 - 45 69 11 0
> Fax: +49 - 89 - 45 69 11 21
> mob: +49 - 174 - 343 28 75
>
> mail: [EMAIL PROTECTED]
> web: www.multinet.de
>
> Sitz der Gesellschaft: 85630 Grasbrunn
> Registergericht: Amtsgericht München HRB 114375
> Geschäftsführer: Günter Jurgeneit, Hubert Martens
>
> ---
>
> PGP Fingerprint: F919 3919 FF12 ED5A 2801 DEA6 AA77 57A4 EDD8 979B
> Skype: misch42
> _______________________________________________
>
>
> 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