Skip to contentSkip to conversation

conga/luci/site/luci/Extensions ModelBuilder.py

Cluster-devel [email protected] 1 participant 1 message Jan 10, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: jparsons at sourceware.org 2007-01-10 19:26:56

Modified files:
luci/site/luci/Extensions: ModelBuilder.py

Log message:
part of bz212021 for two-node case

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ModelBuilder.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.8.2.3&r2=1.8.2.4

luci/site/luci/Extensions/ModelBuilder.py +7 -1
@@ -965,8 +965,14 @@
     return True
 
   def check_two_node(self):
-    if self.getLockType() == DLM_TYPE:
+    if self.getLockType() == DLM_TYPE and self.quorumd_ptr == None:
       clusternodes_count = len(self.clusternodes_ptr.getChildren())
+      #Make certain that there is a cman tag in the file
+      #If missing, it will not hurt to add it here
+      if self.CMAN_ptr == None:
+      cman = Cman()
+      self.cluster_ptr.addChild(cman)
+      self.CMAN_ptr = cman
       if clusternodes_count == 2:
         self.CMAN_ptr.addAttribute('two_node', '1')
         self.CMAN_ptr.addAttribute('expected_votes', '1')