[Pacemaker] Manging Virtual Machine's resource

Nitin nitin at atc.tcs.com
Mon May 19 04:04:16 EDT 2008


On Mon, 2008-05-19 at 09:24 +0200, Andrew Beekhof wrote:
> On May 19, 2008, at 9:07 AM, Nitin wrote:
> 
> > On Mon, 2008-05-19 at 08:34 +0200, Andrew Beekhof wrote:
> >> On May 19, 2008, at 7:14 AM, Nitin wrote:
> >>
> >>> On Fri, 2008-05-16 at 15:08 +0200, Andrew Beekhof wrote:
> >>>> On May 16, 2008, at 3:04 PM, Nitin wrote:
> >>>>
> >>>>> Hello,
> >>>>>
> >>>>> I would like to make my virtual machines (DomUs) resources to
> >>>>> participate in the HA cluster. Dom0 (Physical Host) may or may not
> >>>>> have
> >>>>> resources.
> >>>>>
> >>>>> To do this I would like to treat DomUs as *resource* in the
> >>>>> cluster as
> >>>>> opposed to treating them as *nodes*. I am planning to write OCF
> >>>>> resource
> >>>>> agents for virtual machines. But I am not very sure about how to
> >>>>> make a
> >>>>> resource's resource to participate in the cluster.
> >>>>>
> >>>>> Is there any configuration in existing structure to achieve this??
> >>>>> If no
> >>>>> then please tell me how to go about creating a "container"
> >>>>> resource in
> >>>>> CRM.
> >>>>
> >>>> Why not just use the Xen agent if you don't want them to be cluster
> >>>> nodes?
> >>>> Or do you mean that you want them to both be resources and to run
> >>>> other resources too?
> >>>
> >>> Yes. Please advise me how to go about it.
> >>> Thanks a lot for reply.
> >>
> >> We don't have a clean way to do that yet
> >>
> >> Possible options:
> >> a) start the services at VM boot (you don't get monitoring)
> >> b) start the services at VM boot and modify the Xen agent to monitor
> >> the services inside the VM (ugly)
> >> c) add a proxy resource to start/stop/monitor the services inside the
> >> VM (complex)
> > Did you mean writing a OCF RA which will take care of start/stop/ 
> > monitor inside VMs ??
> 
> right
> 
> >
> > Can we configure how CRM will handle resource failures in this case??
> 
> as far as the crm knows, its just another resource
> 
> >
> > For example if res1 at VM1 fails
> > 	     retry on same VM
> > 		success --> OK
> > 		failure --> start res1 (with group dependencies/collocation  
> > preferences) at VM2 on same node
> 
> no - the cluster doesn't know that VM1 or VM2 is a cluster node.
> so (for option 'c') the cluster will never allocate the resource to a  
> specific virtual machine - thats up to you.
OK. Thanks!!!

I have small idea. Should we create a new policy under which we can
define container resources (such as VMs). These container resources in
turn can house other resources say "contained resources". Contained
resources may have collocation/dependency constraints too. 

This way CRM would be aware of contained resources and will run them
only on their containers.

Does it make sense to you??

Thanks again.
> 
> >
> > 			(success -- OK)
> > 			failure --> start res1 as direct resource to node
> > 			..........
> > 			..........
> > 			
> > 			finally use Passive node's VM
> > 			
> > 				
> > 	
> >> d) implement a generic version of c)
> > I guess it would be required otherwise we have to write a proxy  
> > resource
> > (c) for each resource type. Right??
> 
> depends on what your needs are
> 
> >
> >
> >> e) have the VM join the cluster (makes stonith and quorum  
> >> "interesting")
> >> f) wait for us to implement clusters-of-clusters which also solves
> >> this scenario "for free"
> >> g) something else i've not thought of
> >>
> >> _______________________________________________
> >> Pacemaker mailing list
> >> Pacemaker at clusterlabs.org
> >> http://list.clusterlabs.org/mailman/listinfo/pacemaker
> >
> >
> > _______________________________________________
> > Pacemaker mailing list
> > Pacemaker at clusterlabs.org
> > http://list.clusterlabs.org/mailman/listinfo/pacemaker
> 
> 
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at clusterlabs.org
> http://list.clusterlabs.org/mailman/listinfo/pacemaker





More information about the Pacemaker mailing list