cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga ./conga.spec.in.in luci/site/luci/Extens ...
Date: 2 May 2007 02:39:56 -0000	[thread overview]
Message-ID: <20070502023956.25008.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL4
Changes by:	rmccabe at sourceware.org	2007-05-02 02:39:53

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

Log message:
	Fix 238656: 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=RHEL4&r1=1.67.2.10&r2=1.67.2.11
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceHandler.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.17.2.1&r2=1.17.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.227.2.18&r2=1.227.2.19

--- conga/conga.spec.in.in	2007/05/01 15:57:33	1.67.2.10
+++ conga/conga.spec.in.in	2007/05/02 02:39:53	1.67.2.11
@@ -288,6 +288,9 @@
 
 
 %changelog
+* Tue Apr 30 2007 Ryan McCabe <rmccabe@redhat.com> 0.9.1-9
+- Fix bz238656 (conga does not set the "nodename" attribute for manual fencing)
+
 * Tue Apr 30 2007 Ryan McCabe <rmccabe@redhat.com> 0.9.1-8
 - Do not build for ppc64
 - Resolves: bz236827
--- conga/luci/site/luci/Extensions/FenceHandler.py	2007/02/12 23:28:16	1.17.2.1
+++ conga/luci/site/luci/Extensions/FenceHandler.py	2007/05/02 02:39:53	1.17.2.2
@@ -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:00	1.227.2.18
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2007/05/02 02:39:53	1.227.2.19
@@ -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.



             reply	other threads:[~2007-05-02  2:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-02  2:39 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-09-17  6:29 [Cluster-devel] conga ./conga.spec.in.in luci/site/luci/Extens rmccabe
2008-07-15 18:20 rmccabe
2008-07-14 16:29 rmccabe
2008-05-12 17:09 rmccabe
2008-05-12 17:04 rmccabe
2008-04-28  3:54 rmccabe
2008-04-28  3:49 rmccabe
2008-04-18 20:34 rmccabe
2008-04-14 15:58 rmccabe
2008-01-14 20:51 rmccabe
2007-10-09 21:41 rmccabe
2007-10-09 21:33 rmccabe
2007-10-09 21:31 rmccabe
2007-10-03  2:16 rmccabe
2007-09-20 22:37 rmccabe
2007-08-17 20:26 rmccabe
2007-06-25 19:10 rmccabe
2007-05-02  2:36 rmccabe
2006-12-14  0:01 rmccabe
2006-11-29 22:33 kupcevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070502023956.25008.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).