Bug 2215043 - Image Builder can fail with custom repos returning sha1 checksums
Summary: Image Builder can fail with custom repos returning sha1 checksums
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: osbuild-composer
Version: 9.2
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Achilleas Koutsou
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-14 14:44 UTC by Christophe Besson
Modified: 2023-08-02 08:31 UTC (History)
9 users (show)

Fixed In Version: osbuild-composer-85-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github osbuild osbuild-composer pull 3514 0 None open Allow any hashing algorithm in osbuild stage inputs 2023-06-26 14:36:59 UTC
Red Hat Issue Tracker RHELPLAN-159871 0 None None None 2023-06-14 14:44:53 UTC

Description Christophe Besson 2023-06-14 14:44:02 UTC
Description of problem:
sha256 string is apparently prepended to sha1 checksums, leading to a "Unknown source reference(s)" error message from the osbuild-worker logs.

Version-Release number of selected component (if applicable):
osbuild-composer-76-2.el9_2.2.x86_64
osbuild-81-1.el9_2.1.noarch

How reproducible:
Always for the customer, not tested internally.

Steps to Reproduce:
Customer uses a custom repo and also the EPEL9 repo, in addition to RHEL ones.

Actual results:
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1358]: time="2023-06-06T17:57:13Z" level=info msg="Running job 'f8de666a-b752-4e6d-b5aa-24bbf5532979' (osbuild)\n"
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]: Traceback (most recent call last):
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]:   File "/usr/bin/osbuild", line 33, in <module>
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]:     sys.exit(load_entry_point('osbuild==81', 'console_scripts', 'osbuild')())
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]:   File "/usr/lib/python3.9/site-packages/osbuild/main_cli.py", line 119, in osbuild_cli
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]:     manifest = fmt.load(desc, index)
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]:   File "/usr/lib/python3.9/site-packages/osbuild/formats/v2.py", line 369, in load
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]:     load_pipeline(desc, index, manifest, source_refs)
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]:   File "/usr/lib/python3.9/site-packages/osbuild/formats/v2.py", line 348, in load_pipeline
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]:     load_stage(desc, index, pl, manifest, source_refs)
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]:   File "/usr/lib/python3.9/site-packages/osbuild/formats/v2.py", line 317, in load_stage
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]:     load_input(name, desc, index, stage, manifest, source_refs)
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]:   File "/usr/lib/python3.9/site-packages/osbuild/formats/v2.py", line 273, in load_input
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]:     raise ValueError(f"Unknown source reference(s) {unknown_refs}")
Jun 06 17:57:13 PRIVATEHOST osbuild-worker[1445]: ValueError: Unknown source reference(s) {'sha256:sha1:312a225e09335222d35592cdc97a1e4caa0e628e', 'sha256:sha1:1f168faf08fbd486174e5d193a244a3c4389e452', 'sha256:sha1:336a081b0fd9152
559c9e280ab3c693ae94e2629', 'sha256:sha1:195f3b153af1898a18dd9ecd9b61ee71b9d36616', 'sha256:sha1:c074b288e1bbb60680f1bcda2a036253f9ce04c4', 'sha256:sha1:1f836d38a1cb746de31906c09e999ca4b6be0f55', 'sha256:sha1:ec0cce49f9bc7f0dc5a86c365cf
a37b056496983'}

Comment 4 Ondřej Budai 2023-06-27 07:32:12 UTC
The fix was merged upstream and thus will be released as a part of RHEL 8.9 and 9.3.

Comment 11 Simon Steinbeiß 2023-07-06 08:09:10 UTC
Hi Markus,
I apologize for the late response. Almost the entire team is on PTO this week.
We'll try to get something to you today.
Cheers
Simon


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