[2316] Feature: Add Hitachi support for storage accelerated migration via cinder mediated LUN Mapping - #2340
Draft
spai-p9 wants to merge 11 commits into
Draft
[2316] Feature: Add Hitachi support for storage accelerated migration via cinder mediated LUN Mapping#2340spai-p9 wants to merge 11 commits into
spai-p9 wants to merge 11 commits into
Conversation
…Copy Reimplements the private/main/cinder-optimisation work on top of current main: a Cinder os-initialize_connection fallback for vendors without native LUN mapping, a Hitachi Vantara storage provider (REST API, DP pool selection, Cinder-backend pool hint derivation), and the v2v-helper mapper selection (native vs Cinder) wired into the StorageAcceleratedCopy XCOPY flow. Reimplemented file-by-file against main's post-restructure layout rather than merging the old branch directly, since it predates the migrate.go/OpenStack client split and a raw merge would have reintroduced relocated code and dropped newer main-only features. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…olumeService GetCinderVolumeServices returns []openstack.CinderVolumeService, but the type assertion in autodiscoverCinderHost referenced a non-existent utils.CinderVolumeService, breaking the build.
Signed-off-by: K Suhas Pai <suhas@platform9.com>
Contributor
✅ Security Vulnerability SummaryNo change in security posture 📊 Overall Changes
🔍 Detailed Breakdown📦 Gosec (Static Analysis)
📦 Trivy (Dependency Scan)
📋 Baseline Methods
Only HIGH and CRITICAL severity vulnerabilities are tracked |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
Adds Hitachi Vantara (VSP family) as a third array vendor for Storage-Accelerated Copy (XCOPY), alongside the existing Pure and NetApp providers. Unlike Pure/NetApp, Vantara's Cinder driver (HBSD) already owns host/initiator-group/LUN-map management, so instead of reimplementing that against Hitachi's Configuration Manager REST API, this PR splits StorageProvider into a core surface + an optional VendorMapper surface, and adds a Cinder-mediated mapping fallback (os-initialize_connection/os-terminate_connection) that any vendor without native mapping can use.
Why the interface split
Previously StorageProvider bundled volume CRUD and ESXi host/initiator-group/LUN mapping into one interface, which implicitly assumed every vendor manages mapping through its own array API (true for Pure and NetApp, not true for Hitachi).
Cinder mapping fallback (pkg/vpwned/sdk/storage/cinder)
New CinderMapper implements the same three mapping operations by driving the array's own Cinder driver via os-initialize_connection/os-terminate_connection with an os-brick-style connector built from the ESXi host's HBAs — instead of calling array-native host/initiator-group/LUN-map APIs. Volume create/delete/NAA/resolve stay vendor-native regardless of mapping mode, since creating the LUN through the array's own REST API is what pins it to the correct physical array/pool.
Selection is controlled by a new ArrayCreds.spec.mappingMode:
v2v-helper (migrate/mapper.go) adds a Mapper interface + selectMapper() that adapts vendor-native providers (ctx-less by design) into a ctx-aware wrapper, and picks between vendorMapperAdapter and CinderMapper per this mode.
Hitachi Vantara provider (pkg/vpwned/sdk/storage/vantara)
New provider implementing only the core StorageProvider surface against Hitachi's Configuration Manager (GUM/SVP) REST API: session auth (~30 min expiry, auto re-auth at 25 min), async job polling, LDEV create/delete/info, and NAA lookup. It does not implement VendorMapper — mapping always goes through CinderMapper/HBSD.
Also includes:
API/CRD changes
UI
Testing
Notes for reviewers
Which issue(s) this PR fixes
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged)fixes #2316
Special notes for your reviewer
Testing done
please add testing details (logs, screenshots, etc.)