Red Hat Bugzilla – Bug 978373
Man pages for fence agents should make it clear when the parameter value is expected to be Python regular expression
Last modified: 2014-06-18 03:23:26 EDT
# man fence_drac5 | grep -A1 cmd_prompt
Force command prompt (Default Value: ['\$'])
The dollar-sign is escaped only because it is treated as Python regular
expression under the hood. This ought to be explained in the man page
so that no misunderstanding my arise when redefining the default value.
(something like "Force Python regex for command prompt").
For instance, if my fence device uses '.' as a prompt, I'd like to avoid
unneeded trial and error and use properly escaped '\.' as a cmd_prompt
value right away.
# rpm -q fence-agents-drac5
Two related notes:
1. to address using single-item-lists needlessly for default values
(specifically in case of cmd_prompt as can also be observed above),
I proposed a patch . Thanks for considering it, Marku.
2. IIUIC, lists cannot be specified externally even when they
are as default values (case of cmd_prompt at fence_apc, for instance)
so the default values in man pages may still be confusing
(patch  only fixed single-item-lists)
Apparently, this applies to help texts (--help) as well.
Manual page was fixed in upstream:
Problem with regex was solved by changing type of cmd-prompt - it is first value of newly created list.
Changing all command-prompts to just regex is surely an option but I don't like it very much because of fence agents that were not mentioned in patch.
all_opt["cmd_prompt"]["default"] = [ "RSM>", "MPC>", "IPS>", "TPS>", "NBB>", "NPS>", "VMR>" ]
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.