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

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



CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe sourceware org	2009-05-21 13:33:19

Modified files:
	.              : conga.spec.in.in 
	luci/cluster   : cluster_config-macros cluster_svc-macros 
	                 resource-form-macros resource_form_handlers.js 
	luci/site/luci/Extensions: LuciClusterInfo.py LuciValidation.py 
	                           ResourceHandler.py 
	luci/site/luci/var: Data.fs 

Log message:
	- Fix bz469965 (Adding existing fence device fails)
	- Fix bz499741 (updating qdisk partition global settings wipes out heuristics)
	- Fix bz495109 (Need xen/kvm flag for conga UI)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.115&r2=1.45.2.116
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/cluster_config-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.5&r2=1.3.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/cluster_svc-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.11&r2=1.3.2.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.21.2.15&r2=1.21.2.16
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource_form_handlers.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.20.2.17&r2=1.20.2.18
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.18&r2=1.1.4.19
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciValidation.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.6.2.11&r2=1.6.2.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ResourceHandler.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.7&r2=1.1.4.8
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.42&r2=1.15.2.43

--- conga/conga.spec.in.in	2009/05/14 21:05:58	1.45.2.115
+++ conga/conga.spec.in.in	2009/05/21 13:32:03	1.45.2.116
@@ -325,6 +325,8 @@
 %changelog
 * Thu May 14 2009 Ryan McCabe <rmccabe redhat com> 0.12.2-6
 - Fix bz469965 (Adding existing fence device fails)
+- Fix bz499741 (updating qdisk partition global settings wipes out heuristics)
+- Fix bz495109 (Need xen/kvm flag for conga UI)
 
 * Thu Apr 23 2009 Ryan McCabe <rmccabe redhat com> 0.12.2-5
 - Fix bz492392 (Conga Interface for Fence Agents Requires Password even when Password Script is Specified)
--- conga/luci/cluster/cluster_config-macros	2009/02/16 17:23:27	1.3.2.5
+++ conga/luci/cluster/cluster_config-macros	2009/05/21 13:32:03	1.3.2.6
@@ -819,15 +819,14 @@
 
 				<tal:block
 					tal:condition="python: len(heuristics)"
-					tal:define="global curHeur python: -1">
+					tal:define="global curHeur python:int(0)">
 
 				<input type="hidden" name="num_heuristics" id="num_heuristics"
 					tal:attributes="value python: len(heuristics)" />
 
 				<tr class="systemsTable"
 					tal:repeat="heuristic heuristics"
-					tal:attributes="id python: 'heuristic' + str(curHeur)"
-					tal:define="global curHeur python: curHeur + 1">
+					tal:attributes="id python: 'heuristic' + str(curHeur)">
 
 					<td class="systemsTable">
 						<input class="qdpath qdisk" type="text"
@@ -861,6 +860,8 @@
 								id python: 'heuristic' + str(curHeur) + ':hdel';
 								name python: 'heuristic' + str(curHeur) + ':hdel'" />
 					</td>
+
+					<tal:block tal:define="global curHeur python:int(curHeur) + 1" />
 				</tr>
 				</tal:block>
 			</tbody>
--- conga/luci/cluster/cluster_svc-macros	2009/05/14 21:05:58	1.3.2.11
+++ conga/luci/cluster/cluster_svc-macros	2009/05/21 13:32:04	1.3.2.12
@@ -166,6 +166,19 @@
 					</select>
 				</td>
 			</tr>
+
+			<tr class="systemsTable"
+				tal:condition="python:clusterinfo and clusterinfo.get('has_qemu') == True">
+				<td>Hypervisor</td>
+				<td>
+					<select name="hypervisor">
+						<option value="auto"
+							selected="selected">Automatic</option>
+						<option value="qemu">KVM</option>
+						<option value="xen">Xen</option>
+					</select>
+				</td>
+			</tr>
 						
 			<tal:block metal:use-macro="here/cluster_svc-macros/macros/failover-prefs-macro" />
 
