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 2160557 - backport https://github.com/ostreedev/ostree/pull/2519/commits/cb731294837736e957ee595ce11ab115277dbb36 [rhel-8.6.0.z]
Summary: backport https://github.com/ostreedev/ostree/pull/2519/commits/cb731294837736...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ostree
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Colin Walters
QA Contact: HuijingHei
URL:
Whiteboard:
Depends On: 2160075
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-12 20:25 UTC by RHEL Program Management Team
Modified: 2023-03-07 13:57 UTC (History)
4 users (show)

Fixed In Version: ostree-2022.1-3.el8_6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2160075
Environment:
Last Closed: 2023-03-07 13:54:59 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-144991 0 None None None 2023-01-12 20:25:53 UTC
Red Hat Product Errata RHBA-2023:1135 0 None None None 2023-03-07 13:55:00 UTC

Comment 4 Colin Walters 2023-01-13 13:40:30 UTC
There are a few levels of verifying this bug.  First, we'll need to queue an update.  The simplest is e.g.

rpm-ostree kargs --append=foo=bar


Now, to synthesize the failure mode:

# Use strace 

We can use e.g. strace to cause the `sync` system call to hang, like `strace --inject=sync:delay_exit=1000s ...`; simplest is to `systemctl edit ostree-finalize-staged.service, then 

[Service]
ExecStop=
ExecStop=strace --inject=sync:delay_exit=400s ostree admin finalize-staged

or so.  This will cause systemd to time out and kill the service when we do `systemctl reboot`.  The patched ostree should successfully apply the karg, previous one should not.

# Set up a network filesystem that fails to sync

Here you could set up e.g. a NFS mount, then use a firewall rule or other change to cause the remote NFS server to become unreachable and hence for sync() to fail

# Set up OpenShift with Ceph (ODS)

This is obviously the full real test, but much more involved.

Comment 5 HuijingHei 2023-01-16 08:45:14 UTC
Verify passed with ostree-2022.1-3.el8_6.x86_64 on rhcos-411.86.202301102150-0-qemu.x86_64.qcow2

1) Test with old ostree-2022.1-2.el8.x86_64 using strace, reboot and check the karg is not applied

a) Setup
# rpm -q ostree
ostree-2022.1-2.el8.x86_64
# rpm-ostree kargs --append=foo=bar
# systemctl edit ostree-finalize-staged.service, then add

[Service]
ExecStop=
ExecStop=strace --inject=sync:delay_exit=400s ostree admin finalize-staged

b) Reboot and check the karg is not applied
# systemctl reboot

[root@cosa-devsh ~]# cat /proc/cmdline | grep foo
[root@cosa-devsh ~]# rpm-ostree status
State: idle
Warning: failed to finalize previous deployment
         ostree-finalize-staged.service: Failed with result 'timeout'.
         check `journalctl -b -1 -u ostree-finalize-staged.service`
Deployments:
* 31180811d9f312d82de7f243665176ee2d6a55cd5b4d0d59d869a49ec6623815
                   Version: 411.86.202301102150-0 (2023-01-10T21:53:17Z)


2) Upgrade to ostree-2022.1-3.el8_6.x86_64 with the same steps, reboot and check the karg is applied 
# rpm-ostree override replace ostree-2022.1-3.el8_6.x86_64.rpm ostree-libs-2022.1-3.el8_6.x86_64.rpm ostree-grub2-2022.1-3.el8_6.x86_64.rpm
# reboot

a) Setup
# rpm-ostree kargs --append=foo=bar
# systemctl edit ostree-finalize-staged.service, then add

[Service]
ExecStop=
ExecStop=strace --inject=sync:delay_exit=400s ostree admin finalize-staged

b) Reboot and check the karg is applied
# systemctl reboot

[root@cosa-devsh ~]# cat /proc/cmdline | grep foo
BOOT_IMAGE=(hd0,gpt3)/ostree/rhcos-bd733914976ee5d3d4dac5da3a0e10a10c75d2ecd289fc1cfe1f70aeb0e88db6/vmlinuz-4.18.0-372.36.1.el8_6.x86_64 random.trust_cpu=on console=tty0 console=ttyS0,115200n8 ignition.platform.id=qemu ostree=/ostree/boot.1/rhcos/bd733914976ee5d3d4dac5da3a0e10a10c75d2ecd289fc1cfe1f70aeb0e88db6/0 root=UUID=544a3180-8c4e-471c-86bd-c26724bb11a7 rw rootflags=prjquota boot=UUID=50910abb-dc78-46b2-bad7-f11ff8a51015 foo=bar

Comment 11 errata-xmlrpc 2023-03-07 13:54:59 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 (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:1135


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