Skip to content

feat(cinder): Multi-FlexVol routing for NetApp NVMe driver#1800

Merged
cardoe merged 3 commits intomainfrom
cinder_for_multivol
Mar 17, 2026
Merged

feat(cinder): Multi-FlexVol routing for NetApp NVMe driver#1800
cardoe merged 3 commits intomainfrom
cinder_for_multivol

Conversation

@nidzrai
Copy link
Contributor

@nidzrai nidzrai commented Mar 12, 2026

Extended the dynamic NetApp NVMe Cinder driver to support multiple FlexVols per SVM, enabling per-volume-type storage routing within a single project's SVM. https://github.com/RSS-Engineering/undercloud-deploy/pull/1463/changes

@nidzrai nidzrai changed the title debug: add startup diagnostics and vol_type_id UUID normalization probe test: add startup diagnostics and vol_type_id UUID normalization probe Mar 12, 2026
@nidzrai nidzrai force-pushed the cinder_for_multivol branch 2 times, most recently from e426433 to d450956 Compare March 16, 2026 14:03
@nidzrai nidzrai changed the title test: add startup diagnostics and vol_type_id UUID normalization probe feat(cinder): Multi-FlexVol routing for NetApp NVMe driver Mar 16, 2026
@nidzrai nidzrai force-pushed the cinder_for_multivol branch 2 times, most recently from 8ff7a63 to 6cd71a3 Compare March 16, 2026 16:15
# We use a + because of the special meaning of # in
# cinder/volume/volume_utils.py extract_host()
_SVM_NAME_DELIM = "+"
_FLEXVOL_PREFIX = "vol_"
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't hardcode this. Instead netapp_pool_name_search_pattern is the config option that we should use. https://docs.openstack.org/cinder/latest/configuration/block-storage/drivers/netapp-volume-driver.html

We'd define this as netapp_pool_name_search_pattern = vol_(.+)

pool["netapp_vserver"] = svm_name
prefix = self.configuration.safe_get("netapp_vserver_prefix")
pool["netapp_project_id"] = svm_name.replace(prefix, "")
svm_uuid = svm_name.removeprefix(prefix)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
svm_uuid = svm_name.removeprefix(prefix)
project_uuid = svm_name.removeprefix(prefix)

prefix = self.configuration.safe_get("netapp_vserver_prefix")
pool["netapp_project_id"] = svm_name.replace(prefix, "")
svm_uuid = svm_name.removeprefix(prefix)
pool["netapp_project_id"] = svm_uuid
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pool["netapp_project_id"] = svm_uuid
pool["netapp_project_id"] = project_uuid

@nidzrai nidzrai force-pushed the cinder_for_multivol branch 4 times, most recently from d98bf3e to 60010e8 Compare March 16, 2026 18:00
@nidzrai nidzrai requested a review from cardoe March 16, 2026 18:22
@nidzrai
Copy link
Contributor Author

nidzrai commented Mar 16, 2026

https://github.com/RSS-Engineering/undercloud-deploy/pull/1463/changes for netapp_pool_name_search_pattern = vol_(.+)

Copy link
Contributor

@cardoe cardoe left a comment

Choose a reason for hiding this comment

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

We need to crank the logging down in the default case by a lot. Even some of these logs will probably need to be removed even further. The logs are just so noisy at this point and this will add more.

# Get the current SVMs from cluster
current_svms = set(self._get_svms())
LOG.info("Current SVMs detected from cluster: %s", current_svms)
LOG.info(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOG.info(
LOG.debug(

@@ -260,12 +262,13 @@ def _refresh_svm_libraries(self):
def _actual_refresh_svm_libraries(self, ctxt):
"""Refresh the SVM libraries."""
LOG.info("Start refreshing SVM libraries")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOG.info("Start refreshing SVM libraries")
LOG.debug("Start refreshing SVM libraries")

def check_for_setup_error(self):
"""Check for setup errors."""
svm_to_init = set(self._libraries.keys())
LOG.info(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOG.info(
LOG.debug(

svm_lib = self._libraries[svm_name]
try:
svm_lib.check_for_setup_error()
LOG.info("SVM %s setup check passed", svm_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOG.info("SVM %s setup check passed", svm_name)
LOG.debug("SVM %s setup check passed", svm_name)

LOG.exception("Failed to initialize SVM %s, skipping", svm_name)
self._remove_svm_lib(svm_lib)
del self._libraries[svm_name]
LOG.info(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOG.info(
LOG.debug(

)
svm_name = f"os-{volume['project_id']}"

LOG.info(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOG.info(
LOG.debug(

)

volume["host"] = original_host.replace(f"{svm_name}{_SVM_NAME_DELIM}", "")
LOG.info(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOG.info(
LOG.debug(


def create_volume(self, volume):
"""Create a volume."""
LOG.info(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOG.info(
LOG.debug(


def delete_volume(self, volume):
"""Delete a volume."""
LOG.info(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOG.info(
LOG.debug(

else:
return svm_filter
result = combined
LOG.info("get_filter_function: filter=%s", result)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOG.info("get_filter_function: filter=%s", result)
LOG.debug("get_filter_function: filter=%s", result)

@nidzrai nidzrai force-pushed the cinder_for_multivol branch from 60010e8 to 449a7d6 Compare March 17, 2026 10:31
@nidzrai nidzrai force-pushed the cinder_for_multivol branch from 449a7d6 to 68973b9 Compare March 17, 2026 10:36
@nidzrai nidzrai requested a review from cardoe March 17, 2026 10:37
@cardoe cardoe added this pull request to the merge queue Mar 17, 2026
Merged via the queue into main with commit f0f390c Mar 17, 2026
62 checks passed
@cardoe cardoe deleted the cinder_for_multivol branch March 17, 2026 20:19
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