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 1824422 - Registration to CDN can't be persisted if use rhsm in text mode with liveimg payload
Summary: Registration to CDN can't be persisted if use rhsm in text mode with liveimg ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: anaconda
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: 8.5
Assignee: Martin Kolman
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-16 08:18 UTC by Qin Yuan
Modified: 2022-05-10 13:59 UTC (History)
16 users (show)

Fixed In Version: anaconda-33.16.6.4-1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-10 13:36:52 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
logs in /tmp (1.18 MB, application/gzip)
2020-04-16 08:18 UTC, Qin Yuan
no flags Details
new-log (1.04 MB, application/gzip)
2021-09-12 12:41 UTC, cshao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RTT-3924 0 None None None 2021-10-26 12:43:17 UTC
Red Hat Issue Tracker RTT-3925 0 None None None 2021-10-26 12:43:23 UTC
Red Hat Issue Tracker RTT-3926 0 None None None 2021-10-26 12:43:27 UTC
Red Hat Issue Tracker RTT-3928 0 None None None 2021-10-26 14:43:09 UTC
Red Hat Issue Tracker RTT-3929 0 None None None 2021-10-26 14:43:15 UTC
Red Hat Issue Tracker RTT-3930 0 None None None 2021-10-26 14:43:20 UTC
Red Hat Product Errata RHBA-2022:1780 0 None None None 2022-05-10 13:37:23 UTC

Description Qin Yuan 2020-04-16 08:18:49 UTC
Created attachment 1679266 [details]
logs in /tmp

Description of problem:
Register to CDN during installation via rhsm cmd in ks file, if the installation mode is text, registration succeeds during installation, but after boot into the installed system, registration status is Unknown.

Info checked after installation finished, but before first reboot:

[anaconda root@dell-per730-34 ~]# subscription-manager list
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Virtualization Host
Product ID:     328
Version:        4.4
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         03/10/20
Ends:           03/10/21

[anaconda root@dell-per730-34 ~]# ls -al /etc/pki/entitlement/
total 152
drwxr-xr-x.  2 root root   4096 Apr 16 05:19 .
drwxr-xr-x. 11 root root   4096 Apr 16 01:19 ..
-rw-r--r--.  1 root root   3247 Apr 16 05:19 1514919162143496559-key.pem
-rw-r--r--.  1 root root 142405 Apr 16 05:19 1514919162143496559.pem

[anaconda root@dell-per730-34 ~]# ls -al /mnt/sysimage/etc/pki/entitlement/
total 0
drwxr-xr-x.  2 root root   6 Apr  2 16:37 .
drwxr-xr-x. 14 root root 196 Apr  9 09:50 ..


Info checked after first reboot:

[root@dell-per730-34 ~]# subscription-manager list
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Virtualization Host
Product ID:     328
Version:        4.4
Arch:           x86_64
Status:         Unknown
Status Details: 
Starts:         
Ends:           

Product Name:   Red Hat Enterprise Linux for x86_64
Product ID:     479
Version:        8.2
Arch:           x86_64
Status:         Unknown
Status Details: 
Starts:         
Ends:           

[root@dell-per730-34 ~]# ls -al /etc/pki/entitlement/
total 0
drwxr-xr-x.  2 root root   6 Apr  2 12:37 .
drwxr-xr-x. 14 root root 196 Apr  9 05:50 ..


Version-Release number of selected component (if applicable):
RHVH-4.4-20200409.0-RHVH-x86_64-dvd1.iso

How reproducible:
100%

Steps to Reproduce:
1. Prepare a ks:
lang en_US.UTF-8
timezone America/New_York
keyboard --vckeymap=us --xlayouts='us'
rootpw --plaintext redhat
text

liveimg --url=your-url-to-rhvh-squashfs

zerombr
clearpart --all
bootloader --location=mbr
autopart --type=thinp

rhsm --organization="your-org-id" --activation-key="your-key" --connect-to-insights --server-hostname="subscription.rhsm.stage.redhat.com" --rhsm-baseurl="https://cdn.stage.redhat.com"

%post --erroronfail
imgbase layout --init
%end

2. Install rhvh using the ks file in step1.
3. Check subscription status after first reboot.

Actual results:
1. The system is not registered.

Expected results:
1. The system should be registered.

Additional info:

Comment 1 Michal Skrivanek 2020-04-17 06:24:16 UTC
sounds like unrelated to RHV. RHEL bug?

Comment 2 Qin Yuan 2020-04-17 07:19:27 UTC
I tried out the following ks with RHEL-8.2.0-20200310.0-BaseOS-x86_64-boot.iso, subscription works fine:

text
lang en_US.UTF-8
keyboard us
rootpw redhat
timezone America/New_York
zerombr
clearpart --all --initlabel
autopart
rhsm --organization="your-id" --activation-key="your-key" --connect-to-insights --server-hostname="subscription.rhsm.stage.redhat.com" --rhsm-baseurl="https://cdn.stage.redhat.com"
%packages
vim
%end

For rhvh 4.4, rhsm cmd works fine if define graphical installation mode in ks. But in text mode, some files, like /etc/pki/entitlement/*.pem, /etc/rhsm/rhsm.conf, are not synced to /mnt/sysimage/etc/. I think it should be related to Anaconda.

Comment 9 Sandro Bonazzola 2021-09-07 12:38:32 UTC
Does this still reproduce?

Comment 10 Qin Yuan 2021-09-08 02:16:34 UTC
Chen will test it and provide the results.

Comment 11 cshao 2021-09-08 03:40:46 UTC
> Does this still reproduce?

Yes, still can reproduce this issue on RHVH-4.4-20210903.0-RHVH-x86_64-dvd1.iso.

Info checked after first reboot:
# subscription-manager list
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Virtualization Host
Product ID:     328
Version:        4
Arch:           x86_64
Status:         Unknown
Status Details: 
Starts:         
Ends:           

# ls -al /etc/pki/entitlement/
total 0
drwxr-xr-x.  2 root root   6 Jun  8 21:11 .
drwxr-xr-x. 16 root root 231 Sep  3 10:36 ..

Comment 12 Jiri Konecny 2021-09-10 14:51:18 UTC
Hi,

could you please provide us new logs from the installation. I would like to check if you are using Anaconda before or after rebase.

Comment 14 cshao 2021-09-12 12:41:11 UTC
Created attachment 1822502 [details]
new-log

Comment 18 Jan Stodola 2021-10-08 12:52:59 UTC
And just a note, that I was not able to reproduce this bug when installing from an rpm repository - "inst.repo=http://..." on the kernel command line and no "liveimg" in kickstart.

Comment 20 RHEL Program Management 2021-10-16 07:27:07 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 25 Jan Stodola 2021-10-26 14:02:41 UTC
RHEL-9 clone: bug 2017428

Comment 26 Martin Kolman 2021-11-12 17:39:27 UTC
Turns out this is caused by installation task queue being populated before background processing threads (including the subscription thread) can finish processing. As a result the subscription token transfer task gets scheduled in "do nothing" mode as at the time it is added to the task queue, the system is not yet subscribed.

This has been fixed by first waiting for all background processing threads to finish and only then start to populate installation task queue.
Thanks a lot to Vendula Poncova for help tracking down the root cause as well as to Honza Stodola for helping me test the fix! :)

PR with fix: https://github.com/rhinstaller/anaconda/pull/3704

Comment 28 Jan Stodola 2021-11-29 16:51:31 UTC
Verified with anaconda-33.16.6.4-1.el8, the installed system was registered after both GUI and TUI kickstart installations with liveimg:

[root@localhost ~]# subscription-manager list
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux for x86_64 Beta
Product ID:     486
Version:        8.6 Beta
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         16.12.2020
Ends:           15.12.2021

[root@localhost ~]#


Config files were transferred to the installed system:
...
15:43:43,516 WARNING org.fedoraproject.Anaconda.Modules.Subscription:INFO:anaconda.threading:Running Thread: AnaTaskThread-TransferSubscriptionTokensTask-1 (140650179622656)
15:43:43,517 WARNING org.fedoraproject.Anaconda.Modules.Subscription:DEBUG:anaconda.modules.subscription.installation:subscription: transferring syspurpose file
15:43:43,529 WARNING org.fedoraproject.Anaconda.Modules.Subscription:DEBUG:anaconda.modules.subscription.installation:subscription: transferring entitlement keys
15:43:43,532 WARNING org.fedoraproject.Anaconda.Modules.Subscription:DEBUG:anaconda.modules.subscription.installation:subscription: transferring RHSM consumer key
15:43:43,532 WARNING org.fedoraproject.Anaconda.Modules.Subscription:DEBUG:anaconda.modules.subscription.installation:subscription: transferring RHSM consumer cert
15:43:43,533 WARNING org.fedoraproject.Anaconda.Modules.Subscription:DEBUG:anaconda.modules.subscription.installation:subscription: transferring RHSM repo file
15:43:43,535 WARNING org.fedoraproject.Anaconda.Modules.Subscription:DEBUG:anaconda.modules.subscription.installation:subscription: transferring RHSM config file
15:43:43,536 WARNING org.fedoraproject.Anaconda.Modules.Subscription:INFO:anaconda.threading:Thread Done: AnaTaskThread-TransferSubscriptionTokensTask-1 (140650179622656)
...

Also successfully tested an interactive GUI installation with registration and with liveimg specified as the only command in the kickstart file.

The "CDN / kickstart registration / GUI" and "CDN / kickstart registration / TUI" test cases will be executed as part of the final verification due to infrastructure issues.

Comment 32 Jan Stodola 2021-12-02 09:21:34 UTC
anaconda-33.16.6.4-1.el8 is included in RHEL-8.6.0-20211201.1, moving to VERIFIED.

Comment 34 errata-xmlrpc 2022-05-10 13:36:52 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-2022:1780


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