Bug 1803858

Summary: Unable to get the register to insights server option when insights packages are not installed - cockpit should install PackageKit by default
Product: Red Hat Enterprise Linux 8 Reporter: Rehana <redakkan>
Component: cockpitAssignee: Martin Pitt <mpitt>
Status: CLOSED ERRATA QA Contact: Rehana <redakkan>
Severity: unspecified Docs Contact:
Priority: high    
Version: 8.2CC: cdonnell, csnyder, jhnidek, jstavel, mpitt
Target Milestone: rcKeywords: Regression, Triaged
Target Release: 8.2   
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: 2020-04-28 16:54:53 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
register screen none

Description Rehana 2020-02-17 15:43:47 UTC
Description of problem:


Version-Release number of selected component (if applicable):
# subscription-manager version
server type: This system is currently not registered.
subscription management server: 2.9.21-1
subscription management rules: 5.37
subscription-manager: 1.26.10-1.el8

How reproducible:
always

Steps to Reproduce:
1.Unable to get the register to insights server option 
2.
3.

Actual results:
Did not have the insights packages installed

Expected results:
It would really nice to have a capability to pull the insights rpm automatically if not already installed and help the customer to get registered to insights server

Additional info:

Comment 5 Rehana 2020-02-20 10:13:23 UTC
Created attachment 1664306 [details]
register screen

Comment 7 Martin Pitt 2020-02-24 12:37:47 UTC
> We believe that PackageKit RPM should be automatically installed, when Cockpit RPM is installed.

Right, that's the intention. The "cockpit" metapackage has "Recommends: cockpit-packagekit", so a default install which has "cockpit" installed should also have cockpit-packagekit (and thus its dependency PackageKit). It seems in your install scenario, Recommends are somehow disabled? Did you specify `--setopt=install_weak_deps=False` anywhere? Or how exactly did you install your test machine?

If disabling Recommends: is legit (maybe that's even the default in RHEL? although at first sight this sounds really bad, you'd break a lot of intended use cases), then we'd either need to promote cockpit's Recommends: to Requires:, or make subscription-manager-cockpit Requires: PackageKit

Comment 8 Martin Pitt 2020-02-24 12:43:30 UTC
@Rehana, as you reported the bug, can you please answer my qusetion about how exactly you installed that test machine?

As per https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/packaging_and_distributing_software/new-features-in-rhel-8_packaging-and-distributing-software , disabling weak dependencies is meant for minimal installations (and a minimal RHEL install doesn't include cockpit anyway), but a default install should certainly have them. 

Thanks!

Comment 9 Rehana 2020-02-24 12:47:19 UTC
(In reply to Martin Pitt from comment #8)
> @Rehana, as you reported the bug, can you please answer my qusetion about
> how exactly you installed that test machine?
> 
> As per
> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/
> html/packaging_and_distributing_software/new-features-in-rhel-8_packaging-
> and-distributing-software , disabling weak dependencies is meant for minimal
> installations (and a minimal RHEL install doesn't include cockpit anyway),
> but a default install should certainly have them. 
> 
> Thanks!

Hi Martin, 

The system i used was a beaker machine and later manually installed cockpit on it using `dnf install cockpit* -y `

It should easily reproducible by reserving a plain new RHEL8.2 system with nightly and then install cockpit manually.

Please let me know if you need any more details.

thanks,
Rehana

Comment 10 Martin Pitt 2020-02-24 12:56:15 UTC
Argh, thanks -- indeed the Recommends: cockpit-packagekit doesn't exist on a RHEL build, it's conditionalized. I'll fix that.

Comment 11 Martin Pitt 2020-02-24 13:58:52 UTC
I sent the upstream fix to https://github.com/cockpit-project/cockpit/pull/13604 and I have a fix ready for RHEL 8.2. Scratch build at https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=26712353

I'll upload this as soon as I get qe-ack.

Comment 12 Martin Pitt 2020-02-24 14:22:19 UTC
Marking as regression - RHEL 8.0' and 8.1's cockpit metapackage still did have the correct Recommends, I just botched it in an earlier 8.2 upload.

Comment 13 Martin Pitt 2020-02-24 15:38:14 UTC
The dependencies are fixed by cockpit 211.2-2, in https://errata.devel.redhat.com/errata/details/48366 . I just can't add this bugzilla to that erratum, as it's already attached to a different erratum.

Comment 15 Rehana 2020-03-24 13:23:46 UTC
Retesting with :

 DISTRO=RHEL-8.2.0-20200310.0
 ARCHITECTURE=x86_64

[root@kvm-07-guest05 ~]# yum install cockpit -y
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:19:12 ago on Tue 24 Mar 2020 08:47:24 AM EDT.
Dependencies resolved.
================================================================================
 Package                      Arch   Version             Repository        Size
================================================================================
Installing:
 cockpit                      x86_64 211.2-2.el8         beaker-BaseOS     71 k
Installing dependencies:
 PackageKit                   x86_64 1.1.12-4.el8        beaker-AppStream 599 k
 PackageKit-glib              x86_64 1.1.12-4.el8        beaker-AppStream 140 k
<snip>

Notice that now packagekit dependencies are installed by default

subscription management server: 2.9.21-1
subscription management rules: 5.37
subscription-manager: 1.26.14-1.el8
[root@kvm-07-guest05 ~]# rpm -qa insights*
[root@kvm-07-guest05 ~]# 

Lets open cockpit and try to register to insights server (using stage server )

1) Provide credentials and click "Connect this system to Red Hat Insights " option

Results :
Noticed that insights-client package was automatically installed and then the system was successfully registered to insights server 
[root@kvm-07-guest05 ~]# rpm -qa ins*
insights-client-3.0.13-1.el8.noarch

[root@kvm-07-guest05 ~]# cat /etc/insights-client/machine-id 
7733ddca-1ca1-48b4-8009-94c8aac88173

Based on the above observations , moving the bug to Verified.

Comment 17 errata-xmlrpc 2020-04-28 16:54: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, 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-2020:1849