Skip to content

Make the MachineConfigPool wait survive real-world rollout times - #82

Open
Vincent056 wants to merge 1 commit into
ComplianceAsCode:mainfrom
Vincent056:mcp-wait-reliability
Open

Make the MachineConfigPool wait survive real-world rollout times#82
Vincent056 wants to merge 1 commit into
ComplianceAsCode:mainfrom
Vincent056:mcp-wait-reliability

Conversation

@Vincent056

Copy link
Copy Markdown
Collaborator

Summary

The e2e-aws-openshift-node-compliance lane fails repeatedly with:

timed out waiting for MachineConfigPools to update: 1 MachineConfigPools still updating: [master (Updated: 1/3, Unavailable: 1)]

after applying ~590 remediations cleanly (Applied=589, Error=0). Root cause is arithmetic, not flakiness: the master pool reboots its 3 nodes serially (~10 min each on AWS, often over more than one render wave) and the fixed 60-minute wait sat exactly at the expected duration.

Changes

  1. MCP wait budget 60 → 120 minutes (overall job timeout already allows it).
  2. Fix a real bug in setPoolRollingPolicy: it compared pool.Spec.MaxUnavailable against the address of a fresh local variable — never equal — so MaxUnavailable: 2 was silently never applied and worker reboots stayed serialized. Now compared by value, and explicitly skipped for the master pool (etcd quorum).
  3. Timeout diagnostics: per-pool progress transitions are logged during the wait, and on timeout every node's machine-config daemon annotations (state/reason/currentConfig/desiredConfig) are dumped, so a drain hang vs reboot hang vs degraded daemon is diagnosable from the job log instead of hand-waved as flake.

Testing

  • go build ./..., go vet, gofmt clean.
  • Failure evidence: identical MCP-timeout signature on this repo's lane and across ComplianceAsCode/content PRs (e.g. content#14878 runs) since 2026-07-17.

🤖 Generated with Claude Code

The node-compliance e2e lane fails repeatedly with 'timed out waiting for
MachineConfigPools ... master (Updated: 1/3, Unavailable: 1)' after a full
remediation run. Three fixes:

1. Raise the MCP wait budget from 60 to 120 minutes. A remediation run
   reboots every node and the master pool always rolls serially (~10min
   per node on AWS), often in more than one render wave - the old budget
   sat exactly at the expected duration, so normal variance blew it.

2. Fix setPoolRollingPolicy: it compared pool.Spec.MaxUnavailable against
   the ADDRESS of a fresh local variable, which is never equal, so the
   intended MaxUnavailable=2 was never applied and worker reboots stayed
   fully serialized. Apply it by value comparison - and never to the
   master pool, where parallel reboots would threaten etcd quorum.

3. Diagnose instead of just dying: log per-pool progress transitions
   during the wait, and on timeout dump every node's machine-config
   daemon state annotations (state/reason/current/desired) so a drain
   hang is distinguishable from a reboot hang or a degraded daemon in
   the job output.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Vincent056

Copy link
Copy Markdown
Collaborator Author

/retest

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown

@Vincent056: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ocp4-stig 8187cbd link true /test e2e-aws-ocp4-stig
ci/prow/e2e-aws-ocp4-cis 8187cbd link true /test e2e-aws-ocp4-cis
ci/prow/e2e-aws-rhcos4-moderate 8187cbd link true /test e2e-aws-rhcos4-moderate
ci/prow/e2e-aws-openshift-node-compliance 8187cbd link true /test e2e-aws-openshift-node-compliance

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant