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 2057472 - pyanaconda.modules.common.errors.installation.SubscriptionTokenTransferError: RHSM entitlement keys (from /etc/pki/entitlement) are missing.
Summary: pyanaconda.modules.common.errors.installation.SubscriptionTokenTransferError:...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: anaconda
Version: 9.1
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Martin Kolman
QA Contact: Release Test Team
URL:
Whiteboard: abrt_hash:4658b62fcec65746fe6b356b302...
: 2099419 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-23 12:58 UTC by Timothée Ravier
Modified: 2023-05-09 08:35 UTC (History)
3 users (show)

Fixed In Version: anaconda-34.25.2.7-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2127072 (view as bug list)
Environment:
Last Closed: 2023-05-09 07:35:38 UTC
Type: ---
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
File: anaconda-tb (1.78 MB, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: anaconda.log (57.63 KB, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: dbus.log (3.56 KB, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: dnf.librepo.log (3.07 KB, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: environ (702 bytes, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: hawkey.log (180 bytes, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: lorax-packages.log (25.59 KB, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: lsblk_output (2.58 KB, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: lvm.log (273.62 KB, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: nmcli_dev_list (1.52 KB, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: os_info (624 bytes, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: program.log (20.89 KB, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: storage.log (166.18 KB, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: syslog (703.37 KB, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details
File: packaging.log (564.24 KB, text/plain)
2022-02-23 12:58 UTC, Timothée Ravier
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-113282 0 None None None 2022-02-23 13:11:22 UTC
Red Hat Issue Tracker RTT-5009 0 None None None 2022-11-15 09:04:30 UTC
Red Hat Issue Tracker RTT-5010 0 None None None 2022-11-15 09:04:36 UTC
Red Hat Product Errata RHBA-2023:2223 0 None None None 2023-05-09 07:35:54 UTC

Description Timothée Ravier 2022-02-23 12:58:25 UTC
Description of problem:
Standard Workstation installation. Will include further information in a followup comment.

Version-Release number of selected component:
anaconda-34.25.0.26

The following was filed automatically by anaconda:
anaconda 34.25.0.26 exception report
Traceback (most recent call first):
  File "/usr/lib/python3.9/site-packages/dasbus/client/handler.py", line 497, in _handle_method_error
    raise exception from None
  File "/usr/lib/python3.9/site-packages/dasbus/client/handler.py", line 477, in _get_method_reply
    return self._handle_method_error(error)
  File "/usr/lib/python3.9/site-packages/dasbus/client/handler.py", line 444, in _call_method
    return self._get_method_reply(
  File "/usr/lib64/python3.9/site-packages/pyanaconda/modules/common/task/__init__.py", line 46, in sync_run_task
    task_proxy.Finish()
  File "/usr/lib64/python3.9/site-packages/pyanaconda/installation_tasks.py", line 527, in run_task
    sync_run_task(self._task_proxy)
  File "/usr/lib64/python3.9/site-packages/pyanaconda/installation_tasks.py", line 496, in start
    self.run_task()
  File "/usr/lib64/python3.9/site-packages/pyanaconda/installation_tasks.py", line 311, in start
    item.start()
  File "/usr/lib64/python3.9/site-packages/pyanaconda/installation_tasks.py", line 311, in start
    item.start()
  File "/usr/lib64/python3.9/site-packages/pyanaconda/installation_tasks.py", line 311, in start
    item.start()
  File "/usr/lib64/python3.9/site-packages/pyanaconda/installation.py", line 396, in run_installation
    queue.start()
  File "/usr/lib64/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.9/site-packages/pyanaconda/threading.py", line 275, in run
    threading.Thread.run(self)
pyanaconda.modules.common.errors.installation.SubscriptionTokenTransferError: RHSM entitlement keys (from /etc/pki/entitlement) are missing.

Additional info:
addons:         com_redhat_kdump, org_fedora_oscap
cmdline:        /usr/bin/python3  /sbin/anaconda
cmdline_file:   BOOT_IMAGE=vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=RHEL-9-1-0-BaseOS-x86_64 quiet
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         5.14.0-58.el9.x86_64
product:        Red Hat Enterprise Linux 9
release:        Red Hat Enterprise Linux release 9.1 Beta (Plow)
release_type:   pre-release
type:           anaconda
version:        9.1

Comment 1 Timothée Ravier 2022-02-23 12:58:28 UTC
Created attachment 1862951 [details]
File: anaconda-tb

Comment 2 Timothée Ravier 2022-02-23 12:58:30 UTC
Created attachment 1862952 [details]
File: anaconda.log

Comment 3 Timothée Ravier 2022-02-23 12:58:31 UTC
Created attachment 1862953 [details]
File: dbus.log

Comment 4 Timothée Ravier 2022-02-23 12:58:32 UTC
Created attachment 1862954 [details]
File: dnf.librepo.log

Comment 5 Timothée Ravier 2022-02-23 12:58:34 UTC
Created attachment 1862955 [details]
File: environ

Comment 6 Timothée Ravier 2022-02-23 12:58:36 UTC
Created attachment 1862956 [details]
File: hawkey.log

Comment 7 Timothée Ravier 2022-02-23 12:58:37 UTC
Created attachment 1862957 [details]
File: lorax-packages.log

Comment 8 Timothée Ravier 2022-02-23 12:58:39 UTC
Created attachment 1862958 [details]
File: lsblk_output

Comment 9 Timothée Ravier 2022-02-23 12:58:40 UTC
Created attachment 1862959 [details]
File: lvm.log

Comment 10 Timothée Ravier 2022-02-23 12:58:42 UTC
Created attachment 1862960 [details]
File: nmcli_dev_list

Comment 11 Timothée Ravier 2022-02-23 12:58:43 UTC
Created attachment 1862961 [details]
File: os_info

Comment 12 Timothée Ravier 2022-02-23 12:58:45 UTC
Created attachment 1862962 [details]
File: program.log

Comment 13 Timothée Ravier 2022-02-23 12:58:47 UTC
Created attachment 1862963 [details]
File: storage.log

Comment 14 Timothée Ravier 2022-02-23 12:58:48 UTC
Created attachment 1862964 [details]
File: syslog

Comment 15 Timothée Ravier 2022-02-23 12:58:50 UTC
Created attachment 1862965 [details]
File: packaging.log

Comment 16 Timothée Ravier 2022-02-23 13:00:27 UTC
I registered this system using a personal free developer Red Hat account during the installation process, which might be the source of this issue.

Comment 17 Timothée Ravier 2022-02-23 15:07:55 UTC
I tried again without registering my system during the installation and it worked this I highly suspect that the bug is in this part.

Comment 18 Jiri Konecny 2022-03-04 10:51:36 UTC
Hi Martin, could you please take a look on this?

Comment 19 Martin Kolman 2022-03-18 18:11:16 UTC
(In reply to Timothée Ravier from comment #16)
> I registered this system using a personal free developer Red Hat account
> during the installation process, which might be the source of this issue.

So I've tried the same - using a free developer account on a latest RHEL 9 nightly image and all worked fine. Anaconda version on the image I used: 34.25.0.28

There have been some subscription related fixes in anaconda 34.25.0.27 & it now requires a new subscription-manager version which was released in the meantime.

So it might been either a subscription infra hiccup or possibly something that was fixed by the anaconda or subscription manager changes.

Could you perhaps try again using the same account on a newer installation image with anaconda >= 34.25.0.28 ? Anaconda version can be easily seen on the TTY1 once the installation image is booted. Thanks in advance! :)

Comment 20 Jiri Konecny 2022-03-24 13:04:36 UTC
Thanks a lot Martin for testing this.

Jan based on comment 19 this seems to be already resolved. Do you or the reporter want to do re-testing of this issue before we will close it?

Comment 21 Jan Stodola 2022-03-24 13:10:39 UTC
Timothée,
can you please confirm if you are still able to reproduce this bug using RHEL-9.1, RHEL-9.0 and/or RHEL-8.5?
If the problem still exists, could you please install the system without registering during the installation process, register the system after the system is installed and check if you are able to install any package from CDN? I just want to understand better if the problem is in anaconda, subscription-manager, or if the account is miss-configured somehow.

Comment 22 Timothée Ravier 2022-04-19 16:55:07 UTC
Will be doing a new installation to verify this is fixed.

Comment 23 Timothée Ravier 2022-04-19 17:40:34 UTC
I've completed an installation with 34.25.1.1-1 nd I've got the same issue. Will make an install without registering.

Comment 24 Timothée Ravier 2022-04-19 18:25:21 UTC
I've done a new installation and registered the system later and did not have errors during installation. I can not get a subscription working but this is maybe because I'm used the beta repos for installation?
I've also realized that my developer subscription had expired when I tried re-installing again. This might be part of the issue. However, failing before the installation is started would be better than after in this case if this is the real issue.

Comment 25 Jan Stodola 2022-05-18 15:15:43 UTC
Martine,
do you know if it's possible to detect an expired subscription? I would assume that it is not possible to register and use the CDN repository with an expired subscription at all... I do not have any expired subscription to confirm the behavior.

Comment 26 Martin Kolman 2022-05-27 14:41:26 UTC
(In reply to Jan Stodola from comment #25)
> Martine,
> do you know if it's possible to detect an expired subscription? I would
> assume that it is not possible to register and use the CDN repository with
> an expired subscription at all... I do not have any expired subscription to
> confirm the behavior.

So looking at the logs & comments I think this is what happens:

- a valid Red Hat account is used
- but the account does not have any subscriptions that can be attached
- a DVD installation image is used, so CDN is not required for the installation, which would need a valid subscription and would uncover something is wrong earlier

On a timeline:

1) user registers, username and password is valid
2) auto-attach runs - and succeeds in attaching 0 subscriptions (!)
3) installation is started from the package repo on the DVD
4) then when Anaconda attempts to transfer the subscription related certificates (so that the subscription can be used also after installation) it crashes as there are no certificates due to 0 subscriptions being attached

To fix this I think we need to better validate if subscription attempt was actually properly successful. I guess we could check if the expected certificates exist & fail installation if they don't, but ideally we should get this information via the RHSM DBus API or even open a RFE/bug for RHSM to fail the attach attempt if there are no valid subscriptions yet account creds are fine.

Comment 27 Jan Stodola 2022-06-21 14:37:02 UTC
*** Bug 2099419 has been marked as a duplicate of this bug. ***

Comment 30 Jan Stodola 2022-09-15 09:34:40 UTC
Also reported as a rhel-8 bug 2127072

Comment 32 Martin Kolman 2023-01-25 14:56:25 UTC
PR: https://github.com/rhinstaller/anaconda/pull/4527

Comment 34 Jan Stodola 2023-02-07 13:10:58 UTC
Tested with anaconda-34.25.2.7-1.el9, it was possible to finish the installation when an account with no subscriptions was used to register the system. The installer displayed an appropriate message.
Tested by manual graphical and kickstart text-mode installations.

Marking as Verified:Tested

Comment 37 Jan Stodola 2023-02-14 12:51:08 UTC
Checked that anaconda-34.25.2.7-1.el9 is in nightly compose RHEL-9.2.0-20230209.13

Moving to VERIFIED

Comment 39 errata-xmlrpc 2023-05-09 07:35:38 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 (anaconda 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:2223


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