[Pacemaker] how to correctly identify when a "Resource xxx-n cannot run anywhere"

Tim Serong tserong at novell.com
Wed Nov 18 02:53:36 EST 2009


On 11/18/2009 at 08:13 AM, Димитър Бойн<dboyn at postpath.com> wrote: 
> Hi, 
> I would love to be able to identify when a certain resource cannot run  
> anywhere in a cluster anymore. 
> A valid scenario would be when my cluster loses quorum -I want to leave it  
> "frozen" and mark the failed resources for a Geographical failover to a  
> different site. 
>   
> #crm_resource crm_resource -W -r xxx-n  
> Returns: "resource xxx-n is NOT running" -but this is current state only  
> doesn't indicate cluster wide intention to be in certain state  
>  
> I noticed also that  
> #/usr/sbin/crm_verify -LV  
>  
> Is not grep-able. 

crm_verify output is going to stderr.  If you redirect it to stdout, you'll be able to grep it:

  # crm_verify -LV 2>&1 |grep 'cannot run'

> Any advice on how would I ask the crm if it is trying to  
> manage/relocate/restart a resource or it has already given up because   
> Resource xxx-n cannot run anywhere  ? 
>   
> Thanks as always! 

I'm not sure offhand if there's a better way than asking crm_verify.

Regards,

Tim


-- 
Tim Serong <tserong at novell.com>
Senior Clustering Engineer, Novell Inc.






More information about the Pacemaker mailing list