Skip to content

OCPCLOUD-3347: feat(machine-approver): add TLS configuration options to deployment manifests - #8019

Merged
sjenning merged 1 commit into
openshift:mainfrom
damdo:main
Apr 14, 2026
Merged

sjenning merged 1 commit into
openshift:mainfrom
damdo:main

Conversation

@damdo

@damdo damdo commented Mar 19, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Add new flags to the hosted machine-approver to comply with the centralized TLS configuration in HyperShift. These flags are to override the machine-approver's internal TLS profile, which is used for its metrics server. Flags to be added via openshift/cluster-machine-approver#292

Special notes for your reviewer:

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci-robot

Copy link
Copy Markdown

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci

openshift-ci Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 19, 2026
@coderabbitai

coderabbitai Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 3a7fcf77-45cb-4c53-9077-6cbee6028176

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot added do-not-merge/needs-area area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release and removed do-not-merge/needs-area labels Mar 19, 2026
@damdo damdo changed the title Main feat(machine-approver): add TLS configuration options to deployment manifests Mar 19, 2026
@damdo damdo changed the title feat(machine-approver): add TLS configuration options to deployment manifests OCPCLOUD-3347: feat(machine-approver): add TLS configuration options to deployment manifests Mar 19, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 19, 2026
@openshift-ci-robot

openshift-ci-robot commented Mar 19, 2026

Copy link
Copy Markdown

@damdo: This pull request references OCPCLOUD-3347 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 "4.22.0" version, but no target version was set.

Details

In response to this:

Added --tls-min-version and --tls-cipher-suites arguments to the machine approver deployment configurations across multiple environments to enhance security settings.

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes

Special notes for your reviewer:

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

@openshift-ci-robot

openshift-ci-robot commented Mar 19, 2026

Copy link
Copy Markdown

@damdo: This pull request references OCPCLOUD-3347 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 "4.22.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Add --tls-min-version and --tls-cipher-suites arguments to the machine approver deployment configurations across multiple environments to enhance security settings.

Which issue(s) this PR fixes:

Fixes

Special notes for your reviewer:

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

@openshift-ci-robot

openshift-ci-robot commented Mar 19, 2026

Copy link
Copy Markdown

@damdo: This pull request references OCPCLOUD-3347 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 "4.22.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Add new flags to the hosted machine-approver to comply with the centralized TLS configuration in HyperShift. These flags are to override the machine-approver's internal TLS profile, which is used for its metrics server. Flags to be added via openshift/cluster-machine-approver#292

Special notes for your reviewer:

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

@openshift-ci

openshift-ci Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

@damdo: This PR was included in a payload test run from openshift/cluster-machine-approver#292
trigger 0 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

1 similar comment
@openshift-ci

openshift-ci Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

@damdo: This PR was included in a payload test run from openshift/cluster-machine-approver#292
trigger 0 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

@damdo

damdo commented Mar 20, 2026

Copy link
Copy Markdown
Member Author

/testwith openshift/cluster-machine-approver/main/e2e-hypershift-aws openshift/cluster-machine-approver#292

@openshift-ci

openshift-ci Bot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

@damdo, testwith: could not generate prow job. ERROR:

create refs for PR: path alias: resolve config openshift/hypershift@: got unexpected http 400 status code from configresolver: branch query missing or incorrect

@openshift-ci

openshift-ci Bot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

@sunzhaohua2: This PR was included in a payload test run from openshift/cluster-machine-approver#292
trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-hypershift-release-4.22-periodics-e2e-aws-ovn-conformance

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/15948fb0-244f-11f1-83e2-50fda993a409-0

@openshift-ci

openshift-ci Bot commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

@sunzhaohua2: This PR was included in a payload test run from openshift/cluster-machine-approver#292
trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-hypershift-release-4.22-periodics-e2e-aws-external-oidc

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/15022440-267f-11f1-9a65-bf72365d4b33-0

…anifests

Added `--tls-min-version` and `--tls-cipher-suites` arguments to the
machine approver deployment configurations across multiple environments
to enhance security settings.
@damdo

damdo commented Apr 1, 2026

Copy link
Copy Markdown
Member Author

/reopen

@damdo

damdo commented Apr 1, 2026

Copy link
Copy Markdown
Member Author

reopen

@openshift-ci

openshift-ci Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

@damdo: Failed to re-open PR: state cannot be changed. There are no new commits on the damdo:main branch.

Details

In response to this:

/reopen

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.

@damdo damdo reopened this Apr 1, 2026
@openshift-ci-robot

openshift-ci-robot commented Apr 1, 2026

Copy link
Copy Markdown

@damdo: This pull request references OCPCLOUD-3347 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 "4.22.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Add new flags to the hosted machine-approver to comply with the centralized TLS configuration in HyperShift. These flags are to override the machine-approver's internal TLS profile, which is used for its metrics server. Flags to be added via openshift/cluster-machine-approver#292

Special notes for your reviewer:

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

@damdo
damdo marked this pull request as ready for review April 1, 2026 13:30
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 1, 2026
@damdo

damdo commented Apr 1, 2026

Copy link
Copy Markdown
Member Author

/assign @sjenning @csrwng @joelanford

@damdo

damdo commented Apr 1, 2026

Copy link
Copy Markdown
Member Author

/assign @wewang58

For testing

@openshift-ci-robot

openshift-ci-robot commented Apr 1, 2026

Copy link
Copy Markdown

@damdo: This pull request references OCPCLOUD-3347 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 "4.22.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Add new flags to the hosted machine-approver to comply with the centralized TLS configuration in HyperShift. These flags are to override the machine-approver's internal TLS profile, which is used for its metrics server. Flags to be added via openshift/cluster-machine-approver#292

Special notes for your reviewer:

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

@openshift-ci-robot

openshift-ci-robot commented Apr 1, 2026

Copy link
Copy Markdown

@damdo: This pull request references OCPCLOUD-3347 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 "4.22.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Add new flags to the hosted machine-approver to comply with the centralized TLS configuration in HyperShift. These flags are to override the machine-approver's internal TLS profile, which is used for its metrics server. Flags to be added via openshift/cluster-machine-approver#292

Special notes for your reviewer:

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

@openshift-ci

openshift-ci Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: damdo
Once this PR has been reviewed and has the lgtm label, please assign sjenning for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
openshift-ci Bot requested review from muraee and sjenning April 1, 2026 13:32
@openshift-ci

openshift-ci Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: damdo
Once this PR has been reviewed and has the lgtm label, please assign sjenning for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov

codecov Bot commented Apr 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 29.96%. Comparing base (3a0a288) to head (fc8b894).

Files with missing lines Patch % Lines
...stedcontrolplane/v2/machine_approver/deployment.go 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8019      +/-   ##
==========================================
- Coverage   29.96%   29.96%   -0.01%     
==========================================
  Files        1049     1049              
  Lines       97523    97530       +7     
==========================================
  Hits        29225    29225              
- Misses      65796    65803       +7     
  Partials     2502     2502              
Files with missing lines Coverage Δ
...stedcontrolplane/v2/machine_approver/deployment.go 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@damdo

damdo commented Apr 1, 2026

Copy link
Copy Markdown
Member Author

/pipeline required

@openshift-ci-robot

Copy link
Copy Markdown

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws

@sunzhaohua2

Copy link
Copy Markdown

/retest-required

@openshift-ci

openshift-ci Bot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

@damdo: 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-upgrade-hypershift-operator fc8b894 link true /test e2e-aws-upgrade-hypershift-operator
ci/prow/e2e-kubevirt-aws-ovn-reduced fc8b894 link true /test e2e-kubevirt-aws-ovn-reduced
ci/prow/e2e-v2-aws fc8b894 link true /test e2e-v2-aws
ci/prow/e2e-azure-self-managed fc8b894 link true /test e2e-azure-self-managed
ci/prow/e2e-aws fc8b894 link true /test e2e-aws
ci/prow/e2e-aks fc8b894 link true /test e2e-aks

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.

