Bug 734910 - ccs should not traceback when passing a directory with '-f'
Summary: ccs should not traceback when passing a directory with '-f'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ricci
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: rc
: ---
Assignee: Chris Feist
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 756082
TreeView+ depends on / blocked
 
Reported: 2011-08-31 20:11 UTC by Chris Feist
Modified: 2012-06-20 14:13 UTC (History)
2 users (show)

Fixed In Version: ricci-0.16.2-48.el6
Doc Type: Bug Fix
Doc Text:
No Documentation Needed.
Clone Of:
Environment:
Last Closed: 2012-06-20 14:13:33 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0898 normal SHIPPED_LIVE ricci bug fix and enhancement update 2012-06-19 19:50:47 UTC

Description Chris Feist 2011-08-31 20:11:55 UTC
Description of problem:
ccs gives an unhelpful error when passing a directory to '-f'

Version-Release number of selected component (if applicable):
ccs-0.18.7-1.fc15.i686

How reproducible:
Always

Steps to Reproduce:
1. Create directory 'test'
2. ccs -f test createcluster
3. Error
  
Actual results:
Traceback (most recent call last):
  File "/usr/sbin/ccs", line 1820, in <module>
    main(sys.argv[1:])
  File "/usr/sbin/ccs", line 224, in main
    if (createcluster): create_cluster(clustername)
  File "/usr/sbin/ccs", line 689, in create_cluster
    set_cluster_conf(xml, False)
  File "/usr/sbin/ccs", line 1659, in set_cluster_conf
    f = open(filename, 'w')
IOError: [Errno 21] Is a directory: 'test'


Expected results:
Error: '-f' requires a filename, not a directory

Comment 3 Chris Feist 2012-02-03 23:12:33 UTC
Replicated:

[root@amoco-01 ~]# ccs -f /tmp --createcluster test
Traceback (most recent call last):
  File "/usr/sbin/ccs", line 2144, in <module>
    main(sys.argv[1:])
  File "/usr/sbin/ccs", line 256, in main
    if (createcluster): create_cluster(clustername)
  File "/usr/sbin/ccs", line 786, in create_cluster
    set_cluster_conf(xml, False)
  File "/usr/sbin/ccs", line 1970, in set_cluster_conf
    f = open(filename, 'w')
IOError: [Errno 21] Is a directory: '/tmp'

With Fix:
[cfeist@gold ccs]$ ./ccs -i  -f /tmp --createcluster test
Error: Unable to write file: '/tmp', Is a directory

Commit:
https://github.com/feist/ccs/commit/b4b658ee8bb35a08ad9973fb08086532fb98f286

Comment 4 Chris Feist 2012-02-28 00:14:50 UTC
Using ricci-0.16.2-48.el6:


[root@ask-04 tmp]# ccs -f /tmp/ --createcluster test
Error: Unable to write file: '/tmp/', Is a directory

Comment 6 Chris Feist 2012-03-15 19:49:28 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No Documentation Needed.

Comment 8 errata-xmlrpc 2012-06-20 14:13:33 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-2012-0898.html


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