Project

General

Profile

Bug #16920

katello-installer --katello-oauth-secret forgets to restart tomcat service

Added by Stephen Benjamin over 2 years ago. Updated 11 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Installer
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1272752
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

History

#1 Updated by Chris Roberts over 2 years ago

  • Subject changed from katello-installer --katello-oauth-secret forgets to restart tomcat service to katello-installer --katello-oauth-secret forgets to restart tomcat service
  • Assignee set to Chris Roberts

#2 Updated by Justin Sherrill over 2 years ago

  • Legacy Backlogs Release (now unused) set to 114

#3 Updated by Chris Roberts over 2 years ago

  • Assignee deleted (Chris Roberts)

Also available in: Atom PDF