Re: [Pacemaker] Patch for bugzilla 2541: Shell should warn if parameter uniqueness is violated
On Fri, 2011-03-04 at 13:06 +0100, Holger Teutsch wrote: On Thu, 2011-03-03 at 10:55 +0100, Florian Haas wrote: On 2011-03-03 10:43, Holger Teutsch wrote: Hi, I submit a patch for bugzilla 2541: Shell should warn if parameter uniqueness is violated for discussion. I'll leave it do Dejan to review the code, but I love the functionality. Thanks a lot for tackling this. My only suggestion for an improvement is to make the warning message a bit more terse, as in: WARNING: Resources ip1a, ip1b violate uniqueness for parameter ip: 1.2.3.4 Florian, I see your point. Although my formatting allows for an unlimited number of collisions ( 8-) ) in real life we will only have 2 or 3. Will change this together with Dejan's hints. Cheers, Florian Florian + Dejan, here the version with terse output. The code got terser as well. - holger crm(live)configure# primitive ip1a ocf:heartbeat:IPaddr2 params ip=1.2.3.4 meta target-role=stopped crm(live)configure# primitive ip1b ocf:heartbeat:IPaddr2 params ip=1.2.3.4 meta target-role=stopped crm(live)configure# primitive ip2a ocf:heartbeat:IPaddr2 params ip=1.2.3.5 meta target-role=stopped crm(live)configure# primitive ip2b ocf:heartbeat:IPaddr2 params ip=1.2.3.5 meta target-role=stopped crm(live)configure# primitive ip3 ocf:heartbeat:IPaddr2 params ip=1.2.3.6 meta target-role=stopped crm(live)configure# primitive dummy_1 ocf:heartbeat:Dummy params fake=abc meta target-role=stopped crm(live)configure# primitive dummy_2 ocf:heartbeat:Dummy params fake=abc meta target-role=stopped crm(live)configure# primitive dummy_3 ocf:heartbeat:Dummy meta target-role=stopped crm(live)configure# commit WARNING: Resources ip1a,ip1b violate uniqueness for parameter ip: 1.2.3.4 WARNING: Resources ip2a,ip2b violate uniqueness for parameter ip: 1.2.3.5 Do you still want to commit? diff -r cf4e9febed8e shell/modules/ui.py.in --- a/shell/modules/ui.py.in Wed Feb 23 14:52:34 2011 +0100 +++ b/shell/modules/ui.py.in Tue Mar 08 09:11:38 2011 +0100 @@ -1509,6 +1509,55 @@ return False set_obj = mkset_obj(xml) return ptestlike(set_obj.ptest,'vv',cmd,*args) + +def __check_unique_clash(self): +'Check whether resource parameters with attribute unique clash' + +def process_primitive(prim, clash_dict): +''' +Update dict clash_dict with +(ra_class, ra_provider, ra_type, name, value) - [ resourcename ] +if parameter name should be unique +''' +ra_class = prim.getAttribute(class) +ra_provider = prim.getAttribute(provider) +ra_type = prim.getAttribute(type) +ra_id = prim.getAttribute(id) + +ra = RAInfo(ra_class, ra_type, ra_provider) +if ra == None: +return +ra_params = ra.params() + +attributes = prim.getElementsByTagName(instance_attributes) +if len(attributes) == 0: +return + +for p in attributes[0].getElementsByTagName(nvpair): +name = p.getAttribute(name) +if ra_params[ name ]['unique'] == '1': +value = p.getAttribute(value) +k = (ra_class, ra_provider, ra_type, name, value) +try: +clash_dict[k].append(ra_id) +except: +clash_dict[k] = [ra_id] +return + +clash_dict = {} +for p in cib_factory.mkobj_list(xml,type:primitive): +process_primitive(p.node, clash_dict) + +no_clash = 1 +for param, resources in clash_dict.items(): +if len(resources) 1: +no_clash = 0 +msg = 'Resources %s violate uniqueness for parameter %s: %s' %\ +(,.join(sorted(resources)), param[3], param[4]) +common_warning(msg) + +return no_clash + def commit(self,cmd,force = None): usage: commit [force] if force and force != force: @@ -1523,7 +1572,8 @@ rc1 = cib_factory.is_current_cib_equal() rc2 = cib_factory.is_cib_empty() or \ self._verify(mkset_obj(xml,changed),mkset_obj(xml)) -if rc1 and rc2: +rc3 = self.__check_unique_clash() +if rc1 and rc2 and rc3: return cib_factory.commit() if force or user_prefs.get_force(): common_info(commit forced) ___ 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
Re: [Pacemaker] build Issue while configurin g the cluster glue in CENT OS
Larry Brigman larry.brigman@... writes: Hi Larry Thanks for you suggestion the when i tried to install e2fsprogs-libs-1.39-23.el5_5.1 rpm file it says it is uptodate and again i tried to install cluster glue using make command . which thrown me the same error. [root@low-house lib]# rpm -qf /lib/libuuid.so.1 e2fsprogs-libs-1.39-23.el5_5.1 [root@low-house lib]# yum install e2fsprogs-libs-1.39-23.el5_5.1 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.nwresd.org * base: mirror.stanford.edu * extras: mirror.stanford.edu * updates: mirror.san.fastserv.com Setting up Install Process Package e2fsprogs-libs-1.39-23.el5_5.1.i386 already installed and latest version Nothing to do [root@low-house lib]# regards Rakesh ___ 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
Re: [Pacemaker] Patch for bugzilla 2541: Shell should warn if parameter uniqueness is violated
Hi Holger, On Tue, Mar 08, 2011 at 09:15:01AM +0100, Holger Teutsch wrote: On Fri, 2011-03-04 at 13:06 +0100, Holger Teutsch wrote: On Thu, 2011-03-03 at 10:55 +0100, Florian Haas wrote: On 2011-03-03 10:43, Holger Teutsch wrote: Hi, I submit a patch for bugzilla 2541: Shell should warn if parameter uniqueness is violated for discussion. I'll leave it do Dejan to review the code, but I love the functionality. Thanks a lot for tackling this. My only suggestion for an improvement is to make the warning message a bit more terse, as in: WARNING: Resources ip1a, ip1b violate uniqueness for parameter ip: 1.2.3.4 Florian, I see your point. Although my formatting allows for an unlimited number of collisions ( 8-) ) in real life we will only have 2 or 3. Will change this together with Dejan's hints. Cheers, Florian Florian + Dejan, here the version with terse output. The code got terser as well. It looks good, just a few notes. The check function should move to the CibObjectSetRaw class and be invoked from semantic_check(). There's rc1 = set_obj_verify.verify() if user_prefs.check_frequency != never: rc2 = set_obj_semantic.semantic_check() The last should be changed to: rc2 = set_obj_semantic.semantic_check(set_obj_verify) set_obj_verify always contains all CIB elements (well, that means that its name should probably be changed too :). Now, the code should check _only_ new and changed primitives which are contained in set_obj_semantic. That's because we don't want to repeatedly print warnings for all objects on commit, but only for those which were added/changed in the meantime. On the other hand, verify is an explicit check and in that case the whole CIB is always verified. - holger crm(live)configure# primitive ip1a ocf:heartbeat:IPaddr2 params ip=1.2.3.4 meta target-role=stopped crm(live)configure# primitive ip1b ocf:heartbeat:IPaddr2 params ip=1.2.3.4 meta target-role=stopped crm(live)configure# primitive ip2a ocf:heartbeat:IPaddr2 params ip=1.2.3.5 meta target-role=stopped crm(live)configure# primitive ip2b ocf:heartbeat:IPaddr2 params ip=1.2.3.5 meta target-role=stopped crm(live)configure# primitive ip3 ocf:heartbeat:IPaddr2 params ip=1.2.3.6 meta target-role=stopped crm(live)configure# primitive dummy_1 ocf:heartbeat:Dummy params fake=abc meta target-role=stopped crm(live)configure# primitive dummy_2 ocf:heartbeat:Dummy params fake=abc meta target-role=stopped crm(live)configure# primitive dummy_3 ocf:heartbeat:Dummy meta target-role=stopped crm(live)configure# commit WARNING: Resources ip1a,ip1b violate uniqueness for parameter ip: 1.2.3.4 WARNING: Resources ip2a,ip2b violate uniqueness for parameter ip: 1.2.3.5 Do you still want to commit? diff -r cf4e9febed8e shell/modules/ui.py.in --- a/shell/modules/ui.py.in Wed Feb 23 14:52:34 2011 +0100 +++ b/shell/modules/ui.py.in Tue Mar 08 09:11:38 2011 +0100 @@ -1509,6 +1509,55 @@ return False set_obj = mkset_obj(xml) return ptestlike(set_obj.ptest,'vv',cmd,*args) + +def __check_unique_clash(self): +'Check whether resource parameters with attribute unique clash' + +def process_primitive(prim, clash_dict): +''' +Update dict clash_dict with +(ra_class, ra_provider, ra_type, name, value) - [ resourcename ] +if parameter name should be unique +''' +ra_class = prim.getAttribute(class) +ra_provider = prim.getAttribute(provider) +ra_type = prim.getAttribute(type) +ra_id = prim.getAttribute(id) + +ra = RAInfo(ra_class, ra_type, ra_provider) There's a convenience function get_ra(node) for this. +if ra == None: +return +ra_params = ra.params() + +attributes = prim.getElementsByTagName(instance_attributes) +if len(attributes) == 0: +return + +for p in attributes[0].getElementsByTagName(nvpair): +name = p.getAttribute(name) +if ra_params[ name ]['unique'] == '1': +value = p.getAttribute(value) +k = (ra_class, ra_provider, ra_type, name, value) +try: +clash_dict[k].append(ra_id) +except: +clash_dict[k] = [ra_id] +return + +clash_dict = {} +for p in cib_factory.mkobj_list(xml,type:primitive): This would become: for p in all_obj_list: # passed from _verify() if is_primitive(p.node): +process_primitive(p.node, clash_dict) Or perhaps to loop through self.obj_list and build clash_dict against all elements? Otherwise, you'll need to skip elements which don't
Re: [Pacemaker] Exclude resource from host
Hi, On Tue, Mar 08, 2011 at 07:05:04AM +, Arthur B. Olsen wrote: But it will still give me an action failed for those nodes where fx nfs-kernel-server is not installed. And when both nfs nodes are down it will try to get it running on the sql servers Pacemaker will never try to run a resource on a node for which its score is negative. Do you also get errors on probes (monitor)? If so, then that should be either fixed in the RA or you can just install nfs server packages. Thanks, Dejan Arthur B Olsen Føroya Tele +298 243392 +298 303392 On 07/03/2011, at 21.27, Glenn Elliott gelli...@stvincents.com.aumailto:gelli...@stvincents.com.au wrote: Does a location rule help? node http://node1.foo.com node1.foo.comhttp://node1.foo.com node http://node2.foo.com node2.foo.comhttp://node2.foo.com primitive node1-ip ocf:heartbeat:IPaddr \ params ip=10.56.0.10 cidr_netmask=24 \ op monitor interval=10s location exclude_node node1-ip -inf: http://node1.foo.com node1.foo.comhttp://node1.foo.com On 8/03/2011 at 5:58 am, in message 4d752aef.1070...@huapi.ba.armailto:4d752aef.1070...@huapi.ba.ar, t...@huapi.ba.armailto:t...@huapi.ba.ar wrote: Beware: sorcerer's apprentice advice: What about Lars' double negation trick of having an -infinite rule applied to this resource living in other than the two good nodes ? -Carlos Arthur B. Olsen @ 07/03/2011 15:02 -0300 dixit: I was wondering how to make a resource not to run on a certain host. I have two nfs servers an two mysql server in one cluster. Now i get failed actions because nfs is not installed on mysql an visa versa. Maybe this is trivial, but it has escaped me Thanks Arthur B Olsen Føroya Tele +298 243392 +298 303392 ___ Pacemaker mailing list: mailto:Pacemaker@oss.clusterlabs.org Pacemaker@oss.clusterlabs.orgmailto:Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org/ http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker -- Carlos G Mendioroz t...@huapi.ba.armailto:t...@huapi.ba.ar LW7 EQI Argentina ___ Pacemaker mailing list: mailto:Pacemaker@oss.clusterlabs.org Pacemaker@oss.clusterlabs.orgmailto:Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemakerhttp://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org/ http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been virus scanned and although no viruses were detected by the system, St Vincents Mater Health Sydney accepts no liability for any consequential damage resulting from email containing any computer viruses. Please consider the environment before printing this. ** ___ Pacemaker mailing list: mailto:Pacemaker@oss.clusterlabs.org Pacemaker@oss.clusterlabs.orgmailto:Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker 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
[Pacemaker] restart only a particular service in group if it fails
Hi, I have setup a group where in , it has many resources configured say res1 , res2 , res3 , res4 , res5. To test if monitor is working or not, I stopped manually the res2 service When monitor command found res2 is stopped , it stops res3 , res4 and res5 and then tries to start res2. After it successfully start res2 , it then starts res3 , res4 and res5. My question is , Is it possible to just start res2 only without stopping other services that follows the resource(res3 , res4 , res5) which has been stopped. Thanks, Bikrish ___ 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] network interface as a cluster resource
Hi! Instead of adding a virtual IP address to an interface (ocf:heartbeat:IPaddr2), how do I manage a physical interface? Are there any special resource scripts? Thanks Klaus ___ 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
Re: [Pacemaker] Validate strategy for RA on DRBD standby node
Hi, On Thu, Mar 03, 2011 at 09:58:59AM -0500, David McCurley wrote: Would it be appropriate to post the first result of coding here for review and recommendations? If so, just post code in-line or as an attachment? If not, no problemo. The right place to post resource agents is linux-ha-...@lists.linux-ha.org Thanks, Dejan - Original Message - From: Dejan Muhamedagic deja...@fastmail.fm To: The Pacemaker cluster resource manager pacemaker@oss.clusterlabs.org Sent: Friday, February 25, 2011 10:53:34 AM Subject: Re: [Pacemaker] Validate strategy for RA on DRBD standby node On Thu, Feb 24, 2011 at 10:49:27AM -0500, David McCurley wrote: Thanks for the quick reply and especially the link. It was much better and more thorough in testing than the other shell ra ldap link I found. That would be the first python RA. BTW, there was recently posted slapd RA (implemented in shell), which I should review, but haven't done that yet. /At any rate, that RA does not support multi-state resources which I think would be essential. Did you plan to do that? At any rate, I'd suggest that you check that code too and then see if you need to do your own implementation. The thread starts here: http://marc.info/?l=linux-ha-devm=129666245428850w=2 Great stuff and very thorough. But it doesn't look like it will work in our config because the files won't exist on the DRBD slave. I will use this as my new example. I'm not sure what you are referring to with multi-state resources. Is this in relation to promote,demote, migrate_to, migrate_from in the guide, i.e. master vs slave or is there more to it? I plan to support a master and slave later on down the road -- under pressure to get this rolled out now. Is there a good discussion / resource other than the dev guide? I had planned to try to wade through the DRBD RA scripts to figure it out. migrate_to/from are for something else. It's just promote (slave-master) and demote (master-slave). Why python? Because shell is harder for me to read and I have to make a good clear verbose example for some others who will also be doing some RA's (in python) for our custom apps. No problem with python. Actually, there was an idea to provide a python class (RA or so) which would make implementing resource agents easier. The config file for OpenLDAP is stored in /etc/ldap/slapd.d/cn=config.ldif. This is on a DRBD active-passive system and the /etc/ldap directory is actually a symlink to the DRBD controlled share /vcoreshare/etc/ldap. The real config file is at /vcoreshare/etc/ldap/slapd.d/cn=config.ldif. What about the old style configuration? I assume that there are still quite a few installations/distributions using those. Yes, I have some code for that, using the example slapd init script and the other examples I found, but no test environment for that. IIRC, the old configuration style is quite easy to parse. So I'm trying to be very judicious with every function and validation, checking file permissions, etc. But the problem is that /etc/ldap/slapd.d/cn=config.ldif is only present on the active DRBD node. My validate function checks that the file is readable by the user/group that slapd is to run as. Now, as soon as I start ldap in the cluster, it starts fine, but validate fails on the standby node (because the DRBD volume isn't mounted) and crm_mon shows a failed action: On probes (monitor with interval 0), some parts of validation which concern the local node and not the configuration should say OCF_NOT_RUNNING instead of error. This is exactly that case. No worries, because if the next action is start validation is invoked again. Probes are issued by pacemaker to establish if the resource is running and normally it is expected to be not running (for instance on node startup). Ah! I have a function that checks for probes but wasn't using it because I didn't quite understand the semantics. OK, hope that it's clear now. Thanks, Dejan Very helpful stuff, thanks! ___ 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:
Re: [Pacemaker] Check if resource is running on specific node
Hi, On Thu, Mar 03, 2011 at 11:38:23AM +0100, Thomas Baumann wrote: Hi, I have the following scenario: - resource 1 runs on Node A - resource 2 should be started on Node B if resource 1 is running on Node A order o1 inf: r1 r2 location pref-r1 r1 100: nodea location pref-r2 r2 100: nodeb - if resource 1 is not running on Node A, resource 2 should be stopped and resource 3 started r2 should be stopped if r1 is stopped. But I'm not sure how to make r3 start in that case. Perhaps something like this would do (or something similar): colocation no-r3 -inf: r3 r2 location no-r3-on-a r3 -inf: nodea location pref-r3 r3 50: nodeb What attribute is set on Node A, that exactly tells me that the resource is running ? I want to use that for the decision how to handle the resource on Node B. If I check the transient state of the node, I am not sure what to use. Normally, you use only RA created attributes, for instance by ping. Thanks, Dejan regards, Thomas node_state uname=m-lab-prx-lb-1 ha=active in_ccm=true crmd=online shutdown=0 join=member expected=member id=m-lab-prx-lb-1 crm-debug-origin=do_state_transition transient_attributes id=m-lab-prx-lb-1 instance_attributes id=status-m-lab-prx-lb-1 nvpair id=status-m-lab-prx-lb-1-probe_complete name=probe_complete value=true/ nvpair id=status-m-lab-prx-lb-1-fail-count-res_mysqld_lb1-primitive name=fail-count-res_mysqld_lb1-primitive value=1/ nvpair id=status-m-lab-prx-lb-1-last-failure-res_mysqld_lb1-primitive name=last-failure-res_mysqld_lb1-primitive value=1299094062/ nvpair id=status-m-lab-prx-lb-1-fail-count-res_ser_lb1-primitive name=fail-count-res_ser_lb1-primitive value=1/ nvpair id=status-m-lab-prx-lb-1-last-failure-res_ser_lb1-primitive name=last-failure-res_ser_lb1-primitive value=1299094062/ /instance_attributes ___ 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
Re: [Pacemaker] build Issue while configurin g the cluster glue in CENT OS
08.03.2011 12:25, rakesh k wrote: Larry Brigman larry.brigman@... writes: Hi Larry Thanks for you suggestion the when i tried to install e2fsprogs-libs-1.39-23.el5_5.1 rpm file it says it is uptodate and again i tried to install cluster glue using make command . which thrown me the same error. [root@low-house lib]# rpm -qf /lib/libuuid.so.1 e2fsprogs-libs-1.39-23.el5_5.1 Then you need e2fsprogs-libs-devel which contains header files and symlinks to shared libs which are used during build. [root@low-house lib]# yum install e2fsprogs-libs-1.39-23.el5_5.1 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.nwresd.org * base: mirror.stanford.edu * extras: mirror.stanford.edu * updates: mirror.san.fastserv.com Setting up Install Process Package e2fsprogs-libs-1.39-23.el5_5.1.i386 already installed and latest version Nothing to do [root@low-house lib]# regards Rakesh ___ 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
Re: [Pacemaker] Patch for bugzilla 2541: Shell should warn if parameter uniqueness is violated
Hi Dejan, On Tue, 2011-03-08 at 12:07 +0100, Dejan Muhamedagic wrote: Hi Holger, On Tue, Mar 08, 2011 at 09:15:01AM +0100, Holger Teutsch wrote: On Fri, 2011-03-04 at 13:06 +0100, Holger Teutsch wrote: On Thu, 2011-03-03 at 10:55 +0100, Florian Haas wrote: On 2011-03-03 10:43, Holger Teutsch wrote: Hi, I submit a patch for bugzilla 2541: Shell should warn if parameter uniqueness is violated for discussion. ... It looks good, just a few notes. The check function should move to the CibObjectSetRaw class and be invoked from Will move it there. semantic_check(). There's rc1 = set_obj_verify.verify() if user_prefs.check_frequency != never: rc2 = set_obj_semantic.semantic_check() The last should be changed to: rc2 = set_obj_semantic.semantic_check(set_obj_verify) set_obj_verify always contains all CIB elements (well, that means that its name should probably be changed too :). Now, the code should check _only_ new and changed primitives which are contained in set_obj_semantic. That's because we don't want to repeatedly print warnings for all objects on commit, but only for those which were added/changed in the meantime. On the other hand, verify is an explicit check and in that case the whole CIB is always verified. +ra_class = prim.getAttribute(class) +ra_provider = prim.getAttribute(provider) +ra_type = prim.getAttribute(type) +ra_id = prim.getAttribute(id) + +ra = RAInfo(ra_class, ra_type, ra_provider) There's a convenience function get_ra(node) for this. I did not use this as I need all ra_XXX value anyhow later in the code for building k. +if ra == None: +return +ra_params = ra.params() + +attributes = prim.getElementsByTagName(instance_attributes) +if len(attributes) == 0: +return + +for p in attributes[0].getElementsByTagName(nvpair): +name = p.getAttribute(name) +if ra_params[ name ]['unique'] == '1': +value = p.getAttribute(value) +k = (ra_class, ra_provider, ra_type, name, value) +try: +clash_dict[k].append(ra_id) +except: +clash_dict[k] = [ra_id] +return + +clash_dict = {} +for p in cib_factory.mkobj_list(xml,type:primitive): This would become: for p in all_obj_list: # passed from _verify() if is_primitive(p.node): +process_primitive(p.node, clash_dict) Or perhaps to loop through self.obj_list and build clash_dict against all elements? Otherwise, you'll need to skip elements which don't pass the check but are not new/changed (in self.obj_list). The typical occurrences of clashes will originate from old objects and new/changed objects. I think I have to loop over all objects to build clash dict and then ... + +no_clash = 1 +for param, resources in clash_dict.items(): +if len(resources) 1: ... only emit a warning if the intersection of a clash set with changed objects is not empty. +no_clash = 0 +msg = 'Resources %s violate uniqueness for parameter %s: %s' %\ +(,.join(sorted(resources)), param[3], param[4]) +common_warning(msg) + +return no_clash + I will submit an updated version later this week. -holger ___ 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
Re: [Pacemaker] restart only a particular service in group if it fails
--On Tuesday, March 08, 2011 11:24:50 AM + bikrish amatya bikris...@hotmail.com wrote: [snip] My question is , Is it possible to just start res2 only without stopping other services that follows the resource(res3 , res4 , res5) which has been stopped. A group implies ordering, so no (unless res2 is listed as the last resource in the group). Devin ___ 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
Re: [Pacemaker] build Issue while configurin g the cluster glue in CENT OS
Vladislav Bogdanov bubble@... writes: Hi Vladislav Bogdanov When i listed down all the packages in CentOS i found this package is already isntalled i used rpm-qa for listing down the packages is there any alternative for building cluster glue in my CENT OS through code base since this an urgent requirement sorry for posting the questions frequently ___ 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
Re: [Pacemaker] build Issue while configurin g the cluster glue in CENT OS
09.03.2011 07:35, rakesh k wrote: When i listed down all the packages in CentOS i found this package is already isntalled i used rpm-qa for listing down the packages Ahm, el5/centos5 have it in e2fsprogs-devel. Install that package and this should help. And there is no e2fsprogs-libs-devel for that distro (package naming scheme seems to be broken in this particular case). Best, Vladislav ___ 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