Hi Kazunori-san,

Can you please test the attached patch. I'm not sure if it covers
all cases, but I believe that it is the right direction. I tested
it lightly, but I don't have a Heartbeat cluster at hand right
now.

Sorry again for taking such a long time. For whatever reason it
was difficult for me to figure this one out.

Thanks,

Dejan

On Fri, Dec 09, 2011 at 07:10:44PM +0900, Kazunori INOUE wrote:
> Hi Dejan,
> 
> I had a discussion with Andrew about it.
> Can you please check this?
> 
>  * http://bugs.clusterlabs.org/show_bug.cgi?id=5006
> 
> Regards,
> Kazunori INOUE
> 
> (11.09.22 19:19), Dejan Muhamedagic wrote:
> >Hi Kazunori-san,
> >
> >On Thu, Sep 22, 2011 at 05:50:53PM +0900, Kazunori INOUE wrote:
> >>Hi Dejan,
> >>
> >>(2011/06/21 21:59), Dejan Muhamedagic wrote:
> >>>Hi Kazunori-san,
> >>>
> >>>Apologies for not getting back to you sooner.
> >>>
> >>>On Mon, Jun 06, 2011 at 06:17:31PM +0900, Kazunori INOUE wrote:
> >>>>Hi,
> >>>>
> >>>>(2011/05/27 19:32), Lars Ellenberg wrote:
> >>>>>
> >>>>>Oh no.
> >>>>>Now you have duplicated all nodes, and will always get "unclean" nodes.
> >>>>>
> >>>>>Is this some variant of:
> >>>>>http://www.clusterlabs.org/wiki/Initial_Configuration#A_Special_Note_for_People_Switching_Cluster_Stacks
> >>>>>
> >>>>>Could that be the root cause of your duplicate node instances with
> >>>>>different ids?
> >>>>>
> >>>>Yes.
> >>>>Corosync uses uname (output of 'uname -n') as ID of the node, and
> >>>>Heartbeat uses UUID as ID of the node. Therefore, on Heartbeat stack,
> >>>>unclean node is added when I loaded the following CLI.
> >>>># cat test1.cli
> >>>>node srv-a1 utilization capacity="1"
> >>>>#
> >>>>
> >>>>Attached "crm_configure_node_for_hb.patch" replaces ID of node (uname)
> >>>>with UUID, after parsing the node ('node srv-a1 utilization capacity="1"')
> >>>>command.
> >>>># crm -d configure load update test1.cli
> >>>>(snip)
> >>>>DEBUG: 1: cli_list: [['node', [['uname', 'srv-a1'], ['id', 'srv-a1']]], 
> >>>>['utilization', [['capacity', '1']]]]
> >>>>DEBUG: 1: id_replace:<srv-a1>   to<0cd9d2df-13fa-4b11-93d3-27a57192caeb>
> >>>>DEBUG: 1: cli_list: [['node', [['uname', 'srv-a1'], ['id', 
> >>>>'0cd9d2df-13fa-4b11-93d3-27a57192caeb']]], ['utilization', [['capacity', 
> >>>>'1']]]]
> >>>>(snip)
> >>>>
> >>>>In other words attached patch will get the same result as loading
> >>>>following cli.
> >>>># cat test2.cli
> >>>>node $id="0cd9d2df-13fa-4b11-93d3-27a57192caeb" utilization capacity="1"
> >>>>#
> >>>>Is not this patch effective?
> >>>
> >>>Took a look at the patch, but I still need to investigate this
> >>>further. Unfortunately, my schedule got really tight lately.
> >>>I'll try to get to it as soon as I can.
> >>>
> >>>Cheers,
> >>>
> >>>Dejan
> >>>
> >>How is the status of this problem?
> >
> >Sorry to say none. I thought that one of you were on to it, but
> >obviously not so. I guess I mixed it with something else. I'll
> >see to it one of these days.
> >
> >Thanks,
> >
> >Dejan
> >
> >>Thanks for your help.
> >>Kazunori INOUE
> >>
> >>>>>Or is only the crm shell getting it wrong when updating node attributes?
> >>>>>
> >>>>>--
> >>>>>: Lars Ellenberg
> >>>>>: LINBIT | Your Way to High Availability
> >>>>>: DRBD/HA support and consulting http://www.linbit.com
> >>>>>
> >>>>>DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
> >>>
> >>>_______________________________________________
> >>>Pacemaker mailing list: Pacemaker@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@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@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@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://bugs.clusterlabs.org
# HG changeset patch
# Parent 053893747a94e8daf5931b65e84a8796a39b82e5
Medium: cibconf: handle nodes in Heartbeat better (cl#5006)

diff -r 053893747a94 -r b97fb8bdadb8 modules/cibconfig.py
--- a/modules/cibconfig.py	Fri Jan 13 18:16:02 2012 +0100
+++ b/modules/cibconfig.py	Wed Jan 18 21:40:05 2012 +0100
@@ -1759,6 +1759,11 @@ class CibFactory(Singleton):
         for obj in self.cib_objects:
             if obj.obj_id == obj_id:
                 return obj
+            # special case for Heartbeat nodes which have id
+            # different from uname
+            if obj.obj_type == "node" and \
+                    obj.node.getAttribute("uname") == obj_id:
+                return obj
         return None
     #
     # tab completion functions
_______________________________________________
Pacemaker mailing list: Pacemaker@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://bugs.clusterlabs.org

Reply via email to