Bug 804108 - Katello CLI org create fails - IOError: [Errno 2] No such file or directory: '/etc/katello/client.conf'
Katello CLI org create fails - IOError: [Errno 2] No such file or directory: ...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: --
Assigned To: Mike McCune
Katello QA List
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-16 10:52 EDT by scollier
Modified: 2014-09-18 11:32 EDT (History)
9 users (show)

See Also:
Fixed In Version: katello-cli-0.1.105-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-22 14:31:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
katello-debug (73.14 KB, application/x-gzip)
2012-03-16 10:52 EDT, scollier
no flags Details

  None (edit)
Description scollier 2012-03-16 10:52:28 EDT
Created attachment 570619 [details]
katello-debug

Description of problem:

I would like to create an organization using Katello CLI in beta 5.  This is not working.  Clean install of OS and system engine.

Version-Release number of selected component (if applicable):

# /pub/scripts/post_install_configuration_scripts/cf-se-versions 
Red Hat Enterprise Linux Server release 6.2 (Santiago)
Linux cf-se2.cloud.lab.eng.bos.redhat.com 2.6.32-220.7.1.el6.x86_64 #1 SMP Fri Feb 10 15:22:22 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
PyYAML-3.09-14.el6_1.x86_64
facter-1.5.9-1.el6.noarch
js-1.8.5-6.el6.x86_64
mongodb-1.8.2-3.el6.x86_64
mongodb-server-1.8.2-3.el6.x86_64
puppet-2.6.14-1.el6.noarch
pymongo-1.9-8.el6_1.x86_64
tomcat6-6.0.24-35.el6_1.noarch
ruby-1.8.7.352-6.el6.x86_64
grinder-0.0.139-1.el6.noarch
postgresql-server-8.4.9-1.el6_1.1.x86_64
postgresql-8.4.9-1.el6_1.1.x86_64
candlepin-0.5.26-1.el6.noarch
pulp-1.0.0-4.el6.noarch
katello-0.1.304-1.el6.noarch
katello-all-0.1.304-1.el6.noarch
katello-cli-0.1.104-1.el6.noarch
katello-configure-0.1.104-1.el6.noarch




How reproducible:

every time.  I re-installed to repro and it was reproducible.

Steps to Reproduce:
1.  install system engine
2.  issue the command below.

  
Actual results:

# katello -u admin -p admin org create --name=refarch
Traceback (most recent call last):
  File "/usr/bin/katello", line 31, in <module>
    from katello.client.cli.admin import AdminCLI
  File "/usr/lib/python2.6/site-packages/katello/client/cli/admin.py", line 16, in <module>
    from katello.client.cli.base import KatelloCLI
  File "/usr/lib/python2.6/site-packages/katello/client/cli/base.py", line 31, in <module>
    Config()
  File "/usr/lib/python2.6/site-packages/katello/client/config.py", line 67, in __init__
    Config.parser.readfp(open(Config.PATH, 'r'), Config.PATH)
IOError: [Errno 2] No such file or directory: '/etc/katello/client.conf'



I thought maybe the order or options changed.  But if you just issue "katello", same error:

# katello
Traceback (most recent call last):
  File "/usr/bin/katello", line 31, in <module>
    from katello.client.cli.admin import AdminCLI
  File "/usr/lib/python2.6/site-packages/katello/client/cli/admin.py", line 16, in <module>
    from katello.client.cli.base import KatelloCLI
  File "/usr/lib/python2.6/site-packages/katello/client/cli/base.py", line 31, in <module>
    Config()
  File "/usr/lib/python2.6/site-packages/katello/client/config.py", line 67, in __init__
    Config.parser.readfp(open(Config.PATH, 'r'), Config.PATH)
IOError: [Errno 2] No such file or directory: '/etc/katello/client.conf'




Expected results:

a message stating that the org was successfully created.


Additional info:

attaching katello debug output
Comment 1 James Laska 2012-03-19 10:56:04 EDT
Seeing the same thing using katello-0.1.304-1.el6 katello-configure-0.1.104-1.el6

> katello -u admin -p admin org create --name redhat
> Traceback (most recent call last):
>   File "/usr/bin/katello", line 31, in <module>
>     from katello.client.cli.admin import AdminCLI
>   File "/usr/lib/python2.6/site-packages/katello/client/cli/admin.py", line 16, in <module>
>     from katello.client.cli.base import KatelloCLI
>   File "/usr/lib/python2.6/site-packages/katello/client/cli/base.py", line 31, in <module>
>     Config()
>   File "/usr/lib/python2.6/site-packages/katello/client/config.py", line 67, in __init__
>     Config.parser.readfp(open(Config.PATH, 'r'), Config.PATH)
> IOError: [Errno 2] No such file or directory: '/etc/katello/client.conf'
Comment 2 Lukas Zapletal 2012-03-19 10:59:28 EDT
Hello,

