Skip to content

Conversation

@jeckersb
Copy link
Collaborator

@jeckersb jeckersb commented Oct 31, 2025

Had this working earlier this afternoon but broke it in rebase somehow. Time for halloween festivities but wanted to throw it up incase my laptop is hit by a meteor over the weekend.

@github-actions github-actions bot added the area/install Issues related to `bootc install` label Oct 31, 2025
@jeckersb jeckersb changed the title bootc kargs kernel cmdline WIP: bootc kargs kernel cmdline Oct 31, 2025
@bootc-bot bootc-bot bot requested a review from gursewak1997 October 31, 2025 21:01
@jeckersb jeckersb changed the title WIP: bootc kargs kernel cmdline WIP: Switch bootc_kargs to use kernel_cmdline for parsing Oct 31, 2025
@jeckersb jeckersb force-pushed the bootc_kargs_kernel_cmdline branch from 4196722 to e28c0a1 Compare November 4, 2025 22:07
@jeckersb
Copy link
Collaborator Author

jeckersb commented Nov 4, 2025

Rebased on #1729, so this is pending getting that sorted out and merged first.

@jeckersb jeckersb force-pushed the bootc_kargs_kernel_cmdline branch from e28c0a1 to 1c99086 Compare November 5, 2025 14:25
@jeckersb
Copy link
Collaborator Author

jeckersb commented Nov 5, 2025

Hooray for tests

verifying third boot
cmdline=[BOOT_IMAGE=(hd0,gpt3)/boot/ostree/default-7e0ca7b10ef8102e3e459b6a8de1b8d09f8c700e82e97d2af2c1d940d967c9ab/vmlinuz-6.17.6-200.fc42.x86_64, root=UUID=d83586c7-8a15-41d1-a383-aca4d4def032, rootflags=subvol=root, rw, boot=UUID=72a5cd34-0b37-4dc9-9907-0524161248c3, localtestkarg=somevalue, otherlocalkarg=42, kargsd-test=1, kargsd-othertest=2, console=ttyS0,115200n8, testing-kargsd=3, ostree=/ostree/boot.1/default/7e0ca7b10ef8102e3e459b6a8de1b8d09f8c700e82e97d2af2c1d940d967c9ab/0, testarg=foo, thirdkarg=bar]
Verifying karg testarg=foo
Verifying karg thirdkarg=baz
Error:   × Assertion failed.
     ╭─[/var/ARTIFACTS/work-test-20-local-upgradem4wulh6_/tmt/plans/integration/test-20-local-upgrade/discover/default-0/tests/tmt/tests/booted/test-image-pushpull-upgrade.nu:165:16]
 164 │         print $"Verifying karg ($x)"
 165 │         assert ($x in $cmdline)
     ·                ────────┬───────
     ·                        ╰── It is not true.
 166 │     }
     ╰────

@jeckersb jeckersb force-pushed the bootc_kargs_kernel_cmdline branch from 1c99086 to 3bd3694 Compare November 5, 2025 21:52
@jeckersb jeckersb changed the title WIP: Switch bootc_kargs to use kernel_cmdline for parsing Switch bootc_kargs to use kernel_cmdline for parsing Nov 5, 2025
@jeckersb jeckersb marked this pull request as ready for review November 5, 2025 21:54
@jeckersb
Copy link
Collaborator Author

jeckersb commented Nov 5, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a nice refactoring to use a dedicated Cmdline type for kernel arguments instead of Vec<String>, which improves type safety and code clarity. The implementation is solid, introducing a new remove_exact method and updating various parts of the codebase to use the new type. I've found one bug in how root arguments are filtered and have a suggestion to reduce code duplication in the tests by using a helper function. Overall, great work on improving the codebase.

@jeckersb
Copy link
Collaborator Author

jeckersb commented Nov 5, 2025

Also we should modify the upgrade integration test to include quoted kargs as in ostreedev/ostree#3544 which originally prompted all of this

@jeckersb jeckersb marked this pull request as draft November 6, 2025 14:59
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
@jeckersb jeckersb force-pushed the bootc_kargs_kernel_cmdline branch from 3bd3694 to 02b77cc Compare November 7, 2025 22:48
@jeckersb
Copy link
Collaborator Author

jeckersb commented Nov 7, 2025

Ok good news is that cherry-picking the patch that modifies the upgrade test onto main reproduces the original problem where ostree aborts:

16:32:23                         content:  INFO Staging image for deployment: ostree-unverified-image:containers-storage:localhost/bootc-derived (digest: sha256:84c3e696405c96ad1a4ed6f122f5588a14dbe4bdf78e70999a1fb75e0599ce70) message_id="8f7a2b1c3d4e5f6a7b8c9d0e1f2a3b4c" bootc.image.reference="localhost/bootc-derived" bootc.image.transport="containers-storage" bootc.manifest_digest="sha256:84c3e696405c96ad1a4ed6f122f5588a14dbe4bdf78e70999a1fb75e0599ce70"
16:32:23                         content: DEBUG kargs: added=["thirdkarg=baz"] removed=["othertestkarg", "thirdkarg=bar"]
16:32:23                         content: Deploying...**
16:32:23                         content: OSTree:ERROR:src/libostree/ostree-kernel-args.c:197:split_kernel_args: 'quoted' should be FALSE
16:32:23                         content: Bail out! OSTree:ERROR:src/libostree/ostree-kernel-args.c:197:split_kernel_args: 'quoted' should be FALSE
16:32:23                         content: Error: nu::shell::core_dumped
16:32:23                         content:
16:32:23                         content:   x External command core dumped
16:32:23                         content:      ,-[/var/tmp/tmt/run-019/tmt/plans/integration/test-20-local-upgrade/discover/default-0/tests/tmt/tests/booted/test-image-pushpull-upgrade.nu:160:20]
16:32:23                         content:  159 |     # We should already be fetching updates from container storage
16:32:23                         content:  160 |     RUST_LOG=debug bootc upgrade
16:32:23                         content:      :                    ^^|^^
16:32:23                         content:      :                      `-- core dumped with SIGABRT (6)
16:32:23                         content:  161 |     # Verify we staged an update
16:32:23                         content:      `----

This covers the issue reported in ostreedev/ostree#3544

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
@jeckersb jeckersb force-pushed the bootc_kargs_kernel_cmdline branch from 02b77cc to ed5b166 Compare November 7, 2025 23:02
@jeckersb jeckersb marked this pull request as ready for review November 7, 2025 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install Issues related to `bootc install`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant