All of lore.kernel.org
 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/cluster/fence-ma ...
Date: 23 Apr 2008 17:27:56 -0000	[thread overview]
Message-ID: <20080423172756.826.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe at sourceware.org	2008-04-23 17:27:53

Modified files:
	.              : conga.spec.in.in 
	luci/cluster   : fence-macros form-macros resource-form-macros 
	                 validate_fence.js 
	luci/site/luci/Extensions: FenceHandler.py LuciClusterInfo.py 
	                           homebase_adapters.py 
	luci/site/luci/var: Data.fs 

Log message:
	foward port fixes from RHEL4

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.82&r2=1.45.2.83
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.4&r2=1.2.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.90.2.34&r2=1.90.2.35
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.21.2.11&r2=1.21.2.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_fence.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.8&r2=1.1.2.9
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.12&r2=1.4.2.13
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.9&r2=1.1.4.10
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.34.2.16&r2=1.34.2.17
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/var/Data.fs.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.15.2.32&r2=1.15.2.33

--- conga/conga.spec.in.in	2008/04/18 20:34:50	1.45.2.82
+++ conga/conga.spec.in.in	2008/04/23 17:27:10	1.45.2.83
@@ -291,13 +291,15 @@
 
 ###  changelog ###
 %changelog
-* Thu Apr 10 2008 Ryan McCabe <rmccabe@redhat.com> 0.12.0-8
-- Fix bz443152 (Exception generated when adding or updating failover domains)
+-* Fri Apr 18 2008 Ryan McCabe <rmccabe@redhat.com> 0.12.0-8
 - Fix bz441580 (conga should install 'sg3_utils' and start service 'scsi_reserve' when scsi fencing is used)
 - Fix bz441573 ("nodename" field for fence_scsi disabled when adding a new fence device/instance)
 - Fix bz442997 (Luci inserts "hostname" instead of "ipaddr" for rsa II fencing device)
 - Fix bz442806 (luci shows wrong state for 'Monitor link' checkbox in IP resource)
 
+* Fri Apr 18 2008 Ryan McCabe <rmccabe@redhat.com> 0.12.0-7
+- Fix a bug introduced while implementing bz337041 (Add option to not fail-back service)
+
 * Wed Feb 27 2008 Ryan McCabe <rmccabe@redhat.com> 0.12.0-6
 - Fix bz434586 (Resource tree does not display multiple children of a parent correctly)
 - Fix bz304931 (Rich Sybase resource agent configuration support)
--- conga/luci/cluster/fence-macros	2008/04/16 20:46:09	1.2.2.4
+++ conga/luci/cluster/fence-macros	2008/04/23 17:27:10	1.2.2.5
@@ -77,6 +77,9 @@
 
 	<h2>Add a Sharable Fence Device</h2>
 
+	<tal:block tal:define="
+		global clusterinfo python: here.getClusterInfo(modelb, request)" />
+
 	<div id="invisible" class="invisible">
 		<tal:block metal:use-macro="here/fence-macros/macros/shared-fence-form-list" />
 	</div>
@@ -136,6 +139,9 @@
 
 	<h3>Configure a Fence Device</h3>
 
+	<tal:block tal:define="
+		global clusterinfo python: here.getClusterInfo(modelb, request)" />
+
 	<tal:block tal:define="fencedevs python: here.getFenceInfo(modelb, None)">
 
 	<tal:block tal:condition="exists: fencedevs/fencedevs">
@@ -615,6 +621,19 @@
 							value cur_fencedev/passwd_script | nothing" />
 				</td>
 			</tr>
+			<tr tal:condition="exists:clusterinfo/has_fence_ssh">
+				<td>
+					<span title="Enable SSH operation">Use SSH</span>
+				</td>
+				<td>
+					<input tal:condition="exists:cur_fencedev"
+						type="checkbox" name="secure"
+						tal:attributes="
+							checked python:(cur_fencedev and cur_fencedev.has_key('secure') and (cur_fencedev['secure'] == '1' or cur_fencedev['secure'].lower() == 'true')) and 'checked' or ''" />
+					<input tal:condition="not:exists:cur_fencedev"
+						type="checkbox" name="secure" />
+				</td>
+			</tr>
 		</table>
 
 		<tal:block tal:condition="exists: cur_fencedev">
@@ -675,6 +694,19 @@
 							value cur_fencedev/passwd_script | nothing" />
 				</td>
 			</tr>
+			<tr tal:condition="exists:clusterinfo/has_fence_ssh">
+				<td>
+					<span title="Enable SSH operation">Use SSH (DRAC5 only)</span>
+				</td>
+				<td>
+					<input tal:condition="exists:cur_fencedev"
+						type="checkbox" name="secure"
+						tal:attributes="
+							checked python:(cur_fencedev and cur_fencedev.has_key('secure') and (cur_fencedev['secure'] == '1' or cur_fencedev['secure'].lower() == 'true')) and 'checked' or ''" />
+					<input tal:condition="not:exists:cur_fencedev"
+						type="checkbox" name="secure" />
+				</td>
+			</tr>
 		</table>
 
 		<tal:block tal:condition="exists: cur_fencedev">
@@ -1386,10 +1418,9 @@
 			<tr>
 				<td>Use Lanplus</td>
 				<td>
-					<tal:block tal:condition="exists: cur_fencedev">
+					<tal:block tal:condition="exists:cur_fencedev">
 						<input name="lanplus" type="checkbox"
-							tal:attributes="checked python: ('lanplus' in cur_fencedev and cur_fencedev['lanplus'] == '1') and 'checked' or ''"
-						/>
+							tal:attributes="checked python: (cur_fencedev and cur_fencedev.has_key('lanplus') and (cur_fencedev['lanplus'] == '1' or cur_fencedev['lanplus'].lower() == 'true')) and 'checked' or ''" />
 					</tal:block>
 					<tal:block tal:condition="not:exists:cur_fencedev">
 						<input name="lanplus" type="checkbox" />
@@ -1532,6 +1563,19 @@
 						tal:attributes="value cur_instance/switch | nothing" />
 				</td>
 			</tr>
+			<tr tal:condition="exists:clusterinfo/has_fence_ssh">
+				<td>
+					<span title="Enable SSH operation">Use SSH</span>
+				</td>
+				<td>
+					<input tal:condition="exists:cur_instance"
+						type="checkbox" name="secure"
+						tal:attributes="
+							checked python:(cur_instance and cur_instance.has_key('secure') and (cur_instance['secure'] == '1' or cur_instance['secure'].lower() == 'true')) and 'checked' or ''" />
+					<input tal:condition="not:exists:cur_instance"
+						type="checkbox" name="secure" />
+				</td>
+			</tr>
 			<tr><td colspan="2">
 				<div class="hbSubmit">
 					<tal:block tal:condition="exists:cur_fence_instance_id">
@@ -1615,6 +1659,19 @@
 						tal:attributes="value cur_instance/port | nothing" />
 				</td>
 			</tr>
+			<tr tal:condition="exists:clusterinfo/has_fence_ssh">
+				<td>
+					<span title="Enable SSH operation">Use SSH</span>
+				</td>
+				<td>
+					<input tal:condition="exists:cur_instance"
+						type="checkbox" name="secure"
+						tal:attributes="
+							checked python:(cur_instance and cur_instance.has_key('secure') and (cur_instance['secure'] == '1' or cur_instance['secure'].lower() == 'true')) and 'checked' or ''" />
+					<input tal:condition="not:exists:cur_instance"
+						type="checkbox" name="secure" />
+				</td>
+			</tr>
 			<tr><td colspan="2">
 				<div class="hbSubmit">
 					<tal:block tal:condition="exists:cur_fence_instance_id">
@@ -1843,6 +1900,19 @@
 						tal:attributes="value cur_instance/blade | nothing" />
 				</td>
 			</tr>
+			<tr tal:condition="exists:clusterinfo/has_fence_ssh">
+				<td>
+					<span title="Enable SSH operation">Use SSH</span>
+				</td>
+				<td>
+					<input tal:condition="exists:cur_instance"
+						type="checkbox" name="secure"
+						tal:attributes="
+							checked python:(cur_instance and cur_instance.has_key('secure') and (cur_instance['secure'] == '1' or cur_instance['secure'].lower() == 'true')) and 'checked' or ''" />
+					<input tal:condition="not:exists:cur_instance"
+						type="checkbox" name="secure" />
+				</td>
+			</tr>
 			<tr><td colspan="2">
 				<div class="hbSubmit">
 					<tal:block tal:condition="exists:cur_fence_instance_id">
