Skip to contentSkip to conversation

conga/luci cluster/form-macros site/luci/Exten ...

Cluster-devel [email protected] 1 participant 1 message Jan 15, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-01-15 18:21:50

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

Log message:
changes related to bz212021 that address bugs found during testing of the original fix

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.90.2.15&r2=1.90.2.16
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.2&r2=1.4.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.120.2.18&r2=1.120.2.19
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/conga_constants.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.19.2.6&r2=1.19.2.7

luci/cluster/form-macros +21 -1
@@ -2046,7 +2046,7 @@
 			<tr>
 				<td>Authentication Type</td>
 				<td>
-					<input name="auth_type" type="text" title="Options are to leave blank for none, password, md2, or md5"
+					<input name="auth_type" type="text" title="Options are to leave blank for none, password, or md5"
 						tal:attributes="value cur_fencedev/auth_type | nothing" />
 				</td>
 			</tr>
@@ -2751,6 +2751,17 @@
 				<input type="submit" value="Go"/>
 				</form>
 			</td>
+
+			<td class="cluster node node_action"
+				tal:condition="python: nodeinfo['nodestate'] != '0' and nodeinfo['nodestate'] != '1'">
+				<form method="post" onSubmit="return dropdown(this.gourl)">
+				<select name="gourl">
+					<option value="">Choose a Task...</option>
+					<option tal:attributes="value nodeinfo/fence_url | nothing">Fence this node</option>
+				</select>
+				<input type="submit" value="Go"/>
+				</form>
+			</td>
 		</tr>
 
 		<tr class="cluster node info_middle">
@@ -3143,6 +3154,15 @@
 						<input type="submit" value="Go"/>
 					</form>
 				</td>
+				<td class="node node_action" tal:condition="python: nd['status'] != '0' and nd['status'] != '1'">
+					<form method="post" onSubmit="return dropdown(this.gourl)">
+						<select class="node" name="gourl">
+							<option value="">Choose a Task...</option>
+							<option tal:attributes="value nd/fence_it_url | nothing">Fence this node</option>
+						</select>
+						<input type="submit" value="Go"/>
+					</form>
+				</td>
 			</tr>
 
 			<tr class="node info_middle">
luci/site/luci/Extensions/FenceHandler.py +40 -37

275 lines not on this page · raw message

luci/site/luci/Extensions/cluster_adapters.py +7 -6
@@ -1979,7 +1979,7 @@
 	31: validateResourceAdd,
 	33: validateResourceAdd,
 	51: validateFenceAdd,
-	50: validateFenceEdit,
+	54: validateFenceEdit,
 	55: validateDaemonProperties,
 	57: deleteFenceDevice,
 	58: validateNodeFenceConfig
@@ -4066,12 +4066,13 @@
     infohash['reboot_url'] = baseurl + "?pagetype=" +NODE_PROCESS + "&task=" + NODE_REBOOT + "&nodename=" + nodename + "&clustername=" + clustername
     infohash['fence_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_FENCE + "&nodename=" + nodename + "&clustername=" + clustername
     infohash['delete_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_DELETE + "&nodename=" + nodename + "&clustername=" + clustername
-
-  if nodestate == NODE_INACTIVE:
+  elif nodestate == NODE_INACTIVE:
     infohash['jl_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_JOIN_CLUSTER + "&nodename=" + nodename + "&clustername=" + clustername
     infohash['reboot_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_REBOOT + "&nodename=" + nodename + "&clustername=" + clustername
     infohash['fence_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_FENCE + "&nodename=" + nodename + "&clustername=" + clustername
     infohash['delete_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_DELETE + "&nodename=" + nodename + "&clustername=" + clustername
+  else:
+    infohash['fence_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_FENCE + "&nodename=" + nodename + "&clustername=" + clustername
 
   #figure out current services running on this node
   svc_dict_list = list()
@@ -4196,13 +4197,13 @@
       map['reboot_url'] = baseurl + "?pagetype=" +NODE_PROCESS + "&task=" + NODE_REBOOT + "&nodename=" + name + "&clustername=" + clustername
       map['fence_it_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_FENCE + "&nodename=" + name + "&clustername=" + clustername
       map['delete_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_DELETE + "&nodename=" + name + "&clustername=" + clustername
-
-    if map['status'] == NODE_INACTIVE:
+    elif map['status'] == NODE_INACTIVE:
       map['jl_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_JOIN_CLUSTER + "&nodename=" + name + "&clustername=" + clustername
       map['reboot_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_REBOOT + "&nodename=" + name + "&clustername=" + clustername
       map['fence_it_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_FENCE + "&nodename=" + name + "&clustername=" + clustername
       map['delete_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_DELETE + "&nodename=" + name + "&clustername=" + clustername
-
+    else:
+      map['fence_it_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_FENCE + "&nodename=" + name + "&clustername=" + clustername
 
     #figure out current services running on this node
     svc_dict_list = list()
luci/site/luci/Extensions/conga_constants.py +1 -1
@@ -130,7 +130,7 @@
 
 POSSIBLE_REBOOT_MESSAGE = "This node is not currently responding and is probably rebooting as planned. This state should persist for 5 minutes or so..."
 
-REDIRECT_MSG = " You will be redirected in 5 seconds. Please fasten your safety restraints."
+REDIRECT_MSG = " You will be redirected in 5 seconds."
 
 
 # Homebase-specific constants