Bug 1126876 - ccs --getversion gives result even if cluster.conf doesn't exist on target node
Summary: ccs --getversion gives result even if cluster.conf doesn't exist on target node
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ricci
Version: 6.7
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Chris Feist
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-05 13:56 UTC by Radek Steiger
Modified: 2015-07-22 07:33 UTC (History)
1 user (show)

Fixed In Version: ccs-0.16.2-77.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-22 07:33:57 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1405 normal SHIPPED_LIVE ricci bug fix and enhancement update 2015-07-20 18:07:08 UTC

Description Radek Steiger 2014-08-05 13:56:45 UTC
Description of problem:

When a cluster.conf does not exist on a target system, ccs will cast the value from thin air and print "1" when asking for cluster config version via --getversion:

# ll /etc/cluster/cluster.conf
ls: cannot access /etc/cluster/cluster.conf: No such file or directory

# ccs --getversion
1
# echo $?
0

The exit code also doesn't hint any problem whatsoever, making the whole result a clear fake. This only happens when asking a host, asking from a file with -f properly shouts an error.


Version-Release number of selected component (if applicable):
ccs-0.16.2-75.el6.x86_64
ricci-0.16.2-75.el6.x86_64


How reproducible:
Always


Steps to Reproduce:
1. rm /etc/cluster/cluster.conf
2. ccs --getversion
3.


Actual results:

Message returned: 1
Exit code returned: 0


Expected results:

Message returned: <some kind of error message>
Exit code returned: 1

Comment 2 Chris Feist 2014-08-05 21:11:10 UTC
Fixed upstream here:
https://github.com/feist/ccs/commit/5c2280e547d3663883e7ca5644e4df3e276ba438

Comment 4 Chris Feist 2015-03-03 23:28:44 UTC
Before Fix:

[root@ask-03 ~]# rpm -q ccs
ccs-0.16.2-75.el6.x86_64
[root@ask-03 ~]# rm /etc/cluster/cluster.conf 
rm: remove regular file `/etc/cluster/cluster.conf'? y
[root@ask-03 ~]# ccs --getversion
1
[root@ask-03 ~]# 


After Fix:

[root@ask-02 ~]# rpm -q ccs
ccs-0.16.2-77.el6.x86_64
[root@ask-02 ~]# rm /etc/cluster/cluster.conf
rm: remove regular file `/etc/cluster/cluster.conf'? y
[root@ask-02 ~]# ccs --getversion
Unable to obtain cluster.conf file from remote node
[root@ask-02 ~]#

Comment 7 errata-xmlrpc 2015-07-22 07:33:57 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.

https://rhn.redhat.com/errata/RHBA-2015-1405.html


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