Bug 2153460

Summary: Fix container image GC with package layering
Product: Red Hat Enterprise Linux 9 Reporter: Colin Walters <walters>
Component: rpm-ostreeAssignee: Colin Walters <walters>
Status: CLOSED ERRATA QA Contact: HuijingHei <hhei>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.2CC: aaradhak, mnguyen
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpm-ostree-2022.19-3.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 07:23:50 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:

Description Colin Walters 2022-12-14 16:16:21 UTC
This is a followup fix to https://bugzilla.redhat.com/show_bug.cgi?id=2144586 - see https://github.com/ostreedev/ostree-rs-ext/pull/432 

To implement this we'll rebase to 2022.18.

Comment 2 Michael Nguyen 2022-12-15 00:44:53 UTC
@walters can we use the same verification steps as https://bugzilla.redhat.com/show_bug.cgi?id=2144586#c2 but do some client side package layering before?

Comment 3 Colin Walters 2022-12-15 13:32:26 UTC

Yep, exactly. There's also some test code changes that landed in https://github.com/coreos/rpm-ostree/pull/4217 that cover this upstream (but we're not running that downstream yet...we should). Joseph is looking at something similar to add to fedora-coreos-config.

Comment 4 Michael Nguyen 2022-12-16 16:01:54 UTC
Pre-verified on SCOS with rpm-ostree-2022.16-2.el9.x86_64

[core@cosa-devsh ~]$ rpm -q rpm-ostree
rpm-ostree-2022.16-2.el9.x86_64
[core@cosa-devsh ~]$ sudo rpm-ostree install wget
[core@cosa-devsh ~]$ sudo systemctl reboot
[core@cosa-devsh ~]$ sudo rpm-ostree status
State: idle
Deployments:
* c72cba4693ba562ee9420fc2be349842aa049a4c1419cf82544ac2fd1ebcca05
                  Version: 413.9.202212161539-0 (2022-12-16T15:42:10Z)
          LayeredPackages: wget

  c72cba4693ba562ee9420fc2be349842aa049a4c1419cf82544ac2fd1ebcca05
                  Version: 413.9.202212161539-0 (2022-12-16T15:42:10Z)

[core@cosa-devsh ~]$ sudo rpm-ostree rebase --experimental ostree-unverified-registry:registry.ci.openshift.org/coreos/hhei-rhcos-test:9

[core@cosa-devsh ~]$ rpm-ostree status
State: idle
Deployments:
  ostree-unverified-registry:registry.ci.openshift.org/coreos/hhei-rhcos-test:9
                   Digest: sha256:19107c4cb3793d4284afd271aaa8d3a8f532a5771b8b9de75034baa67fbb859f
                  Version: 413.90.202211240936-0 (2022-12-16T15:50:47Z)
                     Diff: 24 upgraded, 263 downgraded, 6 removed, 6 added
          LayeredPackages: wget

* c72cba4693ba562ee9420fc2be349842aa049a4c1419cf82544ac2fd1ebcca05
                  Version: 413.9.202212161539-0 (2022-12-16T15:42:10Z)
          LayeredPackages: wget

  c72cba4693ba562ee9420fc2be349842aa049a4c1419cf82544ac2fd1ebcca05
                  Version: 413.9.202212161539-0 (2022-12-16T15:42:10Z)


[core@cosa-devsh ~]$ sudo rpm-ostree rebase --experimental ostree-unverified-registry:registry.ci.openshift.org/coreos/hhei-rhcos-test:9-new
[core@cosa-devsh ~]$ rpm-ostree status    
State: idle
Deployments:
  ostree-unverified-registry:registry.ci.openshift.org/coreos/hhei-rhcos-test:9-new
                   Digest: sha256:366e8220c926e6f1aa42f8979307af7bcb61a89a65a2f845349b02dbf0a326a9
                  Version: 413.90.202211241020-0 (2022-12-16T15:51:40Z)
                     Diff: 24 upgraded, 260 downgraded, 6 removed, 6 added
          LayeredPackages: wget

* c72cba4693ba562ee9420fc2be349842aa049a4c1419cf82544ac2fd1ebcca05
                  Version: 413.9.202212161539-0 (2022-12-16T15:42:10Z)
          LayeredPackages: wget

  c72cba4693ba562ee9420fc2be349842aa049a4c1419cf82544ac2fd1ebcca05
                  Version: 413.9.202212161539-0 (2022-12-16T15:42:10Z)


[core@cosa-devsh ~]$ ostree container image list --repo=/ostree/repo
docker://registry.ci.openshift.org/coreos/hhei-rhcos-test:9-new

Comment 9 HuijingHei 2023-01-18 13:17:23 UTC
Verify passed with rpm-ostree-2022.19-3.el9.x86_64 on local rhcos built using internal nightly 9.2, with the same steps in comment 4

Comment 11 errata-xmlrpc 2023-05-09 07:23:50 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/RHEA-2023:2164