Bug 2168576

Summary: subscription-manager-cockpit: An application gets frozen with 'Checking installed software' and red Oops at the top bar
Product: Red Hat Enterprise Linux 8 Reporter: Jan Stavel <jstavel>
Component: subscription-managerAssignee: Pino Toscano <ptoscano>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact:
Priority: high    
Version: 8.8CC: arpandey, ptoscano, redakkan
Target Milestone: rcKeywords: Triaged
Target Release: 8.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.28.36-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2169976 (view as bug list) Environment:
Last Closed: 2023-05-16 09:07:12 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:
Deadline: 2023-02-21   

Description Jan Stavel 2023-02-09 12:37:10 UTC
rhel8.8

[root@kvm-02-guest06 yum.repos.d]# rpm -qa | egrep 'cockpit|subscription|insights|syspurpose'
python3-syspurpose-1.28.35-1.el8.x86_64
python3-subscription-manager-rhsm-1.28.35-1.el8.x86_64
subscription-manager-1.28.35-1.el8.x86_64
cockpit-bridge-284-1.el8.x86_64
cockpit-system-284-1.el8.noarch
subscription-manager-rhsm-certificates-1.28.35-1.el8.x86_64
cockpit-ws-284-1.el8.x86_64
subscription-manager-cockpit-1.28.35-1.el8.noarch
dnf-plugin-subscription-manager-1.28.35-1.el8.x86_64


dnf remove insights-client

run firefox and open cockpit app

try to register a system and you will see 'A package insights-client will installed'

after you click on a 'Register' button you will see a message 'Checking installed software' with a rotating circle and red 'Oops' will appear on the top bar of the application.

The application gets frozen in this state.

I will attach js console.log and a piece of the source code the error has arisen from.

Comment 4 Jan Stavel 2023-02-09 12:40:30 UTC
a piece of the problematic code:

ject.getPrototypeOf(e)},wr(e)}gr.displayName="DescriptionListDescription";var kr=t().gettext;Je().locale(t().language);var xr=or("insights-client.timer","Timer"),Yr=or("insights-client.service","Service");function Tr(){return t().spawn(["which","insights-client"],{err:"ignore"}).then((function(){return!0}),(function(){return!1}))}function Dr(e,n){return e.problem?t().message(e):n}function Sr(e,t){var n=Dr(e,t);n.indexOf("\n")>0&&(n=n.split("\n").map((function(e){return a.createElement("p",null,e)}))),me.setError("error",n)}function Er(e){return function(e){return Tr().then((function(n){return n?Promise.resolve():C([me.insightsPackage],function(e){return function(t){var n;n=t.waiting?kr("Waiting for other software management operations to finish"):kr("Checking installed software"),e(n,t.can

Comment 5 Pino Toscano 2023-02-09 13:32:19 UTC
I *think* this issue could be what was fixed by
https://github.com/candlepin/subscription-manager-cockpit/pull/37
(only in subscription-manager-cockpit, fixed in 9.2)

If that's the case, you should not get the issue when doing the same steps in 9.2.

Comment 10 Jan Stavel 2023-02-10 12:04:58 UTC
this is a piece of the problematic code:

return wr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wr(e)}gr.displayName="DescriptionListDescription";var kr=t().gettext;Je().locale(t().language);var xr=or("insights-client.timer","Timer"),Yr=or("insights-client.service","Service");function Tr(){return t().spawn(["which","insights-client"],{err:"ignore"}).then((function(){return!0}),(function(){return!1}))}function Dr(e,n){return e.problem?t().message(e):n||e||void console.debug(">>>> returning undefined")}function Sr(e,t){var n=Dr(e,t);n?n.indexOf("\n")>0&&(n=n.split("\n").map((function(e){return a.createElement("p",null,e)}))):n="Unable to get any error message.",me.setError("error",n)}function Er(e){return function(e){return Tr().then((function(n){return n?Promise.resolve():C([me.insightsPackage],function(e){return function(t){var n;n=t.waiting?kr("Waiting for other software management operations to finish"):kr("Checking installed software"),e(n,t.cancel)}}(e)).then((funct


I will attach the whole code source too.

Comment 14 Jan Stavel 2023-02-10 18:01:39 UTC
I confirm that the latest patch that Pino has sent me works well. Ie. the application registers a system and just error message appears. ie. no frozen application at all.

Comment 17 Pino Toscano 2023-02-14 15:01:16 UTC
(In reply to Pino Toscano from comment #5)
> I *think* this issue could be what was fixed by
> https://github.com/candlepin/subscription-manager-cockpit/pull/37
> (only in subscription-manager-cockpit, fixed in 9.2)

In addition to this, most likely we will need also
https://github.com/candlepin/subscription-manager-cockpit/pull/46

Comment 24 Archana Pandey 2023-02-27 14:43:12 UTC
Final verification: verifying issue against subscription-manager-cockpit-1.28.36-2.el8.noarch


Beaker Test information:
                         HOSTNAME=kvm-01-guest23.lab.eng.rdu2.redhat.com
                            JOBID=7574827
                         RECIPEID=13463432
                    RESULT_SERVER=
                           DISTRO=RHEL-8.8.0-20230227.10
                     ARCHITECTURE=x86_64


[root@kvm-01-guest23 ~]# 
[root@kvm-01-guest23 ~]# rpm -qa subscription-manager-cockpit
subscription-manager-cockpit-1.28.36-2.el8.noarch
[root@kvm-01-guest23 ~]#

[root@kvm-01-guest23 ~]# rpm -qa --changelog subscription-manager | grep 2168576
- 2168576: cockpit: insights: fix spawn_error_to_string in more cases
[root@kvm-01-guest23 ~]# 

Steps to verify:

1-Register the system using cockpit, enable check box for "Connect this system to insights"

Verified : A box appears with error message instead of the application got stuck (with 'Oops' on the top bar)

Comment 29 errata-xmlrpc 2023-05-16 09:07:12 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 (subscription-manager bug fix and enhancement update), 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/RHBA-2023:2984