[Cluster-devel] conga ./conga.spec.in.in luci/site/luci/Extens ...

rmccabe at sourceware.org rmccabe at sourceware.org
Wed May 2 02:36:07 UTC 2007


CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe at sourceware.org	2007-05-02 02:36:06

Modified files:
	.              : conga.spec.in.in 
	luci/site/luci/Extensions: FenceHandler.py cluster_adapters.py 

Log message:
	Fix 238655: conga does not set the "nodename" attribute for manual fencing

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.35&r2=1.45.2.36
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceHandler.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.4&r2=1.4.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.120.2.28&r2=1.120.2.29

--- conga/conga.spec.in.in	2007/04/30 18:47:32	1.45.2.35
+++ conga/conga.spec.in.in	2007/05/02 02:36:06	1.45.2.36
@@ -281,12 +281,11 @@
 
 
 %changelog
-
 * Mon Apr 30 2007 Ryan McCabe <rmccabe at redhat.com> 0.9.2-7
-
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXX UPDATE NOT RELEASED YET XXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+- Fixed bz238655 (conga does not set the "nodename" attribute for manual fencing)
 
 * Wed Apr 11 2007 Ryan McCabe <rmccabe at redhat.com> 0.9.2-5
 - Fixed bz225206 (Cluster cannot be deleted (from 'Manage Systems') - but no error results)
--- conga/luci/site/luci/Extensions/FenceHandler.py	2007/03/01 00:31:08	1.4.2.4
+++ conga/luci/site/luci/Extensions/FenceHandler.py	2007/05/02 02:36:06	1.4.2.5
@@ -29,7 +29,7 @@
 FI_PROVIDE_IPADDRESS = 'An IP address must be provided for this Fence'
 FI_PROVIDE_ELPAN = 'A LPAN value must be provided for this Egenera Fence'
 FI_PROVIDE_EPSERVER = 'A PServer value must be provided for this Egenera Fence'
-FI_PROVIDE_NODENAME = 'A Node Name value must be provided for this SCSI Fence'
+FI_PROVIDE_NODENAME = 'A Node Name value must be provided for this Fence'
 
 ILLEGAL_CHARS_REPLACED = 'Illegal characters were replaced by underscores. Feel free to set a new value.'
 
@@ -120,7 +120,7 @@
 	'fence_drac':			[],
 	'fence_rsa':			[],
 	'fence_rps10':			[],
-	'fence_manual':			[]
+	'fence_manual':			['nodename']
 }
 
 FENCE_FD_ATTRS = {
@@ -1094,6 +1094,19 @@
 	fenceinst.addAttribute('nodename', nodename)
 	return errors
 
+def val_manual_fi(form, fenceinst):
+	errors = list()
+
+	try:
+		nodename = form['nodename'].strip()
+		if not nodename:
+			raise Exception, 'blank'
+	except Exception, e:
+		errors.append(FI_PROVIDE_NODENAME)
+
+	fenceinst.addAttribute('nodename', nodename)
+	return errors
+
 def val_noop_fi(dummy, _dummy):
 	return []
 
@@ -1110,12 +1123,12 @@
 	'fence_bullpap':		val_bullpap_fi,
 	'fence_xvm':			val_xvm_fi,
 	'fence_scsi':			val_scsi_fi,
+	'fence_manual':			val_manual_fi,
 	'fence_ilo':			val_noop_fi,
 	'fence_ipmilan':		val_noop_fi,
 	'fence_drac':			val_noop_fi,
 	'fence_rsa':			val_noop_fi,
-	'fence_rps10':			val_noop_fi,
-	'fence_manual':			val_noop_fi
+	'fence_rps10':			val_noop_fi
 }
 
 def validate_fenceinstance(form, parent_name, fence_agent):
--- conga/luci/site/luci/Extensions/cluster_adapters.py	2007/03/16 03:19:22	1.120.2.28
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2007/05/02 02:36:06	1.120.2.29
@@ -1877,7 +1877,10 @@
 
 					# Add back the tags under the method block
 					# for the fence instance
-					instance_list.append({'name': fencedev_name })
+					if fence_type == 'fence_manual':
+						instance_list.append({'name': fencedev_name, 'nodename': nodename })
+					else:
+						instance_list.append({'name': fencedev_name })
 		else:
 			# The user created a new fence device.
 			retcode, retmsg = validateNewFenceDevice(fence_form, model)
@@ -1891,7 +1894,10 @@
 			# so the appropriate XML goes into the <method> block inside
 			# <node><fence>. All we need for that is the device name.
 			if not 'sharable' in fence_form:
-				instance_list.append({'name': fencedev_name })
+				if fence_type == 'fence_manual':
+					instance_list.append({'name': fencedev_name, 'nodename': nodename })
+				else:
+					instance_list.append({'name': fencedev_name })
 
 		if fencedev_unknown is True:
 			# Save any instances for this fence device.




More information about the Cluster-devel mailing list