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 2178206 - Showing blueprints with ServicesCustomization panics with "runtime error: comparing uncomparable type"
Summary: Showing blueprints with ServicesCustomization panics with "runtime error: com...
Keywords:
Status: CLOSED DUPLICATE of bug 2137364
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: osbuild-composer
Version: 8.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Image Builder team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-14 14:24 UTC by idiez
Modified: 2023-03-30 11:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-03-30 11:52:15 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-151782 0 None None None 2023-03-14 14:25:43 UTC

Description idiez 2023-03-14 14:24:56 UTC
Description of problem:

Trying to show a blueprint with
[customizations.services]
enabled = ["microshift"]

makes osbuild-composer panic with "runtime error: comparing uncomparable type blueprint.ServicesCustomization"

Version-Release number of selected component (if applicable):

RHEL 8.7

[root@citest-1 microshift-local]# rpm -qa | grep osbuild
osbuild-65-1.el8.noarch
osbuild-composer-worker-62-3.el8_7.x86_64
osbuild-composer-core-62-3.el8_7.x86_64
osbuild-selinux-65-1.el8.noarch
osbuild-ostree-65-1.el8.noarch
osbuild-luks2-65-1.el8.noarch
osbuild-composer-62-3.el8_7.x86_64
osbuild-composer-dnf-json-62-3.el8_7.x86_64
python3-osbuild-65-1.el8.noarch
osbuild-lvm2-65-1.el8.noarch

How reproducible: 

Always.

Steps to Reproduce:
1. Create the following blueprint

name = "minimal-microshift"

description = ""
version = "0.0.1"
modules = []
groups = []

[[packages]]
name = "microshift"
version = "4.12.0-1"

[customizations.services]
enabled = ["microshift"]

2. Push the blueprint: composer-cli blueprints push the-blueprint
3. Try to show the blueprint: composer-cli blueprints show minimal-microshift

Actual results:

[root@citest-1 microshift-local]# composer-cli blueprints show minimal-microshift
ERROR: Show Error: Get "http://localhost/api/v1/blueprints/info/minimal-microshift?format=toml": EOF

journalctl -f

Mar 13 09:11:38 citest-1 osbuild-composer[1776]: 2023/03/13 09:11:38 GET /api/v1/blueprints/info/minimal-microshift
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: 2023/03/13 09:11:38 http: panic serving @: runtime error: comparing uncomparable type blueprint.ServicesCustomization
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: goroutine 64 [running]:
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: net/http.(*conn).serve.func1()
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /usr/lib/golang/src/net/http/server.go:1825 +0xbf
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: panic({0x55b383a5f720, 0xc0005a8920})
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /usr/lib/golang/src/runtime/panic.go:844 +0x258
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.(*Encoder).safeEncode.func1()
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:152 +0x78
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: panic({0x55b383a5f720, 0xc0005a8920})
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /usr/lib/golang/src/runtime/panic.go:838 +0x207
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.isEmpty({0x55b383ab4420?, 0xc00016d2c0?, 0x0?})
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:656 +0xf9
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.(*Encoder).eStruct.func2({0xc000110150?, 0x1, 0x55b383b86560?})
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:507 +0x23e
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.(*Encoder).eStruct(0xc000389518, {0xc0005a8750, 0x1, 0x1}, {0x55b383b86560?, 0xc00003f760?, 0x1?}, 0x0)
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:529 +0x266
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.(*Encoder).eMapOrStruct(0xc000389518?, {0xc0005a8750?, 0x1?, 0x0?}, {0x55b383b86560?, 0xc00003f760?, 0x55b383b86560?}, 0x0?)
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:370 +0x4e
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.(*Encoder).eTable(0xc000389518, {0xc0005a8750, 0x1, 0x1}, {0x55b383b86560?, 0xc00003f760?, 0x55b383a02c80?})
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:362 +0x1a5
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.(*Encoder).encode(0x55b383a05411?, {0xc0005a8750, 0x1, 0x1}, {0x55b383b86560?, 0xc00003f760?, 0x55b383a05411?})
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:202 +0x399
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.(*Encoder).eStruct.func2({0xc000536630?, 0x2, 0x55b383b69bc0?})
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:520 +0x425
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.(*Encoder).eStruct(0xc000389518, {0x55b38435ad78, 0x0, 0x0}, {0x55b383b69bc0?, 0xc0002ec160?, 0x2000?}, 0x0)
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:529 +0x266
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.(*Encoder).eMapOrStruct(0xc000169180?, {0x55b38435ad78?, 0x55b383a6f400?, 0x55b383b69bc0?}, {0x55b383b69bc0?, 0xc0002ec160?, 0x55b383b69bc0?}, 0xc0?)
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:370 +0x4e
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.(*Encoder).eTable(0xc000169518, {0x55b38435ad78, 0x0, 0x0}, {0x55b383b69bc0?, 0xc0002ec160?, 0x1?})
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:362 +0x1a5
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.(*Encoder).encode(0xc0002ec160?, {0x55b38435ad78, 0x0, 0x0}, {0x55b383b69bc0?, 0xc0002ec160?, 0x7f0a068b7108?})
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:202 +0x399
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.(*Encoder).safeEncode(0x55b383b69bc0?, {0x55b38435ad78?, 0xc000169380?, 0x55b382a94f4b?}, {0x55b383b69bc0?, 0xc0002ec160?, 0xc0002ec0b0?})
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:155 +0x77
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/BurntSushi/toml.(*Encoder).Encode(0xc000389518, {0x55b383b69bc0?, 0xc0002ec160?})
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/BurntSushi/toml/encode.go:139 +0xc8
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/osbuild/osbuild-composer/internal/weldr.(*API).blueprintsInfoHandler(0xc0001878c0, {0x55b383bce6d8?, 0xc00054a2a0}, 0xc000538400, {0xc00014e500?, 0x2, 0xc0002e401b?})
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/internal/weldr/api.go:1462 +0xbc5
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc0005d1200, {0x55b383bce6d8, 0xc00054a2a0}, 0xc000538400)
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/vendor/github.com/julienschmidt/httprouter/router.go:387 +0x82b
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: github.com/osbuild/osbuild-composer/internal/weldr.(*API).ServeHTTP(0xc0001878c0, {0x55b383bce6d8, 0xc00054a2a0}, 0xc000538400)
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /builddir/build/BUILD/osbuild-composer-62/_build/src/github.com/osbuild/osbuild-composer/internal/weldr/api.go:299 +0x16a
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: net/http.serverHandler.ServeHTTP({0xc000536510?}, {0x55b383bce6d8, 0xc00054a2a0}, 0xc000538400)
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /usr/lib/golang/src/net/http/server.go:2916 +0x43b
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: net/http.(*conn).serve(0xc00049a280, {0x55b383bcf5b0, 0xc00016c1b0})
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /usr/lib/golang/src/net/http/server.go:1966 +0x5d7
Mar 13 09:11:38 citest-1 osbuild-composer[1776]: created by net/http.(*Server).Serve
Mar 13 09:11:38 citest-1 osbuild-composer[1776]:         /usr/lib/golang/src/net/http/server.go:3071 +0x4db

Expected results:

The blueprint is shown.

Additional info:

Comment 1 Ondřej Budai 2023-03-30 11:52:15 UTC
The root cause is the same as in rhbz#2137364

*** This bug has been marked as a duplicate of bug 2137364 ***


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