Repository navigation
fix(cmdline): keep the cmdline stages when one token cannot be converted - #5507
Merged
Itxaka merged 2 commits intoOct 20, 2026
Merged
Conversation
…ing keys Co-authored-by: Itxaka <itxakaserrano@gmail.com> Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
A kernel parameter whose key starts with a digit, like 8250.nr_uarts=0, cannot be turned into YAML. DotStringToYAML skips it but still returns an error, and yip drops the whole cmdline config when a modifier errors, so every stage set on the cmdline was lost. Add DotStringToYAMLBestEffort to sdk/machine and use it from the agent and immucore modifiers: the tokens that converted are kept and the skipped ones are logged at debug level, matching how runstage already treats cmdline noise. When nothing converts the error is still returned. DotStringToYAML is unchanged. Co-authored-by: Itxaka <itxakaserrano@gmail.com> Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
Itxaka
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A kernel arg whose key starts with a digit, like
8250.nr_uarts=0, cannot be turned into YAML.DotStringToYAMLskips it but still returns an error along with the rest, and yip'sschema.Loadtreats any modifier error as fatal. So on a host with such an arg on its cmdline, every generic dot-notation stage set there (stages.initramfs[0]...) was dropped byrun-stageand by immucore.This adds
machine.DotStringToYAMLBestEffort: the tokens that converted are kept, the skipped ones are passed to a callback, and the agent and immucore modifiers log them at debug level. When nothing converts the error is still returned.DotStringToYAMLitself is unchanged.Skipped tokens are logged at debug, not warn:
8250.nr_uarts=0is a valid kernel parameter the user can't fix, and the modifier runs several times per run-stage, whichrunstage.goalready handles by demoting cmdline errors.Same root cause as #5505, which fixed
collector.ParseCmdLine. This is the other half and is independent of it, branched from master. The new specs in agent, immucore and sdk/machine fail on master and pass here. In the container, the fiveSyncDataspecs inagent/pkg/utilsfail on master too (norsyncin the image).No linked issue.
Signed-off-by: itxaka-agent itxaka-agent@users.noreply.github.com