Skip to contentSkip to conversation

conga ./conga.spec.in.in luci/cluster/cluster_ ...

Cluster-devel [email protected] 1 participant 1 message Feb 16, 2009

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2009-02-16 17:23:28

Modified files:
. : conga.spec.in.in
luci/cluster : cluster_config-macros
luci/site/luci/Extensions: LuciClusterInfo.py LuciValidation.py luci/site/luci/Extensions/ClusterModel: FenceDaemon.py

Log message:

	fix bz459160

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.111&r2=1.45.2.112
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/cluster_config-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.4&r2=1.3.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciClusterInfo.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.14&r2=1.1.4.15
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciValidation.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.6.2.9&r2=1.6.2.10
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/FenceDaemon.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.2&r2=1.1.4.3

conga.spec.in.in +2 -1
@@ -331,7 +331,8 @@
 - Fix bz483775 (Failover Domains can't be set for VMs as services of cluster suite using Conga)
 - Fix bz483769 (Conga always shows VM properties as "Run exclusive")
 - Fix bz450007 (cannot remove shared fence device through luci)
-- Fiz bz466013 (Add luci GUI support for LPAR and vmware fencing)
+- Fix bz466013 (Add luci GUI support for LPAR and vmware fencing)
+- Fix bz459160 (fenced config option to skip nodes with undefined fencing)
 
 * Thu Sep 25 2008 Ryan McCabe <[email protected]> 0.12.1-7
 - Fix a typo in the fix for bz459562
luci/cluster/cluster_config-macros +12 -0
@@ -454,6 +454,18 @@
 							tal:attributes="value clusterinfo/pjd" />
 					</td>
 				</tr>
+
+				<tr tal:condition="clusterinfo/has_ignore_undef_fence"
+					class="systemsTable">
+
+					<td class="systemsTable">Skip nodes with undefined fencing</td>
+					<td class="systemsTable">
+						<input type="checkbox" name="skip_undefined"
+							tal:attributes="checked python: clusterinfo.get('skip_undefined') and 'checked' or ''" />
+					</td>
+				</tr>
+
+
 				<tr class="systemsTable">
 					<td class="systemsTable">
 						<span class="cluster_help" title="Enable if you will be running a VM cluster on this physical cluster">Run XVM fence daemon</td>
luci/site/luci/Extensions/LuciClusterInfo.py +2 -0
@@ -604,6 +604,7 @@
 				clumap['vm_migration_choice'] = True
 			if os_minor > 2:
 				clumap['has_fence_ssh'] = True
+				clumap['has_ignore_undef_fence'] = True
 		elif cluster_os.find('Nahant') != -1:
 			clumap['os_major'] = 4
 			os_minor = int(cluster_os[cluster_os.find('Update ') + 7])
@@ -662,6 +663,7 @@
 		clumap['pjd'] = pjd
 		#post fail delay
 		clumap['pfd'] = pfd
+		clumap['skip_undefined'] = fdp.getSkipUndefined()
 
 		#-------------
 		#if multicast
luci/site/luci/Extensions/LuciValidation.py +7 -0
@@ -867,6 +867,7 @@
 	elif not run_xvmd:
 		model.delFenceXVM()
 
+	fd = None
 	try:
 		fd = model.getFenceDaemonPtr()
 		old_pj_delay = fd.getPostJoinDelay()
@@ -882,6 +883,12 @@
 			luci_log.debug_verbose('Unable to update fence daemon properties: %r %s' % (e, str(e)))
 		errors.append('An error occurred while attempting to update fence daemon properties: %s' % str(e))
 
+	skip_undef = form.has_key('skip_undefined')
+	if skip_undef is True:
+		fd.setSkipUndefined(True)
+	else:
+		fd.setSkipUndefined(False)
+
 	if len(errors) > 0:
 		return (False, {'errors': errors })
 
luci/site/luci/Extensions/ClusterModel/FenceDaemon.py +10 -0
@@ -33,6 +33,16 @@
     val = self.getAttribute('clean_start')
     return val
 
+  def getSkipUndefined(self):
+    val = self.getAttribute('skip_undefined')
+    return val
+
+  def setSkipUndefined(self, val):
+    if val:
+      self.addAttribute('skip_undefined', '1')
+    else:
+      self.removeAttribute('skip_undefined')
+
   def setPostJoinDelay(self, delay):
     self.addAttribute('post_join_delay', delay)