Repository navigation
MCO-154: Default MCS-served Ignition to the latest spec for unversioned requests - #6796
ptalgulk01 wants to merge 1 commit into
Conversation
|
Pipeline controller notification This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration. Use |
|
No actionable comments were generated in the recent review. WalkthroughThe server now selects Ignition’s latest supported spec when the Accept header does not specify a versioned Ignition media type. Tests cover these header cases and a GET request without an Accept header. ChangesAccept Header Default
Estimated code review effort: 2 (Simple) | ~8 minutes Change: Feature Suggested reviewers: Merge Risk:
|
|
@ptalgulk01: This pull request references MCO-154 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.2.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Chai risk assessment for Tier: Critical Reason: The change makes the Machine Config Server serve a different config to some clients. When a request to /config/ has no versioned Ignition Accept header (no header, a non-Ignition header, an Ignition header without version=, or an unparseable header), the server now returns Ignition spec 3.6.0 (ign3types.MaxVersion) instead of the 2.2.0 it has returned for these requests since 2020. Requests that name a version are handled as before. This changes what the MCS API returns by default on every existing cluster once it runs the new MCO, so it meets the Critical criteria for API changes existing clients consume and for defaults applied to existing installations. If the change is wrong, the impact falls on node provisioning: any client that fetches pool config without a versioned header and expects spec v2 will get a config it cannot parse, and if that client is used to bring up nodes, those nodes fail to join. Ignition, the assisted-installer and the assisted-installer-agent all send versioned headers, so the main install paths I checked are not affected, and I found no Windows Machine Config Operator code that calls the endpoint. A code search cannot rule out unversioned clients in customer UPI or bare-metal tooling, scripts, or components outside the indexed repos, and that uncertainty pushed the tier up. Signals: 2 files, +39/-11, one production function plus unit tests, no API type or CRD changes, full diff read; the repository has no AGENTS.md on main. Change it with /label chai-risk-assessment/critical |
|
@ptalgulk01: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Fixes: MCO-154 Epic: MCO-2640
- What I did
The MCS served Ignition spec v2.2 to any request without a versioned
Acceptheader (plaincurl, no header, or Ignition header withoutversion=) — a 2020 back-compat choice. Current boot images reject spec v2, and producing it requires a lossy v3.6→v3.2→v2.2 down-conversion.This changes the default in
detectSpecVersionFromAcceptHeader(pkg/server/api.go) to the latest supported spec (ign3types.MaxVersion, 3.6.0). Explicit version requests are untouched:version=2.xstill serves 2.2.0,version=3.xbehaves as before.Tests: updated the three default-path cases in
TestAcceptHeadersand added aTestAPIHandlerscenario asserting an Accept-header-less request returns{"ignition":{"version":"3.6.0"}}.- How to verify it
Unit tests: go test ./pkg/server/ -run "TestAcceptHeaders|TestAPIHandler" -v
On a cluster:
unversioned curl now gets the current spec (previously 2.2.0)
explicit v2 must still be honored
Node provisioning is unaffected: Ignition clients always send a versioned. Accept header and never hit the default (verified by scaling a pool and confirming the node joins).
- Description for the changelog
MCS now serves the latest supported Ignition spec (3.6.0) instead of spec 2.2 when a client requests a config without a versioned Ignition Accept header; explicit version requests continue to be honored as before.
Summary by CodeRabbit
Acceptheader now receive Ignition spec version 3.6.0 by default, instead of 2.2.0.