Skip to contentSkip to conversation

conga ./conga.spec.in.in luci/cluster/cluster_ ...

Cluster-devel [email protected] 1 participant 1 message May 21, 2009

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at 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.spec.in.in +2 -0
@@ -325,6 +325,8 @@
 %changelog
 * Thu May 14 2009 Ryan McCabe <[email protected]> 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 <[email protected]> 0.12.2-5
 - Fix bz492392 (Conga Interface for Fence Agents Requires Password even when Password Script is Specified)
luci/cluster/cluster_config-macros +4 -3
@@ -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>
luci/cluster/cluster_svc-macros +34 -1
@@ -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"
luci/cluster/resource-form-macros +188 -2

235 lines not on this page · raw message

luci/cluster/resource_form_handlers.js +11 -0
@@ -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 = '';
luci/site/luci/Extensions/LuciClusterInfo.py +8 -0
@@ -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])
luci/site/luci/Extensions/LuciValidation.py +9 -1
@@ -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)
luci/site/luci/Extensions/ResourceHandler.py +13 -7
@@ -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