Bug 1608817

Summary: No template mapped to feature Katello: Install Errata while applying errata on content host
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: Remote ExecutionAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Nikhil Kathole <nkathole>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: aruzicka, inecas, nkathole
Target Milestone: UnspecifiedKeywords: Regression
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-26 12:30:26 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
screenshot of UI
none
log in production.log file none

Description Nikhil Kathole 2018-07-26 10:24:17 UTC
Created attachment 1470678 [details]
screenshot of UI

Description of problem: Applying errata on content host via remote execution or remote execution(customized first) gives No template mapped to feature Katello: Install Errata.

Version-Release number of selected component (if applicable): 
Satellite 6.4 snap 13


How reproducible: always


Steps to Reproduce:
1. Register content host and have errata at place
2. Navigate to host -> content host
3. Select content host
4. Click on errata tab
5. select any errata 
6. Click on "Apply selected via remote excution" / remote execution(customized first)

Actual results: Error on UI Oops, we're sorry but something went wrong ERF42-5962 [Foreman::Exception]: No template mapped to feature Katello: Install Errata

and production.log showed 500 ISE

2018-07-26T06:22:19 [W|app|e7ab5] Action failed
Foreman::Exception: ERF42-5962 [Foreman::Exception]: No template mapped to feature Katello: Install Errata
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.5.4/app/models/job_invocation_composer.rb:285:in `job_template'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.5.4/app/models/job_invocation_composer.rb:246:in `params'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.5.4/app/models/job_invocation_composer.rb:326:in `for_feature'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.rc1.6/app/controllers/katello/remote_execution_controller.rb:21:in `prepare_composer'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.rc1.6/app/controllers/katello/remote_execution_controller.rb:9:in `create'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/abstract_controller/base.rb:186:in `process_action'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:108:in `block in run_callbacks'
/usr/share/foreman/app/controllers/concerns/application_shared.rb:15:in `set_timezone'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'


Expected results: Templates should found and successful errata apply via rex.


Additional info:

Comment 1 Nikhil Kathole 2018-07-26 10:25:07 UTC
Created attachment 1470679 [details]
log in production.log file

Comment 2 Nikhil Kathole 2018-07-26 10:37:08 UTC
Looking further into it I could not see templates mapped for Katello: Install Katello: Remove Katello: Service Katello: Update as well.

Comment 3 Brad Buckingham 2018-07-26 12:12:06 UTC
The error looks different; however, it appears to be the same flow as https://bugzilla.redhat.com/show_bug.cgi?id=1575988#c3.

The error above may be related to the referenced bug 1602875.  Can you confirm that the job templates are in the proper organization?  If not, set the org, re-run and see if it results in a behavior similar to https://bugzilla.redhat.com/show_bug.cgi?id=1575988#c4?

Comment 4 Nikhil Kathole 2018-07-26 12:30:26 UTC
Thanks Brad. Yes the above bugzilla should cover this issue. Marking it as dupe of 1575988 in the favour of https://bugzilla.redhat.com/show_bug.cgi?id=1575988#c3

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