in the code being readied for 1.0, you can have recurring actions repeat at specific intervals - which would achieve what you're after.
but in 0.6 there is no clean way to do this automatically to restart it manually, use "crm_resource --meta -p ..." to set and reset target_role On Tue, Jul 22, 2008 at 16:44, Ehlers, Kolja <[EMAIL PROTECTED]> wrote: > I am still trying to find a solution for this. If noone knows how to restart > a resource at a specific time, what is the savest way to restart a resource > manually? > > If I use the tomcat LSB script to stop tomcat even the tomcat clone on the > other node is being stopped and then started again. I dont want this to > happen. I need at least one of the clones to be always available. > > Is there a way to restart a single cloned resource without stoppin the other > one? > > Thanks > > -----Ursprüngliche Nachricht----- > Von: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Auftrag von Ehlers, Kolja > Gesendet: Dienstag, 22. Juli 2008 11:37 > An: General Linux-HA mailing list > Betreff: [Linux-HA] Date expression rule / SNMP LHAResourceName > > > Hi all, > > I want to have all my Tomcat clones restarted one by one each night. Until > now I did that with a cronjob. But I thought maybe Hearbeat can watch over > this process more carefully. I read about the date_expression but I only > read about manipulating the cluster properties, rsc_location , > rsc_colocation and rsc_order. > > So is there a way to have my resource tomcat_38:0 restarted at a specific > time but only if the clone (tomcat_38:1) is started up on the other node? > > Also I have noticed that in the SNMP Object LHAResourceName because of some > odd reason my resource clones show up twice at some point of time. > > LINUX-HA-MIB::LHAResourceName.49 = STRING: tomcat_38:0 > LINUX-HA-MIB::LHAResourceName.50 = STRING: tomcat_38:0 > LINUX-HA-MIB::LHAResourceName.51 = STRING: tomcat_38:1 > LINUX-HA-MIB::LHAResourceName.52 = STRING: tomcat_38:1 > > I think this comes from the LRM Resource in the <node_state uname="www1test" > > <lrm_resource id="tomcat_38:0" type="tomcat" class="ocf" > provider="heartbeat"> > <lrm_rsc_op id="tomcat_38:0_monitor_0" operation="monitor" > crm-debug-origin="build_active_RAs" > transition_key="20:129:a4569b75-3678-48ba-987e-bfdd57998301" > transition_magic="4:7;20:129:a4569b75-3678-48ba-987e-bfdd57998301" > call_id="190" crm_feature_set="2.0" rc_code="7" op_status="4" interval="0" > op_digest="272e9487b52a67798cb87ef4afd9fc26"/> > <lrm_rsc_op id="tomcat_38:0_stop_0" operation="stop" > crm-debug-origin="build_active_RAs" > transition_key="10:132:a4569b75-3678-48ba-987e-bfdd57998301" > transition_magic="0:0;10:132:a4569b75-3678-48ba-987e-bfdd57998301" > call_id="197" crm_feature_set="2.0" rc_code="0" op_status="0" interval="0" > op_digest="272e9487b52a67798cb87ef4afd9fc26"/> > <lrm_rsc_op id="tomcat_38:0_start_0" operation="start" > crm-debug-origin="build_active_RAs" > transition_key="109:132:a4569b75-3678-48ba-987e-bfdd57998301" > transition_magic="0:0;109:132:a4569b75-3678-48ba-987e-bfdd57998301" > call_id="198" crm_feature_set="2.0" rc_code="0" op_status="0" interval="0" > op_digest="272e9487b52a67798cb87ef4afd9fc26"/> > <lrm_rsc_op id="tomcat_38:0_monitor_5000" operation="monitor" > crm-debug-origin="build_active_RAs" > transition_key="108:133:a4569b75-3678-48ba-987e-bfdd57998301" > transition_magic="0:0;108:133:a4569b75-3678-48ba-987e-bfdd57998301" > call_id="199" crm_feature_set="2.0" rc_code="0" op_status="0" > interval="5000" op_digest="22e68d5524d00f39ad4464c6bb1d7edc"/> > </lrm_resource> > > and also in <node_state uname="www2test" > > <lrm_resource id="tomcat_38:0" type="tomcat" class="ocf" > provider="heartbeat"> > <lrm_rsc_op id="tomcat_38:0_monitor_0" operation="monitor" > crm-debug-origin="build_active_RAs" > transition_key="24:132:a4569b75-3678-48ba-987e-bfdd57998301" > transition_magic="4:7;24:132:a4569b75-3678-48ba-987e-bfdd57998301" > call_id="225" crm_feature_set="2.0" rc_code="7" op_status="4" interval="0" > op_digest="272e9487b52a67798cb87ef4afd9fc26"/> > </lrm_resource> > > I thought I could prevent this from happening by adding the following > location constraints: > > <rsc_location id="run_Tomcat38_0" rsc="tomcat_38:0"> > <rule id="pref_run_Tomcat38_0" score="INFINITY"> > <expression attribute="#uname" operation="eq" value="www1test" > id="ceb99420-4e64-40c4-9039-525a349869f6"/> > </rule> > </rsc_location> > <rsc_location id="run_Tomcat38_1" rsc="tomcat_38:1"> > <rule id="pref_run_Tomcat38_1" score="INFINITY"> > <expression attribute="#uname" operation="eq" value="www2test" > id="cacdb624-2df8-48ac-8edd-aadbb9e94ec2"/> > </rule> > </rsc_location> > > Thanks for your help!! > > Kolja > > Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt > Amtsgericht Köln HRB 32356 > Steuer-Nr.: 217/5717/0536 > Ust.Id.-Nr.: DE 204051920 > -- > This email transmission and any documents, files or previous email > messages attached to it may contain information that is confidential or > legally privileged. If you are not the intended recipient or a person > responsible for delivering this transmission to the intended recipient, > you are hereby notified that any disclosure, copying, printing, > distribution or use of this transmission is strictly prohibited. If you > have received this transmission in error, please immediately notify the > sender by telephone or return email and delete the original transmission > and its attachments without reading or saving in any manner. > > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems > > Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt > Amtsgericht Köln HRB 32356 > Steuer-Nr.: 217/5717/0536 > Ust.Id.-Nr.: DE 204051920 > -- > This email transmission and any documents, files or previous email > messages attached to it may contain information that is confidential or > legally privileged. If you are not the intended recipient or a person > responsible for delivering this transmission to the intended recipient, > you are hereby notified that any disclosure, copying, printing, > distribution or use of this transmission is strictly prohibited. If you > have received this transmission in error, please immediately notify the > sender by telephone or return email and delete the original transmission > and its attachments without reading or saving in any manner. > > _______________________________________________ > 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
