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/luci cluster/form-macros site/luci/Exten ...
Date: 2 Feb 2007 00:11:05 -0000	[thread overview]
Message-ID: <20070202001105.20559.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2007-02-02 00:11:05

Modified files:
	luci/cluster   : form-macros 
	luci/site/luci/Extensions: cluster_adapters.py 

Log message:
	Disallow multicast configuration options for GULM clusters

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.172&r2=1.173
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.225&r2=1.226

--- conga/luci/cluster/form-macros	2007/02/01 23:48:51	1.172
+++ conga/luci/cluster/form-macros	2007/02/02 00:11:05	1.173
@@ -550,18 +550,13 @@
 				class python: 'configTab' + (configTabNum == 2 and ' configTabActive' or '');
 			">Fence</a>
 		</li>
-		<li class="configTab">
+		<li class="configTab"
+			tal:condition="not:clusterinfo/gulm">
 			<a tal:attributes="
 				href clusterinfo/multicast_url | nothing;
 				class python: 'configTab' + (configTabNum == 3 and ' configTabActive' or '');
 			">Multicast</a>
 		</li>
-		<li class="configTab">
-			<a tal:attributes="
-				href clusterinfo/quorumd_url | nothing;
-				class python: 'configTab' + (configTabNum == 4 and ' configTabActive' or '');
-			">Quorum Partition</a>
-		</li>
 
 		<li class="configTab"
 			tal:condition="clusterinfo/gulm">
@@ -569,6 +564,13 @@
 				href clusterinfo/gulm_url | nothing;
 				class python: 'configTab' + (configTabNum == 5 and ' configTabActive' or '')">GULM</a>
 		</li>
+
+		<li class="configTab">
+			<a tal:attributes="
+				href clusterinfo/quorumd_url | nothing;
+				class python: 'configTab' + (configTabNum == 4 and ' configTabActive' or '');
+			">Quorum Partition</a>
+		</li>
 	</ul>
 
 	<div id="configTabContent" tal:condition="python: configTabNum == 1">
--- conga/luci/site/luci/Extensions/cluster_adapters.py	2007/02/01 23:48:51	1.225
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2007/02/02 00:11:05	1.226
@@ -906,6 +906,13 @@
 
 # rhel5 cluster version
 def validateMCastConfig(model, form):
+	try:
+		gulm_ptr = model.getGULMPtr()
+		if gulm_ptr:
+			return (False, {'errors': ['Multicast cannot be used with GULM locking.']})
+	except:
+		pass
+
 	errors = list()
 	try:
 		mcast_val = form['mcast'].strip().lower()
@@ -3506,24 +3513,25 @@
   clumap['pjd'] = pjd
   #post fail delay
   clumap['pfd'] = pfd
-  #-------------
-  #if multicast
-  multicast_url = prop_baseurl + PROPERTIES_TAB + "=" + PROP_MCAST_TAB
-  clumap['multicast_url'] = multicast_url
-  #mcast addr
-  is_mcast = model.isMulticast()
-  #clumap['is_mcast'] = is_mcast
-  if is_mcast:
-    clumap['mcast_addr'] = model.getMcastAddr()
-    clumap['is_mcast'] = "True"
-  else:
-    clumap['is_mcast'] = "False"
-    clumap['mcast_addr'] = "1.2.3.4"
 
-  #-------------
-  #GULM params (rhel4 only)
   gulm_ptr = model.getGULMPtr()
-  if gulm_ptr:
+  if not gulm_ptr:
+    #-------------
+    #if multicast
+    multicast_url = prop_baseurl + PROPERTIES_TAB + "=" + PROP_MCAST_TAB
+    clumap['multicast_url'] = multicast_url
+    #mcast addr
+    is_mcast = model.isMulticast()
+    if is_mcast:
+      clumap['mcast_addr'] = model.getMcastAddr()
+      clumap['is_mcast'] = "True"
+    else:
+      clumap['is_mcast'] = "False"
+      clumap['mcast_addr'] = "1.2.3.4"
+    clumap['gulm'] = False
+  else:
+    #-------------
+    #GULM params (rhel4 only)
     lockserv_list = list()
     clunodes = model.getNodes()
     gulm_lockservs = map(lambda x: x.getName(), gulm_ptr.getChildren())
@@ -3535,8 +3543,6 @@
     clumap['gulm'] = True
     clumap['gulm_url'] = prop_baseurl + PROPERTIES_TAB + '=' + PROP_GULM_TAB
     clumap['gulm_lockservers'] = lockserv_list
-  else:
-    clumap['gulm'] = False
 
   #-------------
   #quorum disk params



             reply	other threads:[~2007-02-02  0:11 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-02  0:11 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-09-21  3:11 [Cluster-devel] conga/luci cluster/form-macros site/luci/Exten rmccabe
2007-06-19 15:54 rmccabe
2007-05-03 20:16 rmccabe
2007-03-15 16:41 rmccabe
2007-03-14 22:38 rmccabe
2007-03-14 22:37 rmccabe
2007-03-05 16:50 rmccabe
2007-03-05 16:50 rmccabe
2007-03-05 16:49 rmccabe
2007-02-15 22:44 rmccabe
2007-02-08  3:46 rmccabe
2007-02-07 17:02 rmccabe
2007-02-07 16:55 rmccabe
2007-02-02  4:34 rmccabe
2007-02-01 20:49 rmccabe
2007-01-31 23:36 rmccabe
2007-01-31  5:26 rmccabe
2007-01-23 13:53 rmccabe
2007-01-15 18:21 rmccabe
2007-01-11 19:11 rmccabe
2007-01-10 21:40 rmccabe
2007-01-06  3:29 rmccabe
2006-12-14 23:14 rmccabe
2006-12-14 18:22 rmccabe
2006-12-11 22:42 rmccabe
2006-12-11 21:51 rmccabe
2006-12-06 22:11 rmccabe
2006-12-06 21:16 rmccabe
2006-11-13 21:40 rmccabe
2006-11-12  2:10 rmccabe
2006-11-09 20:32 rmccabe
2006-11-03 22:48 rmccabe
2006-10-25  1:53 rmccabe
2006-10-25  1:11 rmccabe
2006-10-13 21:25 rmccabe
2006-08-03 18:36 shuennek
2006-07-21 14:49 rmccabe
2006-07-20 16:59 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=20070202001105.20559.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.