[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga ./conga.spec.in.in luci/cluster/fence-ma ...



CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL4
Changes by:	rmccabe sourceware org	2008-04-21 18:16:01

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 
	luci/site/luci/var: Data.fs 
	make           : version.in 

Log message:
	Fix bz442729 (Add UI support for ssh for fence agents that now support it)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.67.2.26&r2=1.67.2.27
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence-macros.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2.4.4&r2=1.2.4.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.176.2.23&r2=1.176.2.24
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.31.2.9&r2=1.31.2.10
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_fence.js.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.3.2.6&r2=1.3.2.7
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.8&r2=1.17.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciClusterInfo.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.10.2.4&r2=1.10.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/var/Data.fs.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.20.2.22&r2=1.20.2.23
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/make/version.in.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.28.2.11&r2=1.28.2.12

--- conga/conga.spec.in.in	2008/04/18 04:19:57	1.67.2.26
+++ conga/conga.spec.in.in	2008/04/21 18:15:17	1.67.2.27
@@ -300,6 +300,9 @@
 
 
 %changelog
+* Fri Apr 18 2008 Ryan McCabe <rmccabe redhat com> 0.11.1-3
+- Fix bz442729 (Add UI support for ssh for fence agents that now support it)
+
 * Tue Mar 25 2008 Ryan McCabe <rmccabe redhat com> 0.11.1-2
 - Fix bz443002 (luci shows wrong state for 'Monitor link' checkbox in IP resource)
 - Fix bz442933 (Luci inserts "hostname" instead of "ipaddr" for rsa II fencing device)
--- conga/luci/cluster/fence-macros	2008/04/18 03:31:46	1.2.4.4
+++ conga/luci/cluster/fence-macros	2008/04/21 18:15:17	1.2.4.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/03/25 01:27:10	1.176.2.23
+++ conga/luci/cluster/form-macros	2008/04/21 18:15:17	1.176.2.24
@@ -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:19:57	1.31.2.9
+++ conga/luci/cluster/resource-form-macros	2008/04/21 18:15:17	1.31.2.10
@@ -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/18 03:31:46	1.3.2.6
+++ conga/luci/cluster/validate_fence.js	2008/04/21 18:15:17	1.3.2.7
@@ -8,8 +8,8 @@
 */
 
 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' ];
@@ -18,7 +18,7 @@
 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/18 03:31:46	1.17.2.8
+++ conga/luci/site/luci/Extensions/FenceHandler.py	2008/04/21 18:15:18	1.17.2.9
@@ -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/03/25 01:27:12	1.10.2.4
+++ conga/luci/site/luci/Extensions/LuciClusterInfo.py	2008/04/21 18:15:18	1.10.2.5
@@ -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:
Binary files /cvs/cluster/conga/luci/site/luci/var/Data.fs	2008/04/14 17:17:29	1.20.2.22 and /cvs/cluster/conga/luci/site/luci/var/Data.fs	2008/04/21 18:15:18	1.20.2.23 differ
rcsdiff: /cvs/cluster/conga/luci/site/luci/var/Data.fs: diff failed
--- conga/make/version.in	2008/04/11 06:30:25	1.28.2.11
+++ conga/make/version.in	2008/04/21 18:16:00	1.28.2.12
@@ -1,2 +1,2 @@
 VERSION=0.11.1
-RELEASE=2
+RELEASE=3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]