On Fri, Feb 17, 2012 at 01:15:04PM +0100, Dejan Muhamedagic wrote:
> On Fri, Feb 17, 2012 at 12:13:49PM +1100, Andrew Beekhof wrote:
[...]
> > What about notifications?  The would be the right point to
> > re-configure things I'd have thought.
> 
> Sounds like the right way. Still, it may be hard to coordinate
> between different instances. Unless we figure out how to map
> nodes to numbers used by the CLUSTERIP. For instance, the notify
> operation gets:
> 
> OCF_RESKEY_CRM_meta_notify_stop_resource="ip_lb:2 "
> OCF_RESKEY_CRM_meta_notify_stop_uname="xen-f "
> 
> But the instance number may not match the node number from

Scratch that.

        IP_CIP_FILE="/proc/net/ipt_CLUSTERIP/$OCF_RESKEY_ip"
        IP_INC_NO=`expr ${OCF_RESKEY_CRM_meta_clone:-0} + 1`
        ...
        echo "+$IP_INC_NO" >$IP_CIP_FILE

> /proc/net/ipt_CLUSTERIP/<ip> and that's where we should add the
> node. It should be something like:
> 
> notify() {
>       if node_down; then
>               echo "+node_num" >> /proc/net/ipt_CLUSTERIP/<ip>
>       elif node_up; then
>               echo "-node_num" >> /proc/net/ipt_CLUSTERIP/<ip>
>       fi
> }
> 
> Another issue is that the above code should be executed on
> _exactly_ one node.

OK, I guess that'd also be doable by checking the following
variables:

        OCF_RESKEY_CRM_meta_notify_inactive_resource (set of
                currently inactive instances)
        OCF_RESKEY_CRM_meta_notify_stop_resource (set of
                instances which were just stopped)

Any volunteers for a patch? :)

Thanks,

Dejan

> Cheers,
> 
> Dejan
> _______________________________________________
> 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