Skip to content

[PCD-7821] feat: clean up scripts for hitachi#73

Open
sanya-pf9 wants to merge 28 commits into
masterfrom
sanya/hitachi-iscsi-audit
Open

[PCD-7821] feat: clean up scripts for hitachi#73
sanya-pf9 wants to merge 28 commits into
masterfrom
sanya/hitachi-iscsi-audit

Conversation

@sanya-pf9

@sanya-pf9 sanya-pf9 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

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

@sanya-pf9 sanya-pf9 changed the title feat: clean up scripts for hitachi [PCD-7821] feat: clean up scripts for hitachi Jun 9, 2026
Sanya Varghese and others added 18 commits June 17, 2026 11:55
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant