RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1651621 - Subscription Management from Workstation's desktop menu item requires a running cockpit service
Summary: Subscription Management from Workstation's desktop menu item requires a runni...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: 8.0
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On: 1651264
Blocks: 1635157
TreeView+ depends on / blocked
 
Reported: 2018-11-20 12:22 UTC by ignusius
Modified: 2022-05-06 04:21 UTC (History)
10 users (show)

Fixed In Version: subscription-manager-1.23.8-7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-14 01:47:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:
cdonnell: needinfo-


Attachments (Terms of Use)
Screenshot error (104.08 KB, image/png)
2018-11-20 12:22 UTC, ignusius
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1986 0 None None None 2018-12-06 17:43:24 UTC
Red Hat Issue Tracker RHELPLAN-20219 0 None None None 2022-05-06 04:21:18 UTC

Description ignusius 2018-11-20 12:22:49 UTC
Created attachment 1507402 [details]
Screenshot error

Description of problem:

Subscription Management doesn't work. 
localhost:9090/subscriptions  -  doesn't open in firefox

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


How reproducible:

Steps to Reproduce:
1. Install RHEL 8 Beta (Workstation)
2. Start GNOME 
3. Open  Subscription Management in menu

Actual results:


Expected results:


Additional info:

Comment 5 Martin Pitt 2018-11-21 09:56:34 UTC

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

Comment 6 Martin Pitt 2018-12-05 13:52:08 UTC
Unduplicating this. Bug 1651264 tracks the addition of a "cockpit-desktop" helper to cockpit-ws. With this, subscription-manager-cockpit.desktop's Exec= line should look like this:

   Exec=/usr/libexec/cockpit-desktop /cockpit/@localhost/subscriptions/index.html

This will be available in >= 184, so please adjust your dependencies accordingly.

You can test this right now on a RHEL 8 Beta desktop with

   sudo yum install https://piware.de/tmp/cockpit-ws-183.x-1.wip.el8.x86_64.rpm

and modifying the .desktop file accordingly.

Note that this still has some warts:

  * Firefox always opens the privacy statement in a second tab, which we'd like to avoid. Maybe one can pre-create some profile in the temporary home dir?
  * Ideally we would not use Firefox at all, but some webkitgtk wrapper. A few years ago, the webkit library/package shipped with a command line tool that would just pop up a window with a given URL inside it, and no other "chrome" (URL bars, etc.) behind it; but this seems to be gone?
  * Right now, cockpit-desktop supports chrome/chromium and Firefox, but the RHEL 8 beta desktop only installs firefox and webkitgtk. Do we need other browsers?
  * The polkit prompt could be more explanatory.

For these issues I'd really appreciate some help from the desktop team.

Comment 7 Martin Pitt 2018-12-05 16:52:55 UTC
https://github.com/cockpit-project/cockpit/pull/10770 proposes to use a custom WebKit view window using Python3 with GI, which addresses the first two points.

Comment 10 Martin Pitt 2018-12-06 12:18:22 UTC
Note that exception+ is only necessary after December 18. But indeed that's getting a little tight now, and the design is still in flux, so I suppose it can't hurt to ask for it now.

For those who want to play around with this: The RPM in https://bugzilla.redhat.com/show_bug.cgi?id=1651621#c6 uses Firefox. In the mentioned PR #10770 above I also added an embedded WebKit browser. If you want to try this, install this RPM instead:

    sudo yum install https://piware.de/tmp/cockpit-ws-183.x-1.wip-webkit.el8.x86_64.rpm

Comment 11 Allan Day 2018-12-07 08:17:40 UTC
I tried the embedded browser version yesterday. In general it looks good.

You're right that a better description is needed for the polkit dialog, Martin. The best I could come up with is "Authentication is required to manage subscriptions."

Another small point: I'd expect the window title to be the same as the desktop launcher - "Red Hat Subscription Manager".

Comment 12 Martin Pitt 2018-12-07 09:25:11 UTC
> You're right that a better description is needed for the polkit dialog

Unfortunately it cannot be very specific, like "manage subscriptions". The way Cockpit is designed is that it starts a cockpit-bridge process as root (which is what needs the authorization), and then the various pages can do administrative actions through that root bridge. If it would be specific, then cockpit would need to ask for authorization for every single privileged operation (even reading information and every page update), which is not practical.

So it needs to be generic, like "Authentication is required to manage your system with the Web Console" or something such. Although the "web console" term might not be obvious on the desktop... This bit applies to cockpit itself, not subscription-manager, so we can continue that discussion in bug 1651264.

> I'd expect the window title to be the same as the desktop launcher - "Red Hat Subscription Manager".

This is determined by the subscription-manager-cockpit package itself (i. e. *this* bug). I agree that this would be more consistent.

Thanks for the feedback!

Comment 13 Martin Pitt 2018-12-07 14:12:01 UTC
https://github.com/cockpit-project/cockpit/pull/10782 proposes a polkit action with a "proper" description. Allan, do you mind having a look at the strings there?

Comment 14 Stef Walter 2018-12-13 13:44:39 UTC
> Unfortunately it cannot be very specific, like "manage subscriptions". The way Cockpit is designed is that it starts a cockpit-bridge process as root ...

Actually it can be specific. But only if subscription manager was designed differently and did it's own Polkit interaction (as systemd, realmd, and other services do). You are correct though that this cannot be made specific on the Cockpit side.

Comment 16 Martin Pitt 2018-12-14 21:03:08 UTC
I uploaded cockpit 184 to RHEL 8 today which includes cockpit-desktop.

Comment 17 Jan Stavel 2019-01-09 10:21:37 UTC
It works. I have installed gnome.
I have started an application using 'Activities' and string 'Subscription' .
Activities offered me 'SubscriptionManager'.

It runs and looks good.

Regards,
Jan Stavel


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