@@ -207,6 +220,9 @@
 	<input type="hidden" name="oldname"
 		tal:attributes="value sinfo/name | nothing" />
 
+	<tal:block tal:define="
+		global clusterinfo python: here.getClusterInfo(modelb, request)" />
+
 	<div class="service_comp_list">
 	<table class="systemsTable">
 		<thead class="systemsTable">
@@ -295,6 +311,23 @@
 				</td>
 			</tr>
 
+			<tr class="systemsTable"
+				tal:condition="python:clusterinfo and clusterinfo.get('has_qemu') == True">
+				<td>Hypervisor</td>
+				<td>
+					<select name="hypervisor">
+						<option value="auto"
+							tal:content="string:Automatic"
+							tal:attributes="selected python:(not sinfo.get('hypervisor') or sinfo.get('hypervisor') == 'auto') and 'selected' or ''" />
+						<option value="qemu"
+							tal:content="string:KVM"
+							tal:attributes="selected python:(sinfo.get('hypervisor') == 'qemu') and 'selected' or ''" />
+						<option value="xen"
+							tal:content="string:Xen"
+							tal:attributes="selected python:(sinfo.get('hypervisor') == 'xen') and 'selected' or ''" />
+				</td>
+			</tr>
+
 			<tal:block metal:use-macro="here/cluster_svc-macros/macros/failover-prefs-macro" />
 						
 			<tr class="systemsTable"><td colspan="2">
@@ -577,7 +610,7 @@
 	<tr class="systemsTable">
 		<td>Recovery policy</td>
 		<td>
-			<select name="recovery">
+			<select name="recovery" onchange="set_recovery_type(this.form)">
 				<option value="">Select a recovery policy</option>
 				<option name="relocate" value="relocate"
 					tal:content="string:Relocate"
--- conga/luci/cluster/resource-form-macros	2008/07/30 21:14:38	1.21.2.15
+++ conga/luci/cluster/resource-form-macros	2009/05/21 13:32:04	1.21.2.16
@@ -147,7 +147,7 @@
 			<option name="SAPDatabase" value="SAPDatabase">SAP Database</option>
 			<option name="SAPInstance" value="SAPInstance">SAP Instance</option>
 
-			<tal:block tal:condition="python:clusterinfo and clusterinfo['os_major'] == 5 and clusterinfo['os_minor'] > 1">
+			<tal:block tal:condition="python:clusterinfo and clusterinfo.get('has_sybase_agent') == True">
 				<option name="ASEHAagent" value="ASEHAagent">Sybase ASE Failover Instance</option>
 			</tal:block>
 			<option name="oracledb" value="oracledb">Oracle 10g Failover Instance</option>
@@ -203,7 +203,7 @@
 			<option name="SAPDatabase" value="SAPDatabase">SAP Database</option>
 			<option name="SAPInstance" value="SAPInstance">SAP Instance</option>
 
-			<tal:block tal:condition="python:clusterinfo and clusterinfo['os_major'] == 5 and clusterinfo['os_minor'] > 1">
+			<tal:block tal:condition="python:clusterinfo and clusterinfo.get('has_sybase_agent') == True">
 				<option name="ASEHAagent" value="ASEHAagent">Sybase ASE Failover Instance</option>
 			</tal:block>
 
@@ -286,9 +286,13 @@
 	<script type="text/javascript">
 		set_page_title('Luci — cluster — resources — Resource details');
 	</script>
+
 	<tal:block
 		tal:define="global res python: here.getResourceInfo(modelb, request)" />
 
+	<tal:block tal:define="
+		global clusterinfo python: here.getClusterInfo(modelb, request)" />
+
 	<h2>Resource details for <span tal:replace="res/name" /></h2>
 
 	<table class="systemsTable">
@@ -327,6 +331,9 @@
 		src="/luci/cluster/resource_form_handlers.js">
 	</script>
 
+	<tal:block tal:define="
+		global clusterinfo python: here.getClusterInfo(modelb, request)" />
+
 	<tal:block tal:define="global resourcename request/resourcename | request/form/resourcename | nothing" />
 
 	<tal:block tal:condition="resourcename"
@@ -1329,6 +1336,7 @@
 						value res/attrs/DIR_PROFILE | nothing" />
 			</td>
 		</tr>
+
 		<tr class="systemsTable">
 			<td class="systemsTable">Name of the SAP START profile</td>
 			<td class="systemsTable">
@@ -1338,6 +1346,84 @@
 						value res/attrs/START_PROFILE | nothing" />
 			</td>
 		</tr>
+
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+            class="systemsTable">
+			<td class="systemsTable">
+				<span title="After that time in seconds a monitor operation is executed by the resource agent. Does the monitor return SUCCESS, the start is handled as SUCCESS. This is useful to resolve timing problems with e.g. the J2EE-Addin instance.">Number of seconds to wait before checking startup status</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="START_WAITTIME"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/START_WAITTIME | nothing" />
+			</td>
+		</tr>
+
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+			class="systemsTable">
+			<td class="systemsTable">
+				<span title="The SAPInstance resource agent tries to recover a failed start attempt automaticaly one time. This is done by killing runing instance processes and executing cleanipc.">Enable automatic startup recovery</span>
+			</td>
+			<td class="systemsTable">
+				<input type="checkbox" name="AUTOMATIC_RECOVER"
+					tal:attributes="
+						disabled python: editDisabled;
+						checked res/attrs/AUTOMATIC_RECOVER | nothing" />
+			</td>
+		</tr>
+
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+            class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path where to find a script or program which should be executed before this resource gets started.">Path to a pre-start script</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="PRE_START_USEREXIT"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/PRE_START_USEREXIT | nothing" />
+			</td>
+		</tr>
+
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+            class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path where to find a script or program which should be executed after this resource got started.">Path to a post-start script</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="POST_START_USEREXIT"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/POST_START_USEREXIT | nothing" />
+			</td>
+		</tr>
+
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+            class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path where to find a script or program which should be executed before this resource gets stopped.">Path to a pre-stop script</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="PRE_STOP_USEREXIT"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/PRE_STOP_USEREXIT | nothing" />
+			</td>
+		</tr>
+
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+            class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path where to find a script or program which should be executed after this resource got stopped.">Path to a post-stop script</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="POST_STOP_USEREXIT"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/POST_STOP_USEREXIT | nothing" />
+			</td>
+		</tr>
 	</table>
 	<div metal:use-macro="here/resource-form-macros/macros/res_form_footer" />
 	</form>
