[Linux-HA] Can't reload grouped resources

Andrew Beekhof beekhof at gmail.com
Tue Nov 13 00:41:15 MST 2007


groups are hardwired to restart children >N when child N restarts

if you want the behavior described, don't use a group... specify the  
resources and constraints manually.

On Nov 13, 2007, at 2:26 AM, Aníbal Monsalve Salazar wrote:

> We are able to successfully trigger reloads for HA resources (by
> changing the value of a non-unique RA parameter), provided they are  
> not
> in a group.  Once resources are grouped, changing the same non-unique
> parameter always results in a full restart of the resource, and all
> dependent resources.  Here's a simple demonstration of this problem:
>
> 1) Edit /usr/lib/ocf/resource.d/heartbeat/Dummy and add a non-unique
>   parameter so you can trigger a reload:
>
>    --- Dummy.orig  2007-11-12 14:45:21.378089227 +1100
>    +++ Dummy       2007-11-12 14:15:26.121908269 +1100
>    @@ -57,6 +57,12 @@
>     <content type="string"
>      default="${HA_RSCTMP}/Dummy-{OCF_RESOURCE_INSTANCE}.state" />
>     </parameter>
>
>    +<parameter name="reload-trigger" unique="0">
>    +<longdesc lang="en">Change this to trigger a reload</longdesc>
>    +<shortdesc lang="en">Change this to trigger a reload</shortdesc>
>    +<content type="string"/>
>    +</parameter>
>    +
>     </parameters>
>
> 2) Create a standalone resource, a group containing two resources,
>   and appropriate constraints:
>
>    <resources>
>      <primitive id="test-reload-primitive" class="ocf"
>        provider="heartbeat" type="Dummy"/>
>      <group id="test-group">
>        <primitive id="test-reload-grouped-1" class="ocf"
>          provider="heartbeat" type="Dummy"/>
>        <primitive id="test-reload-grouped-2" class="ocf"
>          provider="heartbeat" type="Dummy"/>
>      </group>
>    </resources>
>    <constraints>
>      <rsc_location rsc="test-reload-primitive">
>        <rule score="INFINITY">
>          <expression attribute="#uname" operation="eq"  
> value="node-0"/>
>        </rule>
>      </rsc_location>
>      <rsc_location rsc="test-group">
>        <rule score="INFINITY">
>          <expression attribute="#uname" operation="eq"  
> value="node-0"/>
>        </rule>
>      </rsc_location>
>    </constraints>
>
> 3) Try to trigger a reload of each of the three resources:
>
>     # crm_resource --resource "test-reload-primitive" --set- 
> parameter \
>         "reload-trigger" --property-value "$(date --rfc-3339=ns)"
>
>     # crm_resource --resource "test-reload-grouped-1" --set- 
> parameter \
>         "reload-trigger" --property-value "$(date --rfc-3339=ns)"
>
>     # crm_resource --resource "test-reload-grouped-2" --set- 
> parameter \
>         "reload-trigger" --property-value "$(date --rfc-3339=ns)"
>
>   If you tail /var/log/messages while doing this, you'll see the
>   standalone resource is reloaded correctly:
>
>     Nov 12 14:36:38 node-0 Dummy[20400]: [20407]: ERROR: Reloading...
>     Nov 12 14:36:38 node-0 Dummy[20400]: [20408]: DEBUG:
>       test-reload-primitive reload : 0
>
>   The other two resources however do a full stop-and-start:
>
>     Nov 12 14:37:01 node-0 Dummy[20562]: [20570]: DEBUG:
>       test-reload-grouped-2 stop : 0
>     Nov 12 14:37:02 node-0 Dummy[20571]: [20578]: DEBUG:
>       test-reload-grouped-1 stop : 0
>     Nov 12 14:37:03 node-0 Dummy[20582]: [20589]: DEBUG:
>       test-reload-grouped-1 start : 0
>     Nov 12 14:37:04 node-0 Dummy[20590]: [20597]: DEBUG:
>       test-reload-grouped-2 start : 0
>
>
> We need to be able to do a reload of individual resources within a
> group.  Is there anything extra we should be configuring in order to
> allow this?
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems



More information about the Linux-HA mailing list