Skip to content

OCPBUGS-78576: Update the csi-driver-host-path version to 1.17.1#2641

Open
jsafrane wants to merge 3 commits intoopenshift:masterfrom
jsafrane:4.22-hostpath-1.17
Open

OCPBUGS-78576: Update the csi-driver-host-path version to 1.17.1#2641
jsafrane wants to merge 3 commits intoopenshift:masterfrom
jsafrane:4.22-hostpath-1.17

Conversation

@jsafrane
Copy link
Copy Markdown

@jsafrane jsafrane commented Apr 9, 2026

This is a replacement for #2629, with two upstream PRs:

kubernetes#136913: Update the csi-driver-host-path version to 1.17.1 in the CSI driver manifests
kubernetes#136337: Update DRA tests to read csi-driver-host-path from the CSI driver manifests instead of hardcoding its own version.

jsafrane and others added 2 commits April 9, 2026 17:38
When testing in an air-gapped cluster, users of the e2e.test depend on
-list-images and KUBE_TEST_REPO_LIST to pre-populate a local registry with
required images.

The hostpath image used by DRA was not part of that process (not getting
patched with local registry) and the version fell behind what SIG Storage was
using at least once. Now the registry and version are derived from what is
being tested elsewhere, using the latest available image if there is more than
one.
@openshift-ci-robot openshift-ci-robot added backports/validated-commits Indicates that all commits come to merged upstream PRs. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Apr 9, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@jsafrane: This pull request references Jira Issue OCPBUGS-78576, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

This is a replacement for #2629, with two upstream PRs:

kubernetes#136913: Update the csi-driver-host-path version to 1.17.1 in the CSI driver manifests
kubernetes#136337: Update DRA tests to read csi-driver-host-path from the CSI driver manifests instead of hardcoding its own version.

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
Copy link
Copy Markdown

@jsafrane: the contents of this pull request could be automatically validated.

The following commits are valid:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@openshift-ci openshift-ci bot requested review from benluddy and deads2k April 9, 2026 15:50
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 38d982ac-7361-4354-aaee-95b3f99816b7

📥 Commits

Reviewing files that changed from the base of the PR and between 6bdaf8d and 6cb4b77.

📒 Files selected for processing (1)
  • test/e2e/testing-manifests/dra/dra-test-driver-proxy.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/e2e/testing-manifests/dra/dra-test-driver-proxy.yaml

Walkthrough

Deploy logic now discovers and patches the highest-version hostpathplugin image at runtime and injects the patched image into the ReplicaSet manifest. Several test manifests had container image tags updated (including one unpinned placeholder for runtime replacement).

Changes

Cohort / File(s) Summary
DRA Deployment Logic
test/e2e/dra/utils/deploy.go
Added k8s.io/kubernetes/test/utils/image import; moved manifest slice creation; added logic to find the highest-version registry.k8s.io/sig-storage/hostpathplugin:<version> from original image configs, construct and patch the image URL, fail on lookup/patch errors, and set item.Spec.Template.Spec.Containers[0].Image to the patched image in the ReplicaSet mutation.
DRA proxy manifest (placeholder image)
test/e2e/testing-manifests/dra/dra-test-driver-proxy.yaml
Replaced a pinned hostpathplugin image with an unpinned registry.k8s.io/sig-storage/hostpathplugin:to-be-replaced placeholder and added a comment indicating runtime patching.
CSI hostpath/plugin image bumps
test/e2e/testing-manifests/storage-csi/external-snapshotter/volume-group-snapshots/csi-hostpath-plugin.yaml, test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-plugin.yaml, test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver.yaml, test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml
Updated hostpathplugin image tags from v1.16.1 or v1.17.0 to v1.17.1 in multiple CSI-related manifests; no other pod spec fields changed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

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

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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/e2e/dra/utils/deploy.go`:
- Around line 473-491: The loop selecting hostPathVersion uses string
comparison; change it to parse image tags as semantic versions (e.g., use
k8s.io/apimachinery/pkg/util/version's ParseSemantic or a semver lib) and
compare versions semantically when updating hostPathVersion (use version.Compare
or GreaterThan/Compare methods on parsed versions), and add a guard after the
loop to fail the test if hostPathVersion is still empty before building
origImageURL (e.g., call framework.Failf or return an error) so
ReplaceRegistryInImageURL is not invoked with a missing tag; keep references to
GetOriginalImageConfigs, GetE2EImage, hostPathVersion, origImageURL, and
ReplaceRegistryInImageURL to locate the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2ffd5fa4-fe6c-4fdc-be0b-4c619c00ba82

📥 Commits

Reviewing files that changed from the base of the PR and between 9193b12 and 6bdaf8d.

📒 Files selected for processing (6)
  • test/e2e/dra/utils/deploy.go
  • test/e2e/testing-manifests/dra/dra-test-driver-proxy.yaml
  • test/e2e/testing-manifests/storage-csi/external-snapshotter/volume-group-snapshots/csi-hostpath-plugin.yaml
  • test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-plugin.yaml
  • test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver.yaml
  • test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml

Comment on lines +473 to +491
for _, config := range image.GetOriginalImageConfigs() {
parts := strings.SplitN(config.GetE2EImage(), ":", 2)
if len(parts) < 2 {
continue
}
image, version := parts[0], parts[1]
if image != hostPathImage {
continue
}
// "Dumb" string comparison is good enough for e.g. v1.16.1 < v1.17.0.
// It seems unlikely that any major/patch will need more than one digit
// or that version grow beyond 99.
if hostPathVersion == "" || hostPathVersion < version {
hostPathVersion = version
}
}
origImageURL := hostPathImage + ":" + hostPathVersion
patchedImageURL, err := image.ReplaceRegistryInImageURL(origImageURL)
framework.ExpectNoError(err, "look up E2E image")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Use semantic version ordering when selecting the hostpath image.

The current lexical comparison can pick an older version as “latest” (for example, v1.9.0 sorting above v1.17.1). Also add a guard for the “no hostpath tag found” case before building origImageURL.

Suggested fix
 	hostPathImage := "registry.k8s.io/sig-storage/hostpathplugin"
 	hostPathVersion := ""
+	bestMajor, bestMinor, bestPatch := -1, -1, -1
 	for _, config := range image.GetOriginalImageConfigs() {
 		parts := strings.SplitN(config.GetE2EImage(), ":", 2)
 		if len(parts) < 2 {
 			continue
 		}
 		image, version := parts[0], parts[1]
 		if image != hostPathImage {
 			continue
 		}
-		// "Dumb" string comparison is good enough for e.g. v1.16.1 < v1.17.0.
-		// It seems unlikely that any major/patch will need more than one digit
-		// or that version grow beyond 99.
-		if hostPathVersion == "" || hostPathVersion < version {
+		var major, minor, patch int
+		if _, err := fmt.Sscanf(strings.TrimPrefix(version, "v"), "%d.%d.%d", &major, &minor, &patch); err != nil {
+			continue
+		}
+		if major > bestMajor ||
+			(major == bestMajor && minor > bestMinor) ||
+			(major == bestMajor && minor == bestMinor && patch > bestPatch) {
+			bestMajor, bestMinor, bestPatch = major, minor, patch
 			hostPathVersion = version
 		}
 	}
+	if hostPathVersion == "" {
+		framework.Failf("failed to find tagged %q image in E2E image configs", hostPathImage)
+	}
 	origImageURL := hostPathImage + ":" + hostPathVersion
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/dra/utils/deploy.go` around lines 473 - 491, The loop selecting
hostPathVersion uses string comparison; change it to parse image tags as
semantic versions (e.g., use k8s.io/apimachinery/pkg/util/version's
ParseSemantic or a semver lib) and compare versions semantically when updating
hostPathVersion (use version.Compare or GreaterThan/Compare methods on parsed
versions), and add a guard after the loop to fail the test if hostPathVersion is
still empty before building origImageURL (e.g., call framework.Failf or return
an error) so ReplaceRegistryInImageURL is not invoked with a missing tag; keep
references to GetOriginalImageConfigs, GetE2EImage, hostPathVersion,
origImageURL, and ReplaceRegistryInImageURL to locate the change.

