Great, it works, thank you guys!

On Mon, Dec 6, 2010 at 4:42 PM, Dan Frincu <[email protected]> wrote:

> Hi,
>
> Bin Chen(sunwen_ling) wrote:
> > Thanks for all your replies, but I still failed, the resource will still
> > migrated even I have setup the resource stickiness, the process I am
> using
> > is:
> >
> > 1) running resouce in xcp-1
> > 2) /etc/init.d/heartbeat stop in xcp-1
> > 3) resource running xcp-3(expected)
> > 4) /etc/init.d/heartbeat start in xcp-3
> > 5) resource running xcp-1(unexpected)
> >
> > Please help.
> >
> > The configure of crm:
> >
> > crm(live)configure# show xml
> > <?xml version="1.0" ?>
> > <cib admin_epoch="0" cib-last-written="Mon Dec  6 00:28:26 2010"
> > crm_feature_set="3.0.1" dc-uuid="d111371b-51bd-41f0-a764-4e2f7616e47a"
> > epoch="18" have-quorum="1" num_updates="28"
> validate-with="pacemaker-1.0">
> >   <configuration>
> >     <crm_config>
> >       <cluster_property_set id="cib-bootstrap-options">
> >         <nvpair id="cib-bootstrap-options-dc-version" name="dc-version"
> > value="1.0.10-da7075976b5ff0bee71074385f8fd02f296ec8a3"/>
> >         <nvpair id="cib-bootstrap-options-cluster-infrastructure"
> > name="cluster-infrastructure" value="Heartbeat"/>
> >         <nvpair id="cib-bootstrap-options-stonith-enabled"
> > name="stonith-enabled" value="false"/>
> >         <nvpair id="cib-bootstrap-options-default-resource-stickiness"
> > name="default-resource-stickiness" value="100"/>
> >       </cluster_property_set>
> >     </crm_config>
> >     <rsc_defaults/>
> >     <op_defaults/>
> >     <nodes>
> >       <node id="51fbafc2-2ca9-4123-b1e0-43927f6eccb6" type="normal"
> > uname="xcp-1"/>
> >       <node id="d111371b-51bd-41f0-a764-4e2f7616e47a" type="normal"
> > uname="xcp-3"/>
> >     </nodes>
> >     <resources>
> >       <primitive class="ocf" id="test-binch" provider="heartbeat"
> > type="binch">
> >         <meta_attributes id="test-binch-meta_attributes">
> >           <nvpair id="test-binch-meta_attributes-resource-stickiness"
> > name="resource-stickiness" value="100"/>
> >         </meta_attributes>
> >         <operations>
> >           <op id="test-binch-monitor-3s" interval="3s" name="monitor"/>
> >         </operations>
> >       </primitive>
> >     </resources>
> >     <constraints/>
> >   </configuration>
> > </cib>
> >
> >
> Dejan showed you before how to apply the configuration. If it still
> isn't clear, please see page 25 of
> http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>
> In the XML it shows like this
>
>    <rsc_defaults>
>      <meta_attributes id="rsc-options">
>        <nvpair id="rsc-options-resource-stickiness"
> name="resource-stickiness" value="1000"/>
>      </meta_attributes>
>    </rsc_defaults>
>
> Where the value is "a positive (but not infinity) default resource
> stickiness"
>
> HTH
> > On Mon, Dec 6, 2010 at 4:19 PM, Dejan Muhamedagic <[email protected]
> >wrote:
> >
> >
> >> Hi,
> >>
> >> On Mon, Dec 06, 2010 at 03:20:19PM +0800, Bin Chen(sunwen_ling) wrote:
> >>
> >>> Thanks for your answer, I just do a google search but can't find how to
> >>>
> >> set
> >>
> >>> the resource stickness, can you point me some document that how can I
> add
> >>>
> >> a
> >>
> >>> resource stickness to a primitive?
> >>>
> >> primitive ... meta resource-stickiness=n
> >>
> >> Thanks,
> >>
> >> Dejan
> >>
> >>
> >>> Bin
> >>>
> >>> On Mon, Dec 6, 2010 at 3:20 AM, Lars Ellenberg <
> >>>
> >> [email protected]>wrote:
> >>
> >>>> On Sun, Dec 05, 2010 at 02:02:25PM +0800, Bin Chen(sunwen_ling) wrote:
> >>>>
> >>>>> Hi Dan, Thanks so much for your explanation!
> >>>>>
> >>>>> I am wondering is there an easy way to change the default behavior?
> >>>>>
> >> Can I
> >>
> >>>>> set the score dynamically when the resource is going up(set the
> >>>>>
> >> currently
> >>
> >>>>> running node higher than other node)?
> >>>>> I just don't want the resource to be migrated unnecessarily. The
> >>>>>
> >> result I
> >>
> >>>>> want is, when the resource is running in one node, regardless of
> >>>>>
> >> other
> >>
> >>>> node
> >>>>
> >>>>> status, and as long as currently node is up and running, the resouce
> >>>>> shouldn't be migrated.
> >>>>>
> >>>>> I don't know if I set the location constraints works, because what I
> >>>>>
> >> want
> >>
> >>>> is
> >>>>
> >>>>> some sort of dynamic feature, not restrict the resource to some
> >>>>>
> >> permanent
> >>
> >>>>> ones.
> >>>>>
> >>>>> Can you please suggest?
> >>>>>
> >>>> set a positive (but not infinity) default resource stickiness
> >>>>
> >>>> --
> >>>> : Lars Ellenberg
> >>>> : LINBIT | Your Way to High Availability
> >>>> : DRBD/HA support and consulting http://www.linbit.com
> >>>>
> >>>> DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
> >>>> _______________________________________________
> >>>> 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
> >>>
> >> _______________________________________________
> >> 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
> >
>
> --
> Dan FRINCU
> Systems Engineer
> CCNA, RHCE
> Streamwide Romania
>
> _______________________________________________
> 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

Reply via email to