[Pacemaker] crm resource restart fails to restart the service

Dejan Muhamedagic dejanmm at fastmail.fm
Wed Nov 17 18:03:47 UTC 2010


On Wed, Nov 17, 2010 at 09:56:25AM -0500, Vadym Chepkov wrote:
> 
> On Nov 17, 2010, at 9:46 AM, Dejan Muhamedagic wrote:
> 
> > On Wed, Nov 17, 2010 at 08:30:36AM -0500, Vadym Chepkov wrote:
> >> On Wed, Nov 17, 2010 at 8:01 AM, Dejan Muhamedagic <dejanmm at fastmail.fm> wrote:
> >> 
> >>>> RA doesn't support restart action? Most luckily you get OCF_ERR_UNIMPLEMENTED in the log
> >>> 
> >>> It's actually a resource stop followed by start. It says so in
> >>> the help too. Perhaps the start precludes the stop action. The
> >>> logs should give a hint. We need a sleep in between.
> >>> 
> >> 
> >> In this case this command is not working at all, because I tried in
> >> the past for many resources and it never worked, so I just assumed it
> >> has to be implemented by RA.
> > 
> > Funny, it worked here for me every time for apache, Dummy,
> > Delay, stonith resources. With both pacemaker 1.0 and 1.1.
> > 
> >> To test it right now I issued a command
> >> # crm resource restart xen_vbuild
> > 
> > Can you try to insert a sleep and see if that helps. It's in
> > /usr/lib64/python2.6/site-packages/crm/ui.py:
> > 
> > 802     def restart(self,cmd,rsc):
> > 803         "usage: restart <rsc>"
> > 804         if not is_name_sane(rsc):
> > 805             return False
> > 806         if not self.stop("stop",rsc):
> > 807             return False
> > 808         time.sleep(1)
> > 809         return self.start("start",rsc)
> > 
> > Thanks,
> > 
> > Dejan
> 
> 
> Yep, that did the trick

OK. These nodes are faster than what I have (or the other way
around), i.e. this seems to be timing issue.

Thanks,

Dejan