quick workaround is to put this content:

http://git.fedorahosted.org/git/?p=katello.git;a=blob;f=cli/etc/client.conf

into that file (create one).
Comment 3 Lukas Zapletal 2012-03-19 11:00:15 EDT
Replacing

host = localhost.localdomain

with your fqdn

host = myhostname.mydomain
Comment 4 James Laska 2012-03-19 11:02:46 EDT
Requesting as a blocker.  The missing /etc/katello/client.conf appears to
impact all katello CLI operations.
Comment 5 Garik Khachikyan 2012-03-19 11:03:30 EDT
and what --deployment=<???> you used there?

for CFSE the right thing is: --deployment=cfse
Comment 7 Lukas Zapletal 2012-03-19 11:09:01 EDT
FYI the related bug is: https://bugzilla.redhat.com/show_bug.cgi?id=801786
Comment 8 James Laska 2012-03-19 11:50:22 EDT
(In reply to comment #5)
> and what --deployment=<???> you used there?
> 
> for CFSE the right thing is: --deployment=cfse

Hey Garik, the CloudForms documentation currently makes no recommendation for using 'katello-configure --deployment=cfse'

Can you file that as a separate issue?
Comment 9 Mike McCune 2012-03-19 19:41:44 EDT
James, I filed a bug for the docs a while ago for the issue:

https://bugzilla.redhat.com/show_bug.cgi?id=800703

looks like it didn't get done correctly thou, I see:

http://documentation-stage.bne.redhat.com/docs/en-US/CloudForms/1.0/html-single/Installation_Guide/index.html


Procedure 2.2. Running the Configuration Script

   1. CloudForms System Engine is configured automatically using the katello-configure --deployment=cfse script. Switch to the root user, and run the script:

      # katello-configure

but instead should be:

 1.CloudForms System Engine is configured automatically using the
katello-configure script. Switch to the root user, and run the script:

      # katello-configure --deployment=cfse

will update that bug accordingly
Comment 10 James Laska 2012-03-20 08:36:51 EDT
(In reply to comment #9)
> James, I filed a bug for the docs a while ago for the issue:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=800703
> 
> looks like it didn't get done correctly thou, I see:

Seems like your bug was dup'd against bug#797273 ... we should track the changes there perhaps.  It looks like Dan is working the issue in that bug.
Comment 12 Bryan Kearney 2012-03-21 09:40:14 EDT
Per all the comments, this is a documentation issues and is being tracked by 797273.

*** This bug has been marked as a duplicate of bug 797273 ***
Comment 13 James Laska 2012-03-21 10:18:09 EDT
Moving back to ASSIGNED, resolution/discussion of the original problem (comment#0) needs to be tracked.  The comments regarding --deployment=<val> are a tangent to this issue, and should be tracked in bug#797273
Comment 14 Bryan Kearney 2012-03-21 10:19:49 EDT
Per an IRC conversation, the original bug is not showing up 

katello-cli-0.1.105-1.el6.noarch
katello-glue-candlepin-0.1.304-1.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-glue-foreman-0.1.304-1.el6.noarch
katello-selinux-0.1.8-1.el6.noarch
katello-cli-common-0.1.105-1.el6.noarch
katello-certs-tools-1.0.4-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-common-0.1.304-1.el6.noarch
katello-glue-pulp-0.1.304-1.el6.noarch
katello-all-0.1.304-1.el6.noarch
katello-configure-0.1.104-1.el6.noarch
katello-0.1.304-1.el6.noarch
Comment 15 Bryan Kearney 2012-03-21 10:21:22 EDT
Also, this is provided in the cli-common package:

[root@rhel61 ~]# rpm -q --whatprovides /etc/katello/client.conf 
katello-cli-0.1.105-1.el6.noarch
Comment 16 James Laska 2012-03-21 10:43:26 EDT
Moving to MODIFIED until the updated katello-cli package is available in a puddle
Comment 17 James Laska 2012-03-21 14:13:32 EDT
Looks like the katello-0.1.304-1.el6 build is already included in the errata [1].

We can move this bug to ON_QA, or add this bugzilla to the errata [1] and it will handle all state changes from here on out.

[1] https://errata.devel.redhat.com/errata/stateview/12962
Comment 18 Corey Welton 2012-03-22 10:29:17 EDT
QA Verified in brew katello-cli-0.1.107-1.el6.noarch

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