@damdo

damdo commented Apr 3, 2026

Copy link
Copy Markdown
Member Author

@sunzhaohua2 e2e jobs are expected to fail as Cluster Machine Approver doesn't have the flags until openshift/cluster-machine-approver#292 merges.
But openshift/cluster-machine-approver#292 can't merge until this one does. So we need to do overrides and merge both at the same time (cc. @shellyyang1989 @sjenning)

@wewang58

wewang58 commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

/verified by @wewang58

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Apr 7, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@wewang58: This PR has been marked as verified by @wewang58.

Details

In response to this:

/verified by @wewang58

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.

@sjenning

sjenning commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

/hold

until openshift/cluster-machine-approver#292 merges

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 7, 2026
@hypershift-jira-solve-ci

hypershift-jira-solve-ci Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Now I have all the information needed. Let me compile the final structured report.

Test Failure Analysis Complete (Multi-Step)

Job Information


Root Cause

The machine-approver binary does not support --tls-min-version or --tls-cipher-suites flags.

PR #8019 adds TLS configuration arguments to the machine-approver deployment manifest in control-plane-operator/controllers/hostedcontrolplane/v2/machine_approver/deployment.go:

if tlsMinVersion := config.MinTLSVersion(configuration.GetTLSSecurityProfile()); tlsMinVersion != "" {
    c.Args = append(c.Args, fmt.Sprintf("--tls-min-version=%s", tlsMinVersion))
}
if cipherSuites := config.CipherSuites(configuration.GetTLSSecurityProfile()); len(cipherSuites) != 0 {
    c.Args = append(c.Args, fmt.Sprintf("--tls-cipher-suites=%s", strings.Join(cipherSuites, ",")))
}

This follows the same pattern used by kube-controller-manager and kube-scheduler, which are upstream Kubernetes binaries that do support these flags. However, machine-approver is an OpenShift-specific binary (openshift/cluster-machine-approver) that does not yet implement these flags.

Result: Every machine-approver pod across every test cluster crashes immediately on startup with:

unknown flag: --tls-min-version
  • Container exit code: 2
  • Restart count: 5–14+ (crash-looping)

This causes the HostedCluster to never reach Available status:

message: machine-approver deployment has 1 unavailable replicas
reason: UnavailableReplicas
status: "True"
type: Degraded

message: 'Waiting for components to be available: machine-approver'
reason: ComponentsNotAvailable
status: "False"
type: Available

All tests that create a HostedCluster then time out waiting for it to become available.


Per-Job Failure Summary

# Job Build ID Root Cause Key Error
1 e2e-v2-aws 2039885042146086912 machine-approver crash unknown flag: --tls-min-version
2 e2e-aws 2039885033765867520 machine-approver crash unknown flag: --tls-min-version
3 e2e-azure-self-managed 2039885037150670848 machine-approver crash UnavailableReplicas(machine-approver)
4 e2e-aks 2039885032079757312 machine-approver crash UnavailableReplicas(machine-approver)
5 e2e-aws-upgrade-hypershift-operator 2039885035435200512 machine-approver crash UnavailableReplicas(machine-approver)
6 e2e-kubevirt-aws-ovn-reduced 2039885039637893120 Unrelated timeout process timed out (node count mismatch, no machine-approver error)
7 Red Hat Konflux Not a Prow job Separate build/image check
8 codecov/patch Not a Prow job Code coverage check

Detailed Analysis

Jobs 1–5: machine-approver crash-loop (Same Root Cause)