@@ -1665,6 +1751,106 @@
 			</td>
 		</tr>
 
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+			class="systemsTable">
+			<td class="systemsTable">Application Level Monitoring</td>
+			<td class="systemsTable">
+				<input type="checkbox" name="STRICT_MONITORING"
+					tal:attributes="
+						disabled python: editDisabled;
+						checked res/attrs/STRICT_MONITORING | nothing" />
+			</td>
+		</tr>
+
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+			class="systemsTable">
+			<td class="systemsTable">Automatic Startup Recovery</td>
+			<td class="systemsTable">
+				<input type="checkbox" name="AUTOMATIC_RECOVER"
+					tal:attributes="
+						disabled python: editDisabled;
+						checked res/attrs/AUTOMATIC_RECOVER | nothing" />
+			</td>
+		</tr>
+
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+			class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path to the Java SDK">Path to Java SDK</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="JAVA_HOME"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/JAVA_HOME | nothing" />
+			</td>
+		</tr>
+
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+			class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified filename of the jdbc driver for the database connection test. It will be automaticaly read from the bootstrap.properties file in Java engine 6.40 and 7.00. For Java engine 7.10 the parameter is mandatory">File name of the JDBC driver</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="DB_JARS"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/DB_JARS | nothing" />
+			</td>
+		</tr>
+
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+			class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path where to find a script or program which should be executed before this resource gets started.">Path to a pre-start script</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="PRE_START_USEREXIT"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/PRE_START_USEREXIT | nothing" />
+			</td>
+		</tr>
+
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+			class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path where to find a script or program which should be executed after this resource got started.">Path to a post-start script</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="POST_START_USEREXIT"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/POST_START_USEREXIT | nothing" />
+			</td>
+		</tr>
+
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+			class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path where to find a script or program which should be executed before this resource gets stopped.">Path to a pre-stop script</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="PRE_STOP_USEREXIT"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/PRE_STOP_USEREXIT | nothing" />
+			</td>
+		</tr>
+
+		<tr tal:condition="python:clusterinfo and clusterinfo.get('sap_agent_v19') == True"
+			class="systemsTable">
+			<td class="systemsTable">
+				<span title="The fully qualified path where to find a script or program which should be executed after this resource got stopped.">Path to a post-stop script</span>
+			</td>
+			<td class="systemsTable">
+				<input type="text" size="20" name="POST_STOP_USEREXIT"
+					tal:attributes="
+						disabled python: editDisabled;
+						value res/attrs/POST_STOP_USEREXIT | nothing" />
+			</td>
+		</tr>
+
 		<tr class="systemsTable">
 			<td class="systemsTable">
 				<span title="The fully qualified path to the J2EE instance bootstrap directory">J2EE instance bootstrap directory</span>
--- conga/luci/cluster/resource_form_handlers.js	2009/04/27 21:03:32	1.20.2.17
+++ conga/luci/cluster/resource_form_handlers.js	2009/05/21 13:32:04	1.20.2.18
@@ -471,6 +471,17 @@
 
 var submit_btn = null;
 
+function set_recovery_type(form) {
+	recovery = form.recovery.options[form.recovery.options.selectedIndex].value;
+	if (recovery != 'restart') {
+		form.max_restarts.disabled = true;
+		form.restart_expire_time.disabled = true;
+	} else {
+		form.max_restarts.disabled = false;
+		form.restart_expire_time.disabled = false;
+	}
+}
+
 function forms_to_xml(submit_button, master_form) {
 	var errors = new Array();
 	var form_xml = '';
--- conga/luci/site/luci/Extensions/LuciClusterInfo.py	2009/04/27 21:03:32	1.1.4.18
+++ conga/luci/site/luci/Extensions/LuciClusterInfo.py	2009/05/21 13:32:04	1.1.4.19
@@ -603,17 +603,25 @@
 	clumap = {}
 
 	clumap['has_ignore_undef_fence'] = False
+	clumap['sap_agent_v19'] = False
+	clumap['has_qemu'] = False
+	clumap['has_sybase_agent'] = False
 	try:
 		cluster_os = model.getClusterOS()
 		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 > 0:
+				clumap['has_sybase_agent'] = True
 			if os_minor > 1:
 				clumap['vm_migration_choice'] = True
 			if os_minor > 2:
 				clumap['has_fence_ssh'] = True
 				#clumap['has_ignore_undef_fence'] = True
+			if os_minor > 3:
+				clumap['sap_agent_v19'] = True
+				clumap['has_qemu'] = True
 		elif cluster_os.find('Nahant') != -1:
 			clumap['os_major'] = 4
 			os_minor = int(cluster_os[cluster_os.find('Update ') + 7])
--- conga/luci/site/luci/Extensions/LuciValidation.py	2009/04/27 21:03:32	1.6.2.11
+++ conga/luci/site/luci/Extensions/LuciValidation.py	2009/05/21 13:32:04	1.6.2.12
@@ -1108,7 +1108,7 @@
 def validate_vmsvc_form(model, request):
 	errors = list()
 
-	fvar = GetReqVars(request, [ 'vmname', 'oldname', 'vmpath', 'recovery', 'domain', 'migration_type', 'max_restarts', 'restart_expire_time', 'migration_mapping'])
+	fvar = GetReqVars(request, [ 'vmname', 'oldname', 'vmpath', 'recovery', 'domain', 'migration_type', 'max_restarts', 'restart_expire_time', 'migration_mapping', 'hypervisor' ])
 
 	vm_name = fvar['vmname']
 	if vm_name is None:
@@ -1227,6 +1227,14 @@
 		except:
 			pass
 
+	hypervisor = fvar['hypervisor']
+	if hypervisor == 'xen':
+		xvm.addAttribute('hypervisor', 'xen')
+	elif hypervisor == 'qemu':
+		xvm.addAttribute('hypervisor', 'qemu')
+	else:
+		xvm.removeAttribute('hypervisor')
+
 	fdom = fvar['domain']
 	if fdom:
 		xvm.addAttribute('domain', fdom)
--- conga/luci/site/luci/Extensions/ResourceHandler.py	2009/01/23 19:33:29	1.1.4.7
+++ conga/luci/site/luci/Extensions/ResourceHandler.py	2009/05/21 13:32:04	1.1.4.8
@@ -710,13 +710,14 @@
 		if LUCI_DEBUG_MODE is True:
 			luci_log.debug_verbose('addSAPD1: %s' % err)
 
-	if form.has_key('DBJ2EE_ONLY'):
-		res.addAttribute('DBJ2EE_ONLY', 'TRUE')
-	else:
-		res.removeAttribute('DBJ2EE_ONLY')
-
+	for param in ( 'DBJ2EE_ONLY', 'AUTOMATIC_RECOVER', 'STRICT_MONITORING' ):
+		if form.has_key(param):
+			res.addAttribute(param, 'true')
+		else:
+			res.removeAttribute(param)
+			
 	# Optional string parameters
-	for param in ( 'DIR_EXECUTABLE', 'NETSERVICENAME', 'DIR_BOOTSTRAP', 'DIR_SECSTORE' ):
+	for param in ( 'DIR_EXECUTABLE', 'NETSERVICENAME', 'DIR_BOOTSTRAP', 'DIR_SECSTORE', 'JAVA_HOME', 'DB_JARS', 'PRE_START_USEREXIT', 'POST_START_USEREXIT', 'PRE_STOP_USEREXIT', 'POST_STOP_USEREXIT' ):
 		try:
 			pval = form[param].strip()
 			if not pval:
@@ -737,8 +738,13 @@
 	res.removeAttribute('name')
 	res.addAttribute('InstanceName', rname)
 
+	if form.has_key('AUTOMATIC_RECOVER'):
+		res.addAttribute('AUTOMATIC_RECOVER', 'true')
+	else:
+		res.removeAttribute('AUTOMATIC_RECOVER')
+
 	# Optional string parameters
-	for param in ( 'DIR_EXECUTABLE', 'DIR_PROFILE', 'START_PROFILE' ):
+	for param in ( 'DIR_EXECUTABLE', 'DIR_PROFILE', 'START_PROFILE', 'PRE_START_USEREXIT', 'POST_START_USEREXIT', 'PRE_STOP_USEREXIT', 'POST_STOP_USEREXIT', 'START_WAITTIME' ):
 		try:
 			pval = form[param].strip()
 			if not pval:
Binary files /cvs/cluster/conga/luci/site/luci/var/Data.fs	2009/03/24 20:08:19	1.15.2.42 and /cvs/cluster/conga/luci/site/luci/var/Data.fs	2009/05/21 13:32:05	1.15.2.43 differ
rcsdiff: /cvs/cluster/conga/luci/site/luci/var/Data.fs: diff failed


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