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/cluster_ ...
Date: 7 Aug 2008 18:08:28 -0000	[thread overview]
Message-ID: <20080807180828.11796.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe at sourceware.org	2008-08-07 18:08:24

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

Log message:
	More fixes for bz429350

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.99&r2=1.45.2.100
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/cluster_config-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.3&r2=1.3.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/cluster_svc-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.6&r2=1.3.2.7
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.15&r2=1.20.2.16
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.12&r2=1.1.4.13
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.7&r2=1.6.2.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.36&r2=1.15.2.37
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/make/version.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.21.2.43&r2=1.21.2.44

--- conga/conga.spec.in.in	2008/07/28 17:49:44	1.45.2.99
+++ conga/conga.spec.in.in	2008/08/07 18:07:36	1.45.2.100
@@ -312,6 +312,9 @@
 
 ###  changelog ###
 %changelog
+* Thu Aug 07 2008 Ryan McCabe <rmccabe@redhat.com> 0.12.1-3
+- More fixes for bz429350
+
 * Thu Jul 10 2008 Ryan McCabe <rmccabe@redhat.com> 0.12.1-1
 - Fix bz444938 (conga fails to create proper cluster.conf entries for gfs2 filesystem type)
 - Fix bz444210 (Adding multiple fence devices at the same time causes duplicate entries)
--- conga/luci/cluster/cluster_config-macros	2008/07/14 21:52:30	1.3.2.3
+++ conga/luci/cluster/cluster_config-macros	2008/08/07 18:07:37	1.3.2.4
@@ -715,34 +715,35 @@
 				</td>
 			</tr>
 
-			
 			<tr class="systemsTable"><td colspan="2">
 				<table class="systemsTable">
 					<tr class="systemsTable">
 						<td class="systemsTable">
 							<input type="radio" name="qdisk_dev_label"
-								onclick="disable_text_field(this.form.label, this.form.device)">Label
+								onclick="disable_text_field(this.form.label, this.form.device)"
+								tal:attributes="
+									checked python:(clusterinfo.get('label') or not clusterinfo.get('device')) and 'checked' or ''">Label
 						</td>
 						<td class="systemsTable">
 							<input type="text" name="label" id="qdisk_label"
 								onfocus="disable_text_field(this.form.label, this.form.device);this.form.qdisk_dev_label[0].checked='checked';"
 								tal:attributes="
-									disabled python:(clusterinfo.get('label') or not clusterinfo.get('device')) and '' or 'disabled';
-									checked python:(clusterinfo.get('label') or not clusterinfo.get('label')) and 'checked' or '';
+									disabled python:(not clusterinfo.get('label') and clusterinfo.get('device')) and 'disabled' or '';
 									value clusterinfo/label | nothing" />
 						</td>
 					</tr>
 					<tr class="systemsTable">
 						<td class="systemsTable">
 							<input type="radio" name="qdisk_dev_label"
-								onclick="disable_text_field(this.form.device, this.form.label)">Device (deprecated)
+								onclick="disable_text_field(this.form.device, this.form.label)"
+									tal:attributes="
+										checked python:clusterinfo.get('device') and 'checked' or ''">Device (deprecated)
 						</td>
 						<td class="systemsTable">
 							<input type="text" name="device" id="qdisk_device"
 								onfocus="disable_text_field(this.form.device, this.form.label);this.form.qdisk_dev_label[1].checked='checked';"
 								tal:attributes="
-									disabled python:clusterinfo.get('device') and '' or 'disabled';
-									checked python:clusterinfo.get('device') and 'checked' or '';
+									disabled python:not clusterinfo.get('device') and 'disabled' or '';
 									value clusterinfo/device | nothing" />
 						</td>
 					</tr>
--- conga/luci/cluster/cluster_svc-macros	2008/08/04 21:49:30	1.3.2.6
+++ conga/luci/cluster/cluster_svc-macros	2008/08/07 18:07:37	1.3.2.7
@@ -375,6 +375,8 @@
 		<input type="hidden" name="exclusive" value="-1" />
 		<input type="hidden" name="recovery" />
 		<input type="hidden" name="domain" />
+		<input type="hidden" name="max_restarts" />
+		<input type="hidden" name="restart_expire_time" />
 		<input type="hidden" name="form_xml" />
 		<input type="hidden" name="action" value="add" />
 		</form>
@@ -760,6 +762,8 @@
 		<input type="hidden" name="exclusive" value="-1" />
 		<input type="hidden" name="recovery" />
 		<input type="hidden" name="domain" />
+		<input type="hidden" name="max_restarts" />
+		<input type="hidden" name="restart_expire_time" />
 		<input type="hidden" name="form_xml" />
 		<input type="hidden" name="action" value="edit" />
 		</form>
--- conga/luci/cluster/resource_form_handlers.js	2008/03/12 15:13:12	1.20.2.15
+++ conga/luci/cluster/resource_form_handlers.js	2008/08/07 18:07:37	1.20.2.16
@@ -479,6 +479,8 @@
 	var domain = null;
 	var exclusive = 0;
 	var recovery = null;
+	var max_restarts = null;
+	var restart_expire_time = null;
 
 	submit_btn = submit_button;
 	submit_button.disabled = true;
@@ -509,6 +511,18 @@
 					recovery = null;
 			}
 
+			if (form[i].max_restarts) {
+				max_restarts = form[i].max_restarts.value;
+				if (str_is_blank(max_restarts))
+					max_restarts = null;
+			}
+
+			if (form[i].restart_expire_time) {
+				restart_expire_time = form[i].restart_expire_time.value;
+				if (str_is_blank(restart_expire_time))
+					restart_expire_time = null;
+			}
+
 			if (form[i].domain) {
 				domain = form[i].domain.options[form[i].domain.options.selectedIndex].value;
 				if (str_is_blank(domain))
@@ -581,6 +595,10 @@
 		master_form.domain.value = domain;
 	if (recovery)
 		master_form.recovery.value = recovery;
+	if (max_restarts)
+		master_form.max_restarts.value = max_restarts;
+	if (restart_expire_time)
+		master_form.restart_expire_time.value = restart_expire_time;
 	master_form.autostart.value = autostart;
 	master_form.exclusive.value = exclusive;
 
--- conga/luci/site/luci/Extensions/LuciClusterInfo.py	2008/08/04 21:49:30	1.1.4.12
+++ conga/luci/site/luci/Extensions/LuciClusterInfo.py	2008/08/07 18:07:37	1.1.4.13
@@ -423,6 +423,20 @@
 		hmap['recovery'] = None
 
 	try:
+		hmap['max_restarts'] = svc.getAttribute('max_restarts')
+		if not hmap['max_restarts']:
+			hmap['max_restarts'] = 0
+	except:
+		hmap['max_restarts'] = 0
+
+	try:
+		hmap['restart_expire_time'] = svc.getAttribute('restart_expire_time')
+		if not hmap['restart_expire_time']:
+			hmap['restart_expire_time'] = 0
+	except:
+		hmap['restart_expire_time'] = 0
+
+	try:
 		if int(svc.getAttribute('exclusive')):
 			hmap['exclusive'] = 'true'
 		else:
@@ -1088,7 +1102,7 @@
 
 		nl_map['fdoms'] = fdom_dict_list
 
-		if model.has_errors():
+		if model and model.has_errors():
 			nl_map['has_errors'] = True
 			nl_map['errmsgs'] = model.get_errmsgs()
 		resultlist.append(nl_map)
--- conga/luci/site/luci/Extensions/LuciValidation.py	2008/07/31 18:46:40	1.6.2.7
+++ conga/luci/site/luci/Extensions/LuciValidation.py	2008/08/07 18:07:37	1.6.2.8
@@ -370,26 +370,28 @@
 	if recovery is not None and recovery != 'restart' and recovery != 'relocate' and recovery != 'disable':
 		errors.append('You entered an invalid recovery option: "%s" Valid options are "restart" "relocate" and "disable."')
 
+	max_restarts = None
+	restart_expire_time = None
+
 	if recovery == 'restart':
-		max_restarts = None
-		if fvar['max_restarts']:
+		if fvar['max_restarts'] is not None:
 			try:
 				max_restarts = int(fvar['max_restarts'])
 				if max_restarts < 0:
-					raise ValueError, 'must be greater than 0'
+					raise ValueError, 'must be greater than or equal to 0'
 			except Exception, e:
 				errors.append('Maximum restarts must be a number greater than or equal to 0')
 				max_restarts = None
-		restart_expire_time = None
-		if fvar['restart_expire_time']:
+		if fvar['restart_expire_time'] is not None:
 			try:
 				restart_expire_time = int(fvar['restart_expire_time'])
 				if restart_expire_time < 0:
-					raise ValueError, 'must be greater than 0'
+					raise ValueError, 'must be greater than or equal to 0'
 			except Exception, e:
 				errors.append('Restart expire time must be a number greater than or equal to 0')
 				restart_expire_time = None
 
+
 	service_name = fvar['svc_name']
 	if service_name is None:
 		if LUCI_DEBUG_MODE is True:
@@ -1114,22 +1116,23 @@
 	recovery = fvar['recovery']
 	if recovery is not None and recovery != 'restart' and recovery != 'relocate' and recovery != 'disable':
 		errors.append('You entered an invalid recovery option "%s" for VM service "%s". Valid options are "restart" "relocate" and "disable"' % (recovery, vm_name))
+
+	max_restarts = None
+	restart_expire_time = None
 	if recovery == 'restart':
-		max_restarts = None
-		if fvar['max_restarts']:
+		if fvar['max_restarts'] is not None:
 			try:
 				max_restarts = int(fvar['max_restarts'])
 				if max_restarts < 0:
-					raise ValueError, 'must be greater than 0'
+					raise ValueError, 'must be greater than or equal to 0'
 			except Exception, e:
 				errors.append('Maximum restarts must be a number greater than or equal to 0')
 				max_restarts = None
-		restart_expire_time = None
-		if fvar['restart_expire_time']:
+		if fvar['restart_expire_time'] is not None:
 			try:
 				restart_expire_time = int(fvar['restart_expire_time'])
 				if restart_expire_time < 0:
-					raise ValueError, 'must be greater than 0'
+					raise ValueError, 'must be greater than or equal to 0'
 			except Exception, e:
 				errors.append('Restart expire time must be a number greater than or equal to 0')
 				restart_expire_time = None
Binary files /cvs/cluster/conga/luci/site/luci/var/Data.fs	2008/07/30 21:27:07	1.15.2.36 and /cvs/cluster/conga/luci/site/luci/var/Data.fs	2008/08/07 18:07:37	1.15.2.37 differ
rcsdiff: /cvs/cluster/conga/luci/site/luci/var/Data.fs: diff failed
--- conga/make/version.in	2008/07/30 21:27:55	1.21.2.43
+++ conga/make/version.in	2008/08/07 18:08:24	1.21.2.44
@@ -1,2 +1,2 @@
 VERSION=0.12.1
-RELEASE=2
+RELEASE=3



             reply	other threads:[~2008-08-07 18:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 18:08 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-09-29 17:08 [Cluster-devel] conga ./conga.spec.in.in luci/cluster/cluster_ rmccabe
2009-05-21 13:33 rmccabe
2009-05-14 21:05 rmccabe
2009-04-27 21:03 rmccabe
2009-04-15 16:07 rmccabe
2009-03-24 20:06 rmccabe
2009-02-16 17:23 rmccabe
2008-09-18 15:20 rmccabe
2008-07-14 21:52 rmccabe
2008-03-12 15:13 rmccabe
2008-02-27 20:22 rmccabe
2008-02-08 21:57 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=20080807180828.11796.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.