Skip to contentSkip to conversation

conga ./conga.spec.in.in luci/cluster/fence-ma ...

Cluster-devel [email protected] 1 participant 1 message Apr 23, 2008

lore
Share & tools
lore
#0 lore 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.spec.in.in +4 -2
@@ -291,13 +291,15 @@
 
 ###  changelog ###
 %changelog
-* Thu Apr 10 2008 Ryan McCabe <[email protected]> 0.12.0-8
-- Fix bz443152 (Exception generated when adding or updating failover domains)
+-* Fri Apr 18 2008 Ryan McCabe <[email protected]> 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 <[email protected]> 0.12.0-7
+- Fix a bug introduced while implementing bz337041 (Add option to not fail-back service)
+
 * Wed Feb 27 2008 Ryan McCabe <[email protected]> 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)
luci/cluster/fence-macros +73 -3

125 lines not on this page · raw message

luci/cluster/form-macros +3 -0
@@ -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">
luci/cluster/resource-form-macros +9 -2
@@ -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>
luci/cluster/validate_fence.js +11 -7
@@ -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;
luci/site/luci/Extensions/FenceHandler.py +30 -0
@@ -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):
luci/site/luci/Extensions/LuciClusterInfo.py +16 -4
@@ -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:
luci/site/luci/Extensions/homebase_adapters.py +23 -23

52 lines not on this page · raw message

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