conga/luci cluster/form-macros site/luci/Exten ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-12-14 23:14:55
Modified files:
luci/cluster : form-macros
luci/site/luci/Extensions: cluster_adapters.py
Log message:
- fencing updates
- fix a typo in multicast address configuration
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.131&r2=1.132
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.183&r2=1.184
luci/cluster/form-macros +151 -42
@@ -1156,44 +1156,55 @@ <td>Name</td> <td> <input name="name" type="text" - tal:attributes="value cur_fencedev/name | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/name | nothing" /> </td> </tr> <tr> <td>IP Address</td> <td> <input name="ip_addr" type="text" - tal:attributes="value cur_fencedev/ipaddr | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/ipaddr | nothing" /> </td> </tr> <tr> <td>Login</td> <td> <input name="login" type="text" - tal:attributes="value cur_fencedev/login | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/login | nothing" /> </td> </tr> <tr> <td>Password</td> <td> <input name="password" type="password" autocomplete="off" - tal:attributes="value cur_fencedev/passwd | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/passwd | nothing" /> </td> </tr> </table> + <div name="instances"> <tal:block tal:condition="exists: cur_fence_instances"> - <tal:block tal:repeat="cur_fence_instance cur_fence_instances"> + <tal:block tal:repeat="cur_instance cur_fence_instances"> <tal:block metal:use-macro="here/form-macros/macros/fence-instance-form-apc" /> </tal:block> </tal:block> </div> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="sharable" value="1" /> <input type="hidden" name="fence_type" value="fence_apc" /> </div>
@@ -1212,44 +1223,55 @@ <td>Name</td> <td> <input name="name" type="text" - tal:attributes="value cur_fencedev/name | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/name | nothing" /> </td> </tr> <tr> <td>IP Address</td> <td> <input name="ip_addr" type="text" - tal:attributes="value cur_fendev/ipaddr | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fendev/ipaddr | nothing" /> </td> </tr> <tr> <td>Login</td> <td> <input name="login" type="text" - tal:attributes="value cur_fencedev/login | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/login | nothing" /> </td> </tr> <tr> <td>Password</td> <td> <input name="password" type="password" autocomplete="off" - tal:attributes="value cur_fencedev/passwd | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/passwd | nothing" /> </td> </tr> </table> + <div name="instances"> <tal:block tal:condition="exists: cur_fence_instances"> - <tal:block tal:repeat="cur_fence_instance cur_fence_instances"> + <tal:block tal:repeat="cur_instance cur_fence_instances"> <tal:block metal:use-macro="here/form-macros/macros/fence-instance-form-mcdata" /> </tal:block> </tal:block> </div> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="sharable" value="1" /> <input type="hidden" name="fence_type" value="fence_mcdata" /> </div>
@@ -1268,37 +1290,46 @@ <td>Name</td> <td> <input name="name" type="text" - tal:attributes="value cur_fencedev/name | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/name | nothing" /> </td> </tr> <tr> <td>IP Address</td> <td> <input name="ip_addr" type="text" - tal:attributes="value cur_fencedev/ipaddr | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/ipaddr | nothing" /> </td> </tr> <tr> <td>Password</td> <td> <input name="password" type="password" autocomplete="off" - tal:attributes="value cur_fencedev/passwd | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/passwd | nothing" /> </td> </tr> </table> + <div name="instances"> <tal:block tal:condition="exists: cur_fence_instances"> - <tal:block tal:repeat="cur_fence_instance cur_fence_instances"> + <tal:block tal:repeat="cur_instance cur_fence_instances"> <tal:block metal:use-macro="here/form-macros/macros/fence-instance-form-wti" /> </tal:block> </tal:block> </div> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="sharable" value="1" /> <input type="hidden" name="fence_type" value="fence_wti" /> </div>
@@ -1342,11 +1373,13 @@ </td> </tr> </table> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="fence_type" value="fence_ilo" /> </div> </div>
@@ -1388,11 +1421,13 @@ tal:attributes="value cur_fencedev/passwd | nothing" /> </td> </table> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="fence_type" value="fence_drac" /> </div> </div>
@@ -1435,11 +1470,13 @@ </td> </tr> </table> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="fence_type" value="fence_rsa" /> </div> </div>
@@ -1457,44 +1494,55 @@ <td>Name</td> <td> <input name="name" type="text" - tal:attributes="value cur_fencedev/name | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/name | nothing" /> </td> </tr> <tr> <td>IP Address</td> <td> <input name="ip_addr" type="text" - tal:attributes="value cur_fencedev/ipaddr | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/ipaddr | nothing" /> </td> </tr> <tr> <td>Login</td> <td> <input name="login" type="text" - tal:attributes="value cur_fencedev/login | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/login | nothing" /> </td> </tr> <tr> <td>Password</td> <td> <input name="password" type="password" autocomplete="off" - tal:attributes="value cur_fencedev/passwd | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/passwd | nothing" /> </td> </tr> </table> + <div name="instances"> <tal:block tal:condition="exists: cur_fence_instances"> - <tal:block tal:repeat="cur_fence_instance cur_fence_instances"> + <tal:block tal:repeat="cur_instance cur_fence_instances"> <tal:block metal:use-macro="here/form-macros/macros/fence-instance-form-brocade" /> </tal:block> </tal:block> </div> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="sharable" value="1" /> <input type="hidden" name="fence_type" value="fence_brocade" /> </div>
@@ -1513,7 +1561,9 @@ <td>Name</td> <td> <input name="name" type="text" - tal:attributes="value cur_fencedev/name | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/name | nothing" /> </td> </tr> <tr>
@@ -1524,30 +1574,37 @@ <td>Login</td> <td> <input name="login" type="text" - tal:attributes="value cur_fencedev/login | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/login | nothing" /> </td> </tr> <tr> <td>Password</td> <td> <input name="password" type="password" autocomplete="off" - tal:attributes="value cur_fencedev/passwd | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/passwd | nothing" /> </td> </tr> </table> + <div name="instances"> <tal:block tal:condition="exists: cur_fence_instances"> - <tal:block tal:repeat="cur_fence_instance cur_fence_instances"> + <tal:block tal:repeat="cur_instance cur_fence_instances"> <tal:block metal:use-macro="here/form-macros/macros/fence-instance-form-sanbox2" /> </tal:block> </tal:block> </div> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="sharable" value="1" /> <input type="hidden" name="fence_type" value="fence_sanbox2" /> </div>
@@ -1566,37 +1623,46 @@ <td>Name</td> <td> <input name="name" type="text" - tal:attributes="value cur_fencedev/name | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/name | nothing" /> </td> </tr> <tr> <td>IP Address</td> <td> <input name="ip_addr" type="text" - tal:attributes="value cur_fencedev/ipaddr | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/ipaddr | nothing" /> </td> </tr> <tr> <td>Password</td> <td> <input name="password" type="password" autocomplete="off" - tal:attributes="value cur_fencedev/passwd | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/passwd | nothing" /> </td> </tr> </table> + <div name="instances"> <tal:block tal:condition="exists: cur_fence_instances"> - <tal:block tal:repeat="cur_fence_instance cur_fence_instances"> + <tal:block tal:repeat="cur_instance cur_fence_instances"> <tal:block metal:use-macro="here/form-macros/macros/fence-instance-form-brocade" /> </tal:block> </tal:block> </div> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="sharable" value="1" /> <input type="hidden" name="fence_type" value="fence_vixel" /> </div>
@@ -1615,30 +1681,37 @@ <td>Name</td> <td> <input name="name" type="text" - tal:attributes="value cur_fencedev/name | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/name | nothing" /> </td> </tr> <tr> <td>Servers (whitespace separated list)</td> <td> <input name="servers" type="text" - tal:attributes="value cur_fencedev/servers | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/servers | nothing" /> </td> </tr> </table> + <div name="instances"> <tal:block tal:condition="exists: cur_fence_instances"> - <tal:block tal:repeat="cur_fence_instance cur_fence_instances"> + <tal:block tal:repeat="cur_instance cur_fence_instances"> <tal:block metal:use-macro="here/form-macros/macros/fence-instance-form-gnbd" /> </tal:block> </tal:block> </div> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="sharable" value="1" /> <input type="hidden" name="fence_type" value="fence_gnbd" /> </div>
@@ -1657,37 +1730,46 @@ <td>Name</td> <td> <input name="name" type="text" - tal:attributes="value cur_fencedev/name | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/name | nothing" /> </td> </tr> <tr> <td>CServer</td> <td> <input name="cserver" type="text" - tal:attributes="value cur_fencedev/cserver | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/cserver | nothing" /> </td> </tr> <tr> <td>ESH Path (Optional)</td> <td> <input name="login" type="text" - tal:attributes="value cur_fencedev/login | string:/opt/pan-mgr/bin/esh" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/login | string:/opt/pan-mgr/bin/esh" /> </td> </tr> </table> + <div name="instances"> <tal:block tal:condition="exists: cur_fence_instances"> - <tal:block tal:repeat="cur_fence_instance cur_fence_instances"> + <tal:block tal:repeat="cur_instance cur_fence_instances"> <tal:block metal:use-macro="here/form-macros/macros/fence-instance-form-egenera" /> </tal:block> </tal:block> </div> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="sharable" value="1" /> <input type="hidden" name="fence_type" value="fence_egenera" /> </div>
@@ -1731,11 +1813,13 @@ </td> </tr> </table> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="fence_type" value="fence_bladecenter" /> </div> </div>
@@ -1753,44 +1837,55 @@ <td>Name</td> <td> <input name="name" type="text" - tal:attributes="value cur_fencedev/name | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/name | nothing" /> </td> </tr> <tr> <td>IP Address</td> <td> <input name="ip_addr" type="text" - tal:attributes="value cur_fencedev/ipaddr | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/ipaddr | nothing" /> </td> </tr> <tr> <td>Login</td> <td> <input name="login" type="text" - tal:attributes="value cur_fencedev/login | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/login | nothing" /> </td> </tr> <tr> <td>Password</td> <td> <input name="password" type="password" autocomplete="off" - tal:attributes="value cur_fencedev/passwd | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/passwd | nothing" /> </td> </tr> </table> + <div name="instances"> <tal:block tal:condition="exists: cur_fence_instances"> - <tal:block tal:repeat="cur_fence_instance cur_fence_instances"> + <tal:block tal:repeat="cur_instance cur_fence_instances"> <tal:block metal:use-macro="here/form-macros/macros/fence-instance-form-bullpap" /> </tal:block> </tal:block> </div> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="sharable" value="1" /> <input type="hidden" name="fence_type" value="fence_bullpap" /> </div>
@@ -1827,11 +1922,13 @@ </td> </tr> </table> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="fence_type" value="fence_rps10" /> </div> </div>
@@ -1849,23 +1946,28 @@ <td>Name</td> <td> <input name="name" type="text" - tal:attributes="value cur_fencedev/name | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/name | nothing" /> </td> </tr> </table> + <div name="instances"> <tal:block tal:condition="exists: cur_fence_instances"> - <tal:block tal:repeat="cur_fence_instance cur_fence_instances"> + <tal:block tal:repeat="cur_instance cur_fence_instances"> <tal:block metal:use-macro="here/form-macros/macros/fence-instance-form-xvm" /> </tal:block> </tal:block> </div> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="sharable" value="1" /> <input type="hidden" name="fence_type" value="xvm" /> </div>
@@ -1884,15 +1986,19 @@ <td>Name</td> <td> <input name="name" type="text" - tal:attributes="value cur_fencedev/name | nothing" /> + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/name | nothing" /> </td> </tr> </table> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="sharable" value="1" /> <input type="hidden" name="fence_type" value="scsi" /> </div>
@@ -1940,11 +2046,13 @@ <td><input name="auth_type" type="text" Title="Options are to leave blank for none, password, md2, or md5"/></td> </tr> </table> + <tal:block tal:condition="exists: cur_fencedev"> <input type="hidden" name="existing_device" value="1" /> <input type="hidden" name="old_name" tal:attributes="value cur_fencedev/name | nothing" /> </tal:block> + <input type="hidden" name="fence_type" value="fence_ipmilan" /> </div> </div>
@@ -2508,6 +2616,7 @@ <tal:block tal:condition="exists: fenceinfo/level1"> <tal:block tal:repeat="cur_fencedev fenceinfo/level1"> <tal:block tal:define=" + cur_fence_instances cur_fencedev/instance_list | nothing; cur_fence_type cur_fencedev/agent | nothing; cur_fence_level python: 1;"> <div tal:attributes="id python: 'fence1_' + str(cur_fence_num)">
luci/site/luci/Extensions/cluster_adapters.py +5 -2
@@ -726,14 +726,16 @@ if mcast_manual == True: try: - addr_str = form['mcast_addr'].strip() + addr_str = form['mcast_address'].strip() socket.inet_pton(socket.AF_INET, addr_str) except KeyError, e: + addr_str = None errors.append('No multicast address was given') except socket.error, e: try: socket.inet_pton(socket.AF_INET6, addr_str) except socket.error, e: + addr_str = None errors.append('An invalid multicast address was given: %s') else: addr_str = None
@@ -745,6 +747,7 @@ try: model.usesMulticast = True model.mcast_address = addr_str + model.isModified = True except Exception, e: luci_log.debug('Error updating mcast properties: %s' % str(e)) errors.append('Unable to update cluster multicast properties')
@@ -3045,7 +3048,7 @@ if delete_cluster: try: - set_node_flag(self, clustername, rc.hostname(), str(batch_number), NODE_DELETE, "Deleting cluster \"%s\": Deleting node \'%s\'" \ + set_node_flag(self, clustername, rc.hostname(), str(batch_number), CLUSTER_DELETE, "Deleting cluster \"%s\": Deleting node \'%s\'" \ % (clustername, nodename_resolved)) except Exception, e: luci_log.debug_verbose('ND5a: failed to set flags: %s' % str(e))