[luci] luci: Cope better with editing services containing VM resources
by Ryan McCabe
commit 37ef94719d30b248228bdf57f3eb5278327c800b
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 28 08:52:48 2014 -0400
luci: Cope better with editing services containing VM resources
Cope better with editing services that contain inline VM definitions
or references to global VM resources.
Resolves: rhbz#1100817
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
luci/lib/ClusterConf/Vm.py | 1 +
luci/templates/resource_list.html | 18 ++++++++------
luci/validation/validate_resource.py | 41 ++++++++++++++++-----------------
3 files changed, 31 insertions(+), 29 deletions(-)
---
diff --git a/luci/lib/ClusterConf/Vm.py b/luci/lib/ClusterConf/Vm.py
index 97a86eb..25c3003 100644
--- a/luci/lib/ClusterConf/Vm.py
+++ b/luci/lib/ClusterConf/Vm.py
@@ -24,6 +24,7 @@ class Vm(Service, BaseResource):
self.refcount = 1
self.reflist = []
self.resource_type = RESOURCE_TYPE
+ self.deny_all_children = False
def getResourceAttributes(self):
attrs = self.getAttributes()
diff --git a/luci/templates/resource_list.html b/luci/templates/resource_list.html
index 8624bac..996afec 100644
--- a/luci/templates/resource_list.html
+++ b/luci/templates/resource_list.html
@@ -1794,9 +1794,10 @@
<input name="oldname" type="hidden"
py:attrs="res and {'value':res.getAttribute('name')} or {}" />
<input name="type" type="hidden" value="vm" />
+ <input py:if="res and parent_id == 'esvc_root'" type="hidden" name="resourcename" value="${res.getAttribute('name')}" />
<table class="formtable">
- <tr py:if="res">
+ <tr py:if="res and parent_id != 'esvc_root'">
<td>Name</td>
<td>
<input type="text" class="text" name="resourcename"
@@ -1807,6 +1808,7 @@
<td>Migration Type</td>
<td>
<select name="migrate"
+ py:attrs="{'disabled':global_resource and 'disabled' or None}"
py:with="cur_migrate = res and res.getAttribute('migrate') or ''">
<option value="live"
py:attrs="cur_migrate == 'live' and {'selected':'selected'} or {}">Live</option>
@@ -1819,49 +1821,49 @@
<td>Migration Mapping</td>
<td>
<input type="text" class="text" name="migration_mapping"
- py:attrs="res and {'value':res.getAttribute('migration_mapping')} or {}" />
+ py:attrs="res and {'value':res.getAttribute('migration_mapping'),'disabled':global_resource and 'disabled' or None} or {}" />
</td>
</tr>
<tr>
<td>Status Program</td>
<td>
<input type="text" class="text" name="status_program"
- py:attrs="res and {'value':res.getAttribute('status_program')} or {}" />
+ py:attrs="res and {'value':res.getAttribute('status_program'),'disabled':global_resource and 'disabled' or None} or {}" />
</td>
</tr>
<tr>
<td>Path to xmlfile Used to Create the VM</td>
<td>
<input type="text" class="text" name="xmlfile"
- py:attrs="res and {'value':res.getAttribute('xmlfile')} or {}" />
+ py:attrs="res and {'value':res.getAttribute('xmlfile'),'disabled':global_resource and 'disabled' or None} or {}" />
</td>
</tr>
<tr>
<td>VM Configuration File Path</td>
<td>
<input type="text" class="text" name="path"
- py:attrs="res and {'value':res.getAttribute('path')} or {}" />
+ py:attrs="res and {'value':res.getAttribute('path'),'disabled':global_resource and 'disabled' or None} or {}" />
</td>
</tr>
<tr>
<td>Path to the VM Snapshot Directory</td>
<td>
<input type="text" class="text" name="snapshot"
- py:attrs="res and {'value':res.getAttribute('snapshot')} or {}" />
+ py:attrs="res and {'value':res.getAttribute('snapshot'),'disabled':global_resource and 'disabled' or None} or {}" />
</td>
</tr>
<tr>
<td>Hypervisor URI</td>
<td>
<input type="text" class="text" name="hypervisor_uri"
- py:attrs="res and {'value':res.getAttribute('hypervisor_uri')} or {}" />
+ py:attrs="res and {'value':res.getAttribute('hypervisor_uri'),'disabled':global_resource and 'disabled' or None} or {}" />
</td>
</tr>
<tr>
<td>Migration URI</td>
<td>
<input type="text" class="text" name="migration_uri"
- py:attrs="res and {'value':res.getAttribute('migration_uri')} or {}" />
+ py:attrs="res and {'value':res.getAttribute('migration_uri'),'disabled':global_resource and 'disabled' or None} or {}" />
</td>
</tr>
<tr py:if="cluster_os != 'RHEL' or os_version > 6.2">
diff --git a/luci/validation/validate_resource.py b/luci/validation/validate_resource.py
index 317fe9a..6058c76 100644
--- a/luci/validation/validate_resource.py
+++ b/luci/validation/validate_resource.py
@@ -631,9 +631,9 @@ def create_resource(res_type, model, **kw):
if res_type == 'ip':
rname = kw.get('address')
- elif res_type == 'vm' and not resource_edit:
- rname = ''
- res = BaseResource()
+ elif res_type == 'vm' and not resource_edit and not kw.get('svc_create'):
+ rname = ''
+ res = BaseResource()
else:
if not kw.has_key('resourcename') or not kw['resourcename'].strip():
raise Exception, _('All resources must have a unique name.')
@@ -851,6 +851,8 @@ def validate_clusvc_form(model, **kw):
raise Exception, 'no resource type'
if res_type == 'vm':
is_vm = True
+ if action == 'edit':
+ dummy_form['svc_create'] = 1
except Exception, e:
log.exception('no resource type')
return (False, { 'errors': [ _('No resource type was specified') ]})
@@ -979,24 +981,21 @@ def validate_clusvc_form(model, **kw):
buildSvcTree(new_service, form_hash[root_elem]['kids'])
- if is_vm is True:
- svc_children = new_service.getChildren()
- if len(svc_children) != 1:
- errors.append(_('VMs can have no children and cannot be children of resources'))
- else:
- # Because we're treating vm like a resource from the point of
- # view of the user, we need to use the service level attributes
- # from "new_service" and the resource level attributes from its
- # first child
- new_vm = Vm()
- new_vm.getAttributes().update(new_service.getAttributes())
- new_vm.delResourceAttributes()
-
- form_vm = Vm()
- form_vm.getAttributes().update(svc_children[0].getAttributes())
-
- new_vm.getAttributes().update(form_vm.getResourceAttributes())
- model.resourcemanager_ptr.addChild(new_vm)
+ svc_children = new_service.getChildren()
+ if is_vm is True and len(svc_children) == 1:
+ # Because we're treating vm like a resource from the point of
+ # view of the user, we need to use the service level attributes
+ # from "new_service" and the resource level attributes from its
+ # first child
+ new_vm = Vm()
+ new_vm.getAttributes().update(new_service.getAttributes())
+ new_vm.delResourceAttributes()
+
+ form_vm = Vm()
+ form_vm.getAttributes().update(svc_children[0].getAttributes())
+
+ new_vm.getAttributes().update(form_vm.getResourceAttributes())
+ model.resourcemanager_ptr.addChild(new_vm)
else:
model.resourcemanager_ptr.addChild(new_service)
try:
9 years, 9 months
[luci] luci: Move sort arrows for resources
by Ryan McCabe
commit 2660e594f63e6077523dd2a5438fd20aaf07f779
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 28 08:51:23 2014 -0400
luci: Move sort arrows for resources
Move the sort arrows for the resource list form to the left.
Resolves: rhbz#919225
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
luci/public/css/style.css | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/luci/public/css/style.css b/luci/public/css/style.css
index 0425734..9bcbaea 100644
--- a/luci/public/css/style.css
+++ b/luci/public/css/style.css
@@ -656,9 +656,9 @@ table.tablesorter thead tr .header {
}
table.tablesorter thead tr .headerSortUp {
- background-image: url(../images/asc.gif);
+ background: transparent url(../images/asc.gif) no-repeat +6em;
}
table.tablesorter thead tr .headerSortDown {
- background-image: url(../images/desc.gif);
+ background: transparent url(../images/desc.gif) no-repeat +6em;
}
9 years, 9 months
[luci] luci: Update the fence_kdump config forms
by Ryan McCabe
commit 1aa237eafc7b282c671e0f1037e45695a0d4a7e3
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 28 08:47:46 2014 -0400
luci: Update the fence_kdump config forms
Move the "nodename" attribute to the instance form and make it optional
to facilitate sharing fence_kdump devices among multiple cluster nodes.
Resolves: rhbz#918795
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
luci/templates/fence_devices.html | 7 -------
luci/templates/fence_instances.html | 14 ++++++++++++--
luci/validation/validate_fence.py | 10 ++++++++--
3 files changed, 20 insertions(+), 11 deletions(-)
---
diff --git a/luci/templates/fence_devices.html b/luci/templates/fence_devices.html
index 38a82d2..0d34910 100644
--- a/luci/templates/fence_devices.html
+++ b/luci/templates/fence_devices.html
@@ -1347,13 +1347,6 @@
</td>
</tr>
<tr>
- <td>Node Name</td>
- <td>
- <input name="nodename" type="text" class="text"
- py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('nodename')} or {}"/>
- </td>
- </tr>
- <tr>
<td>IP Family</td>
<td>
<select name="family" class="fencedevformselect">
diff --git a/luci/templates/fence_instances.html b/luci/templates/fence_instances.html
index 5ef4602..fca35cc 100644
--- a/luci/templates/fence_instances.html
+++ b/luci/templates/fence_instances.html
@@ -1044,7 +1044,17 @@
<div py:def="fence_kdump_instance(cur_fence_inst, cur_fence_dev_id, fi_id, **kw)" id="fence_kdump_instance"
py:attrs="fi_id is not None and {'id': fi_id, 'class':'fenceinst'}">
- <div class="emptyfenceinst">No additional parameters</div>
+ <table class="detailstable">
+ <tr>
+ <td>Node name</td>
+ <td>
+ <input py:if="cur_fence_inst" type="text" class="text" name="nodename"
+ value="${cur_fence_inst.getAttribute('nodename')}"/>
+ <input py:if="not cur_fence_inst and kw.get('nodename')" type="text" class="text" name="nodename" value="${kw.get('nodename')}"/>
+ </td>
+ </tr>
+ </table>
+
<input type="hidden" name="fence_type" value="fence_kdump" />
<input type="hidden" name="fence_instance" value="1" />
<input type="hidden" name="parent_fencedev"
@@ -1328,7 +1338,7 @@ ${fence_ilo4_instance(None, None, None)}
${fence_ilo_mp_instance(None, None, None)}
${fence_rsa_instance(None, None, None)}
${fence_ipmilan_instance(None, None, None)}
-${fence_kdump_instance(None, None, None)}
+${fence_kdump_instance(None, None, None, nodename=nodename)}
${fence_imm_instance(None, None, None)}
${fence_idrac_instance(None, None, None)}
${fence_alom_instance(None, None, None)}
diff --git a/luci/validation/validate_fence.py b/luci/validation/validate_fence.py
index 6e16ea7..91095a1 100644
--- a/luci/validation/validate_fence.py
+++ b/luci/validation/validate_fence.py
@@ -516,7 +516,6 @@ def val_ipmilan_fd(fencedev, fence_name, **kw):
def val_kdump_fd(fencedev, fence_name, **kw):
params = (
- ('nodename', True),
('family', False),
('ipport', False),
('timeout', False),
@@ -1272,6 +1271,13 @@ def val_intelmodular_fi(fenceinst, parent_name, **kw):
errors = config_fence_attr(params, fenceinst, parent_name, **kw)
return errors
+def val_kdump_fi(fenceinst, parent_name, **kw):
+ params = (
+ ('nodename', False),
+ )
+ errors = config_fence_attr(params, fenceinst, parent_name, **kw)
+ return errors
+
def val_scsi_fi(fenceinst, parent_name, **kw):
params = (
('nodename', False),
@@ -1339,7 +1345,7 @@ FI_VALIDATE = {
'fence_ilo4': val_noop_fi,
'fence_intelmodular': val_intelmodular_fi,
'fence_ipmilan': val_noop_fi,
- 'fence_kdump': val_noop_fi,
+ 'fence_kdump': val_kdump_fi,
'fence_idrac': val_noop_fi,
'fence_imm': val_noop_fi,
'fence_ldom': val_ldom_fi,
9 years, 9 months
[luci] luci: Add support for the use_findmnt attribute
by Ryan McCabe
commit 73298497a24212ec7a651143ddb62ef006297aaa
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 28 08:46:52 2014 -0400
luci: Add support for the use_findmnt attribute
Add support for the use_findmnt attribute for fs, clusterfs, and
netfs resources.
Resolves: rhbz#1117398
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
luci/templates/resource_list.html | 21 +++++++++++++++++++
luci/validation/validate_resource.py | 37 +++++++++++++++++++++++++++------
2 files changed, 51 insertions(+), 7 deletions(-)
---
diff --git a/luci/templates/resource_list.html b/luci/templates/resource_list.html
index 9fbaaca..8624bac 100644
--- a/luci/templates/resource_list.html
+++ b/luci/templates/resource_list.html
@@ -240,6 +240,13 @@
py:attrs="{'checked':(res and res.getBinaryAttribute('self_fence')) and 'checked' or None, 'disabled':global_resource and 'disabled' or None}" />
</td>
</tr>
+ <tr py:if="expertMode">
+ <td>Use the findmnt Utility When Available</td>
+ <td>
+ <input type="checkbox" class="checkbox" name="use_findmnt"
+ py:attrs="res and {'checked': res.getBinaryAttribute('use_findmnt') in (None, True) and 'checked' or None, 'disabled':global_resource and 'disabled' or None} or {'checked':'checked'}" />
+ </td>
+ </tr>
${res_footer(res)}
</table>
</div>
@@ -342,6 +349,13 @@
py:attrs="{'checked':(res and res.getBinaryAttribute('self_fence')) and 'checked' or None, 'disabled':global_resource and 'disabled' or None}" />
</td>
</tr>
+ <tr py:if="expertMode">
+ <td>Use the findmnt Utility When Available</td>
+ <td>
+ <input type="checkbox" class="checkbox" name="use_findmnt"
+ py:attrs="res and {'checked': res.getBinaryAttribute('use_findmnt') in (None, True) and 'checked' or None, 'disabled':global_resource and 'disabled' or None} or {'checked':'checked'}" />
+ </td>
+ </tr>
${res_footer(res)}
</table>
</div>
@@ -422,6 +436,13 @@
py:attrs="{'checked':(res and res.getBinaryAttribute('self_fence')) and 'checked' or None, 'disabled':global_resource and 'disabled' or None}" />
</td>
</tr>
+ <tr py:if="expertMode">
+ <td>Use the findmnt Utility When Available</td>
+ <td>
+ <input type="checkbox" class="checkbox" name="use_findmnt"
+ py:attrs="res and {'checked': res.getBinaryAttribute('use_findmnt') in (None, True) and 'checked' or None, 'disabled':global_resource and 'disabled' or None} or {'checked':'checked'}" />
+ </td>
+ </tr>
<tr>
<td>Options</td>
<td>
diff --git a/luci/validation/validate_resource.py b/luci/validation/validate_resource.py
index e95356e..317fe9a 100644
--- a/luci/validation/validate_resource.py
+++ b/luci/validation/validate_resource.py
@@ -139,7 +139,7 @@ def addIp(res, rname, model, **kw):
return errors
def addFs(res, rname, model, **kw):
- params = (
+ params = [
('mountpoint', _('Mountpoint'), True, None),
('device', _('Device, label, or UUID'), True, None),
('fstype', '', False, None),
@@ -150,7 +150,15 @@ def addFs(res, rname, model, **kw):
('force_fsck', '', False, None),
('nfsrestart', '', False, None),
('options', '', False, None)
- )
+ ]
+
+ if kw.get('expert_mode'):
+ params.append(('use_findmnt', '', False, None))
+ if not kw.get('use_findmnt'):
+ kw['use_findmnt'] = '0'
+ else:
+ del kw['use_findmnt']
+
errors = config_resource(params, res, rname, **kw)
fsid = res.getAttribute('fsid')
if not fsid:
@@ -169,7 +177,7 @@ def addFs(res, rname, model, **kw):
return errors
def addClusterfs(res, rname, model, **kw):
- params = (
+ params = [
('mountpoint', '', True, None),
('device', '', True, None),
('fstype', '', False, None),
@@ -178,7 +186,15 @@ def addClusterfs(res, rname, model, **kw):
('self_fence', '', False, None),
('fsid', '', False, None),
('options', '', False, None)
- )
+ ]
+
+ if kw.get('expert_mode'):
+ params.append(('use_findmnt', '', False, None))
+ if not kw.get('use_findmnt'):
+ kw['use_findmnt'] = '0'
+ else:
+ del kw['use_findmnt']
+
errors = config_resource(params, res, rname, **kw)
fsid = res.getAttribute('fsid')
if not fsid:
@@ -196,7 +212,7 @@ def addClusterfs(res, rname, model, **kw):
return errors
def addNetfs(res, rname, model, **kw):
- params = (
+ params = [
('mountpoint', _('Mountpoint'), True, None),
('host', _('NFS/CIFS server host'), True, None),
('export', _('Export name'), True, None),
@@ -205,7 +221,14 @@ def addNetfs(res, rname, model, **kw):
('no_unmount', '', False, None),
('force_unmount', '', False, None),
('fstype', '', False, None)
- )
+ ]
+
+ if kw.get('expert_mode'):
+ params.append(('use_findmnt', '', False, None))
+ if not kw.get('use_findmnt'):
+ kw['use_findmnt'] = '0'
+ else:
+ del kw['use_findmnt']
errors = config_resource(params, res, rname, **kw)
for a in ('force_unmount', 'no_unmount', 'self_fence'):
@@ -748,7 +771,7 @@ def validate_clusvc_form(model, **kw):
test_name = test_name[3:]
else:
svc_depend = 'service:%s' % svc_depend
-
+
try:
test_svc = model.retrieveServiceByName(test_name)
if not test_svc:
9 years, 9 months
[luci] luci: Add support for the no_kill attribute of the VM resource
by Ryan McCabe
commit 927d6869cfb2a29267bfec913960a74777ceddb3
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 28 08:46:00 2014 -0400
luci: Add support for the no_kill attribute of the VM resource
Add support for the no_kill attribute of the VM resource.
Resolves: rhbz#1117398
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
luci/lib/ClusterConf/Vm.py | 2 +-
luci/templates/resource_list.html | 7 +++++++
luci/validation/validate_resource.py | 13 ++++---------
3 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/luci/lib/ClusterConf/Vm.py b/luci/lib/ClusterConf/Vm.py
index 05e6897..97a86eb 100644
--- a/luci/lib/ClusterConf/Vm.py
+++ b/luci/lib/ClusterConf/Vm.py
@@ -15,7 +15,7 @@ RESOURCE_TYPE = _('Virtual Machine')
vm_attributes = ('migration_mapping', 'xmlfile', 'migrate',
'path', 'snapshot', 'hypervisor_uri',
- 'migration_uri', 'status_program', 'tunnelled')
+ 'migration_uri', 'status_program', 'tunnelled', 'no_kill')
class Vm(Service, BaseResource):
def __init__(self):
diff --git a/luci/templates/resource_list.html b/luci/templates/resource_list.html
index 52d85ac..9fbaaca 100644
--- a/luci/templates/resource_list.html
+++ b/luci/templates/resource_list.html
@@ -1850,6 +1850,13 @@
py:attrs="{'checked':(res and res.getBinaryAttribute('tunnelled')) and 'checked' or None, 'disabled':global_resource and 'disabled' or None}"/>
</td>
</tr>
+ <tr py:if="cluster_os != 'RHEL' or os_version > 6.5">
+ <td>Do Not Force Kill VM During Stop</td>
+ <td>
+ <input type="checkbox" class="checkbox" name="no_kill"
+ py:attrs="{'checked':(res and res.getBinaryAttribute('no_kill')) and 'checked' or None, 'disabled':global_resource and 'disabled' or None}"/>
+ </td>
+ </tr>
${res_footer(res)}
</table>
</div>
diff --git a/luci/validation/validate_resource.py b/luci/validation/validate_resource.py
index 4693076..e95356e 100644
--- a/luci/validation/validate_resource.py
+++ b/luci/validation/validate_resource.py
@@ -241,18 +241,13 @@ def addVM(res, rname, model, **kw):
('migration_uri', '', False, None),
('status_program', '', False, None),
('tunnelled', '', False, None),
+ ('no_kill', '', False, None),
)
- if not kw.has_key('tunnelled'):
- kw['tunnelled'] = '0'
- else:
- kw['tunnelled'] = '1'
-
errors = config_resource(params, res, rname, **kw)
- if res.getBinaryAttribute('tunnelled') is True:
- res.addAttribute('tunnelled', 'on')
- else:
- res.removeAttribute('tunnelled')
+ for a in ('tunnelled', 'no_kill',):
+ if res.getAttribute(a) == 'on':
+ res.addAttribute(a, '1')
return errors
def addNFSClient(res, rname, model, **kw):
9 years, 9 months
[luci] luci: Add the ssh_options attribute to applicable fence agents
by Ryan McCabe
commit 8a9b4e1a3304374260a37a92e903be277e65c324
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 28 08:44:57 2014 -0400
luci: Add the ssh_options attribute to applicable fence agents
Support the newly added ssh_options attributes for the fence agents
that will accept it.
Resolves: rhbz#1117398
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
luci/templates/fence_devices.html | 72 +++++++++++++++++++++---------
luci/templates/fence_instances.html | 84 +++++++++++++++++++++++++++++++++++
luci/validation/validate_fence.py | 21 +++++++-
3 files changed, 152 insertions(+), 25 deletions(-)
---
diff --git a/luci/templates/fence_devices.html b/luci/templates/fence_devices.html
index 20dc555..38a82d2 100644
--- a/luci/templates/fence_devices.html
+++ b/luci/templates/fence_devices.html
@@ -504,28 +504,6 @@
</td>
</tr>
<tr>
- <td>SSH</td>
- <td>
- <input type="checkbox" class="checkbox" name="secure"
- py:attrs="cur_fencedev and cur_fencedev.getAttribute('secure') and {'checked': 'checked'}"/>
- <label class="choice">Use SSH</label>
- </td>
- </tr>
- <tr>
- <td>Path to SSH Identity File</td>
- <td>
- <input type="text" class="text" name="identity_file"
- py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('identity_file')} or {}"/>
- </td>
- </tr>
- <tr>
- <td>SSH Options</td>
- <td>
- <input type="text" class="text" name="ssh_options"
- py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('ssh_options')} or {}"/>
- </td>
- </tr>
- <tr>
<td>Force Command Prompt</td>
<td>
<input type="text" class="text" name="cmd_prompt"
@@ -2606,6 +2584,13 @@
</td>
</tr>
<tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('ssh_options')} or {}"/>
+ </td>
+ </tr>
+ <tr>
<td>Path to SSH Identity File</td>
<td>
<input type="text" class="text" name="identity_file"
@@ -2718,6 +2703,28 @@
</td>
</tr>
<tr>
+ <td>SSH</td>
+ <td>
+ <input type="checkbox" class="checkbox" name="secure"
+ py:attrs="cur_fencedev and cur_fencedev.getAttribute('secure') and {'checked': 'checked'}"/>
+ <label class="choice">Use SSH</label>
+ </td>
+ </tr>
+ <tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('ssh_options')} or {}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Path to SSH Identity File</td>
+ <td>
+ <input type="text" class="text" name="identity_file"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('identity_file')} or {}"/>
+ </td>
+ </tr>
+ <tr>
<td>TCP Port</td>
<td>
<input type="text" class="text" name="telnet_port"
@@ -3239,6 +3246,13 @@
</td>
</tr>
<tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('ssh_options')} or {}"/>
+ </td>
+ </tr>
+ <tr>
<td>Path to SSH Identity File</td>
<td>
<input type="text" class="text" name="identity_file"
@@ -3683,6 +3697,13 @@
</td>
</tr>
<tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('ssh_options')} or {}"/>
+ </td>
+ </tr>
+ <tr>
<td>Path to SSH Identity File</td>
<td>
<input type="text" class="text" name="identity_file"
@@ -4068,6 +4089,13 @@
</td>
</tr>
<tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('ssh_options')} or {}"/>
+ </td>
+ </tr>
+ <tr>
<td>Path to SSH Identity File</td>
<td>
<input type="text" class="text" name="identity_file"
diff --git a/luci/templates/fence_instances.html b/luci/templates/fence_instances.html
index a82e830..5ef4602 100644
--- a/luci/templates/fence_instances.html
+++ b/luci/templates/fence_instances.html
@@ -48,6 +48,13 @@
py:attrs="cur_fence_inst and cur_fence_inst.getAttribute('secure') and {'checked': 'checked'}"/>
</td>
</tr>
+ <tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fence_inst and {'value': cur_fence_inst.getAttribute('ssh_options')}"/>
+ </td>
+ </tr>
<tr>
<td>Path to SSH Identity File</td>
<td>
@@ -132,6 +139,20 @@
</td>
</tr>
<tr>
+ <td><span title="Enable SSH operation">Use SSH</span></td>
+ <td>
+ <input type="checkbox" class="checkbox" name="secure"
+ py:attrs="cur_fence_inst and cur_fence_inst.getAttribute('secure') and {'checked': 'checked'}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fence_inst and {'value': cur_fence_inst.getAttribute('ssh_options')}"/>
+ </td>
+ </tr>
+ <tr>
<td>Path to SSH Identity File</td>
<td>
<input type="text" class="text" name="identity_file"
@@ -177,6 +198,13 @@
py:attrs="cur_fence_inst and cur_fence_inst.getAttribute('secure') and {'checked': 'checked'}"/>
</td>
</tr>
+ <tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fence_inst and {'value': cur_fence_inst.getAttribute('ssh_options')}"/>
+ </td>
+ </tr>
<tr>
<td>Path to SSH Identity File</td>
<td>
@@ -266,6 +294,13 @@
py:attrs="cur_fence_inst and cur_fence_inst.getAttribute('secure') and {'checked': 'checked'}"/>
</td>
</tr>
+ <tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fence_inst and {'value': cur_fence_inst.getAttribute('ssh_options')}"/>
+ </td>
+ </tr>
<tr>
<td>Path to SSH Identity File</td>
<td>
@@ -314,6 +349,13 @@
py:attrs="cur_fence_inst and cur_fence_inst.getAttribute('secure') and {'checked': 'checked'}"/>
</td>
</tr>
+ <tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fence_inst and {'value': cur_fence_inst.getAttribute('ssh_options')}"/>
+ </td>
+ </tr>
<tr>
<td>Path to SSH Identity File</td>
<td>
@@ -375,6 +417,27 @@
</td>
</tr>
<tr>
+ <td><span title="Enable SSH operation">Use SSH</span></td>
+ <td>
+ <input type="checkbox" class="checkbox" name="secure"
+ py:attrs="cur_fence_inst and cur_fence_inst.getAttribute('secure') and {'checked': 'checked'}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fence_inst and {'value': cur_fence_inst.getAttribute('ssh_options')}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Path to SSH Identity File</td>
+ <td>
+ <input type="text" class="text" name="identity_file"
+ py:attrs="cur_fence_inst and {'value': cur_fence_inst.getAttribute('identity_file')}"/>
+ </td>
+ </tr>
+ <tr>
<td>Unfencing</td>
<td>
<input type="checkbox" class="checkbox" name="unfencing"
@@ -615,6 +678,13 @@
py:attrs="cur_fence_inst and cur_fence_inst.getAttribute('secure') and {'checked': 'checked'}"/>
</td>
</tr>
+ <tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fence_inst and {'value': cur_fence_inst.getAttribute('ssh_options')}"/>
+ </td>
+ </tr>
<tr>
<td>Path to SSH Identity File</td>
<td>
@@ -681,6 +751,13 @@
py:attrs="cur_fence_inst and cur_fence_inst.getAttribute('secure') and {'checked': 'checked'}"/>
</td>
</tr>
+ <tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fence_inst and {'value': cur_fence_inst.getAttribute('ssh_options')}"/>
+ </td>
+ </tr>
<tr>
<td>Path to SSH Identity File</td>
<td>
@@ -1177,6 +1254,13 @@
py:attrs="cur_fence_inst and cur_fence_inst.getAttribute('secure') and {'checked': 'checked'}"/>
</td>
</tr>
+ <tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fence_inst and {'value': cur_fence_inst.getAttribute('ssh_options')}"/>
+ </td>
+ </tr>
<tr>
<td>Path to SSH Identity File</td>
<td>
diff --git a/luci/validation/validate_fence.py b/luci/validation/validate_fence.py
index 0b0fbd0..6e16ea7 100644
--- a/luci/validation/validate_fence.py
+++ b/luci/validation/validate_fence.py
@@ -198,9 +198,6 @@ def val_brocade_fd(fencedev, fence_name, **kw):
('login', True),
('passwd', False),
('passwd_script', False),
- ('secure', False),
- ('identity_file', False),
- ('ssh_options', False),
('force_ip_family', False),
('cmd_prompt', False),
('power_wait', False),
@@ -401,6 +398,7 @@ def val_rsa_fd(fencedev, fence_name, **kw):
('ipport', False),
('login', True),
('secure', False),
+ ('ssh_options', False),
('identity_file', False),
('passwd', False),
('passwd_script', False),
@@ -430,6 +428,9 @@ def val_rsb_fd(fencedev, fence_name, **kw):
('shell_timeout', False),
('login_timeout', False),
('retry_on', False),
+ ('secure', False),
+ ('ssh_options', False),
+ ('identity_file', False),
)
errors = config_fence_attr(params, fencedev, fence_name, **kw)
@@ -456,6 +457,7 @@ def val_drac5_fd(fencedev, fence_name, **kw):
('module_name', False),
('cmd_prompt', False),
('secure', False),
+ ('ssh_options', False),
('identity_file', False),
('passwd', False),
('passwd_script', False),
@@ -787,6 +789,7 @@ def val_ilo_mp_fd(fencedev, fence_name, **kw):
('passwd', False),
('passwd_script', False),
('secure', False),
+ ('ssh_options', False),
('identity_file', False),
('cmd_prompt', False),
('power_wait', False),
@@ -997,6 +1000,7 @@ def val_apc_fi(fenceinst, parent_name, **kw):
('port', True),
('switch', False),
('secure', False),
+ ('ssh_options', False),
('identity_file', False),
('delay', False),
)
@@ -1008,6 +1012,7 @@ def val_wti_fi(fenceinst, parent_name, **kw):
params = (
('port', True),
('secure', False),
+ ('ssh_options', False),
('identity_file', False),
('delay', False),
)
@@ -1019,6 +1024,7 @@ def val_virsh_fi(fenceinst, parent_name, **kw):
params = (
('port', True),
('secure', False),
+ ('ssh_options', False),
('identity_file', False),
('delay', False),
)
@@ -1030,6 +1036,9 @@ def val_brocade_fi(fenceinst, parent_name, **kw):
params = (
('port', True),
('delay', False),
+ ('secure', False),
+ ('identity_file', False),
+ ('ssh_options', False),
)
errors = config_fence_attr(params, fenceinst, parent_name, **kw)
@@ -1065,6 +1074,7 @@ def val_bladecenter_fi(fenceinst, parent_name, **kw):
('port', True),
('switch', False),
('secure', False),
+ ('ssh_options', False),
('identity_file', False),
('delay', False),
)
@@ -1077,6 +1087,7 @@ def val_ipdu_fi(fenceinst, parent_name, **kw):
('port', True),
('switch', False),
('secure', False),
+ ('ssh_options', False),
('identity_file', False),
('delay', False),
)
@@ -1107,6 +1118,7 @@ def val_lpar_fi(fenceinst, parent_name, **kw):
('partition', True),
('managed', True),
('secure', True),
+ ('ssh_options', False),
('identity_file', False),
('delay', False),
)
@@ -1157,6 +1169,7 @@ def val_vmware_fi(fenceinst, parent_name, **kw):
params = (
('port', True),
('secure', False),
+ ('ssh_options', False),
('identity_file', False),
('delay', False),
)
@@ -1176,6 +1189,7 @@ def val_ldom_fi(fenceinst, parent_name, **kw):
params = (
('port', True),
('secure', False),
+ ('ssh_options', False),
('identity_file', False),
('delay', False),
)
@@ -1223,6 +1237,7 @@ def val_hpblade_fi(fenceinst, parent_name, **kw):
params = (
('port', True),
('secure', False),
+ ('ssh_options', False),
('identity_file', False),
('delay', False),
)
9 years, 9 months
[luci] luci: Add support for the postgres-8 startup_wait attr
by Ryan McCabe
commit f2618fc83cdf2bff2056e9df8a4bbad44231cc08
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 28 08:44:16 2014 -0400
luci: Add support for the postgres-8 startup_wait attr
Add support for the newly added startup_wait attribute for the
postgres-8 resource.
Resolves: rhbz#1117398
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
luci/templates/resource_list.html | 11 ++++++++++-
luci/validation/validate_resource.py | 3 ++-
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/luci/templates/resource_list.html b/luci/templates/resource_list.html
index 579d4d5..52d85ac 100644
--- a/luci/templates/resource_list.html
+++ b/luci/templates/resource_list.html
@@ -931,7 +931,9 @@
</div>
<div py:def="postgres8_resource(res, form_id, parent_id, isref)" name="POSTGRES-8" id="postgres8_resource" class="row rescfg"
- py:with="global_resource = res and isref != 0"
+ py:with="global_resource = res and isref != 0;
+ cluster_os = tmpl_context.cluster.get_OS();
+ os_version = tmpl_context.cluster.get_OSVersion()"
py:attrs="res and {'id': 'global_res_%s' % res.getName(), 'name': res.getName()}">
<input name="global" type="hidden" value="1" py:if="global_resource"/>
<input name="parent_id" type="hidden" value="${parent_id}"/>
@@ -979,6 +981,13 @@
py:attrs="res and {'value':res.getAttribute('shutdown_wait'), 'disabled':global_resource and 'disabled' or None} or {}" />
</td>
</tr>
+ <tr py:if="cluster_os != 'RHEL' or os_version > 6.5">
+ <td>Startup Wait (seconds)</td>
+ <td>
+ <input type="text" class="text" name="startup_wait" value="0"
+ py:attrs="res and {'value':res.getAttribute('startup_wait'), 'disabled':global_resource and 'disabled' or None} or {}" />
+ </td>
+ </tr>
${res_footer(res)}
</table>
</div>
diff --git a/luci/validation/validate_resource.py b/luci/validation/validate_resource.py
index 394b1e5..4693076 100644
--- a/luci/validation/validate_resource.py
+++ b/luci/validation/validate_resource.py
@@ -365,7 +365,8 @@ def addPostgres8(res, rname, model, **kw):
('config_file', _('Path to configuration file'), False, None),
('postmaster_user', '', False, None),
('postmaster_options', '', False, None),
- ('shutdown_wait', '', False, None)
+ ('shutdown_wait', '', False, None),
+ ('startup_wait', '', False, None)
)
errors = config_resource(params, res, rname, **kw)
return errors
9 years, 9 months
[luci] luci: Remove mention of fenced skip_undefined
by Ryan McCabe
commit b76d5db10ffda25cffd7a5d0a49b9048e17cdaa9
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 28 08:43:10 2014 -0400
luci: Remove mention of fenced skip_undefined
Remove any mention of the skip_undefined attribute. This feature
is not implemented.
Resolves: rhbz#1117398
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
luci/templates/configure.html | 2 +-
luci/validation/validate_cluster_prop.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/luci/templates/configure.html b/luci/templates/configure.html
index f06a6ef..086b73d 100644
--- a/luci/templates/configure.html
+++ b/luci/templates/configure.html
@@ -107,7 +107,7 @@
<input type="checkbox" class="text" name="clean_start"
py:attrs="fenced_ptr and fenced_ptr.getCleanStart() and {'checked':'checked'} or {}"/>
</div>
- <div class="row" py:if="expertMode">
+ <div class="row" py:if="0 and expertMode">
<label class="wide">Skip Startup Fencing for Nodes With No Fencing Configured (dangerous)</label>
<input type="checkbox" class="text" name="skip_undefined"
py:attrs="fenced_ptr and fenced_ptr.getSkipUndefined() and {'checked':'checked'} or {}"/>
diff --git a/luci/validation/validate_cluster_prop.py b/luci/validation/validate_cluster_prop.py
index be5fcdd..dda8045 100644
--- a/luci/validation/validate_cluster_prop.py
+++ b/luci/validation/validate_cluster_prop.py
@@ -510,7 +510,7 @@ def validate_fenced_config(model, **kw):
if kw.get('expert_mode'):
# Fields only exposed when in "expert mode"
fd.setCleanStart(kw.get('clean_start') is not None)
- fd.setSkipUndefined(kw.get('skip_undefined') is not None)
+ #fd.setSkipUndefined(kw.get('skip_undefined') is not None)
override_path = kw.get('override_path')
if not override_path or override_path.isspace():
9 years, 9 months
[luci] luci: Add support for the reboot_on_pid_exhaustion attribute
by Ryan McCabe
commit 13980927a411fa9ee3715420c8d38b794d05543e
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 28 08:42:09 2014 -0400
luci: Add support for the reboot_on_pid_exhaustion attribute
Add support for the reboot_on_pid_exhaustion attribute of
the <rm> tag. This is shown/editable only while in expert mode.
Resolves: rhbz#1117398
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
luci/lib/ClusterConf/Rm.py | 9 +++++++++
luci/templates/configure.html | 5 +++++
luci/validation/validate_cluster_prop.py | 1 +
3 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/luci/lib/ClusterConf/Rm.py b/luci/lib/ClusterConf/Rm.py
index 38cdd3a..a335aab 100644
--- a/luci/lib/ClusterConf/Rm.py
+++ b/luci/lib/ClusterConf/Rm.py
@@ -66,6 +66,15 @@ class Rm(TagObject):
def delDisabled(self):
return self.removeAttribute('disabled')
+ def getRebootOnPIDExhaustion(self):
+ return self.getBinaryAttribute('reboot_on_pid_exhaustion')
+
+ def setRebootOnPIDExhaustion(self, val):
+ return self.addBinaryAttribute('reboot_on_pid_exhaustion', val, (None, '1'))
+
+ def delRebootOnPIDExhaustion(self):
+ return self.removeAttribute('reboot_on_pid_exhaustion')
+
def removeDefaults(self):
if self.getCentralProcessing() == int(self.DEFAULTS.get('central_processing')):
self.delCentralProcessing()
diff --git a/luci/templates/configure.html b/luci/templates/configure.html
index 168af2c..f06a6ef 100644
--- a/luci/templates/configure.html
+++ b/luci/templates/configure.html
@@ -1018,6 +1018,11 @@
py:attrs="rm_ptr and rm_ptr.getDisabled() and {'checked':'checked'} or {}"/>
</div>
<div class="row">
+ <label class="wide">Reboot Node on PID Exhaustion</label>
+ <input name="reboot_on_pid_exhaustion" type="checkbox" class="checkbox"
+ py:attrs="rm_ptr and rm_ptr.getRebootOnPIDExhaustion() and {'checked':'checked'} or {}"/>
+ </div>
+ <div class="row">
<label class="wide">Maximum Number of Status Check Threads</label>
<input name="status_child_max" type="text" class="text"
py:attrs="rm_ptr and {'value':rm_ptr.getStatusChildMax()} or {}"/>
diff --git a/luci/validation/validate_cluster_prop.py b/luci/validation/validate_cluster_prop.py
index aaff1c4..be5fcdd 100644
--- a/luci/validation/validate_cluster_prop.py
+++ b/luci/validation/validate_cluster_prop.py
@@ -921,6 +921,7 @@ def validate_rm_config(model, **kw):
else:
rm.delTransitionThrottling()
+ rm.setRebootOnPIDExhaustion(kw.get('reboot_on_pid_exhaustion') is not None)
rm.setCentralProcessing(kw.get('central_processing') is not None)
if kw.get('rgmanager_disabled') is not None:
9 years, 9 months
[luci] luci: Update fence_brocade
by Ryan McCabe
commit 29d21611f213043032d7374ff903c7969cd64226
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 28 08:41:19 2014 -0400
luci: Update fence_brocade
Bring the fence_brocade forms up-to-date with the current
fence agent.
Resolves: rhbz#1117398
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
luci/templates/fence_devices.html | 77 +++++++++++++++++++++++++++++++++++
luci/templates/fence_instances.html | 7 +++
luci/validation/validate_fence.py | 20 +++++++++
3 files changed, 104 insertions(+), 0 deletions(-)
---
diff --git a/luci/templates/fence_devices.html b/luci/templates/fence_devices.html
index dcf15c3..20dc555 100644
--- a/luci/templates/fence_devices.html
+++ b/luci/templates/fence_devices.html
@@ -490,6 +490,83 @@
py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('passwd_script')} or {}"/>
</td>
</tr>
+ <tr>
+ <td>Force IP Family</td>
+ <td>
+ <select name="force_ip_family" class="fencedevformselect">
+ <option value=""
+ py:attrs="(not cur_fencedev or (not cur_fencedev.getAttribute('inet4_only') and not cur_fencedev.getAttribute('inet6_only'))) and {'selected':'selected'} or {}">Default</option>
+ <option value="ipv4"
+ py:attrs="cur_fencedev and cur_fencedev.getAttribute('inet4_only') and {'selected':'selected'} or {}">IPv4 Only</option>
+ <option value="ipv6"
+ py:attrs="cur_fencedev and cur_fencedev.getAttribute('inet6_only') and {'selected':'selected'} or {}">IPv6 Only</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>SSH</td>
+ <td>
+ <input type="checkbox" class="checkbox" name="secure"
+ py:attrs="cur_fencedev and cur_fencedev.getAttribute('secure') and {'checked': 'checked'}"/>
+ <label class="choice">Use SSH</label>
+ </td>
+ </tr>
+ <tr>
+ <td>Path to SSH Identity File</td>
+ <td>
+ <input type="text" class="text" name="identity_file"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('identity_file')} or {}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>SSH Options</td>
+ <td>
+ <input type="text" class="text" name="ssh_options"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('ssh_options')} or {}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Force Command Prompt</td>
+ <td>
+ <input type="text" class="text" name="cmd_prompt"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('cmd_prompt')} or {}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Power Wait (seconds)</td>
+ <td>
+ <input type="text" class="text" name="power_wait"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('power_wait')} or {}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Power Timeout (seconds)</td>
+ <td>
+ <input type="text" class="text" name="power_timeout"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('power_timeout')} or {}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Shell Timeout (seconds)</td>
+ <td>
+ <input type="text" class="text" name="shell_timeout"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('shell_timeout')} or {}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Login Timeout (seconds)</td>
+ <td>
+ <input type="text" class="text" name="login_timeout"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('login_timeout')} or {}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Times to Retry Power On Operation</td>
+ <td>
+ <input type="text" class="text" name="retry_on"
+ py:attrs="cur_fencedev and {'value': cur_fencedev.getAttribute('retry_on')} or {}"/>
+ </td>
+ </tr>
</table>
<py:if test="cur_fencedev">
diff --git a/luci/templates/fence_instances.html b/luci/templates/fence_instances.html
index d8b9684..a82e830 100644
--- a/luci/templates/fence_instances.html
+++ b/luci/templates/fence_instances.html
@@ -368,6 +368,13 @@
</td>
</tr>
<tr>
+ <td>Delay (optional)</td>
+ <td>
+ <input name="delay" type="text" class="text"
+ py:attrs="cur_fence_inst and {'value': cur_fence_inst.getAttribute('delay')}"/>
+ </td>
+ </tr>
+ <tr>
<td>Unfencing</td>
<td>
<input type="checkbox" class="checkbox" name="unfencing"
diff --git a/luci/validation/validate_fence.py b/luci/validation/validate_fence.py
index d102c51..0b0fbd0 100644
--- a/luci/validation/validate_fence.py
+++ b/luci/validation/validate_fence.py
@@ -198,9 +198,28 @@ def val_brocade_fd(fencedev, fence_name, **kw):
('login', True),
('passwd', False),
('passwd_script', False),
+ ('secure', False),
+ ('identity_file', False),
+ ('ssh_options', False),
+ ('force_ip_family', False),
+ ('cmd_prompt', False),
+ ('power_wait', False),
+ ('power_timeout', False),
+ ('shell_timeout', False),
+ ('login_timeout', False),
+ ('retry_on', False),
)
errors = config_fence_attr(params, fencedev, fence_name, **kw)
+ force_family = fencedev.getAttribute('force_ip_family')
+ fencedev.removeAttribute('force_ip_family')
+ fencedev.removeAttribute('inet6_only')
+ fencedev.removeAttribute('inet4_only')
+ if force_family == 'ipv4':
+ fencedev.addAttribute('inet4_only', '1')
+ elif force_family == 'ipv6':
+ fencedev.addAttribute('inet6_only', '1')
+
return errors
def val_vixel_fd(fencedev, fence_name, **kw):
@@ -1010,6 +1029,7 @@ def val_virsh_fi(fenceinst, parent_name, **kw):
def val_brocade_fi(fenceinst, parent_name, **kw):
params = (
('port', True),
+ ('delay', False),
)
errors = config_fence_attr(params, fenceinst, parent_name, **kw)
9 years, 9 months