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 1872014 - Enable web console on host error in "Oops, we're sorry but something went wrong ERF42-5962 [Foreman::Exception]: No template mapped to feature Enable web console"
Summary: Enable web console on host error in "Oops, we're sorry but something went wr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible - Configuration Management
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.8.0
Assignee: Adam Ruzicka
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-24 20:30 UTC by Satyajit Das
Modified: 2020-10-27 13:08 UTC (History)
4 users (show)

Fixed In Version: tfm-rubygem-foreman_ansible-5.1.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 13:05:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot of the page from satellite GUI. (8.76 KB, image/png)
2020-08-24 20:35 UTC, Satyajit Das
no flags Details
Screenshot of the page from satellite GUI with Web Console. (89.64 KB, image/png)
2020-08-25 13:46 UTC, Satyajit Das
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30788 0 Normal Closed Enable web console on host error in "Oops, we're sorry but something went wrong ERF42-5962 [Foreman::Exception]: No tem... 2021-02-17 12:29:14 UTC
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 13:08:55 UTC

Description Satyajit Das 2020-08-24 20:30:35 UTC
Description of problem:

Enable web console  on host error in "Oops, we're sorry but something went wrong ERF42-5962 [Foreman::Exception]: No template mapped to feature Enable web console"

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

satellite-6.8.0-0.7.beta.el7sat.noarch

How reproducible:

100%

Steps to Reproduce:
1.Navigate to Hosts -> All hosts
2.Click on any host to see details.
3.Click on "Enable web console"  from dropdown near "schedule remote job"

Actual results:

Oops, we're sorry but something went wrong ERF42-5962 [Foreman::Exception]: No template mapped to feature Enable web console.

==> /var/log/foreman/production.log <==
2020-08-25T01:58:45 [I|app|28ffd443] Started POST "/job_invocations?feature=ansible_enable_web_console&host_ids%5B%5D=6" for 127.0.0.1 at 2020-08-25 01:58:45 +0530
2020-08-25T01:58:45 [I|app|28ffd443] Processing by JobInvocationsController#create as HTML
2020-08-25T01:58:45 [I|app|28ffd443]   Parameters: {"authenticity_token"=>"nLiaLNnW+Dwm+6OQnUSD+7H8NVho2q8s9sRF48nKuTtHdc9Z7fAzKuQ5+HTuxRvGs5fgauYXr0BtfdJYoFOKMw==", "feature"=>"ansible_enable_web_console", "host_ids"=>["6"]}
2020-08-25T01:58:45 [W|app|28ffd443] Action failed
2020-08-25T01:58:45 [I|app|28ffd443]   Rendering common/500.html.erb within layouts/application
2020-08-25T01:58:45 [I|app|28ffd443]   Rendered common/500.html.erb within layouts/application (Duration: 8.8ms | Allocations: 9516)
2020-08-25T01:58:45 [I|app|28ffd443]   Rendered layouts/_application_content.html.erb (Duration: 3.7ms | Allocations: 6590)
2020-08-25T01:58:45 [I|app|28ffd443]   Rendering layouts/base.html.erb
2020-08-25T01:58:45 [I|app|28ffd443]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-6.0.1.3/app/views/foreman_theme_satellite/_theme_client_side_branding.js.erb (Duration: 3.7ms | Allocations: 6969)
2020-08-25T01:58:45 [I|app|28ffd443]   Rendered layouts/base.html.erb (Duration: 10.0ms | Allocations: 15746)
2020-08-25T01:58:45 [I|app|28ffd443] Completed 500 Internal Server Error in 45ms (Views: 27.8ms | ActiveRecord: 3.1ms | Allocations: 43670)
========================================================

Expected results:

Should rendered the correct template to install and enable cockpit on the host.

Additional info:

Comment 1 Satyajit Das 2020-08-24 20:35:03 UTC
Created attachment 1712435 [details]
Screenshot of the page from satellite GUI.

Comment 2 Adam Ruzicka 2020-08-25 07:03:08 UTC
The web console is accessed by "web console" button in host details which sits somewhere between "bootdisk" and "schedule remote job" buttons. Because it is not there on the screenshot you provided, my guess would be you haven't enabled it when installing satellite.