Failure chain:

  1. PR adds --tls-min-version=VersionTLS12 and --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,... args to machine-approver deployment
  2. machine-approver container starts and immediately exits with unknown flag: --tls-min-version (exit code 2)
  3. Kubelet restarts the container → crash-loop (5–14+ restarts)
  4. machine-approver deployment reports UnavailableReplicas
  5. HostedControlPlane / HostedCluster condition becomes Degraded with reason ComponentsNotAvailable
  6. HostedCluster never reaches Available condition
  7. Test times out waiting for Available (30m timeout)
  8. All downstream tests that depend on a working cluster also fail

25 tests failed in e2e-aws alone, including: TestAutoscaling, TestCreateCluster, TestCreateClusterCustomConfig, TestCreateClusterProxy, TestCreateClusterPrivate, TestNodePool, TestUpgradeControlPlane, and others.

Job 6: e2e-kubevirt-aws-ovn-reduced (Different Root Cause)

This job timed out during health checks with a node count mismatch — nested cluster nodes did not match desired NodePool replicas. No machine-approver errors were found. This appears to be an unrelated infrastructure/timing issue, possibly a pre-existing flake in the KubeVirt provider.


Evidence

Source Code (deployment.go)

// control-plane-operator/controllers/hostedcontrolplane/v2/machine_approver/deployment.go
func adaptDeployment(cpContext component.WorkloadContext, deployment *appsv1.Deployment) error {
    hcp := cpContext.HCP
    configuration := hcp.Spec.Configuration
    util.UpdateContainer(ComponentName, deployment.Spec.Template.Spec.Containers, func(c *corev1.Container) {
        c.Args = append(c.Args, fmt.Sprintf("--machine-namespace=%s", hcp.Namespace))
        // ⬇ These flags are NOT supported by the current machine-approver binary
        if tlsMinVersion := config.MinTLSVersion(configuration.GetTLSSecurityProfile()); tlsMinVersion != "" {
            c.Args = append(c.Args, fmt.Sprintf("--tls-min-version=%s", tlsMinVersion))
        }
        if cipherSuites := config.CipherSuites(configuration.GetTLSSecurityProfile()); len(cipherSuites) != 0 {
            c.Args = append(c.Args, fmt.Sprintf("--tls-cipher-suites=%s", strings.Join(cipherSuites, ",")))
        }
    })
    return nil
}

Container crash log

unknown flag: --tls-min-version

Pod status (from must-gather artifacts)

containerStatuses:
  - name: machine-approver
    restartCount: 14
    state:
      terminated:
        exitCode: 2
        reason: Error
    lastState:
      terminated:
        exitCode: 2
        reason: Error

Supported machine-approver flags (current binary)

--api-group-version, --config, --disable-status-controller, --kubeconfig,
--leader-elect, --leader-elect-lease-duration, --leader-elect-renew-deadline,
--leader-elect-resource-lock, --leader-elect-resource-name,
--leader-elect-resource-namespace, --leader-elect-retry-period,
--machine-namespace, --management-cluster-kubeconfig,
--max-concurrent-reconciles, --workload-cluster-kubeconfig