@jsafrane
Copy link
Copy Markdown
Author

jsafrane commented Apr 9, 2026

/test unit
it looks like a flake, this PR does not change any unit test or code in pkg/

@jsafrane
Copy link
Copy Markdown
Author

e2e errors are real, investigating

In air-gaped environment, the image must have `name:tag` to be parsed and
updated with a private registry.
@openshift-ci-robot openshift-ci-robot added backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. and removed backports/validated-commits Indicates that all commits come to merged upstream PRs. labels Apr 10, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@jsafrane: the contents of this pull request could not be automatically validated.

The following commits are valid:

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@jsafrane
Copy link
Copy Markdown
Author

jsafrane commented Apr 10, 2026

/hold
upstream 138318 has not merged yet. Testing how / if it's actually helping.

@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 10, 2026
@jsafrane
Copy link
Copy Markdown
Author

/hold cancel
the upstream PR has all labels, it just waits for the repo to un-freeze.

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 13, 2026
@bertinatto
Copy link
Copy Markdown
Member

/remove-label backports/unvalidated-commits
/lgtm
/retest-required

@openshift-ci openshift-ci bot removed the backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. label Apr 13, 2026
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 13, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 13, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bertinatto, jsafrane

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 13, 2026
@jsafrane
Copy link
Copy Markdown
Author

/verified by jsafrane

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

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

Details

In response to this:

/verified by jsafrane

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.

@jsafrane
Copy link
Copy Markdown
Author

/retest-required

1 similar comment
@jsafrane
Copy link
Copy Markdown
Author

/retest-required

@openshift-merge-bot
Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 9193b12 and 2 for PR HEAD 6cb4b77 in total

@bertinatto
Copy link
Copy Markdown
Member

/retest-required

@jsafrane
Copy link
Copy Markdown
Author

/retest-required

https://redhat.atlassian.net/browse/OCPBUGS-77244 got fixed, so maybe...

@jsafrane
Copy link
Copy Markdown
Author

/retest-required

3 similar comments
@jsafrane
Copy link
Copy Markdown
Author

/retest-required

@Phaow
Copy link
Copy Markdown

Phaow commented Apr 20, 2026

/retest-required

@jsafrane
Copy link
Copy Markdown
Author

/retest-required

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 20, 2026

@jsafrane: 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-ovn-runc 6cb4b77 link false /test e2e-aws-ovn-runc
ci/prow/e2e-aws-ovn-techpreview 6cb4b77 link false /test e2e-aws-ovn-techpreview
ci/prow/e2e-aws-ovn-crun 6cb4b77 link true /test e2e-aws-ovn-crun

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

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants