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 1899108

Summary: Capsule-certs-generate not working with relative and absolute path
Product: Red Hat Satellite Reporter: Omkar Khatavkar <okhatavk>
Component: CertificatesAssignee: Eric Helms <ehelms>
Status: CLOSED ERRATA QA Contact: Omkar Khatavkar <okhatavk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: ehelms, pcreech
Target Milestone: 6.9.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 13:18:56 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:
Bug Depends On: 1915347    
Bug Blocks:    

Description Omkar Khatavkar 2020-11-18 14:29:33 UTC
Description of problem:
Capsule-certs-generate not working with relative and absolute path  

Version-Release number of selected component (if applicable):
Satellite 6.9 Snap 1 

How reproducible:
Always

Steps to Reproduce:
1. Used the repo https://github.com/ekohl/ownca to generate the certs 

2. Once certs are generated copied them folder like 
cp "cacert.crt" /root/capsule_cert/ca_cert_bundle.pem
cp "<satellite_hostname>/<satellite_hostname>.crt" /root/capsule_cert/capsule_cert.pem
cp "<satellite_hostname>/<satellite_hostname>.key" /root/capsule_cert/capsule_cert_key.pem

3. ran the command 

capsule-certs-generate --foreman-proxy-fqdn capsule.example.com --certs-tar /root/capsule_cert/capsule_certs_Abs.tar --server-cert /root/capsule_cert/capsule_cert.pem --server-key /root/capsule_cert/capsule_cert_key.pem --server-ca-cert /root/capsule_cert/ca_cert_bundle.pem --certs-update-server


Actual results:
Command failed 

Expected results:
Tar file should have been created 

Additional info:

capsule-certs-generate --foreman-proxy-fqdn capsule.example.com --certs-tar /root/capsule_cert/capsule_certs_Abs.tar --server-cert /root/capsule_cert/capsule_cert.pem --server-key /root/capsule_cert/capsule_cert_key.pem --server-ca-cert /root/capsule_cert/ca_cert_bundle.pem --certs-update-server

stty: standard input: Inappropriate ioctl for device
/usr/share/foreman-installer/katello-certs/hooks/pre_commit/20-certs_update.rb:17:in `block (4 levels) in load': undefined method `execute' for #<Kafo::HookContext:0x00000000010b55a8> (NoMethodError)
Did you mean?  exec
	from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.0.0/lib/kafo/hooking.rb:35:in `instance_eval'
	from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.0.0/lib/kafo/hooking.rb:35:in `block (4 levels) in load'
	from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.0.0/lib/kafo/hook_context.rb:19:in `instance_eval'
	from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.0.0/lib/kafo/hook_context.rb:19:in `execute'
	from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.0.0/lib/kafo/hooking.rb:53:in `block in execute'
	from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.0.0/lib/kafo/hooking.rb:51:in `each'
	from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.0.0/lib/kafo/hooking.rb:51:in `execute'
	from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.0.0/lib/kafo/kafo_configure.rb:199:in `execute'
	from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
	from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.0.0/lib/kafo/kafo_configure.rb:169:in `run'
	from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
	from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.0.0/lib/kafo/kafo_configure.rb:50:in `run'
	from /usr/sbin/capsule-certs-generate:31:in `<main>'

Comment 5 Omkar Khatavkar 2021-01-18 15:26:25 UTC
Just retried the same scenario in satellite 6.9 and snap 9. everything working fine

Comment 6 Omkar Khatavkar 2021-01-18 15:26:41 UTC
Just retried the same scenario in satellite 6.9 and snap 9. everything working fine

Comment 9 errata-xmlrpc 2021-04-21 13:18:56 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 (Moderate: Satellite 6.9 Release), 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://access.redhat.com/errata/RHSA-2021:1313