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 1228195

Summary: Cannot setup capsule using capsule-installer in snap7
Product: Red Hat Satellite Reporter: Tazim Kolhar <tkolhar>
Component: HammerAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED NOTABUG QA Contact: Tazim Kolhar <tkolhar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: cwelton, mmccune
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-10 12:45:00 UTC Type: Bug
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
capsule-installer log attached none

Description Tazim Kolhar 2015-06-04 11:44:40 UTC
Created attachment 1034674 [details]
capsule-installer log attached

Description of problem:
Cannot setup capsule using capsule-installer in snap7

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

# rpm -qa  | grep foreman
foreman-compute-1.7.2.26-1.el6_6sat.noarch
ruby193-rubygem-foreman-redhat_access-0.1.0-1.el6_6sat.noarch
rubygem-hammer_cli_foreman-0.1.4.13-1.el6_6sat.noarch
foreman-vmware-1.7.2.26-1.el6_6sat.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2.13-1.el6_6sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el6_6sat.noarch
foreman-postgresql-1.7.2.26-1.el6_6sat.noarch
foreman-libvirt-1.7.2.26-1.el6_6sat.noarch
ruby193-rubygem-foreman-tasks-0.6.12.7-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_docker-0.0.3.6-1.el6_6sat.noarch
foreman-selinux-1.7.2.13-1.el6_6sat.noarch
foreman-debug-1.7.2.26-1.el6_6sat.noarch
foreman-ovirt-1.7.2.26-1.el6_6sat.noarch
foreman-gce-1.7.2.26-1.el6_6sat.noarch
ruby193-rubygem-foreman_discovery-2.0.0.15-1.el6_6sat.noarch
foreman-proxy-1.7.2.5-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.4-1.el6_6sat.noarch
intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch
ruby193-rubygem-foreman_docker-1.2.0.14-1.el6_6sat.noarch
intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch
foreman-1.7.2.26-1.el6_6sat.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el6_6sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el6_6sat.noarch

How reproducible:
everytime

Steps to Reproduce:
1.# capsule-installer --parent-fqdn "intel-s3e3432-01.rhts.eng.bos.redhat.com" --register-in-foreman  "true" --foreman-oauth-key "LAhVo8sgFyLQ9CQcgLAHR8cfhgmGdBEc" --foreman-oauth-secret "ng8YqMmZwwrz6SwPrMSKb34q2xsFpWzf" --pulp-oauth-secret "BjhTy9ACrCvHD4PpbdgXSX4M4kDVp37f" --certs-tar "/root/hp-z600-01.rhts.eng.bos.redhat.com-certs.tar" --puppet "true"  --puppetca "true" --pulp "true"
 tar -xzf /root/hp-z600-01.rhts.eng.bos.redhat.com-certs.tar returned 2 instead of one of [0]
 /Stage[main]/Capsule/Certs::Tar_extract[/root/hp-z600-01.rhts.eng.bos.redhat.com-certs.tar]/Exec[extract /root/hp-z600-01.rhts.eng.bos.redhat.com-certs.tar]/returns: change from notrun to 0 failed: tar -xzf /root/hp-z600-01.rhts.eng.bos.redhat.com-certs.tar returned 2 instead of one of [0]
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[hp-z600-01.rhts.eng.bos.redhat.com]: Failed to call refresh: missing param 'id' in parameters
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[hp-z600-01.rhts.eng.bos.redhat.com]: missing param 'id' in parameters
Installing             Done                                               [100%] []
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/capsule-installer/capsule-installer.log

2.
3.

Actual results:
setting up capsule failed

Expected results:
setting up capsule installed successfully

Additional info:
capsule-installer.log attached

Comment 2 Corey Welton 2015-06-10 15:00:12 UTC
did you create the cert on the parent satellite and then copy it over to the capsule target?  

There was a bug written up long, long ago that we need to do more validation in installer when there is an issue with finding the cert (if someone fat-fingers, or the cert is missing, etc.), and I suspect this is the case here, but maybe not.

Please respond indicating whether you've actually generated the cert on parent satellite and copied it over.

Comment 3 Corey Welton 2015-06-10 15:02:24 UTC
FWIW, I think an error code of "2" in linux generally means "File Not Found"

>  tar -xzf /root/hp-z600-01.rhts.eng.bos.redhat.com-certs.tar returned 2 instead of one of [0]

So I bet the cert isn't there.

Comment 4 Tazim Kolhar 2015-06-11 11:15:12 UTC
Hi,

  I will setup the capsule again and check throughly whether the certs.tar 
  is copied or not

Thanks

Comment 5 Mike McCune 2015-07-09 21:25:46 UTC
Can we close this out? This looks like user error as we are seeing success in later snaps