Note: --tls-min-version and --tls-cipher-suites are not in the supported flag list. A companion PR (openshift/cluster-machine-approver PR #292) adds these flags but has not yet been merged.

Comparison with components that DO support TLS flags

The same TLS flag pattern is used in kube-controller-manager and kube-scheduler deployments — those work because the upstream Kubernetes binaries natively support --tls-min-version and --tls-cipher-suites.


Root Cause Hypothesis

Primary cause: PR #8019 adds TLS CLI flags (--tls-min-version, --tls-cipher-suites) to the machine-approver deployment manifest, but the machine-approver binary does not yet support these flags. This is a dependency ordering issue — the HyperShift-side change was submitted before the corresponding openshift/cluster-machine-approver PR #292 was merged and the new binary image was available in CI.

This is a deterministic, reproducible bug affecting every job that creates a HostedCluster with the default TLS security profile (which resolves to VersionTLS12 with a standard cipher suite list). The machine-approver container immediately crashes on startup, preventing the cluster from ever becoming available.


Recommendations

  1. Merge the companion PR first: Ensure openshift/cluster-machine-approver PR Secure connection from ign server to MCS Service #292 (which adds --tls-min-version and --tls-cipher-suites flag support) is merged and the new image is available in CI before re-testing this PR.
  2. Coordinate cross-repo changes: If both PRs must land simultaneously, use CI overrides (/override) or payload-level testing to ensure both images are present.
  3. Guard the flag addition: Alternatively, gate the TLS flag injection on a version check or feature gate to ensure backward compatibility with older machine-approver binaries that don't support the flags.
  4. e2e-kubevirt-aws-ovn-reduced: Investigate separately — this failure appears unrelated to the TLS changes (no machine-approver errors found; likely a KubeVirt provider flake).

@hypershift-jira-solve-ci

hypershift-jira-solve-ci Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

I now have the complete picture across all 6 Prow jobs. The root cause is identical and conclusive across every single job. Let me compile the final structured report.

Test Failure Analysis Complete (Multi-Job)

Job Information

  • PR: openshift/hypershift#8019OCPCLOUD-3347: feat(machine-approver): add TLS configuration options to deployment manifests by @damdo
  • PR State: OPEN (has do-not-merge/hold label)
  • All 6 Prow jobs failed with the same root cause
Job Build ID Failed Step / Duration
e2e-v2-aws 2039885042146086912 e2e-v2-aws-create-hostedcluster (30m32s)
e2e-aws 2039885033765867520 e2e-aws-hypershift-aws-run-e2e-nested (1h56m30s) — 25 test failures
e2e-aks 2039885032079757312 hypershift-azure-aks-run-e2e-nested — 6 test failures
e2e-azure-self-managed 2039885037150670848 e2e-azure-self-managed-hypershift-azure-run-e2e-self-managed (59m50s) — 4 test failures
e2e-aws-upgrade-hypershift-operator 2039885035435200512 hypershift-aws-run-e2e-nested (54m35s) — 2 test failures
e2e-kubevirt-aws-ovn-reduced 2039885039637893120 hypershift-kubevirt-health-check (55m7s timeout) — 0 nodes registered

Root Cause

PR #8019 adds --tls-min-version=VersionTLS12 and --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,... command-line flags to the machine-approver deployment manifest, but the upstream cluster-machine-approver binary does not support these flags.

The companion PR that adds flag support to the binary — openshift/cluster-machine-approver#292 ("OCPCLOUD-3347: tls: use centralized TLS profile (unrevert)") — is still OPEN and not merged. The CI release images therefore contain a machine-approver binary that rejects the unknown flags.

Error

unknown flag: --tls-min-version

Container exits with code 2 immediately on startup.

Failure Chain (identical across all 6 jobs, all platforms: AWS, Azure, KubeVirt)

  1. PR OCPCLOUD-3347: feat(machine-approver): add TLS configuration options to deployment manifests #8019 adds --tls-min-version=VersionTLS12 and --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,... to the machine-approver container args in control-plane-operator/controllers/hostedcontrolplane/v2/machine_approver/deployment.go
  2. machine-approver pod crashes immediately — the binary prints its usage help followed by unknown flag: --tls-min-version, then exits with code 2
  3. machine-approver enters CrashLoopBackOff — restartCount reaches 10–15 across all clusters, backoff up to 5m0s
  4. machine-approver deployment reports ProgressDeadlineExceeded with 1 unavailable replica
  5. HostedCluster conditions degrade:
    • Available=False: ComponentsNotAvailable(Waiting for components to be available: machine-approver)
    • Degraded=True: UnavailableReplicas(machine-approver deployment has 1 unavailable replicas)
  6. No worker node CSRs are approved — machine-approver is responsible for approving CSRs from new worker kubelets; without it, nodes cannot register
  7. Zero worker nodes join the clusterDataPlaneConnectionAvailable=Unknown: NoWorkerNodesAvailable, NodePool shows Minimum availability requires N replicas, current 0 available
  8. 11 cluster operators remain unavailable — console, dns, image-registry, ingress, insights, kube-storage-version-migrator, monitoring, node-tuning, openshift-samples, service-ca, storage — all require worker nodes
  9. Tests time out waiting for nodes (45m), control plane rollout (30m), or health checks (45m)

Evidence

machine-approver Pod Status (consistent across all jobs)

state:
  waiting:
    message: back-off 5m0s restarting failed container=machine-approver
    reason: CrashLoopBackOff
restartCount: 10-15
lastState:
  terminated:
    exitCode: 2
    reason: Error
    message: "unknown flag: --tls-min-version"

machine-approver Container Log

Usage of /usr/bin/machine-approver:
  --apiserver-serving-certs string
        Path to the apiserver serving cert...
  ...
  [all valid flags listed]
unknown flag: --tls-min-version

HostedCluster Conditions (consistent across all jobs)

- type: Available
  status: "False"
  reason: ComponentsNotAvailable
  message: "Waiting for components to be available: machine-approver"
- type: Degraded
  status: "True"
  reason: UnavailableReplicas
  message: "machine-approver deployment has 1 unavailable replicas"
- type: DataPlaneConnectionAvailable
  status: Unknown
  reason: NoWorkerNodesAvailable
  message: "No worker nodes available"

machine-approver Deployment Args (from pod YAML in artifacts)

args:
  - --machine-namespace=clusters-<cluster-name>
  - --tls-min-version=VersionTLS12
  - --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,...

Upstream Dependency Status


Per-Job Failure Summary

e2e-v2-aws (Build 2039885042146086912)

  • Failed step: e2e-v2-aws-create-hostedclusteroc wait --timeout=30m --for=condition=Available timed out
  • Impact: HostedCluster never became Available because machine-approver was in CrashLoopBackOff

e2e-aws (Build 2039885033765867520)

  • Failed step: e2e-aws-hypershift-aws-run-e2e-nested — 25 of 81 tests failed
  • Failed tests: TestNodePool, TestCreateCluster, TestCreateClusterPrivate, TestCreateClusterPrivateWithRouteKAS, TestAutoscaling, TestCreateClusterCustomConfig, TestNodePoolAutoscalingScaleFromZero, TestCreateClusterProxy, TestCreateClusterRequestServingIsolation, TestUpgradeControlPlane (all with ValidateHostedCluster subtests)
  • Impact: Every hosted cluster created had a crashing machine-approver → 0 worker nodes → test timeouts

e2e-aks (Build 2039885032079757312)

  • Failed step: hypershift-azure-aks-run-e2e-nested — 6 test failures
  • Failed tests: TestNodePool (EnsureNoCrashingPods), TestCreateCluster, TestCreateClusterCustomConfig, TestAutoscaling, TestAzureScheduler, TestUpgradeControlPlane
  • Impact: Same pattern on Azure/AKS platform — machine-approver crash → 0 nodes → timeouts

e2e-azure-self-managed (Build 2039885037150670848)

  • Failed step: e2e-azure-self-managed-hypershift-azure-run-e2e-self-managed — 4 test failures
  • Failed tests: TestCreateCluster, TestAzurePrivateTopology (both with ValidateHostedCluster subtests)
  • Impact: Azure VMs provisioned successfully (CAPI Machines InfrastructureReady: true) but never joined as Nodes due to no CSR approval

e2e-aws-upgrade-hypershift-operator (Build 2039885035435200512)

  • Failed step: hypershift-aws-run-e2e-nested — 2 test failures
  • Failed tests: TestUpgradeHyperShiftOperator, TestUpgradeHyperShiftOperator/ValidateHostedCluster
  • Impact: EC2 instances booted and applied ignition but 0 of 3 nodes registered in 45 minutes

e2e-kubevirt-aws-ovn-reduced (Build 2039885039637893120)

  • Failed step: hypershift-kubevirt-health-check — timed out at 45m
  • Impact: 3 KubeVirt VMs running and READY at infrastructure level but 0 nodes appeared in hosted cluster (worker.nodes.log was empty/0 bytes)

Other Failing Checks (Non-Prow)

Check Likely Cause
Red Hat Konflux Build/image issue — separate from the runtime test failures
codecov/patch Test coverage threshold not met — unrelated to the functional failures

Root Cause Hypothesis

This is a sequencing/dependency issue, not a code defect. PR #8019 correctly implements the TLS flag passthrough pattern (matching what kcm, kube-scheduler, and oauth-apiserver already do), but it depends on openshift/cluster-machine-approver#292 being merged first so the binary actually accepts the flags. The upstream PR is still open.

The failure is deterministic and 100% reproducible — it affects every single hosted cluster creation across all platforms (AWS, Azure, KubeVirt) because the machine-approver deployment always receives the unsupported flags and always crashes.

Recommendations

  1. Do not merge PR OCPCLOUD-3347: feat(machine-approver): add TLS configuration options to deployment manifests #8019 until openshift/cluster-machine-approver#292 is merged and the updated cluster-machine-approver image is available in the CI release payload
  2. The PR already has a do-not-merge/hold label — this is appropriate
  3. Alternatively, add version gating to PR OCPCLOUD-3347: feat(machine-approver): add TLS configuration options to deployment manifests #8019 so the flags are only passed when the machine-approver image supports them (no other TLS flag additions in the codebase have such gating, so this may not be the preferred pattern)
  4. Once the upstream PR is merged, the CI release images need to be rebuilt with the new cluster-machine-approver binary before re-testing PR OCPCLOUD-3347: feat(machine-approver): add TLS configuration options to deployment manifests #8019

Artifacts

  • e2e-v2-aws: .work/prow-job-analyze-test-failure/2039885042146086912/logs/
  • e2e-aws: .work/prow-job-analyze-test-failure/2039885033765867520/logs/
  • e2e-aks: .work/prow-job-analyze-test-failure/2039885032079757312/logs/
  • e2e-azure-self-managed: .work/prow-job-analyze-test-failure/2039885037150670848/logs/
  • e2e-aws-upgrade: .work/prow-job-analyze-test-failure/2039885035435200512/logs/
  • e2e-kubevirt: .work/prow-job-analyze-test-failure/2039885039637893120/logs/

@hypershift-jira-solve-ci

hypershift-jira-solve-ci Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Now I have all the information needed. Let me compile the structured report:

Test Failure Analysis Complete (Multi-Step)

Job Information

  • PR: #8019OCPCLOUD-3347: feat(machine-approver): add TLS configuration options to deployment manifests
  • Failing Jobs: e2e-v2-aws, e2e-azure-self-managed, e2e-aks, e2e-aws-upgrade-hypershift-operator, e2e-kubevirt-aws-ovn-reduced, e2e-aws (all 6 Prow jobs)
  • Root Cause: Directly caused by PR changes — all jobs share the same failure

Root Cause Analysis

Error

unknown flag: --tls-min-version

The cluster-machine-approver binary (/usr/bin/machine-approver) does not recognize the --tls-min-version or --tls-cipher-suites flags. It prints its usage and exits with code 2 immediately on startup.

Failure Chain (traced to root cause)

Step What happened
1. PR code change deployment.go in control-plane-operator/controllers/hostedcontrolplane/v2/machine_approver/ appends --tls-min-version=VersionTLS12 and --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,... to the machine-approver container args
2. Container crash The cluster-machine-approver binary does not have these flags registered → exits immediately with unknown flag: --tls-min-version (exit code 2)
3. CrashLoopBackOff Pod enters CrashLoopBackOff (10+ restarts observed) — machine-approver deployment has 1 unavailable replica
4. HostedCluster not Available HostedCluster condition Available=False with reason: ComponentsNotAvailable message: "Waiting for components to be available: machine-approver"
5. HostedCluster Degraded HostedCluster condition Degraded=True with message: "machine-approver deployment has 1 unavailable replicas"
6. Test timeout oc wait --timeout=30m --for=condition=Available on the HostedCluster times out after 30 minutes → step fails → job fails

The Offending Code Change

File: control-plane-operator/controllers/hostedcontrolplane/v2/machine_approver/deployment.go

func adaptDeployment(cpContext component.WorkloadContext, deployment *appsv1.Deployment) error {
    hcp := cpContext.HCP
    configuration := hcp.Spec.Configuration
    util.UpdateContainer(ComponentName, deployment.Spec.Template.Spec.Containers, func(c *corev1.Container) {
        c.Args = append(c.Args, fmt.Sprintf("--machine-namespace=%s", hcp.Namespace))

+       if tlsMinVersion := config.MinTLSVersion(configuration.GetTLSSecurityProfile()); tlsMinVersion != "" {
+           c.Args = append(c.Args, fmt.Sprintf("--tls-min-version=%s", tlsMinVersion))
+       }
+       if cipherSuites := config.CipherSuites(configuration.GetTLSSecurityProfile()); len(cipherSuites) != 0 {
+           c.Args = append(c.Args, fmt.Sprintf("--tls-cipher-suites=%s", strings.Join(cipherSuites, ",")))
+       }
    })
    return nil
}

The PR assumes the cluster-machine-approver binary already supports --tls-min-version and --tls-cipher-suites CLI flags, but the upstream binary does not have these flags implemented yet.

Why All 6 Jobs Fail Identically

Every e2e job creates a HostedCluster. The machine-approver is a required control-plane component. Since the default TLS security profile produces non-empty MinTLSVersion and CipherSuites values, the flags are always appended — making every HostedCluster creation fail regardless of platform (AWS, Azure, AKS, KubeVirt).

Failed Jobs Summary

Job Build ID Failed Step Failure
e2e-v2-aws 2039885042146086912 e2e-v2-aws-create-hostedcluster machine-approver CrashLoopBackOff → HostedCluster timeout
e2e-aws 2039885033765867520 e2e-aws (create cluster) machine-approver unavailable → HostedCluster timeout
e2e-azure-self-managed 2039885037150670848 Cluster creation machine-approver unavailable → HostedCluster timeout
e2e-aks 2039885032079757312 Cluster creation machine-approver unavailable → HostedCluster timeout
e2e-aws-upgrade-hypershift-operator 2039885035435200512 Cluster creation machine-approver unavailable → HostedCluster timeout
e2e-kubevirt-aws-ovn-reduced 2039885039637893120 Cluster creation machine-approver unavailable → HostedCluster timeout

Non-Prow Failures

Check Likely Cause
Red Hat Konflux Build/image issue or test failure from the same code change
codecov/patch Insufficient test coverage on the new code paths

Recommendations

  1. The cluster-machine-approver binary must be updated first to register --tls-min-version and --tls-cipher-suites as valid CLI flags before this PR can merge. This likely requires a companion PR in the openshift/cluster-machine-approver repository.

  2. Coordinate the merge order: The upstream cluster-machine-approver image with TLS flag support must be available in the CI image registry before this HyperShift PR can pass CI. Either:

    • Merge the upstream change first, wait for the new image to propagate, then retest this PR, or
    • Gate this PR's flag injection on a version check / feature flag to avoid breaking older images
  3. Guard against missing flags: Consider adding a defensive check — e.g., only append TLS args when the machine-approver image version is known to support them, or add the flags via a ConfigMap / environment variable mechanism rather than CLI args, so unrecognized flags don't crash the binary.


Artifacts

  • Test artifacts: .work/prow-job-analyze-test-failure/2039885042146086912/logs/

@sjenning
sjenning merged commit 9b4b004 into openshift:main Apr 14, 2026
27 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants