Bug 1286632 - [RFE] When editing fence agents, options displayed should be specific to that agent
[RFE] When editing fence agents, options displayed should be specific to that...
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin (Show other bugs)
3.6.0.3
All Linux
unspecified Severity low (vote)
: ovirt-4.1.0-alpha
: 4.1.0
Assigned To: Oved Ourfali
Petr Matyáš
: FutureFeature
Depends On:
Blocks: 1427727
  Show dependency treegraph
 
Reported: 2015-11-30 06:32 EST by Dan Lavu
Modified: 2017-03-22 12:34 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
In this release, a link has been added to the Edit fence agent window which opens the online help and displays information about the parameters that can be set for fence agents.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-01 09:44:55 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
mperina: ovirt‑4.1?
pmatyas: testing_plan_complete-
rule-engine: planning_ack?
mperina: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 62336 master MERGED core: add a link to fence agents help page 2016-08-15 11:06 EDT

  None (edit)
Description Dan Lavu 2015-11-30 06:32:46 EST
Description of problem:
When editing fence agents, options displayed should be specific to that agent, it was quite confusing to see 'SSH Port' when adding 'apc_snmp'. If you haven't done this before, it takes time looking through the engine.log to ensure syntax is being parsed correctly. I think it'd be a nice easy improvement for users. 

Version-Release number of selected component (if applicable):
All versions, this is an RFE

How reproducible:
Always

Steps to Reproduce:
1. Add a fencing agent to a host
2. Select apc_snmp
3. *Note* That snmp does not require SSH and should be renamed to SNMP port. 

Actual results: 
Available options for fence_snmp are

Address:
User Name: 
Password:
Type:
SSH Port: 
Options:


Expected results:

Have mandatory fence agent specific options, these can be found in the fence_script on the host. 

fence_apc_snmp --help
Usage:
	fence_apc_snmp [options]
Options:
   -a, --ip=[ip]                  IP address or hostname of fencing device
   -l, --username=[name]          Login name
   -p, --password=[password]      Login password or passphrase
   -n, --plug=[id]                Physical plug number on device, UUID or
                                        identification of machine
   -d, --snmp-version=[version]   Specifies SNMP version to use
   -c, --community=[community]    Set the community string
   -u, --ipport=[port]            TCP/UDP port to use (default 161)
   -4, --inet4-only               Forces agent to use IPv4 addresses only
   -6, --inet6-only               Forces agent to use IPv6 addresses only
   -S, --password-script=[script] Script to run to retrieve password
   -b, --snmp-auth-prot=[prot]    Set authentication protocol (MD5|SHA)
   -E, --snmp-sec-level=[level]   Set security level
                                  (noAuthNoPriv|authNoPriv|authPriv)
   -B, --snmp-priv-prot=[prot]    Set privacy protocol (DES|AES)
   -P, --snmp-priv-passwd=[pass]  Set privacy protocol password
   -R, --snmp-priv-passwd-script  Script to run to retrieve privacy password
   -o, --action=[action]          Action: status, reboot (default), off or on
   -v, --verbose                  Verbose mode
   -D, --debug-file=[debugfile]   Debugging to output file
   -V, --version                  Output version information and exit
   -h, --help                     Display this help and exit
   -C, --separator=[char]         Separator for CSV created by 'list' operation
   --power-timeout=[seconds]      Test X seconds for status change after ON/OFF
   --shell-timeout=[seconds]      Wait X seconds for cmd prompt after issuing command
   --login-timeout=[seconds]      Wait X seconds for cmd prompt after login
   --power-wait=[seconds]         Wait X seconds after issuing ON/OFF
   --delay=[seconds]              Wait X seconds before fencing is started
   --retry-on=[attempts]          Count of attempts to retry power on



Additional info:

Note this is not specific to just fence_apc other fence agents as well.
Comment 1 Oved Ourfali 2015-12-07 07:32:29 EST
We do have specific ones.
We renamed the field to PORT, to fit all use-cases, each one filling another type of PORT.

Was there any other example that you saw?
Comment 2 Dan Lavu 2015-12-14 08:59:00 EST
For the fence_apc_snmp, 'community' should be required, would be nice if 'version' was a pull down.
Comment 3 Oved Ourfali 2015-12-15 05:02:34 EST
Eli - please review and see what we can do among what's requested by Dan.
Comment 4 Eli Mesika 2015-12-15 06:26:24 EST
(In reply to Oved Ourfali from comment #3)
> Eli - please review and see what we can do among what's requested by Dan.

Well, we have decided, when we developed the UI for the fencing operations, to implement specifically only a common subset of the parameters which are 

1) Port
2) Slot
3) Secure

All other parameters can be set in a <key>=<value> format in the options field.

Community (--community=[community]) is specific to apc_snmp, therefor it should be set in the options field if required.

Version (--version) is an operation that only returns information 

For example :

/usr/sbin/fence_apc_snmp --version
3.1.5 (built Thu Jul 10 04:49:13 EDT 2014)
Copyright (C) Red Hat, Inc. 2004-2010 All rights reserved.

How this should populated a drop-down???

More than that, the information returned from --version is never used as an input to any fencing operation (status, on , off) , so , what is the point to even put it in a form that includes only fencing parameters ???

All agents supports the command "-o metadata" 
This will return XML describing the parameters lists and description for the agent.
We were thinking in the past that this option can be used to dynamically build a form per fence agent with all supported parameters, but I am not sure that the benefit justify the effort needed to implement that.
Comment 5 Dan Lavu 2015-12-15 11:27:33 EST
Eli,

SNMP version, not --version, so it'll be either 1, 2c or 3. 


-d, --snmp-version=[version]   Specifies SNMP version to use
Comment 7 Eli Mesika 2016-08-15 10:12:16 EDT
It was agreed that a link to a URL displaying all agents ans their valid parameters will be added to the Add Fence Agent dialog 
We will use branding in order to allow different links for upstream and downstream
Comment 8 Sandro Bonazzola 2016-12-12 09:03:24 EST
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.
Comment 9 Petr Matyáš 2017-01-26 04:04:06 EST
Verified on 4.1.0-9
Comment 10 Martin Perina 2017-03-22 12:34:32 EDT
Unfortunately the original page is no longer available, so until we will have a replacement page, we need to hide that link, see BZ1434019

Note You need to log in before you can comment on or make changes to this bug.