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 1272752 - katello-installer --katello-oauth-secret forgets to restart tomcat service
Summary: katello-installer --katello-oauth-secret forgets to restart tomcat service
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.1.1
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-18 12:58 UTC by Pavel Moravec
Modified: 2019-09-12 09:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-29 21:00:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16920 0 None None None 2016-10-13 16:19:32 UTC

Description Pavel Moravec 2015-10-18 12:58:58 UTC
Description of problem:
Running katello-installer --katello-oauth-secret=.. updates pulp oauth and candlepin oauth. While pulp services are restarted to apply the change, tomcat service running tomcat application is not restarted.

This causes problems when e.g. registering a new content host that fails with error

Invalid oauth unit or secret

when running subscription-manager on the Host. (the error is quite confusing, since sub-man can auth to Satellite/Capsule itself properly - the error comes from Satellite internals..)

Checking katello-installer logs, candlepin.conf is updated properly, but tomcat service (or tomcat6 for RHEL6) is not restarted.

Please add the hook to restart tomcat once the candlepin.conf is updated ;-)


Version-Release number of selected component (if applicable):
Sat 6.1.3
katello-installer-base-2.3.20-1.el7sat.noarch
katello-installer-2.3.20-1.el7sat.noarch


How reproducible:
100%


Steps to Reproduce:
1. Have Sat6.1.3 installed (might be RHEL7 relevant only, havent tried on RHEL6)
2. katello-installer --katello-oauth-secret=whateverSecretYouWant
3. Try to register a content host to Sat or Caps


Actual results:
- subscription-manager register fails with:
Invalid oauth unit or secret

- production.log having:

2015-10-17 22:53:57 [I] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2015-10-17 22:53:57 [I]   Parameters: {"id"=>"a8425d40-0f42-49ac-a5c7-2d797a3e7050"}
2015-10-17 22:53:57 [D] Setting current user thread-local variable to
2015-10-17 22:53:57 [E] RestClient::Unauthorized: 401 Unauthorized
Body: {"displayMessage":"Invalid oauth unit or secret","requestUuid":"6ac311ca-c60d-4f96-8136-1b58d0fa9cc9"}
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
/opt/rh/ruby193/root/usr/share/gems/gems/rbovirt-0.0.29/lib/restclient_ext/request.rb:50:in `block in transmit'
/opt/rh/ruby193/root/usr/share/ruby/net/http.rb:746:in `start'
..
2015-10-17 22:53:58 [I]   Rendered text template (0.0ms)
2015-10-17 22:53:58 [I] Completed 401 Unauthorized in 243ms (Views: 9.6ms | ActiveRecord: 0.0ms)
2015-10-17 22:53:58 [D] With body: {"displayMessage":"Invalid oauth unit or secret","requestUuid":"6ac311ca-c60d-4f96-8136-1b58d0fa9cc9"}

- restarting tomcat service gets rid of the problem


Expected results:
- subscription-manager register succeeds


Additional info:
katello-installer from such test case to be provided

Comment 3 Pavel Moravec 2015-12-22 15:06:56 UTC
Basically *no* action generating or modifying /etc/candlepin/candlepin.conf triggers tomcat restart.

Try e.g.:
#  see what tomcat PID was running
ps aux | grep tomcat
# manually force installer to generate candlepin.conf:
mv /etc/candlepin/candlepin.conf{,.back}
katello-installer
# check tomcat PID unchanged
ps aux | grep tomcat

Comment 4 Bryan Kearney 2016-07-26 15:25:24 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 5 Bryan Kearney 2016-07-26 15:39:39 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 7 Stephen Benjamin 2016-10-13 16:19:30 UTC
Created redmine issue http://projects.theforeman.org/issues/16920 from this bug

Comment 8 Satellite Program 2017-01-27 07:02:01 UTC
Upstream bug assigned to chrobert

Comment 9 Satellite Program 2017-01-28 03:02:07 UTC
Upstream bug assigned to chrobert

Comment 10 Bryan Kearney 2017-03-29 21:00:59 UTC
Thank you for reporting this. The issue is being tracked upstream, and will no longer be tracked in the downstream product. When the upstream issue is fixed, the next Satellite release will contain the fix. I am closing this out as deferred. If you feel this is not correct, please feel free to open with additional information.  We aprpeciate your interest in Red Hat Satellite.


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