--- conga/luci/cluster/form-macros	2008/02/08 21:56:33	1.90.2.34
+++ conga/luci/cluster/form-macros	2008/04/23 17:27:10	1.90.2.35
@@ -512,6 +512,9 @@
 		global cluster_node_status_str python: (nodeinfo['nodestate'] == '0' and 'Cluster member' or (nodeinfo['nodestate'] == '1' and 'Currently not a cluster participant' or 'This node is not responding'))"
 	/>
 
+	<tal:block tal:define="
+		global clusterinfo python: here.getClusterInfo(modelb, request)" />
+
 	 <table class="cluster node" width="100%">
 		<tr class="cluster node info_top">
 			<td class="cluster node node_name">
--- conga/luci/cluster/resource-form-macros	2008/04/18 04:15:52	1.21.2.11
+++ conga/luci/cluster/resource-form-macros	2008/04/23 17:27:10	1.21.2.12
@@ -146,7 +146,10 @@
 			<option name="TOMCAT-5" value="TOMCAT-5">Tomcat 5</option>
 			<option name="SAPDatabase" value="SAPDatabase">SAP Database</option>
 			<option name="SAPInstance" value="SAPInstance">SAP Instance</option>
-			<option name="ASEHAagent" value="ASEHAagent">Sybase ASE Failover Instance</option>
+
+			<tal:block tal:condition="python:clusterinfo and clusterinfo['os_major'] == 5 and clusterinfo['os_minor'] > 1">
+				<option name="ASEHAagent" value="ASEHAagent">Sybase ASE Failover Instance</option>
+			</tal:block>
 			<option name="oracledb" value="oracledb">Oracle 10g Failover Instance</option>
 		</select>
 	</form>
@@ -199,7 +202,11 @@
 			<option name="TOMCAT-5" value="TOMCAT-5">Tomcat 5</option>
 			<option name="SAPDatabase" value="SAPDatabase">SAP Database</option>
 			<option name="SAPInstance" value="SAPInstance">SAP Instance</option>
-			<option name="ASEHAagent" value="ASEHAagent">Sybase ASE Failover Instance</option>
+
+			<tal:block tal:condition="python:clusterinfo and clusterinfo['os_major'] == 5 and clusterinfo['os_minor'] > 1">
+				<option name="ASEHAagent" value="ASEHAagent">Sybase ASE Failover Instance</option>
+			</tal:block>
+
 			<option name="oracledb" value="oracledb">Oracle 10g Failover Instance</option>
 		</select>
 	</form>
--- conga/luci/cluster/validate_fence.js	2008/04/16 20:46:09	1.1.2.8
+++ conga/luci/cluster/validate_fence.js	2008/04/23 17:27:10	1.1.2.9
@@ -8,17 +8,17 @@
 */
 
 var fence_inst_validator = [];
-fence_inst_validator['apc'] = [ 'port', 'switch' ];
-fence_inst_validator['bladecenter'] = [ 'blade' ];
+fence_inst_validator['apc'] = [ 'port', 'switch', 'secure' ];
+fence_inst_validator['bladecenter'] = [ 'blade', 'secure' ];
 fence_inst_validator['brocade'] = [ 'port' ];
 fence_inst_validator['bullpap'] = [ 'domain' ];
 fence_inst_validator['egenera'] = [ 'lpan', 'pserver' ];
-fence_inst_validator['gndb'] = [ 'ipaddress' ];
+fence_inst_validator['gnbd'] = [ 'ipaddress' ];
 fence_inst_validator['mcdata'] = [ 'port' ];
 fence_inst_validator['sanbox2'] = [ 'port' ];
 fence_inst_validator['scsi'] = [ 'nodename' ];
 fence_inst_validator['vixel'] = [ 'port' ];
-fence_inst_validator['wti'] = [ 'port' ];
+fence_inst_validator['wti'] = [ 'port', 'secure' ];
 fence_inst_validator['xvm'] = [ 'domain' ];
 
 var fence_validator = [];
@@ -26,10 +26,10 @@
 fence_validator['bladecenter'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
 fence_validator['brocade'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
 fence_validator['bullpap'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
-fence_validator['drac'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
+fence_validator['drac'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script', 'secure' ];
 fence_validator['egenera'] = [ 'cserver' ];
 fence_validator['gnbd'] = [ 'servers' ];
-fence_validator['ilo'] = [ 'hostname', 'login', 'passwd', 'passwd_script' ];
+fence_validator['ilo'] = [ 'hostname', 'login', 'passwd', 'passwd_script', 'secure' ];
 fence_validator['ipmilan'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script', 'lanplus', 'auth' ];
 fence_validator['manual'] = [];
 fence_validator['mcdata'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
@@ -77,7 +77,8 @@
 		return (errors);
 	}
 
-	if (errors && errors.length > 0 && form.passwd_script && !str_is_blank(form.passwd_script.value))
+	if (errors && errors.length > 0 &&
+		form.passwd_script && !str_is_blank(form.passwd_script.value))
 	{
 		clr_form_err(form_elem);
 		return (null);
@@ -126,6 +127,9 @@
 field_validator['port'] = validate_field_str;
 field_validator['passwd_script'] = validate_field_noop;
 
+/* iLO, DRAC5, WTI, APC, Bladecenter */
+field_validator['secure'] = validate_field_noop;
+
 /* IPMI fence device */
 field_validator['lanplus'] = validate_field_noop;
 field_validator['auth'] = validate_field_ipmilan_auth;
--- conga/luci/site/luci/Extensions/FenceHandler.py	2008/04/16 20:46:09	1.4.2.12
+++ conga/luci/site/luci/Extensions/FenceHandler.py	2008/04/23 17:27:10	1.4.2.13
@@ -654,6 +654,12 @@
 		except:
 			pass
 
+	use_ssh = form.has_key('secure') and (form['secure'] == '1' or form['secure'].lower() == 'true')
+	if use_ssh:
+		fencedev.addAttribute('secure', '1')
+	else:
+		fencedev.removeAttribute('secure')
+
 	return errors
 
 def val_rps10_fd(form, fencedev):
@@ -803,6 +809,12 @@
 	if not has_passwd:
 		errors.append(FD_PROVIDE_PASSWD)
 
+	use_ssh = form.has_key('secure') and (form['secure'] == '1' or form['secure'].lower() == 'true')
+	if use_ssh:
+		fencedev.addAttribute('secure', '1')
+	else:
+		fencedev.removeAttribute('secure')
+
 	return errors
 
 FD_VALIDATE = {
@@ -903,6 +915,12 @@
 	except Exception, e:
 		errors.append(FI_PROVIDE_SWITCH)
 
+	use_ssh = form.has_key('secure') and (form['secure'] == '1' or form['secure'].lower() == 'true')
+	if use_ssh:
+		fenceinst.addAttribute('secure', '1')
+	else:
+		fenceinst.removeAttribute('secure')
+
 	return errors
 
 def val_wti_fi(form, fenceinst):
@@ -916,6 +934,12 @@
 	except Exception, e:
 		errors.append(FI_PROVIDE_PORT)
 
+	use_ssh = form.has_key('secure') and (form['secure'] == '1' or form['secure'].lower() == 'true')
+	if use_ssh:
+		fenceinst.addAttribute('secure', '1')
+	else:
+		fenceinst.removeAttribute('secure')
+
 	return errors
 
 def val_brocade_fi(form, fenceinst):
@@ -981,6 +1005,12 @@
 	except Exception, e:
 		errors.append(FI_PROVIDE_BLADE)
 
+	use_ssh = form.has_key('secure') and (form['secure'] == '1' or form['secure'].lower() == 'true')
+	if use_ssh:
+		fenceinst.addAttribute('secure', '1')
+	else:
+		fenceinst.removeAttribute('secure')
+
 	return errors
 
 def val_mcdata_fi(form, fenceinst):
--- conga/luci/site/luci/Extensions/LuciClusterInfo.py	2008/01/23 04:44:32	1.1.4.9
+++ conga/luci/site/luci/Extensions/LuciClusterInfo.py	2008/04/23 17:27:10	1.1.4.10
@@ -575,14 +575,24 @@
 		return {}
 
 	clumap = {}
+
 	try:
 		cluster_os = model.getClusterOS()
-		if cluster_os.find('Tikanga'):
+		if cluster_os.find('Tikanga') != -1:
+			clumap['os_major'] = 5
 			os_minor = int(cluster_os[cluster_os.find('5.') + 2])
+			clumap['os_minor'] = os_minor
 			if os_minor > 1:
 				clumap['vm_migration_choice'] = True
-	except:
-		pass
+		elif cluster_os.find('Nahant') != -1:
+			clumap['os_major'] = 4
+			os_minor = int(cluster_os[cluster_os.find('Update ') + 7])
+			clumap['os_minor'] = os_minor
+			if os_minor > 6:
+				clumap['has_fence_ssh'] = True
+	except Exception, e:
+		if LUCI_DEBUG_MODE is True:
+			luci_log.debug_verbose('GCI0a: %r %s' % (e, str(e)))
 
 	if not model:
 		try:
@@ -1626,7 +1636,9 @@
 	clu_map = {}
 
 	try:
-		os_str = resolveOSType(rc.os())
+		os_str = rc.os()
+		clu_map['os_full'] = os_str
+		os_str = resolveOSType(os_str)
 		clu_map['os'] = os_str
 		clu_map['isVirtualized'] = rc.dom0()
 	except:
--- conga/luci/site/luci/Extensions/homebase_adapters.py	2008/02/07 06:52:56	1.34.2.16
+++ conga/luci/site/luci/Extensions/homebase_adapters.py	2008/04/23 17:27:10	1.34.2.17
@@ -629,29 +629,29 @@
 					luci_log.debug_verbose('VAC5: %s' % err_msg)
 				continue
 
-			cur_os = resolveOSType(rc.os())
-			if cur_os != cluster_os:
-				if LUCI_DEBUG_MODE is True:
-					luci_log.debug_verbose('VAC5a: "%s" / "%s" -> "%s"' \
-						% (cluster_os, rc.os(), cur_os))
-				incomplete = True
-				cur_system['errors'] = True
-
-				if not prev_auth:
-					try:
-						rc.unauth()
-					except Exception, e:
-						if LUCI_DEBUG_MODE is True:
-							luci_log.debug_verbose('VAC6: %s: %r %s' \
-								% (cur_host, e, str(e)))
-
-				err_msg = 'Node %s reports its cluster version is %s and we expect %s' \
-					% (cur_host, cur_os, cluster_os)
-
-				errors.append(err_msg)
-				if LUCI_DEBUG_MODE is True:
-					luci_log.debug_verbose('VAC7: %s' % err_msg)
-				continue
+			#cur_os = resolveOSType(rc.os())
+			#if cur_os != cluster_os:
+			#	if LUCI_DEBUG_MODE is True:
+			#		luci_log.debug_verbose('VAC5a: "%s" / "%s" -> "%s"' \
+			#			% (cluster_os, rc.os(), cur_os))
+			#	incomplete = True
+			#	cur_system['errors'] = True
+
+			#	if not prev_auth:
+			#		try:
+			#			rc.unauth()
+			#		except Exception, e:
+			#			if LUCI_DEBUG_MODE is True:
+			#				luci_log.debug_verbose('VAC6: %s: %r %s' \
+			#					% (cur_host, e, str(e)))
+
+			#	err_msg = 'Node %s reports its cluster version is %s and we expect %s' \
+			#		% (cur_host, cur_os, cluster_os)
+
+			#	errors.append(err_msg)
+			#	if LUCI_DEBUG_MODE is True:
+			#		luci_log.debug_verbose('VAC7: %s' % err_msg)
+			#	continue
 		else:
 			incomplete = True
 
Binary files /cvs/cluster/conga/luci/site/luci/var/Data.fs	2008/04/16 20:46:09	1.15.2.32 and /cvs/cluster/conga/luci/site/luci/var/Data.fs	2008/04/23 17:27:10	1.15.2.33 differ
rcsdiff: /cvs/cluster/conga/luci/site/luci/var/Data.fs: diff failed



             reply	other threads:[~2008-04-23 17:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23 17:27 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-02-11 16:29 [Cluster-devel] conga ./conga.spec.in.in luci/cluster/fence-ma rmccabe
2008-04-21 18:16 rmccabe
2008-04-16 20:46 rmccabe
2008-04-11  6:50 rmccabe

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=20080423172756.826.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.