← Back to Pull requests

OCPBUGS-126680: fix: approve CSRs of nodes in VPCs with a custom DHCP domain #62

Open
unknown opened this pull request with 211 lines diff across 2 files
View on GitHub
unknown unknown commented on Oct 19, 2026 10:36 UTC
Author

TODO

  • Comment /jira backport release-5.0,release-4.22 here if the approach is accepted
  • Related hypershift PR with E2E test: https://github.com/openshift/hypershift/pull/10004

    The related PR also contains a verbose description, the following is just the commit message.
    The implementation here is almost equal to the approach form the PR linked above.

    Summary

    The node identity verifier only accepted a node name that equals the EC2 PrivateDnsName of a pending NodeClaim instance. If the VPC's DHCP option set has a custom domain-name, the kubelet node name is the first label of the PrivateDnsName followed by that domain, so the client and serving CSRs of Karpenter nodes were never approved and the nodes never registered.

    Match the node name against the PrivateDnsName first, as before. Only if no instance matches, look up the DHCP domain-name of the instance's VPC and also accept <first label of the PrivateDnsName>.<first domain>, compared case-insensitively and ignoring a trailing dot. Nodes in VPCs with the default domain never depend on the lookup, and a match in an early DescribeInstances batch still returns without describing later batches. If the role lacks the permissions for the lookup, the CSR is not approved and the error is logged, as retrying does not help until they are granted. Other lookup errors are returned so the CSR is retried instead of silently staying pending. A mismatch against the pending instances is logged with their DHCP domains.

    The lookup needs ec2:DescribeVpcs and ec2:DescribeDhcpOptions on the Karpenter role. The AWS-managed ROSAKarpenterControllerPolicy has DescribeVpcs but not DescribeDhcpOptions.

    Diff: 211 lines (+158 / -53) across 2 files Reviewer: linkvt Review duration: 10221m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 211 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.320
    Real PR Conversation Timeline
    1 comments
    "Review active on #62"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.5% (MEDIUM) · Higher = larger blast radius
    36.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.4% · Safe to merge
    19.4%