[PCD-7821] feat: clean up scripts for hitachi#73
Open
sanya-pf9 wants to merge 28 commits into
Open
Conversation
added 7 commits
June 11, 2026 13:28
…portId=... bug — no hostGroupNumber.
…t groups. Pass 2a then adds pf9-n02's IQN into host_iqn_map["pf9-n01"]. Pass 2b (--host-iqn) adds pf9-n01's IQN but doesn't clear the contamination.
… paths
- HG names now derived from hypervisor IPs (HBSD-{ip}) instead of hardcoded
- LDEV IDs auto-discovered: try OpenStack provider_location first, fall back
to scanning Hitachi ldevs by label (HBSD driver sets label = volume UUID)
- All inject/cleanup functions now look up HG numbers via _hv_hg_num_for_port
instead of using hardcoded HG_1_1_NUMBER / HG_1_2_NUMBER fallbacks
- _delete_hg_paths_for_ldev: treat KART40014-E (object not found) same as 404
so phantom records from failed inject cycles don't block cleanup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
added 2 commits
June 30, 2026 22:38
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.
pf9-storage-audit-hitachi.py — same flow as the NetApp script, but few changes in the flow:
the left were netapp choices and right is tweak for Hitachi
igroups (global) --> Host groups per port — same name on CL1-A, CL2-A, etc. Script groups by name before classifying
LUN path = /vol/vol1/volume- --> LDEV ID (int) from Cinder's provider_location field; falls back to label search
remove_lun_map(lun_uuid, igroup_uuid) --> remove_lun_path_entry(lun_id="CL1-A,0,0") (one call per port )
add_lun_map(lun_path, igroup) --> add_lun_path_entry(port_id, hg_number, ldev_id) (one call per port )
Synchronous REST --> Handles async jobs (jobId → poll until Completed)
All testing evidence and samples can be found in the READ ME