From mboxrd@z Thu Jan 1 00:00:00 1970 From: jparsons@sourceware.org Date: 10 Jan 2007 19:11:17 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions ModelBuilder.py Message-ID: <20070110191117.19227.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: jparsons at sourceware.org 2007-01-10 19:11:17 Modified files: luci/site/luci/Extensions: ModelBuilder.py Log message: two-node quorumd check Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ModelBuilder.py.diff?cvsroot=cluster&r1=1.11&r2=1.12 --- conga/luci/site/luci/Extensions/ModelBuilder.py 2006/12/20 20:24:27 1.11 +++ conga/luci/site/luci/Extensions/ModelBuilder.py 2007/01/10 19:11:16 1.12 @@ -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')