Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Cluster Development (http://www.linux-archive.org/cluster-development/)
-   -   [Cluster-devel] conga/luci/cluster busy_wait-macro cluster_con ... (http://www.linux-archive.org/cluster-development/698-cluster-devel-conga-luci-cluster-busy_wait-macro-cluster_con.html)

11-19-2007 05:22 PM

[Cluster-devel] conga/luci/cluster busy_wait-macro cluster_con ...
 
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe@sourceware.org 2007-11-19 18:22:48

Added files:
luci/cluster : busy_wait-macro cluster_config-macros
cluster_svc-macros fdom-macros fence-macros
system_svc-macros

Log message:
split up form-macros into manageable modules

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/busy_wait-macro.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/cluster_config-macros.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/cluster_svc-macros.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fdom-macros.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence-macros.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/system_svc-macros.diff?cvsroot=cluster&r1=NONE&r2=1.1

/cvs/cluster/conga/luci/cluster/busy_wait-macro,v --> standard output
revision 1.1
--- conga/luci/cluster/busy_wait-macro
+++ - 2007-11-19 18:22:48.660504000 +0000
@@ -0,0 +1,62 @@
+<div metal:define-macro="busywaitpage">
+ <table>
+ <tr><td>
+ <h2>Please be patient - this cluster's configuration is being modified.</h2>
+ </td></tr>
+
+ <tr><td>
+ <img src="100wait.gif" />
+ </td></tr>
+
+ <span tal:define="global nodereports isBusy/nodereports" />
+
+ <tr tal:repeat="nodereport nodereports"><td>
+ <tal:block
+ tal:condition="python:nodereport.get('isnodecreati on') != True">
+
+ <h2><span tal:replace="nodereport/desc" /></h2>
+ </tal:block>
+
+ <tal:block
+ tal:condition="python:nodereport.get('isnodecreati on') == True">
+
+ <tal:block
+ tal:condition="python:nodereport.get('iserror') == True">
+
+ <h2><span tal:content="nodereport/desc" /></h2>
+
+ <span class="errmsg"
+ tal:content="nodereport/errormessage" />
+ </tal:block>
+
+ <tal:block
+ tal:condition="python:nodereport.get('iserror') != True">
+
+ <h2><span tal:content="nodereport/desc" /></h2>
+ <em tal:content="nodereport/statusmessage | nothing" />
+ <br/>
+
+ <tal:block tal:condition="python: nodereport['statusindex'] < 1">
+ <img src="notstarted.png" />
+ </tal:block>
+
+ <tal:block tal:condition="python: nodereport['statusindex'] == 1 or nodereport['statusindex'] == 2">
+ <img src="installed.png" alt="[cluster software installed]" />
+ </tal:block>
+
+ <tal:block tal:condition="python: nodereport['statusindex'] == 3">
+ <img src="rebooted.png" alt="[cluster node rebooted]" />
+ </tal:block>
+
+ <tal:block tal:condition="python: nodereport['statusindex'] == 4 or nodereport['statusindex'] == 5">
+ <img src="configured.png" alt="[cluster node configured]" />
+ </tal:block>
+
+ <tal:block tal:condition="python: nodereport['statusindex'] == 6">
+ <img src="joined.png" alt="[cluster node joined cluster]" />
+ </tal:block>
+ </tal:block>
+ </tal:block>
+ </td></tr>
+ </table>
+</div>
/cvs/cluster/conga/luci/cluster/cluster_config-macros,v --> standard output
revision 1.1
--- conga/luci/cluster/cluster_config-macros
+++ - 2007-11-19 18:22:48.741556000 +0000
@@ -0,0 +1,955 @@
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
+
+<html>
+
+<head>
+ <title tal:content="string:" />
+</head>
+
+<body>
+
+<div metal:define-macro="clusterconfig-form">
+ <script type="text/javascript">
+ set_page_title('Luci ?? cluster ?? Configure cluster properties');
+ </script>
+ <script type="text/javascript"
+ src="conga_ajax.js">
+ </script>
+ <script type="text/javascript"
+ src="validate_xvm_key.js">
+ </script>
+
+ <tal:block tal:define="
+ global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+ <tal:block tal:condition="not: exists: modelb">
+ <tal:block tal:define="global modelb python: None" />
+ </tal:block>
+
+ <tal:block
+ tal:define="global clusterinfo python: here.getClusterInfo(modelb, request)" />
+
+<tal:block tal:condition="clusterinfo">
+ <span tal:omit-tag="" tal:define="global configTabNum python: 'tab' in request and int(request['tab']) or 1" />
+
+ <ul class="configTab">
+ <li class="configTab">
+ <a tal:attributes="
+ href clusterinfo/basecluster_url | nothing;
+ class python: 'configTab' + (configTabNum == 1 and ' configTabActive' or ');
+ ">General</a>
+ </li>
+ <li class="configTab"
+ tal:condition="not:clusterinfo/gulm">
+ <a tal:attributes="
+ href clusterinfo/fencedaemon_url | nothing;
+ class python: 'configTab' + (configTabNum == 2 and ' configTabActive' or ');
+ ">Fence</a>
+ </li>
+ <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"
+ tal:condition="clusterinfo/gulm">
+ <a tal:attributes="
+ 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">
+ <script type="text/javascript"
+ src="/luci/homebase/homebase_common.js">
+ </script>
+ <script type="text/javascript"
+ src="/luci/cluster/validate_config_general.js">
+ </script>
+
+ <form name="basecluster" action="" method="post">
+ <input type="hidden" name="cluster_version"
+ tal:attributes="value os_version | nothing" />
+ <input type="hidden" name="pagetype"
+ tal:attributes="value request/pagetype | request/form/pagetype"
+ />
+ <input type="hidden" name="configtype" value="general" />
+ <input type="hidden" name="clustername"
+ tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
+
+ <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+ <thead class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="1">
+ <div class="systemsTableTop">
+ <strong>General Properties</strong>
+ </div>
+ </td></tr>
+ </thead>
+
+ <tbody class="systemsTable" id="sys_tbody">
+ <tr class="systemsTable">
+ <td class="systemsTable">Cluster Name</td>
+ <td class="systemsTable">
+ <input type="text" name="cluname"
+ tal:attributes="value clusterinfo/clustername" />
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable">Configuration Version</td>
+ <td class="systemsTable">
+ <input type="text" name="cfgver" size="5"
+ tal:attributes="value clusterinfo/config_version"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <table tal:condition="python: os_version and os_version == 'rhel5'">
+ <tr class="systemsTable">
+ <td class="systemsTable" colspan="2">
+ <img src="arrow_right.png" alt="[+]"
+ onclick="toggle_visible(this, 'genprops_advanced', 'genprops_advanced_label')">
+ <span id="genprops_advanced_label">Show</span>
+ advanced cluster properties
+ </td>
+ </tr>
+
+ <tr class="systemsTable invisible" id="genprops_advanced">
+ <td class="systemsTable" colspan="2">
+ <table class="systemsTable">
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#token', 55, 65);">Token Timeout</a> (ms)
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10" name="token"
+ tal:attributes="value clusterinfo/totem/token | string:10000" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#retransmits_before_loss', 55, 65);">Number of token retransmits before loss</a>
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="token_retransmits_before_loss_const"
+ tal:attributes="value clusterinfo/totem/token_retransmits_before_loss_const | string:20" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#join', 55, 65);">Join Timeout</a> (ms)
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10" name="join"
+ tal:attributes="value clusterinfo/totem/join | string:60" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#consensus', 55, 65);">Consensus Timeout</a> (ms)
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="consensus"
+ tal:attributes="value clusterinfo/totem/consensus | string:4800" />
+ </td>
+ </tr>
+
+<tal:comment tal:replace="nothing">
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#secauth', 55, 65);">Secure Authentication</a>
+ </td>
+ <td class="systemsTable">
+ <input type="checkbox" name="secauth" checked="checked" />
+ </tr>
+
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#rrp_mode', 55, 65);">Redundant Ring Protocol Mode</a>
+ </td>
+ <td class="systemsTable">
+ <select type="text" name="rrp_mode">
+ <option value="none">
+ None
+ </option>
+ <option value="active">
+ Active
+ </option>
+ <option value="passive">
+ Passive
+ </option>
+ </select>
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#netmtu', 55, 65);">Network MTU</a>
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="netmtu"
+ tal:attributes="value string:1500" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#threads', 55, 65);">Number of Threads
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10" name="threads"
+ tal:attributes="value string:0" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#vsftype', 55, 65);">Virtual Synchrony Type
+ </td>
+ <td class="systemsTable">
+ <select name="vsftype">
+ <option value="none">
+ None
+ </option>
+ <option value="ykd">
+ YKD
+ </option>
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#token_retransmit', 55, 65);">Token Retransmit</a> (ms)
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="token_retransmit"
+ tal:attributes="value string:238" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#hold', 55, 65);">Hold Token Timeout</a> (ms)
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10" name="hold"
+ tal:attributes="value string:180" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#send_join', 55, 65);">Maximum time to wait before sending a join message</a> (ms)
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10" name="send_join"
+ tal:attributes="value string:0" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#merge', 55, 65);">Merge Detection Timeout</a> (ms)
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="merge"
+ tal:attributes="value string:200" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#downcheck', 55, 65);">Interface Down Check Timeout</a> (ms)
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="downcheck"
+ tal:attributes="value string:1000" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#fail_to_recv_const', 55, 65);">Fail to Receive Constant</a>
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="fail_to_recv_const"
+ tal:attributes="value string:50" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#seqno_unchanged_const', 55, 65);">Rotations with no mcast traffic before merge detection timeout started</a>
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="seqno_unchanged_const"
+ tal:attributes="value string:30" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#heartbeat_failures_allowed', 55, 65);">Number of Heartbeat Failures Allowed</a>
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="heartbeat_failures_allowed"
+ tal:attributes="value string:0" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#max_network_delay', 55, 65);">Maximum Network Delay</a> (ms)
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="max_network_delay"
+ tal:attributes="value string:50" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#window_size', 55, 65);">Window Size</a>
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="window_size"
+ tal:attributes="value string:50" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#max_messages', 55, 65);">Maximum Messages</a>
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="max_messages"
+ tal:attributes="value string:17" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#rrp_problem_count_timeout', 55, 65);">RRP Problem Count Timeout</a> (ms)
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="rrp_problem_count_timeout"
+ tal:attributes="value string:1000" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#rrp_problem_count_threshold', 55, 65);">RRP Problem Count Threshold</a>
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="rrp_problem_count_threshold"
+ tal:attributes="value string:20" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#rrp_token_expired_timeout', 55, 65);">RRP Token Expired Timeout</a>
+ </td>
+ <td class="systemsTable">
+ <input type="text" size="10"
+ name="rrp_token_expired_timeout"
+ tal:attributes="value string:47" />
+ </td>
+ </tr>
+</tal:comment>
+ </table>
+ </td></tr>
+ </table>
+
+ <table class="systemsTable">
+ <tr class="systemsTable">
+ <td class="systemsTable" colspan="2">
+ <div class="systemsTableEnd">
+ <input type="button" value="Apply"
+ onClick="validate_form(this.form);"/>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+
+ <div id="configTabContent" tal:condition="python: configTabNum == 2">
+ <form name="fencedaemon" method="post" id="fence_config_form" action="">
+ <input type="hidden" name="configtype" value="fence" />
+ <input type="hidden" name="pagetype"
+ tal:attributes="value request/pagetype | request/form/pagetype"
+ />
+ <input type="hidden" name="cluster_version"
+ tal:attributes="value os_version | nothing" />
+ <input type="hidden" name="clustername"
+ tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
+
+ <script type="text/javascript"
+ src="/luci/homebase/homebase_common.js">
+ </script>
+ <script type="text/javascript"
+ src="/luci/cluster/validate_config_fence.js">
+ </script>
+
+ <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+ <thead class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="1">
+ <div class="systemsTableTop">
+ <strong>Fence Daemon Properties</strong>
+ </div>
+ </td></tr>
+ </thead>
+
+ <tbody class="systemsTable" id="sys_tbody">
+ <tr class="systemsTable">
+ <td class="systemsTable">Post Fail <span tal:attributes="onclick python:'window.location.assign('./?pagetype=80&clustername=' + request['clustername'] + ')'">Delay</span>
+ </td>
+ <td class="systemsTable">
+ <input type="text" name="post_fail_delay"
+ tal:attributes="value clusterinfo/pfd" />
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable">Post Join Delay</td>
+ <td class="systemsTable">
+ <input type="text" name="post_join_delay"
+ tal:attributes="value clusterinfo/pjd" />
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <span class="cluster_help" title="Enable if you will be running a VM cluster on this physical cluster">Run XVM fence daemon</td>
+ <td class="systemsTable">
+ <input type="checkbox" name="run_xvmd"
+ tal:attributes="checked python: ('fence_xvmd' in clusterinfo and clusterinfo['fence_xvmd']) and 'checked' or '" />
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable" colspan="2">
+ <div class="systemsTableTop">&nbsp;</div>
+ <strong>XVM fence daemon key distribution</strong>
+ </td>
+ </tr>
+
+ <tr id="fence_xvm_config" class="invisible">
+ <td class="systemsTable" colspan="2" id="fence_xvm_config">
+ <table class="systemsTable" width="100%">
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <div id="fence_xvm_hosts" />
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <input type="button" name="distribute"
+ value="Create and distribute keys"
+ onclick="validate_xvm_dist_form(this.form)"
+ />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr class="systemsTable" id="fence_xvm_init">
+ <td class="systemsTable" colspan="2">
+ <table class="systemsTable">
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ Enter a node hostname from the host cluster
+ </td>
+ <td>
+ <input type="text" value=""
+ name="host_cluster_name"
+ id="host_cluster_name" />
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ Enter a node hostname from the hosted (virtual) cluster
+ </td>
+ <td>
+ <input type="text" value=""
+ name="virt_cluster_name"
+ id="virt_cluster_name" />
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable" colspan="2">
+ <input type="button"
+ name="Retrieve cluster nodes"
+ value="Retrieve cluster nodes"
+ onclick="get_cluster_members(this.form)"
+ />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+
+ <tfoot class="systemsTable">
+ <tr class="systemsTable">
+ <td class="systemsTable" colspan="2">
+ <div class="systemsTableEnd">
+ <input type="button" value="Apply"
+ id="fence_config_submit"
+ onClick="validate_form(this.form)" />
+ </div>
+ </td>
+ </tr>
+ </tfoot>
+ </table>
+ </form>
+ </div>
+
+ <div id="configTabContent" tal:condition="python: configTabNum == 3">
+ <script type="text/javascript"
+ src="/luci/homebase/homebase_common.js">
+ </script>
+ <script type="text/javascript"
+ src="/luci/cluster/validate_config_multicast.js">
+ </script>
+
+ <form name="multicast" action="" method="post">
+ <input type="hidden" name="configtype" value="mcast" />
+ <input type="hidden" name="pagetype"
+ tal:attributes="value request/pagetype | request/form/pagetype"
+ />
+ <input type="hidden" name="cluster_version"
+ tal:attributes="value os_version | nothing" />
+ <input type="hidden" name="clustername"
+ tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
+ <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+ <thead class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="1">
+ <div class="systemsTableTop">
+ <strong>Multicast Configuration</strong>
+ </div>
+ </td></tr>
+ </thead>
+
+ <tbody class="systemsTable" id="sys_tbody">
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <input type="radio" name="mcast" value="False"
+ onClick="disable_mcast('mcast_address', 'mcast_interface');"
+ tal:attributes="checked python: clusterinfo['is_mcast'] != 'True'"
+ />
+ <tal:block tal:condition="python:os_version == 'rhel4'">
+ Do not use multicast
+ </tal:block>
+ <tal:block tal:condition="python:os_version != 'rhel4'">
+ Let cluster choose the multicast address
+ </tal:block>
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <input type="radio" name="mcast" value="True"
+ onClick="enable_mcast('mcast_address', 'mcast_interface');"
+ tal:attributes="checked python: clusterinfo['is_mcast'] == 'True'"
+
+ />
+ <tal:block tal:condition="python:os_version == 'rhel4'">
+ Use multicast
+ </tal:block>
+ <tal:block tal:condition="python:os_version != 'rhel4'">
+ Specify the multicast address manually
+ </tal:block>
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ Multicast address
+ </td>
+ <td class="systemsTable">
+ <input type="text"
+ name="mcast_address" id="mcast_address"
+ tal:attributes="
+ disabled not:clusterinfo/mcast_addr;
+ value clusterinfo/mcast_addr |nothing" />
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ Multicast network interface <span tal:condition="python:os_version != 'rhel4'">(optional)</span>
+ </td>
+ <td class="systemsTable">
+ <input type="text"
+ name="mcast_interface" id="mcast_interface"
+ tal:attributes="
+ disabled not:clusterinfo/mcast_addr;
+ value clusterinfo/mcast_interface |nothing" />
+ </td>
+ </tr>
+ </tbody>
+
+ <tfoot class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="2">
+ <div class="systemsTableEnd">
+ <input type="button" value="Apply"
+ onClick="validate_form(this.form);"/>
+ </div>
+ </td></tr>
+ </tfoot>
+ </table>
+ </form>
+ </div>
+
+ <div id="configTabContent" tal:condition="python: configTabNum == 4">
+ <script type="text/javascript"
+ src="/luci/homebase/homebase_common.js">
+ </script>
+ <script type="text/javascript"
+ src="/luci/cluster/validate_config_qdisk.js">
+ </script>
+ <form name="quorum_partition" action="" method="post">
+ <input type="hidden" name="pagetype"
+ tal:attributes="value request/pagetype | request/form/pagetype"
+ />
+ <input type="hidden" name="configtype" value="qdisk" />
+ <input type="hidden" name="cluster_version"
+ tal:attributes="value os_version | nothing" />
+ <input type="hidden" name="clustername"
+ tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
+ <div class="configTabContent">
+ <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+ <thead class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="1">
+ <div class="systemsTableTop">
+ <strong>Quorum Partition Configuration</strong>
+ </div>
+ </td></tr>
+ </thead>
+
+ <tbody class="systemsTable" id="sys_tbody">
+ <tr class="systemsTable" id="st_row"><td class="systemsTable" id="st_col">
+ <input type="radio" name="quorumd" value="False"
+ onClick="disableChildrenInput('quorumdisk');"
+ tal:attributes="checked python: (not clusterinfo['is_quorumd']) and 'checked' or '" />
+ Do not use a Quorum Partition
+ </td></tr>
+
+ <tr class="systemsTable"><td class="systemsTable">
+ <input type="radio" name="quorumd" value="True"
+ onClick="enableChildrenInput('quorumdisk');"
+ tal:attributes="checked python: (clusterinfo['is_quorumd']) and 'checked' or '" />
+ Use a Quorum Partition
+ </td></tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div class="spacing configTabContent"></div>
+
+ <div id="quorumdisk" class="configTabContent">
+ <div class="configTabContent">
+ <table name="qdiskprefs" class="systemsTable">
+ <tr class="systemsTable">
+ <td class="systemsTable">Interval</td>
+ <td class="systemsTable">
+ <input type="text" name="interval"
+ tal:attributes="value clusterinfo/interval | nothing" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">Votes</td>
+ <td class="systemsTable">
+ <input type="text" name="votes"
+ tal:attributes="value clusterinfo/votes | nothing" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">TKO</td>
+ <td class="systemsTable">
+ <input type="text" name="tko"
+ tal:attributes="value clusterinfo/tko | nothing" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">Minimum Score</td>
+ <td class="systemsTable">
+ <input type="text" name="min_score"
+ tal:attributes="value clusterinfo/min_score | nothing" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">Device</td>
+ <td class="systemsTable">
+ <input type="text" name="device"
+ tal:attributes="value clusterinfo/device | nothing" />
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">Label</td>
+ <td class="systemsTable">
+ <input type="text" name="label"
+ tal:attributes="value clusterinfo/label | nothing" />
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <div class="configTabContent">
+ <table name="qdiskheur" class="systemsTable">
+ <thead class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="1">
+ <div class="systemsTableTop">
+ <strong>Heuristics</strong>
+ </div>
+ </td></tr>
+
+ <tr class="systemsTable">
+ <th class="systemsTable">
+ <div class="systemsTableTop">Path to Program</div>
+ </th>
+ <th class="systemsTable">
+ <div class="systemsTableTop">Interval</div>
+ </th>
+ <th class="systemsTable">
+ <div class="systemsTableTop">Score</div>
+ </th>
+ <th>
+ &nbsp;
+ </th>
+ </tr>
+ </thead>
+
+ <tbody class="systemsTable" id="heuristicList"
+ tal:define="global heuristics clusterinfo/hlist | nothing">
+
+ <tal:block tal:condition="python: not heuristics or not len(heuristics)">
+ <input type="hidden" name="num_heuristics" id="num_heuristics" value="0">
+ <tr class="systemsTable" id="heuristic0">
+ <td class="systemsTable">
+ <input class="qdpath qdisk" type="text"
+ name="heuristic0:hprog" id="heuristic0:hprog" />
+ </td>
+ <td class="systemsTable">
+ <input class="qdint qdisk" type="text"
+ name="heuristic0:hinterval" id="heuristic0:hinterval" />
+ </td>
+ <td class="systemsTable">
+ <input class="qdscore qdisk" type="text"
+ name="heuristic0:hscore" id="heuristic0:hscore" />
+ </td>
+ <td class="systemsTable">
+ <img class="qdisk deleteRow"
+ id="heuristic0:hdel" name="heuristic0:hdel"
+ src="delete-row.png"
+ title="delete this heuristic"
+ onClick="delete_qdisk_heur(this, document.quorum_partition);">
+ </td>
+ </tr>
+ </tal:block>
+
+ <tal:block
+ tal:condition="python: len(heuristics)"
+ tal:define="global curHeur python: -1">
+
+ <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">
+
+ <td class="systemsTable">
+ <input class="qdpath qdisk" type="text"
+ tal:attributes="
+ value heuristic/hprog;
+ id python: 'heuristic' + str(curHeur) + ':hprog';
+ name python: 'heuristic' + str(curHeur) + ':hprog'" />
+ </td>
+
+ <td class="systemsTable">
+ <input class="qdint qdisk" type="text"
+ tal:attributes="
+ value heuristic/hinterval;
+ id python: 'heuristic' + str(curHeur) + ':hinterval';
+ name python: 'heuristic' + str(curHeur) + ':hinterval'" />
+ </td>
+
+ <td class="systemsTable">
+ <input class="qdscore qdisk" type="text"
+ tal:attributes="
+ value heuristic/hscore;
+ id python: 'heuristic' + str(curHeur) + ':hscore';
+ name python: 'heuristic' + str(curHeur) + ':hscore'" />
+ </td>
+ <td class="systemsTable">
+ <img class="qdisk deleteRow"
+ src="delete-row.png"
+ title="delete this heuristic"
+ onClick="delete_qdisk_heur(this, document.quorum_partition);"
+ tal:attributes="
+ id python: 'heuristic' + str(curHeur) + ':hdel';
+ name python: 'heuristic' + str(curHeur) + ':hdel'" />
+ </td>
+ </tr>
+ </tal:block>
+ </tbody>
+
+ <tfoot>
+ <tr class="systemsTable"><td class="systemsTable">
+ <input class="addrow" type="button" value="Add another heuristic" onClick="addHeuristic('heuristicList')">
+ </td></tr>
+ </tfoot>
+ </table>
+ </div>
+ </div>
+
+ <div class="spacing configTabContent"></div>
+ <div class="hbSubmit spacing configTabContent">
+ <input type="button" value="Apply"
+ onClick="validate_form(this.form)" />
+ </div>
+ <script tal:condition="not: clusterinfo/is_quorumd">
+ disableChildrenInput('quorumdisk');
+ </script>
+ </form>
+ </div>
+
+ <tal:block tal:condition="clusterinfo/gulm">
+ <div id="configTabContent" tal:condition="python: configTabNum == 5">
+ <script type="text/javascript"
+ src="/luci/homebase/homebase_common.js">
+ </script>
+ <script type="text/javascript"
+ src="/luci/cluster/validate_config_gulm.js">
+ </script>
+
+ <form name="basecluster" action="" method="post">
+ <input type="hidden" name="cluster_version"
+ tal:attributes="value os_version | nothing" />
+ <input type="hidden" name="pagetype"
+ tal:attributes="value request/pagetype | request/form/pagetype"
+ />
+ <input type="hidden" name="configtype" value="gulm" />
+ <input type="hidden" name="clustername"
+ tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
+
+ <strong class="cluster">GULM Configuration</strong><br/>
+ <table id="systemsTable" class="systemsTable" cellspacing="0">
+ <thead>
+ <tr class="systemsTable" align="left">
+ <th class="systemsTable">Node</th>
+ <th class="systemsTable">Lock Server</th>
+ </tr>
+ </thead>
+ <tbody id="sys_tbody">
+ <tal:block tal:repeat="c clusterinfo/gulm_lockservers">
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <span tal:replace="python:c[0]" />
+ </td>
+ <td class="systemsTable">
+ <input type="checkbox"
+ tal:attributes="
+ name python:c[0];
+ checked python:c[1]" />
+ </td>
+ </tr>
+ </tal:block>
+
+ <tr><td colspan="2">
+ <div class="spacing" />
+ <p><em class="cluster">You may have exactly 1, 3, or 5 GULM lock servers, in any combination of the hosts checked above and given below.</em></p>
+ </td></tr>
+
+ <tr>
+ <td class="pad_right">External Lock Server 1</td>
+ <td>
+ <input type="text" name="__GULM__:server1"
+ class="hostname" value="" />
+ </td>
+ </tr>
+ <tr>
+ <td class="pad_right">External Lock Server 2</td>
+ <td>
+ <input type="text" name="__GULM__:server2"
+ class="hostname" value="" />
+ </td>
+ </tr>
+ <tr>
+ <td class="pad_right">External Lock Server 3</td>
+ <td>
+ <input type="text" name="__GULM__:server3"
+ class="hostname" value="" />
+ </td>
+ </tr>
+ <tr>
+ <td class="pad_right">External Lock Server 4</td>
+ <td>
+ <input type="text" name="__GULM__:server4"
+ class="hostname" value="" />
+ </td>
+ </tr>
+ <tr>
+ <td class="pad_right">External Lock Server 5</td>
+ <td>
+ <input type="text" name="__GULM__:server5"
+ class="hostname" value="" />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div class="spacing configTabContent"></div>
+ <div class="hbSubmit spacing configTabContent">
+ <input type="button" value="Apply"
+ onClick="validate_form(this.form)"/>
+ </div>
+ </div>
+ </tal:block>
+</tal:block>
+</div>
+
+</body>
+</html>
/cvs/cluster/conga/luci/cluster/cluster_svc-macros,v --> standard output
revision 1.1
--- conga/luci/cluster/cluster_svc-macros
+++ - 2007-11-19 18:22:48.840511000 +0000
@@ -0,0 +1,850 @@
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
+
+<html>
+
+<head>
+ <title tal:content="string:" />
+</head>
+
+<body>
+
+<div metal:define-macro="services-form">
+ <h2>Services Form</h2>
+</div>
+
+<div metal:define-macro="servicelist-form">
+ <script type="text/javascript">
+ set_page_title('Luci ?? cluster ?? services');
+ </script>
+
+ <tal:block tal:define="
+ global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+ <tal:block tal:define="
+ global svcstatus python: here.getClusterStatus(request, ricci_agent);
+ global svcinf python: here.getServicesInfo(svcstatus,modelb,request);
+ global svcs svcinf/services" />
+
+ <tal:block tal:repeat="svc svcs">
+ <table class="cluster service" width="100%"
+ tal:define="
+ running svc/running | nothing;
+ autostart svc/autostart |nothing">
+
+ <tr class="cluster service info_top">
+ <td class="cluster service service_name">
+ <strong class="cluster service">Service Name</strong>
+ <a tal:attributes="
+ href svc/cfgurl;
+ class python: 'cluster service ' + (running and 'running' or 'stopped')"
+ tal:content="svc/name" />
+ <tal:block tal:condition="exists:svc/is_vm">
+ (virtual service)
+ </tal:block>
+ </td>
+
+ <td class="cluster service service_action">
+ <form method="post">
+ <select name="gourl">
+ <option value="">Choose a Task...</option>
+ <option
+ tal:attributes="value svc/cfgurl | nothing"
+ tal:content="string:Configure this service" />
+
+ <option value="">----------</option>
+
+ <option
+ tal:condition="running"
+ tal:attributes="value svc/restarturl | nothing"
+ tal:content="string:Restart this service" />
+
+ <option
+ tal:condition="running"
+ tal:attributes="value svc/disableurl | nothing"
+ tal:content="string:Stop this service" />
+
+ <option
+ tal:condition="not: running"
+ tal:attributes="value svc/enableurl | nothing"
+ tal:content="string:Enable this service" />
+
+ <option
+ tal:condition="not: running"
+ tal:attributes="value svc/delurl | nothing"
+ tal:content="string:Delete this service" />
+
+ <option value="">----------</option>
+
+ <tal:block tal:condition="not: running">
+ <tal:block tal:repeat="starturl svc/links">
+ <option
+ tal:condition="not:exists: starturl/migrate"
+ tal:attributes="value starturl/url">Start this service on <span tal:replace="starturl/nodename" /></option>
+ </tal:block>
+ </tal:block>
+
+ <tal:block tal:condition="running">
+ <tal:block tal:repeat="starturl svc/links">
+ <option
+ tal:condition="not:exists: starturl/migrate"
+ tal:attributes="value starturl/url">Relocate this service to <span tal:replace="starturl/nodename" /></option>
+ </tal:block>
+
+ <tal:block tal:condition="svc/is_vm | nothing">
+ <option value="">----------</option>
+ <tal:block tal:repeat="starturl svc/links">
+ <option
+ tal:condition="exists: starturl/migrate"
+ tal:attributes="value starturl/url">Migrate this service to <span tal:replace="starturl/nodename" /></option>
+ </tal:block>
+ </tal:block>
+ </tal:block>
+
+ </select>
+ <input type="button" value="Go"
+ onclick="if (this.form.gourl[this.form.gourl.selectedIndex].value && confirm(this.form.gourl[this.form.gourl.selectedIndex].text + '?')) return dropdown(this.form.gourl)" />
+ </form>
+ </td>
+ </tr>
+
+ <tr class="cluster service info_middle">
+ <td class="cluster service service_nodename">
+ <div class="cluster service service_status">
+ <strong class="cluster service">Status:</strong>
+ <tal:block tal:condition="running">
+ Running on <tal:block tal:replace="svc/nodename"/>
+ </tal:block>
+ <tal:block tal:condition="not: running">
+ This service is stopped
+ </tal:block>
+ </div>
+ <p>Autostart is <span tal:condition="python: autostart.lower() == 'false'" tal:replace="string:not" /> enabled for this service</p>
+ </td>
+ </tr>
+
+ <tr class="cluster service info_bottom">
+ <td class="cluster service service_fdom" tal:condition="running" colspan="2">
+ <strong class="cluster service">Failover Domain Association:</strong> <span tal:replace="svc/faildom"/>
+ </td>
+ </tr>
+ </table>
+ <hr/>
+ </tal:block>
+</div>
+
+<div metal:define-macro="vmadd-form">
+<form method="post" action="">
+ <input type="hidden" name="clustername"
+ tal:attributes="value request/clustername | nothing" />
+
+ <input type="hidden" name="pagetype"
+ tal:attributes="value request/pagetype | nothing" />
+
+ <div class="service_comp_list">
+ <table class="systemsTable">
+ <thead class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable">
+ <p class="reshdr">Create a Virtual Machine Service</p>
+ </td></tr>
+ <tfoot class="systemsTable">
+ <tr class="systemsTable">
+ <td>Automatically start this service</td>
+ <td>
+ <input type="checkbox" name="autostart" checked="checked">
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td>Run exclusive</td>
+ <td>
+ <input type="checkbox" name="exclusive">
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td>Failover Domain</td>
+ <td>
+ <select name="domain">
+ <option value="" selected="selected">None</option>
+ <tal:block tal:repeat="f python:here.get_fdom_names(modelb)">
+ <option tal:content="f"
+ tal:attributes="value f" />
+ </tal:block>
+ </select>
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td>Recovery policy</td>
+ <td>
+ <select name="recovery">
+ <option value="">Select a recovery policy</option>
+ <option name="relocate" value="relocate">Relocate</option>
+ <option name="restart" value="restart">Restart</option>
+ <option name="disable" value="disable">Disable</option>
+ </select>
+ </td>
+ </tr>
+ <tr class="systemsTable"><td colspan="2">
+ <div class="hbSubmit">
+ <input type="submit" value="Create Virtual Machine Service" />
+ </div>
+ </td></tr>
+ </tfoot>
+ <tbody class="systemsTable">
+ <tr class="systemsTable">
+ <td><span class="cluster_help" title="e.g., guest1 if the VM config file is at /etc/xen/guest1">Virtual machine name</span></td>
+ <td><input type="text" name="vmname" value="" /></td>
+ </tr>
+ <tr class="systemsTable">
+ <td><span class="cluster_help" title="e.g., /etc/xen/">Path to VM configuration files</span></td>
+ <td><input type="text" name="vmpath" value="" /></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</form>
+</div>
+
+<div metal:define-macro="vmconfig-form">
+<form method="post" action=""
+ tal:define="vminfo python:here.getVMInfo(modelb, request)">
+
+ <input type="hidden" name="clustername"
+ tal:attributes="value request/clustername | nothing" />
+
+ <input type="hidden" name="pagetype"
+ tal:attributes="value request/pagetype | nothing" />
+
+ <input type="hidden" name="oldname"
+ tal:attributes="value vminfo/name | nothing" />
+
+ <div class="service_comp_list">
+ <table class="systemsTable">
+ <thead class="systemsTable">
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <p class="reshdr">Properties for <tal:block tal:replace="vminfo/name | string:virtual machine service"/></p>
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="cluster service service_action"
+ tal:condition="python: sinfo and 'innermap' in sinfo">
+ <form method="post">
+ <input type="hidden" name="pagetype" tal:attributes="
+ value request/pagetype | request/form/pagetype | nothing" />
+ <select name="gourl"
+ tal:define="global innermap sinfo/innermap;
+ starturls innermap/links">
+
+ <option value="">Choose a Task...</option>
+ <tal:block tal:condition="running">
+ <option
+ tal:attributes="value innermap/restarturl">Restart this service</option>
+
+ <option
+ tal:attributes="value innermap/disableurl">Disable this service</option>
+
+ <option value="">----------</option>
+
+ <tal:block tal:repeat="starturl innermap/links">
+ <option
+ tal:condition="not:exists: starturl/migrate"
+ tal:attributes="value starturl/url">Relocate this service to <span tal:replace="starturl/nodename" />
+ </option>
+ </tal:block>
+
+ <tal:block tal:condition="svc/is_vm | nothing">
+ <option value="">----------</option>
+ <tal:block tal:repeat="starturl innermap/links">
+ <option
+ tal:condition="exists: starturl/migrate"
+ tal:attributes="value starturl/url">Migrate this service to <span tal:replace="starturl/nodename" /></option>
+ </tal:block>
+ </tal:block>
+ </tal:block>
+
+ <tal:block tal:condition="not: running">
+ <option
+ tal:attributes="value innermap/enableurl">Enable this service</option>
+ <option value="">----------</option>
+
+ <tal:block tal:repeat="starturl innermap/links">
+ <option
+ tal:condition="not:exists: starturl/migrate"
+ tal:attributes="value starturl/url">Start this service on <span tal:replace="starturl/nodename" />
+ </option>
+ </tal:block>
+
+ <option value="">----------</option>
+
+ <option
+ tal:attributes="value innermap/delurl | nothing"
+ tal:content="string:Delete this service" />
+ </tal:block>
+ </select>
+
+ <input type="button" value="Go"
+ onclick="if (this.form.gourl[this.form.gourl.selectedIndex].value && confirm(this.form.gourl[this.form.gourl.selectedIndex].text + '?')) return dropdown(this.form.gourl)" />
+ </form>
+ </td>
+ </tr>
+ </thead>
+
+ <tfoot class="systemsTable">
+ <tr class="systemsTable">
+ <td>Automatically start this service</td>
+ <td>
+ <input type="checkbox" name="autostart"
+ tal:attributes="checked python: ('autostart' in vminfo and vminfo['autostart'] != '0') and 'checked' or '" />
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td>Run exclusive</td>
+ <td>
+ <input type="checkbox" name="exclusive"
+ tal:attributes="checked python: ('exclusive' in vminfo and vminfo['exclusive'] != '0') and 'checked' or '" />
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td>Failover Domain</td>
+ <td>
+ <select name="domain">
+ <option value="" tal:content="string:None"
+ tal:attributes="selected python: (not 'domain' in vminfo or not vminfo['domain']) and 'selected' or '" />
+ <tal:block tal:repeat="f python:here.get_fdom_names(modelb)">
+ <option tal:content="f"
+ tal:attributes="
+ value f;
+ selected python: ('domain' in vminfo and vminfo['domain'] == f) and 'selected' or '" />
+ </tal:block>
+ </select>
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td>Recovery policy</td>
+ <td>
+ <select name="recovery">
+ <option value="">Select a recovery policy</option>
+ <option name="relocate" value="relocate"
+ tal:content="string:Relocate"
+ tal:attributes="selected python: ('recovery' in vminfo and vminfo['recovery'] == 'relocate') and 'selected' or '" />
+ <option name="restart" value="restart"
+ tal:content="string:Restart"
+ tal:attributes="selected python: ('recovery' in vminfo and vminfo['recovery'] == 'restart') and 'selected' or '" />
+ <option name="disable" value="disable"
+ tal:content="string:Disable"
+ tal:attributes="selected python: ('recovery' in vminfo and vminfo['recovery'] == 'disable') and 'selected' or '" />
+ </select>
+ </td>
+ </tr>
+ <tr class="systemsTable"><td colspan="2">
+ <div class="hbSubmit">
+ <input name="submit" type="submit" value="Update Virtual Machine Service" />
+ <input name="delete" type="submit" value="Delete Virtual Machine Service" />
+ </div>
+ </td></tr>
+ </tfoot>
+ <tbody class="systemsTable">
+ <tr class="systemsTable">
+ <td><span class="cluster_help" title="e.g., guest1 if the VM config file is at /etc/xen/guest1">Virtual machine name</span></td>
+ <td>
+ <input type="text" name="vmname"
+ tal:attributes="value vminfo/name | nothing" />
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td><span class="cluster_help" title="e.g., /etc/xen/">Path to VM configuration files</span></td>
+ <td>
+ <input type="text" name="vmpath"
+ tal:attributes="value vminfo/path | nothing" />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</form>
+</div>
+
+<div metal:define-macro="serviceadd-form">
+ <script type="text/javascript">
+ set_page_title('Luci ?? cluster ?? services ?? Add a new service');
+ </script>
+ <tal:block metal:use-macro="here/cluster_svc-macros/macros/service-config-head-macro" />
+
+ <h2>Add a Service</h2>
+ <tal:block tal:define="
+ global clusterinfo python: here.getClusterInfo(modelb, request)" />
+
+ <div id="resskel" class="invisible">
+ <tal:block metal:use-macro="here/resource-form-macros/macros/service-compose-macro" />
+ </div>
+
+ <div class="service_comp_list">
+ <form name="service_name_form">
+ <table class="systemsTable">
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <strong class="reshdr">Service name</strong>
+ </td>
+ <td class="systemsTable">
+ <input type="text" length="20" name="service_name" value="" />
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ Automatically start this service
+ </td>
+ <td class="systemsTable">
+ <input type="checkbox" name="autostart" checked="checked" />
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable">Run exclusive</td>
+ <td class="systemsTable">
+ <input type="checkbox" name="exclusive">
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable">Failover Domain</td>
+ <td class="systemsTable">
+ <select name="domain">
+ <option value="" selected="selected">None</option>
+ <tal:block tal:repeat="f sinfo/fdoms">
+ <option tal:content="f"
+ tal:attributes="value f" />
+ </tal:block>
+ </select>
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable">Recovery policy</td>
+ <td class="systemsTable">
+ <select name="recovery">
+ <option value="">Select a recovery policy</option>
+ <option name="relocate" value="relocate">Relocate</option>
+ <option name="restart" value="restart">Restart</option>
+ <option name="disable" value="disable">Disable</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+ <div class="service_comp_list" tal:attributes="id sinfo/root_uuid">
+ </div>
+
+ <div class="service_comp_list">
+ <form name="master" method="post">
+ <input type="button" value="Add a resource to this service"
+ onclick="add_child_resource(this.form);" />
+ <input type="hidden" name="pagetype"
+ tal:attributes="
+ value request/pagetype | request/form/pagetype | nothing" />
+ <input type="hidden" name="orig_pagetype"
+ tal:attributes="
+ value request/pagetype | request/form/pagetype | nothing" />
+ <input type="hidden" name="clustername"
+ tal:attributes="value clusterinfo/clustername" />
+ <input type="button" value="Submit"
+ onClick="forms_to_xml(this, this.form)" />
+ <input type="hidden" name="uuid" value="toplevel" />
+ <input type="hidden" name="parent_uuid" value="_toplevel" />
+ <input type="hidden" name="tree_level" value="-1" />
+ <input type="hidden" name="svc_name" value="" />
+ <input type="hidden" name="autostart" value="-1" />
+ <input type="hidden" name="exclusive" value="-1" />
+ <input type="hidden" name="recovery" />
+ <input type="hidden" name="domain" />
+ <input type="hidden" name="form_xml" />
+ <input type="hidden" name="action" value="add" />
+ </form>
+ </div>
+
+ <div class="invisible" id="global_resources_block">
+ <tal:block tal:repeat="gr global_resources">
+ <tal:block tal:define="
+ global res gr;
+ global type python: 'tag_name' in res and res['tag_name'] or ';
+ global resourceIsRef python: True" />
+ <tal:block metal:use-macro="here/cluster_svc-macros/macros/serviceconfig-type-macro" />
+ </tal:block>
+ </div>
+</div>
+
+<div metal:define-macro="servicestart">
+ <script type="text/javascript">
+ set_page_title('Luci ?? cluster ?? services ?? Start a service');
+ </script>
+
+ <tal:block tal:define="
+ global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+ <tal:block tal:define="
+ result python: here.serviceStart(ricci_agent, request)" />
+</div>
+
+<div metal:define-macro="servicemigrate">
+ <script type="text/javascript">
+ set_page_title('Luci ?? cluster ?? services ?? Migrate a virtual service');
+ </script>
+
+ <tal:block tal:define="
+ global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+ <tal:block tal:define="
+ result python: here.serviceMigrate(ricci_agent, request)" />
+</div>
+
+<div metal:define-macro="servicerestart">
+ <script type="text/javascript">
+ set_page_title('Luci ?? cluster ?? services ?? Restart a service');
+ </script>
+
+ <tal:block tal:define="
+ global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+ <tal:block tal:define="
+ result python: here.serviceRestart(ricci_agent, request)" />
+</div>
+
+<div metal:define-macro="servicestop">
+ <script type="text/javascript">
+ set_page_title('Luci ?? cluster ?? services ?? Stop a service');
+ </script>
+
+ <tal:block tal:define="
+ global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+ <span tal:define="
+ result python: here.serviceStop(ricci_agent, request)" />
+</div>
+
+<div metal:define-macro="serviceconfig-type-macro" tal:omit-tag="">
+ <tal:block tal:condition="python: type == 'ip'">
+ <div metal:use-macro="here/resource-form-macros/macros/ip_macro" />
+ </tal:block>
+
+ <tal:block tal:condition="python: type == 'fs'">
+ <div metal:use-macro="here/resource-form-macros/macros/fs_macro" />
+ </tal:block>
+
+ <tal:block tal:condition="python: type == 'gfs' or type == 'clusterfs'">
+ <div metal:use-macro="here/resource-form-macros/macros/gfs_macro" />
+ </tal:block>
+
+ <tal:block tal:condition="python: type == 'netfs'">
+ <div metal:use-macro="here/resource-form-macros/macros/nfsm_macro"/>
+ </tal:block>
+
+ <tal:block tal:condition="python: type == 'nfsexport'">
+ <div metal:use-macro="here/resource-form-macros/macros/nfsx_macro"/>
+ </tal:block>
+
+ <tal:block tal:condition="python: type == 'nfsclient'">
+ <div metal:use-macro="here/resource-form-macros/macros/nfsc_macro"/>
+ </tal:block>
+
+ <tal:block tal:condition="python: type == 'smb'">
+ <div metal:use-macro="here/resource-form-macros/macros/smb_macro" />
+ </tal:block>
+
+ <tal:block tal:condition="python: type == 'script'">
+ <div metal:use-macro="here/resource-form-macros/macros/scr_macro" />
+ </tal:block>
+
+ <tal:block tal:condition="python: type == 'apache'">
+ <div metal:use-macro="here/resource-form-macros/macros/apache_macro" />
+ </tal:block>
+
+ <tal:block tal:condition="python: type == 'openldap'">
+ <div metal:use-macro="here/resource-form-macros/macros/openldap_macro" />
+ </tal:block>
+
+ <tal:block tal:condition="python: type == 'mysql'">
+ <div metal:use-macro="here/resource-form-macros/macros/mysql_macro" />
+ </tal:block>
+
+ <tal:block tal:condition="python: type == 'lvm'">
+ <div metal:use-macro="here/resource-form-macros/macros/lvm_macro" />
+ </tal:block>
+
+ <tal:block tal:condition="python: type == 'postgres-8'">
+ <div metal:use-macro="here/resource-form-macros/macros/postgres-8_macro" />
+ </tal:block>
+ <tal:block tal:condition="python: type == 'tomcat-5'">
+ <div metal:use-macro="here/resource-form-macros/macros/tomcat-5_macro" />
+ </tal:block>
+ <tal:block tal:condition="python: type == 'SAPInstance'">
+ <div metal:use-macro="here/resource-form-macros/macros/SAPInstance_macro" />
+ </tal:block>
+ <tal:block tal:condition="python: type == 'SAPDatabase'">
+ <div metal:use-macro="here/resource-form-macros/macros/SAPDatabase_macro" />
+ </tal:block>
+</div>
+
+<div metal:define-macro="service-config-head-macro" tal:omit-tag="">
+ <script type="text/javascript"
+ src="/luci/homebase/homebase_common.js">
+ </script>
+ <script type="text/javascript" src="conga_ajax.js"></script>
+ <script type="text/javascript"
+ src="/luci/cluster/resource_form_handlers.js">
+ </script>
+
+ <tal:block tal:define="
+ global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+ <tal:block tal:define="
+ global global_resources python: here.getResourcesInfo(modelb, request);
+ global sstat python: here.getClusterStatus(request, ricci_agent);
+ global sinfo python: here.getServiceInfo(sstat, modelb, request);
+ global resource_list sinfo/resource_list | python:[];
+ global running sinfo/running | nothing" />
+
+ <tal:block tal:replace="structure python: '<script type='+chr(0x22)+'text/javascript'+chr(0x22)+'>'" />
+ var uuid_list = <tal:block tal:replace="sinfo/uuid_list | nothing" />;
+ var global_resources = <tal:block tal:replace="python: map(lambda x: str(x['name']), global_resources) or 'null'" />;
+ var active_resources = <tal:block tal:replace="python: map(lambda x: str(x['name']), resource_list) or 'null'" />;
+ var resource_names = <tal:block tal:replace="python: (map(lambda x: str(x['name']), global_resources) + map(lambda x: str(x['name']), resource_list)) or 'null'" />;
+ <tal:block tal:replace="structure string: </script>" />
+</div>
+
+<div metal:define-macro="serviceconfig-form">
+ <script type="text/javascript">
+ set_page_title('Luci ?? cluster ?? services ?? Configure a service');
+ </script>
+ <tal:block metal:use-macro="here/cluster_svc-macros/macros/service-config-head-macro" />
+
+ <table class="cluster service" width="100%">
+ <tr class="cluster service info_top">
+ <td class="cluster service service_name">
+ <strong class="service_name">Service Name</strong>
+ <span
+ tal:content="sinfo/name | nothing"
+ tal:attributes="class python: running and 'running' or 'stopped'" />
+ </td>
+ <td class="cluster service service_action"
+ tal:condition="python: sinfo and 'innermap' in sinfo">
+ <form method="post">
+ <input type="hidden" name="pagetype" tal:attributes="
+ value request/pagetype | request/form/pagetype | nothing" />
+ <select name="gourl"
+ tal:define="global innermap sinfo/innermap;
+ starturls innermap/links">
+
+ <option value="">Choose a Task...</option>
+ <tal:block tal:condition="running">
+ <option
+ tal:attributes="value innermap/restarturl">Restart this service</option>
+
+ <option
+ tal:attributes="value innermap/disableurl">Disable this service</option>
+
+ <option value="">----------</option>
+
+ <tal:block tal:repeat="starturl innermap/links">
+ <option
+ tal:condition="not:exists: starturl/migrate"
+ tal:attributes="value starturl/url">Relocate this service to <span tal:replace="starturl/nodename" />
+ </option>
+ </tal:block>
+
+ <tal:block tal:condition="innermap/is_vm | nothing">
+ <option value="">----------</option>
+ <tal:block tal:repeat="starturl innermap/links">
+ <option
+ tal:condition="exists: starturl/migrate"
+ tal:attributes="value starturl/url">Migrate this service to <span tal:replace="starturl/nodename" /></option>
+ </tal:block>
+ </tal:block>
+ </tal:block>
+
+ <tal:block tal:condition="not: running">
+ <option
+ tal:attributes="value innermap/enableurl">Enable this service</option>
+ <option value="">----------</option>
+
+ <tal:block tal:repeat="starturl innermap/links">
+ <option
+ tal:condition="not:exists: starturl/migrate"
+ tal:attributes="value starturl/url">Start this service on <span tal:replace="starturl/nodename" />
+ </option>
+ </tal:block>
+
+ <option value="">----------</option>
+
+ <option
+ tal:attributes="value innermap/delurl | nothing"
+ tal:content="string:Delete this service" />
+ </tal:block>
+ </select>
+
+ <input type="button" value="Go"
+ onclick="if (this.form.gourl[this.form.gourl.selectedIndex].value && confirm(this.form.gourl[this.form.gourl.selectedIndex].text + '?')) return dropdown(this.form.gourl)" />
+ </form>
+ </td>
+ </tr>
+
+ <tr class="cluster service info_middle">
+ <td class="cluster service service_status">
+ <strong>Service Status</strong>
+
+ <tal:block tal:condition="running">
+ <span tal:condition="exists:innermap/current"
+ tal:replace="innermap/current | nothing" />
+ <span tal:condition="not:exists:innermap/current"
+ tal:replace="string:Running" />
+ </tal:block>
+
+ <tal:block tal:condition="not:running">
+ Stopped
+ </tal:block>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+ <h2>Service Composition</h2>
+ <tal:block tal:define="
+ global clusterinfo python: here.getClusterInfo(modelb, request)" />
+
+ <div id="resskel" class="invisible">
+ <tal:block metal:use-macro="here/resource-form-macros/macros/service-compose-macro" />
+ </div>
+
+ <div class="service_comp_list" tal:attributes="id sinfo/root_uuid">
+ <div tal:repeat="res resource_list"
+ tal:attributes="
+ class python: 'service_comp rc_indent' + str(res['indent_ctr']);
+ id python: res['uuid']">
+
+ <tal:block
+ tal:condition="python: 'max_depth' in res and res['max_depth'] > 0"
+ tal:replace="structure python: '<div class=nothing>'" />
+
+ <tal:block tal:define="
+ global type python: 'tag_name' in res and res['tag_name'] or ';
+ global resourceIsRef res/ref_object | nothing" />
+
+ <tal:block metal:use-macro="here/cluster_svc-macros/macros/serviceconfig-type-macro" />
+
+ <tal:block
+ tal:condition="python: 'indent_ctr' in res and 'max_depth' in res"
+ tal:replace="structure python: '</div>' * (res['indent_ctr'] - res['max_depth'])" />
+ </div>
+ </div>
+ <div class="service_comp_list">
+ <form name="service_name_form">
+ <table class="rescfg">
+ <tr>
+ <td>Automatically start this service</td>
+ <td><input type="checkbox" name="autostart"
+ tal:attributes="checked python: ('autostart' in sinfo and sinfo['autostart'].lower() != 'false') and 'checked'" />
+ </td>
+ </tr>
+ <tr>
+ <td>Run exclusive</td>
+ <td><input type="checkbox" name="exclusive"
+ tal:attributes="checked python: ('exclusive' in sinfo and sinfo['exclusive'].lower() != 'false') and 'checked'" />
+ </td>
+ </tr>
+ <tr>
+ <td>Failover Domain</td>
+ <td>
+ <select name="domain">
+ <option value=""
+ tal:attributes="selected python: (not 'domain' in sinfo or not sinfo['domain']) and 'selected' or '">None</option>
+ <tal:block tal:repeat="f sinfo/fdoms">
+ <option tal:content="f"
+ tal:attributes="
+ value f;
+ selected python: ('domain' in sinfo and sinfo['domain'] == f) and 'selected' or '" />
+ </tal:block>
+ </select>
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td>Recovery policy</td>
+ <td>
+ <select name="recovery">
+ <option value="">Select a recovery policy</option>
+ <option name="relocate" value="relocate"
+ tal:content="string:Relocate"
+ tal:attributes="selected python: ('recovery' in sinfo and sinfo['recovery'] == 'relocate') and 'selected' or '" />
+ <option name="restart" value="restart"
+ tal:content="string:Restart"
+ tal:attributes="selected python: ('recovery' in sinfo and sinfo['recovery'] == 'restart') and 'selected' or '" />
+ <option name="disable" value="disable"
+ tal:content="string:Disable"
+ tal:attributes="selected python: ('recovery' in sinfo and sinfo['recovery'] == 'disable') and 'selected' or '" />
+ </select>
+ </td>
+ </tr>
+ </table>
+ <input type="hidden" name="service_name"
+ tal:attributes="value sinfo/name | string:1" />
+ </form>
+
+ <form name="master" method="post">
+ <input type="hidden" name="pagetype"
+ tal:attributes="
+ value request/pagetype | request/form/pagetype | nothing" />
+ <input type="hidden" name="orig_pagetype"
+ tal:attributes="
+ value request/pagetype | request/form/pagetype | nothing" />
+ <input type="hidden" name="clustername"
+ tal:attributes="value clusterinfo/clustername" />
+ <input type="button" value="Add a resource to this service"
+ onclick="add_child_resource(this.form);" />
+ <input type="button" value="Save changes"
+ onClick="forms_to_xml(this, this.form)" />
+ <input type="hidden" name="uuid" value="toplevel" />
+ <input type="hidden" name="parent_uuid" value="_toplevel" />
+ <input type="hidden" name="tree_level" value="-1" />
+ <input type="hidden" name="svc_name" value="" />
+ <input type="hidden" name="autostart" value="-1" />
+ <input type="hidd


All times are GMT. The time now is 07:59 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.