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 2169429 - Handle upgrades to rhel9 with layered packages
Summary: Handle upgrades to rhel9 with layered packages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rpm-ostree
Version: 8.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: RHCOS SST
QA Contact: HuijingHei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-13 15:07 UTC by Colin Walters
Modified: 2023-05-16 09:15 UTC (History)
2 users (show)

Fixed In Version: rpm-ostree-2022.10.112.g3d0ac35b-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-16 08:24:00 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-148486 0 None None None 2023-02-13 15:08:13 UTC
Red Hat Product Errata RHBA-2023:2759 0 None None None 2023-05-16 08:24:15 UTC

Description Colin Walters 2023-02-13 15:07:13 UTC
Apply https://github.com/coreos/rpm-ostree/pull/4302 so that we handle upgrades to RHEL9 (with the sqlite db backend) in the case where there are layered/overridden packages.

Comment 1 Colin Walters 2023-02-14 13:08:06 UTC
To verify this basically:

Provision a RHEL8 rpm-ostree system (RHCOS, I'd assume Edge too), then layer or override a package (rpm-ostree install etc.).

Then rebase to RHEL9.

Without this change, you should get a failure to write the rpmdb.  With this patch, the rebase should work.

Comment 3 HuijingHei 2023-02-15 07:09:03 UTC
Thanks Colin for the detail instructions.

Verify passed with rpm-ostree-2022.10.112.g3d0ac35b-2.el8 on RHCOS 412.86.202302080410-0 using the steps in Comment 2

Comment 4 Xiaofeng Wang 2023-02-16 12:41:44 UTC
Verified on RHEL for Edge 8.8 to 9.2 with rpm-ostree-2022.10.112.g3d0ac35b-2.el8.rpm.

$ sudo rpm-ostree rebase rhel-edge:rhel/9/x86_64/edge'
2901 metadata, 19309 content objects fetched; 776884 KiB transferred in 22 seconds; 1.3 GB content written
Writing objects: 5...done
Checking out tree ffa81a8...done
Rewriting rpmdb back to host bdb...done
No enabled rpm-md repositories.
Importing rpm-md...done
Resolving dependencies...done
Relabeling...done
Checking out packages...done
Running pre scripts...done
Running post scripts...done
Running posttrans scripts...done
Writing rpmdb...done
Writing OSTree commit...done
Staging deployment...done
Freed: 60.8 MB (pkgcache branches: 1)

Comment 8 HuijingHei 2023-02-27 02:11:13 UTC
Verify passed using rpm-ostree-2022.10.112.g3d0ac35b-3.el8 from RHCOS 412.86.202302231508-0 to centos-stream-coreos-9:4.12-x86_64

[core@cosa-devsh ~]$ rpm -q rpm-ostree
rpm-ostree-2022.10.112.g3d0ac35b-3.el8.x86_64

[root@cosa-devsh ~]# rpm-ostree override remove strace
Checking out tree 2203ba2... done
Resolving dependencies... done
Applying 1 override
Processing packages... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Removed:
  strace-5.13-4.el8.x86_64
Use "rpm-ostree override reset" to undo overrides
Run "systemctl reboot" to start a reboot
[root@cosa-devsh ~]# rpm-ostree status
State: idle
Deployments:
  2203ba2dd29bbde665aed2c18107029f154e87b87fb7c46adf5da2f799a4ad32
                  Version: 412.86.202302231508-0 (2023-02-23T15:12:01Z)
                     Diff: 1 removed
      RemovedBasePackages: strace 5.13-4.el8

* 2203ba2dd29bbde665aed2c18107029f154e87b87fb7c46adf5da2f799a4ad32
                  Version: 412.86.202302231508-0 (2023-02-23T15:12:01Z)

[root@cosa-devsh ~]# rpm-ostree rebase --experimental ostree-unverified-registry:quay.io/okd/centos-stream-coreos-9:4.12-x86_64
[root@cosa-devsh ~]# systemctl reboot
[core@cosa-devsh ~]$ rpm-ostree status
State: idle
Deployments:
● ostree-unverified-registry:quay.io/okd/centos-stream-coreos-9:4.12-x86_64
                   Digest: sha256:3a9d3dfc48c6ad82eab26334fa4cfa2975f54c6842a7c42a48af767aa553835f
                  Version: 412.9.202302230439-0 (2023-02-27T01:50:47Z)
      RemovedBasePackages: strace 5.18-2.el9

  2203ba2dd29bbde665aed2c18107029f154e87b87fb7c46adf5da2f799a4ad32
                  Version: 412.86.202302231508-0 (2023-02-23T15:12:01Z)

Comment 10 errata-xmlrpc 2023-05-16 08:24:00 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 (rpm-ostree 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:2759


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