> Now I see this:
> 
> Nov 17 14:52:39 xen-11 Xen[14444]: INFO: Xen domain vbuild will be stopped (timeout: 220s)
> Nov 17 14:52:40 xen-11 Xen[14444]: DEBUG: vbuild still not stopped. Waiting...
> Nov 17 14:52:44 xen-11 Xen[14444]: DEBUG: vbuild still not stopped. Waiting…
> Nov 17 14:52:45 xen-11 Xen[14444]: DEBUG: vbuild still not stopped. Waiting...
> Nov 17 14:52:47 xen-11 Xen[14444]: DEBUG: vbuild still not stopped. Waiting...
> Nov 17 14:52:48 xen-11 Xen[14444]: DEBUG: vbuild still not stopped. Waiting...
> Nov 17 14:52:50 xen-11 Xen[14444]: DEBUG: vbuild still not stopped. Waiting...
> Nov 17 14:52:54 xen-11 Xen[14444]: DEBUG: vbuild still not stopped. Waiting...
> Nov 17 14:52:55 xen-11 Xen[14444]: DEBUG: vbuild still not stopped. Waiting...
> Nov 17 14:53:00 xen-11 Xen[14444]: INFO: Xen domain vbuild stopped.
> 
> [root at xen-11 ~]# xm list|grep build
> vbuild                                    18      511     2 -b----     12.0
> 
> 
> 
> > 
> >> where xen_vbuild is a Xen VM and no results whatsoever.
> >> 
> >> Here is output of the log
> >> 
> >> Nov 17 13:04:13 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:05:14 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:06:14 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:07:15 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:07:44 xen-11 cib: [4294]: info: log_data_element: cib:diff:
> >> +       <primitive id="xen_vbuild" >
> >> Nov 17 13:07:44 xen-11 cib: [4294]: info: log_data_element: cib:diff:
> >> +         <meta_attributes id="xen_vbuild-meta_attributes"
> >> __crm_diff_marker__="added:top" >
> >> Nov 17 13:07:44 xen-11 cib: [4294]: info: log_data_element: cib:diff:
> >> +           <nvpair id="xen_vbuild-meta_attributes-target-role"
> >> name="target-role" value="Stopped" />
> >> Nov 17 13:07:44 xen-11 cib: [4294]: info: log_data_element: cib:diff:
> >> -       <primitive id="xen_vbuild" >
> >> Nov 17 13:07:44 xen-11 cib: [4294]: info: log_data_element: cib:diff:
> >> -         <meta_attributes id="xen_vbuild-meta_attributes" >
> >> Nov 17 13:07:44 xen-11 cib: [4294]: info: log_data_element: cib:diff:
> >> -           <nvpair value="Stopped"
> >> id="xen_vbuild-meta_attributes-target-role" />
> >> Nov 17 13:07:44 xen-11 pengine: [22958]: debug: unpack_lrm_rsc_state:
> >> xen_vbuild: Overwriting calculated next role Unknown with requested
> >> next role Stopped
> >> Nov 17 13:07:44 xen-11 cib: [4294]: info: log_data_element: cib:diff:
> >> +       <primitive id="xen_vbuild" >
> >> Nov 17 13:07:44 xen-11 cib: [4294]: info: log_data_element: cib:diff:
> >> +         <meta_attributes id="xen_vbuild-meta_attributes" >
> >> Nov 17 13:07:44 xen-11 cib: [4294]: info: log_data_element: cib:diff:
> >> +           <nvpair value="Started"
> >> id="xen_vbuild-meta_attributes-target-role" />
> >> Nov 17 13:07:45 xen-11 pengine: [22958]: debug: unpack_lrm_rsc_state:
> >> xen_vbuild: Overwriting calculated next role Unknown with requested
> >> next role Stopped
> >> Nov 17 13:07:45 xen-11 pengine: [22958]: notice: native_print:
> >> xen_vbuild	(ocf::heartbeat:Xen):	Started xen-11
> >> Nov 17 13:07:45 xen-11 pengine: [22958]: debug: native_assign_node:
> >> All nodes for resource xen_vbuild are unavailable, unclean or shutting
> >> down (xen-11: 1, -1000000)
> >> Nov 17 13:07:45 xen-11 pengine: [22958]: debug: native_assign_node:
> >> Could not allocate a node for xen_vbuild
> >> Nov 17 13:07:45 xen-11 pengine: [22958]: info: native_color: Resource
> >> xen_vbuild cannot run anywhere
> >> Nov 17 13:07:45 xen-11 pengine: [22958]: notice: LogActions: Stop
> >> resource xen_vbuild	(xen-11)
> >> Nov 17 13:07:46 xen-11 pengine: [22958]: notice: native_print:
> >> xen_vbuild	(ocf::heartbeat:Xen):	Started xen-11
> >> Nov 17 13:07:46 xen-11 pengine: [22958]: debug: native_assign_node:
> >> Assigning xen-11 to xen_vbuild
> >> Nov 17 13:07:46 xen-11 pengine: [22958]: notice: LogActions: Leave
> >> resource xen_vbuild	(Started xen-11)
> >> Nov 17 13:08:15 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:09:15 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:10:16 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:11:16 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:12:17 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:13:17 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:14:17 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:15:18 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:16:18 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:17:19 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:17:47 xen-11 pengine: [22958]: notice: native_print:
> >> xen_vbuild	(ocf::heartbeat:Xen):	Started xen-11
> >> Nov 17 13:17:47 xen-11 pengine: [22958]: debug: native_assign_node:
> >> Assigning xen-11 to xen_vbuild
> >> Nov 17 13:17:47 xen-11 pengine: [22958]: notice: LogActions: Leave
> >> resource xen_vbuild	(Started xen-11)
> >> Nov 17 13:18:19 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:19:19 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> Nov 17 13:20:20 xen-11 lrmd: [4295]: debug: rsc:xen_vbuild:101: monitor
> >> 
> >> but VM never stopped:
> >> 
> >> 
> >> [root at xen-11 ~]# xm list|grep vbuild
> >> vbuild                                     3      511     2 -b----    352.4
> >> 
> >> 
> >> still ID 3 as it was before
> >> 
> >> Vadym
> >> 
> >> _______________________________________________
> >> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> >> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >> 
> >> Project Home: http://www.clusterlabs.org
> >> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> >> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
> > 
> > _______________________________________________
> > Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> > 
> > Project Home: http://www.clusterlabs.org
> > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> > Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
> 
> 
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker




More information about the Pacemaker mailing list