Bug 871603 - ccs_tool: wrong parameter(s) to fence device in "ccs_tool create" help
ccs_tool: wrong parameter(s) to fence device in "ccs_tool create" help
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cluster (Show other bugs)
6.3
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Christine Caulfield
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-30 16:18 EDT by Jonathan Earl Brassow
Modified: 2013-11-21 06:22 EST (History)
9 users (show)

See Also:
Fixed In Version: cluster-3.0.12.1-53.el6
Doc Type: Bug Fix
Doc Text:
Cause: The help text for ccs_tool create showed the wrong parameters for the 'addfence' subcommand. 'user' was used where the correct parameter name is 'login'. Consequence: Users could create an incorrect cluster.conf file if they followed this advice. Fix: The help text has been fixed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 06:22:05 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
ccs_tool: fix ccs_edit example (cont'd) (2.78 KB, patch)
2013-03-04 10:37 EST, Jan Pokorný
no flags Details | Diff

  None (edit)
Description Jonathan Earl Brassow 2012-10-30 16:18:20 EDT
Adding an 'apc' fence method via ccs_tool results in a setup that cannot work because it puts in the wrong arguments.  Specifically, it puts in "user" instead of "login" required by the fence_apc method.

On the other hand, it could have been my mistake for copying what is suggested from the help output when running 'ccs_tool create', like this:
[root@bp-01 ~]# ccs_tool create
Usage: ccs_tool create [-2] <clustername>
 -2                 Create a 2-node cman cluster config file
 -n <num>           Create skeleton entries for <num> nodes
 -f <device>        Add a fence device to the node skeletons
 -c --configfile    Name of configuration file (/etc/cluster/cluster.conf)
 -h --help          Display this help text

Note that "create" on its own will not create a valid configuration file.
Fence agents and nodes will need to be added to it before handing it over
to cman.

eg:
  ccs_tool create MyCluster
  ccs_tool addfence apc fence_apc ipaddr=apc.domain.net user=apc password=apc
  ccs_tool addnode node1 -n 1 -f apc port=1
  ccs_tool addnode node2 -n 2 -f apc port=2
  ccs_tool addnode node3 -n 3 -f apc port=3
  ccs_tool addnode node4 -n 4 -f apc port=4

If you add -n <numbner> to the command then create will add skeleton entries for
that many nodes. This file WILL NEED EDITTING MANUALLY before it can be used
by cman.


Note the example 'ccs_tool addfence'.  It should not be 'user' it should be 'login'.

Either fix the example output, or fix ccs_tool to put in the right parameter into the configuration file.
Comment 3 Fabio Massimo Di Nitto 2013-01-09 10:15:20 EST
Agreed with Jonathan that fixing the example is sufficient.
Comment 4 Fabio Massimo Di Nitto 2013-01-09 11:05:18 EST
http://git.fedorahosted.org/cgit/cluster.git/commit/?h=STABLE32&id=87135d56ee90e7bb1a87b6d12fdd69a63aee747f

new output:

[fabbione@daikengo ccs_tool]$ ./ccs_tool create
Usage: ccs_tool create [-2] <clustername>
 -2                 Create a 2-node cman cluster config file
 -n <num>           Create skeleton entries for <num> nodes
 -f <device>        Add a fence device to the node skeletons
 -c --configfile    Name of configuration file (/etc/cluster/cluster.conf)
 -h --help          Display this help text

Note that "create" on its own will not create a valid configuration file.
Fence agents and nodes will need to be added to it before handing it over
to cman.

eg:
  ccs_tool create MyCluster
  ccs_tool addfence apc fence_apc ipaddr=apc.domain.net login=apc password=apc
  ccs_tool addnode node1 -n 1 -f apc port=1
  ccs_tool addnode node2 -n 2 -f apc port=2
  ccs_tool addnode node3 -n 3 -f apc port=3
  ccs_tool addnode node4 -n 4 -f apc port=4

If you add -n <numbner> to the command then create will add skeleton entries for
that many nodes. This file WILL NEED EDITTING MANUALLY before it can be used
by cman.
Comment 5 Jan Pokorný 2013-03-04 10:37:51 EST
Created attachment 705043 [details]
ccs_tool: fix ccs_edit example (cont'd)

As already discussed at [bug 869735], "passwd" as a correct parameter
denoting password.  As follow-up of referencing (it is really just a
name reference to a custom-named fence device using specific agent,
not a reference to this agent itself) WTI fencing, use "port" rather
than "ipport" as "ipport" is usually a shared per-device configuration
and what changes is particular per-node port.

Also fix the incorrect example with printing configuration to stdout.
Comment 6 Fabio Massimo Di Nitto 2013-03-05 13:23:09 EST
(In reply to comment #5)
> Created attachment 705043 [details]
> ccs_tool: fix ccs_edit example (cont'd)
> 
> As already discussed at [bug 869735], "passwd" as a correct parameter
> denoting password.  As follow-up of referencing (it is really just a
> name reference to a custom-named fence device using specific agent,
> not a reference to this agent itself) WTI fencing, use "port" rather
> than "ipport" as "ipport" is usually a shared per-device configuration
> and what changes is particular per-node port.
> 
> Also fix the incorrect example with printing configuration to stdout.

Just keep in ḿind that ccs_tool/edit capabilities in RHEL6 are NOT supported. While the example can be improved, it's not a reference for customers.
Comment 15 errata-xmlrpc 2013-11-21 06:22:05 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1617.html

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