Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement fix for #42 adding manage/unmanage support for volume/snapshot #45

Merged
merged 4 commits into from
Dec 29, 2023

Conversation

YiHuangDB
Copy link
Contributor

@YiHuangDB YiHuangDB commented Dec 21, 2023

#42 Issue descriptions:

Driver feature manage/unmanage volume/snapshot from Truenas internal reference not yet supported

Failed tempest ci test case
https://docs.openstack.org/tempest/latest/_modules/volume/admin/test_snapshot_manage.html#SnapshotManageAdminTest
https://docs.openstack.org/tempest/latest/_modules/volume/admin/test_volume_manage.html#VolumeManageAdminTest.test_unmanage_manage_volume

Solution:
Adding driver implementation method to to support cinder manage/unmanage volume/snapshot

Changes:
iscsi.py
add functions:
manage_existing
manage_existing_snapshot
manage_existing_get_size
manage_existing_snapshot_get_size
get_manageable_volumes
get_manageable_snapshots

common.py
add function
get_volume
get_snapshot
get_all_snapshot
get_volume_from_snapshot

utils.py
add function
generate_volume_id_from_freenas_volume_name
generate_snapshot_id_from_freenas_snapshot_name

Additional notes:

  1. change cinder volume name to truenas zvol name mapping from uuid aaa-bbb-ccc-ddd-eee -> volume-aaa to volume-aaa-bbb-ccc-ddd-eee (this is ensure 1 to 1 mapping so no extra meta storage is required when manage/unmanage two system cinder vs truenas)
  2. change cinder snapshot name to truenas zvol name mapping from uuid aaa-bbb-ccc-ddd-eee -> snap-aaa to snap-aaa-bbb-ccc-ddd-eee
  3. manage_existing depends on renaming volume from old to new name, use replication api as workaround
  4. manage_existing_snapshot depends on renaming snapshot from old name to new name, no api available at this moment, leave for future implementation once rename snapshot name api available or use zfs native command zfs rename instead
  5. https://docs.openstack.org/tempest/latest/_modules/volume/admin/test_volume_manage.html#VolumeManageAdminTest.test_unmanage_manage_volume test pass
    https://docs.openstack.org/tempest/latest/_modules/volume/admin/test_snapshot_manage.html#SnapshotManageAdminTest test failed due to no snapshot rename implemented for now
  6. get_manageable_volumes and get_manageable_snapshots is not covered by tempest testcase and it's not mandatory leave it for future implementation.

@YiHuangDB YiHuangDB requested a review from william-gr December 21, 2023 14:32
@YiHuangDB YiHuangDB self-assigned this Dec 21, 2023
@william-gr william-gr merged commit d7ab9ce into iXsystems:upstream Dec 29, 2023
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.

2 participants