All the things in the dropdown under "schedule remote job" are REX/ansible jobs. "Enable web console" should install all the dependencies that are need for the web console to work on a given host using ansible. So yes, this is a bug, but a different one than you described. The mapping between features and templates probably got out of sync.

Expected result:
Ansible runs and installs some cockpit-* packages on the target host.

Comment 3 Satyajit Das 2020-08-25 09:57:22 UTC
(In reply to Adam Ruzicka from comment #2)
> The web console is accessed by "web console" button in host details which
> sits somewhere between "bootdisk" and "schedule remote job" buttons. Because
> it is not there on the screenshot you provided, my guess would be you
> haven't enabled it when installing satellite.
> 
> All the things in the dropdown under "schedule remote job" are REX/ansible
> jobs. "Enable web console" should install all the dependencies that are need
> for the web console to work on a given host using ansible. So yes, this is a
> bug, but a different one than you described. The mapping between features
> and templates probably got out of sync.
> 
> Expected result:
> Ansible runs and installs some cockpit-* packages on the target host.

==========================================================================

Hello Adam,

Initially I was testing the Red Hat Web Console feature by following the steps from the below document link and it did not work
~~~~~~~~~~~~~~
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.8-beta/html/managing_hosts/host_management_and_monitoring_using_red_hat_web_console
~~~~~~~~~~~~~~
Then, I found the bug(1837960), so I though a bug is already in place, however for "Enable web console"  from dropdown near "schedule remote job", did not work and I did not find any bug reported for this, so reported the bug.

let me know if the Web Console feature really works for 6.8 beta, as for me it's not working, however, I can access the cockpit-console of the client from my browser by pulling the URL https://client.example.com:9090/system

Comment 4 Adam Ruzicka 2020-08-25 11:04:55 UTC
Yes, it works.

Judging by you not having the web console button on the screenshot you posted, it looks as if you haven't run "satellite-installer --enable-foreman-plugin-remote-execution-cockpit" on your satellite to actually enable the entire feature on satellite.

Comment 5 Satyajit Das 2020-08-25 13:46:30 UTC
Created attachment 1712541 [details]
Screenshot of the page from satellite GUI with Web Console.

Comment 6 Adam Ruzicka 2020-08-25 13:51:42 UTC
I stand corrected, sorry about that. So what happens when you hit the "web console" button?

Comment 10 Adam Ruzicka 2020-09-07 11:35:51 UTC
Created redmine issue http://projects.theforeman.org/issues/30788 from this bug

Comment 11 Bryan Kearney 2020-09-07 12:01:48 UTC
Upstream bug assigned to aruzicka

Comment 12 Bryan Kearney 2020-09-07 12:01:52 UTC
Upstream bug assigned to aruzicka

Comment 13 Bryan Kearney 2020-09-08 16:01:51 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30788 has been resolved.

Comment 16 Lukas Pramuk 2020-09-22 12:33:14 UTC
VERIFIED.

@Satellite 6.8.0 Snap16
tfm-rubygem-foreman_ansible-5.1.3-1.el7sat.noarch

by the following reproducer:

1) Navigate to Hosts -> All hosts
2) Select any host to see details
3) Click on "Enable web console" from dropdown near "Schedule remote job"

 Job invocations > Service Action - Enable Web Console > Template Invocation for host.example.com

Target: host.example.com

   1:
   2:PLAY [all] *********************************************************************
   3:
   4:TASK [Gathering Facts] *********************************************************
   5:ok: [host.example.com]
   6:
   7:TASK [ensure cockpit is installed] *********************************************
   8:ok: [host.example.com]
   9:PLAY RECAP *********************************************************************
  10:host.example.com : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
  11:Exit status: 0

>>> Service Action - Enable Web Console task finished successfully

Comment 19 errata-xmlrpc 2020-10-27 13:05:30 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 (Important: Satellite 6.8 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-2020:4366

Comment 20 errata-xmlrpc 2020-10-27 13:08:53 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 (Important: Satellite 6.8 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-2020:4366


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