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 1938278 - Error handling wrongly used options with capsule-certs-generate
Summary: Error handling wrongly used options with capsule-certs-generate
Keywords:
Status: CLOSED DUPLICATE of bug 1915347
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Certificates
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Eric Helms
QA Contact: Omkar Khatavkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-12 16:51 UTC by Joniel Pasqualetto
Modified: 2024-06-14 00:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 12:28:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Joniel Pasqualetto 2021-03-12 16:51:06 UTC
Description of problem:

When trying to create capsule certificates and the option --certs-update-server-ca is wrongly used, a backtrace is returned instead of a nice message.

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

Observed this on Satellite 6.8. On Satellite 6.7 (didn't have older versions to test) it works fine and return the expected nice message.

How reproducible:
Always

Steps to Reproduce:

1. Try generating capsule certificates using following command line:

~~~
# capsule-certs-generate --foreman-proxy-fqdn capsule.example.com --certs-tar /root/capsule_cert/capsule_certs.tar --certs-update-server --certs-update-server-ca
Traceback (most recent call last):
	14: from /usr/sbin/capsule-certs-generate:31:in `<main>'
	13: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/kafo_configure.rb:162:in `run'
	12: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
	11: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/kafo_configure.rb:118:in `run'
	10: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
	 9: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/kafo_configure.rb:155:in `execute'
	 8: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/kafo_configure.rb:424:in `run_installation'
	 7: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hooking.rb:49:in `execute'
	 6: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hooking.rb:49:in `each'
	 5: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hooking.rb:51:in `block in execute'
	 4: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hook_context.rb:16:in `execute'
	 3: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hook_context.rb:16:in `instance_exec'
	 2: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hooking.rb:34:in `block (4 levels) in load'
	 1: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hooking.rb:34:in `instance_eval'
/usr/share/foreman-installer/katello-certs/hooks/pre/20-certs_update.rb:22:in `block (4 levels) in load': undefined method `fail_and_exit' for #<Kafo::HookContext:0x0000000001bec318> (NoMethodError)
~~~


Actual results:
 Backtrace complaining about method "fail_and_exit" not existing:

/usr/share/foreman-installer/katello-certs/hooks/pre/20-certs_update.rb:22:in `block (4 levels) in load': undefined method `fail_and_exit' for #<Kafo::HookContext:0x0000000001bec318> (NoMethodError)



Expected results:
Nice message saying:

"--certs-update-server-ca needs to be used with katello"

Additional info:

Comment 1 Eric Helms 2021-05-03 15:24:49 UTC
This is related to https://bugzilla.redhat.com/show_bug.cgi?id=1915347 as the fix for that should fix this in 6.8 as well.

Comment 2 Eric Helms 2021-05-18 12:28:26 UTC

*** This bug has been marked as a duplicate of bug 1915347 ***


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