Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 804108

Summary: Katello CLI org create fails - IOError: [Errno 2] No such file or directory: '/etc/katello/client.conf'
Product: Red Hat Satellite Reporter: scollier
Component: HammerAssignee: Mike McCune <mmccune>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: bkearney, cpelland, cwelton, gkhachik, jlaska, jliberma, lzap, scollier, sreichar
Target Milestone: UnspecifiedKeywords: Reopened
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 18:31:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
katello-debug none

Description scollier 2012-03-16 14:52:28 UTC
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 14:56:04 UTC
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 14:59:28 UTC
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 15:00:15 UTC
Replacing

host = localhost.localdomain

with your fqdn

host = myhostname.mydomain

Comment 4 James Laska 2012-03-19 15:02:46 UTC
Requesting as a blocker.  The missing /etc/katello/client.conf appears to
impact all katello CLI operations.

Comment 5 Garik Khachikyan 2012-03-19 15:03:30 UTC
and what --deployment=<???> you used there?

for CFSE the right thing is: --deployment=cfse

Comment 7 Lukas Zapletal 2012-03-19 15:09:01 UTC
FYI the related bug is: https://bugzilla.redhat.com/show_bug.cgi?id=801786

Comment 8 James Laska 2012-03-19 15:50:22 UTC
(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 23:41:44 UTC
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 12:36:51 UTC
(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 13:40:14 UTC
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 14:18:09 UTC
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 14:19:49 UTC
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 14:21:22 UTC
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 14:43:26 UTC
Moving to MODIFIED until the updated katello-cli package is available in a puddle

Comment 17 James Laska 2012-03-21 18:13:32 UTC
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 14:29:17 UTC
QA Verified in brew katello-cli-0.1.107-1.el6.noarch