Bug 871603 - ccs_tool: wrong parameter(s) to fence device in "ccs_tool create" help
Summary: ccs_tool: wrong parameter(s) to fence device in "ccs_tool create" help
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cluster
Version: 6.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Christine Caulfield
QA Contact: Cluster QE
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-30 20:18 UTC by Jonathan Earl Brassow
Modified: 2013-11-21 11:22 UTC (History)
9 users (show)

(edit)
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.
Clone Of:
(edit)
Last Closed: 2013-11-21 11:22:05 UTC


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1617 normal SHIPPED_LIVE cluster and gfs2-utils bug fix update 2013-11-20 21:38:45 UTC
Red Hat Bugzilla 869735 None None None Never

Internal Trackers: 869735

Description Jonathan Earl Brassow 2012-10-30 20:18:20 UTC
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 15:15:20 UTC
Agreed with Jonathan that fixing the example is sufficient.

Comment 4 Fabio Massimo Di Nitto 2013-01-09 16:05:18 UTC
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ý [poki] 2013-03-04 15:37:51 UTC
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 18:23:09 UTC
(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 11:22:05 UTC
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.