Skip to content

fix(e2e): restrict VM SKU fallbacks to RP-allowlisted instance types#6015

Open
roivaz wants to merge 1 commit into
Azure:mainfrom
roivaz:fix/e2e-vm-sku-rp-allowlist
Open

fix(e2e): restrict VM SKU fallbacks to RP-allowlisted instance types#6015
roivaz wants to merge 1 commit into
Azure:mainfrom
roivaz:fix/e2e-vm-sku-rp-allowlist

Conversation

@roivaz

@roivaz roivaz commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Why

The e2e VM-size selectors in test/util/framework/vm_sku_selection.go choose SKUs based only on Azure availability and capabilities (vCPUs, ephemeral OS disk support, etc.), with no awareness of the ARO-HCP RP's instance-type allowlist (cluster-service cloud-resource-constraints-config).

When a region/subscription makes the preferred candidates unavailable (as happened in a PROD uksouth rehearsal), selection falls through to a SKU that Azure advertises but the RP rejects, failing node pool creation:

RESPONSE 400: 400 Bad Request
ERROR CODE: InvalidRequestContent
{ "error": { "code": "InvalidRequestContent",
  "message": "Machine type 'Standard_D8lds_v6' is not supported." } }

Only the plain s and AMD as D-series variants are enabled in the RP allowlist; the local-disk ds/lds/ads variants are not.

What

Restrict the Preferred lists and NamePattern fallback regexes of the worker selectors to allowlisted families:

Selector Old (non-allowlisted) New (allowlisted)
default-worker D8ds_v5, D8lds_v6 D8s_v5, D8s_v6 (D8as_v5 kept)
small-worker D4ds_v5, D4lds_v6 D4s_v5, D4s_v6 (D4as_v5 kept)
ephemeral-osdisk-worker D8ds_v5, D8ads_v5, D8lds_v6 D16s_v3, D32s_v3 (Dsv3 is the only allowlisted family with cache-based ephemeral OS disk)

The NamePattern regexes are tightened from [^p]*s_v[3456] to (?:a)?s_v[3456] so the deterministic fallback path also cannot pick a non-allowlisted local-disk SKU. Historical primary preferences (Standard_D8s_v3 / Standard_D4s_v3) are unchanged, so behaviour only diverges when those are genuinely unusable.

Jumpbox is left unchanged — it is a plain Azure VM and not subject to RP instance-type constraints.

Testing

  • cd test && go test ./util/framework/... → ok
  • Verified every new regex rejects all non-allowlisted SKUs (ds/lds/ads/p) and accepts the enabled s/as families.

The e2e VM-size selectors picked SKUs based only on Azure availability and
capabilities, with no awareness of the ARO-HCP RP instance-type allowlist
(cluster-service cloud-resource-constraints-config). When a region/subscription
made the preferred candidates unavailable, selection could fall through to a
SKU that Azure advertises but the RP rejects, failing node pool creation with:

    RESPONSE 400 InvalidRequestContent:
    Machine type 'Standard_D8lds_v6' is not supported.

Only the plain "s" and AMD "as" D-series variants are enabled in the RP
allowlist; the local-disk "ds"/"lds"/"ads" variants are not. This restricts
the Preferred lists and NamePattern fallback regexes of the worker selectors
to allowlisted families:

- default-worker: D8ds_v5/D8lds_v6 -> D8s_v5/D8s_v6 (D8as_v5 kept)
- small-worker:   D4ds_v5/D4lds_v6 -> D4s_v5/D4s_v6 (D4as_v5 kept)
- ephemeral-osdisk-worker: Dsv3 is the only allowlisted family with
  cache-based ephemeral OS disk support, so candidates are the Dsv3 family
  (D8s_v3 preferred, D16s_v3/D32s_v3 as availability fallback)

The NamePattern regexes are tightened from `[^p]*s_v[3456]` to
`(?:a)?s_v[3456]` so the deterministic fallback path also cannot pick a
non-allowlisted local-disk SKU. Jumpbox is unchanged (plain Azure VM, not
subject to RP instance-type constraints).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 10, 2026 14:36
@openshift-ci openshift-ci Bot requested review from miquelsi and patriksuba July 10, 2026 14:36
@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roivaz

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

The pull request process is described 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the E2E VM SKU selection logic so worker node pool VM sizes (both preferred choices and deterministic regex-based fallbacks) stay within ARO-HCP RP allowlisted instance types, preventing node pool creation failures when Azure-advertised-but-RP-rejected SKUs are selected.

Changes:

  • Tighten default and small worker SKU preferences to RP-allowlisted D-series variants.
  • Narrow fallback regex patterns to prevent selecting non-allowlisted local-disk variants (ds/lds/ads) and ARM64 p variants.
  • Restrict ephemeral OS disk worker selection to allowlisted Dsv3 sizes that support ephemeral OS disks via cache.

Preferred: []string{DefaultWorkerVMSize, "Standard_D8ds_v5", "Standard_D8as_v5", "Standard_D8lds_v6"},
NamePattern: regexp.MustCompile(`^Standard_D[4-8][^p]*s_v[3456]$`),
Preferred: []string{DefaultWorkerVMSize, "Standard_D8s_v5", "Standard_D8as_v5", "Standard_D8s_v6"},
NamePattern: regexp.MustCompile(`^Standard_D[4-8](?:a)?s_v[3456]$`),
Preferred: []string{SmallWorkerVMSize, "Standard_D4ds_v5", "Standard_D4as_v5", "Standard_D4lds_v6"},
NamePattern: regexp.MustCompile(`^Standard_D[2-4][^p]*s_v[3456]$`),
Preferred: []string{SmallWorkerVMSize, "Standard_D4s_v5", "Standard_D4as_v5", "Standard_D4s_v6"},
NamePattern: regexp.MustCompile(`^Standard_D[2-4](?:a)?s_v[3456]$`),
Comment on lines +425 to +426
Preferred: []string{DefaultWorkerVMSize, "Standard_D8s_v5", "Standard_D8as_v5", "Standard_D8s_v6"},
NamePattern: regexp.MustCompile(`^Standard_D[4-8](?:a)?s_v[3456]$`),
@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown

@roivaz: The following test 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-parallel aa44b8c link true /test e2e-parallel

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants