[Pacemaker] crm_mon shows wrong value of migration-threshold.

Andrew Beekhof beekhof at gmail.com
Mon Aug 4 07:43:31 UTC 2008


done

http://hg.clusterlabs.org/pacemaker/dev/rev/77e60a30218b

On Aug 4, 2008, at 4:41 AM, Satomi Taniguchi wrote:

> Hi,
>
> I found that the value of migration-threshold which crm_mon shows is  
> odd
> with the latest Pacemaker-dev(b5a66eb9c9c0).
> It shows default-migration-threshold's value, not the value of
> each resource's migration-threshold.
> (Please see the attached files.)
>
> Maybe, this is because the timing that common_apply_stickiness() is
> called has changed.
> Is it a right way to solve it to return the function to
> unpack_lrm_resources()?
>
> Regards,
> Satomi Taniguchi
> <cib admin_epoch="0" epoch="17" crm_feature_set="3.0" validate- 
> with="transitional-0.6" num_updates="2" have-quorum="1" cib-last- 
> written="Fri Aug  1 11:07:19 2008" dc-uuid="2fdcdb68-89cb-43e0- 
> a93f-137bebdc5edc">
>   <configuration>
>     <crm_config>
>       <cluster_property_set id="cib-bootstrap-options">
>         <attributes>
>           <nvpair id="cib-bootstrap-options-no-quorum-policy"  
> name="no-quorum-policy" value="ignore"/>
>           <nvpair id="cib-bootstrap-options-stonith-enabled"  
> name="stonith-enabled" value="true"/>
>           <nvpair id="cib-bootstrap-options-default-resource- 
> stickiness" name="default-resource-stickiness" value="INFINITY"/>
>           <nvpair id="cib-bootstrap-options-default-migration- 
> threshold" name="default-migration-threshold" value="3"/>
>           <nvpair id="cib-bootstrap-options-default-action-timeout"  
> name="default-action-timeout" value="120s"/>
>           <nvpair id="cib-bootstrap-options-dc-version" name="dc- 
> version" value="0.7.0-bde0c7db74fb+ tip"/>
>         </attributes>
>       </cluster_property_set>
>     </crm_config>
>     <nodes>
>       <node id="2fdcdb68-89cb-43e0-a93f-137bebdc5edc"  
> uname="rh5u2node2" type="normal"/>
>     </nodes>
>     <resources>
>       <group id="grpPostgreSQLDB">
>         <instance_attributes id="grpPostgreSQLDB_instance_attrs">
>           <attributes>
>             <nvpair id="grpPostgreSQLDB_migration_threshold"  
> name="migration-threshold" value="2"/>
>           </attributes>
>         </instance_attributes>
>         <primitive id="prmIpPostgreSQLDB" class="ocf" type="IPaddr"  
> provider="heartbeat">
>           <instance_attributes id="prmIpPostgreSQLDB_instance_attrs">
>             <attributes>
>               <nvpair id="prmIpPostgreSQLDB_instance_attrs-ip"  
> name="ip" value="192.168.70.70"/>
>               <nvpair id="prmIpPostgreSQLDB_instance_attrs-nic"  
> name="nic" value="eth0"/>
>               <nvpair id="prmIpPostgreSQLDB_instance_attrs- 
> cidr_netmask" name="cidr_netmask" value="24"/>
>             </attributes>
>           </instance_attributes>
>           <operations>
>             <op id="815949a3-9242-4afe-8f2e-0be3a6332ebb"  
> name="start" timeout="60" on_fail="restart"/>
>             <op id="5f3c4086-ed52-477b-83c8-712f5ae155a0"  
> name="monitor" interval="10" timeout="60" on_fail="restart"/>
>             <op id="2a4f01f7-4627-46a2-94db-738cda3078b2"  
> name="stop" timeout="60" on_fail="block"/>
>           </operations>
>         </primitive>
>         <primitive id="prmApPostgreSQLDB" class="ocf" type="pgsql"  
> provider="heartbeat">
>           <instance_attributes id="prmApPostgreSQLDB_instance_attrs">
>             <attributes>
>               <nvpair id="prmApPostgreSQLDB_instance_attrs-pgctl"  
> name="pgctl" value="/usr/local/pgsql/bin/pg_ctl"/>
>               <nvpair id="prmApPostgreSQLDB_instance_attrs- 
> start_opt" name="start_opt" value="-p 5432 -h localhost"/>
>               <nvpair id="prmApPostgreSQLDB_instance_attrs-psql"  
> name="psql" value="/usr/local/pgsql/bin/psql"/>
>               <nvpair id="prmApPostgreSQLDB_instance_attrs-pgdata"  
> name="pgdata" value="/home/postgres/pgdata"/>
>               <nvpair id="prmApPostgreSQLDB_instance_attrs-pgdba"  
> name="pgdba" value="postgres"/>
>               <nvpair id="prmApPostgreSQLDB_instance_attrs-pgport"  
> name="pgport" value="5432"/>
>               <nvpair id="prmApPostgreSQLDB_instance_attrs-pgdb"  
> name="pgdb" value="template1"/>
>               <nvpair id="prmApPostgreSQLDB_migration_threshold"  
> name="migration-threshold" value="1"/>
>             </attributes>
>           </instance_attributes>
>           <operations>
>             <op id="prmApPostgreSQLDB_operations-start" name="start"  
> timeout="300" on_fail="restart"/>
>             <op id="prmApPostgreSQLDB_operations-monitor"  
> name="monitor" interval="10" timeout="60" on_fail="restart"/>
>             <op id="prmApPostgreSQLDB_operations-stop" name="stop"  
> timeout="300" on_fail="block"/>
>           </operations>
>         </primitive>
>       </group>
>       <primitive id="stonith-1" class="stonith" type="external/ssh"  
> provider="heartbeat">
>         <instance_attributes id="stonith-1:attrs">
>           <attributes>
>             <nvpair id="stonith-1:hostlist" name="hostlist"  
> value="rh5u2node1"/>
>           </attributes>
>         </instance_attributes>
>       </primitive>
>       <primitive id="stonith-2" class="stonith" type="external/ssh"  
> provider="heartbeat">
>         <instance_attributes id="stonith-2:attrs">
>           <attributes>
>             <nvpair id="stonith-2:hostlist" name="hostlist"  
> value="rh5u2node2"/>
>           </attributes>
>         </instance_attributes>
>       </primitive>
>     </resources>
>     <constraints>
>       <rsc_location id="rulPostgreSQLDB_node01" rsc="grpPostgreSQLDB">
>         <rule id="prefered_rulPostgreSQLDB_node01" score="200">
>           <expression attribute="#uname"  
> id="prefered_rulPostgreSQLDB_node01-expression1" operation="eq"  
> value="rh5u2node1"/>
>         </rule>
>       </rsc_location>
>       <rsc_location id="rulPostgreSQLDB_node02" rsc="grpPostgreSQLDB">
>         <rule id="prefered_rulPostgreSQLDB_node02" score="100">
>           <expression attribute="#uname"  
> id="prefered_rulPostgreSQLDB_node02-expression1" operation="eq"  
> value="rh5u2node2"/>
>         </rule>
>       </rsc_location>
>       <rsc_location id="ping0:disconnect" rsc="grpPostgreSQLDB">
>         <rule id="prefered_ping0:disconnect" score="-INFINITY"  
> boolean_op="and">
>           <expression attribute="default_ping_set"  
> id="prefered_ping0:disconnect-expression1" operation="defined"/>
>           <expression attribute="default_ping_set"  
> id="prefered_ping0:disconnect-expression2" operation="lt"  
> value="100"/>
>         </rule>
>       </rsc_location>
>       <rsc_location id="disk0:disconnect" rsc="grpPostgreSQLDB">
>         <rule id="prefered_disk0:disconnect" score="-INFINITY"  
> boolean_op="and">
>           <expression attribute="diskcheck_status"  
> id="prefered_disk0:disconnect-expression1" operation="defined"/>
>           <expression attribute="diskcheck_status"  
> id="prefered_disk0:disconnect-expression2" operation="eq"  
> value="ERROR"/>
>         </rule>
>       </rsc_location>
>       <rsc_location id="stonith-1_hates_rh5u2node1" rsc="stonith-1">
>         <rule id="stonith-1_hates_rh5u2node1_rule" score="-INFINITY">
>           <expression attribute="#uname" operation="eq"  
> value="rh5u2node1" id="stonith-1_hates_rh5u2node1_expr"/>
>         </rule>
>       </rsc_location>
>       <rsc_location id="stonith-2_hates_rh5u2node2" rsc="stonith-2">
>         <rule id="stonith-2_hates_rh5u2node2_rule" score="-INFINITY">
>           <expression attribute="#uname" operation="eq"  
> value="rh5u2node2" id="stonith-2_hates_rh5u2node2_expr"/>
>         </rule>
>       </rsc_location>
>     </constraints>
>   </configuration>
> </cib>
>
>
> ============
> Last updated: Mon Aug  4 09:55:51 2008
> Current DC: rh5u2node2 (2fdcdb68-89cb-43e0-a93f-137bebdc5edc)
> 1 Nodes configured.
> 3 Resources configured.
> ============
>
> Node: rh5u2node2 (2fdcdb68-89cb-43e0-a93f-137bebdc5edc): online
>
> Resource Group: grpPostgreSQLDB
>    prmIpPostgreSQLDB	(ocf::heartbeat:IPaddr):	Started rh5u2node2
>    prmApPostgreSQLDB	(ocf::heartbeat:pgsql):	Started rh5u2node2
> stonith-1	(stonith:external/ssh):	Started rh5u2node2
>
> Operations:
> * Node rh5u2node2:
>   stonith-1: migration-threshold=3
>    + start: rc=0 (ok)
>   prmApPostgreSQLDB: migration-threshold=3
>    + start: rc=0 (ok)
>    + monitor: interval=10000ms rc=0 (ok)
>   prmIpPostgreSQLDB: migration-threshold=3
>    + start: rc=0 (ok)
>    + monitor: interval=10000ms rc=0 (ok)
> Cleaning up CIB connection: 1
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at clusterlabs.org
> http://list.clusterlabs.org/mailman/listinfo/pacemaker





More information about the Pacemaker mailing list