feat(cinder): Multi-FlexVol routing for NetApp NVMe driver#1800
Conversation
e426433 to
d450956
Compare
8ff7a63 to
6cd71a3
Compare
| # We use a + because of the special meaning of # in | ||
| # cinder/volume/volume_utils.py extract_host() | ||
| _SVM_NAME_DELIM = "+" | ||
| _FLEXVOL_PREFIX = "vol_" |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
| 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 |
There was a problem hiding this comment.
| pool["netapp_project_id"] = svm_uuid | |
| pool["netapp_project_id"] = project_uuid |
d98bf3e to
60010e8
Compare
|
https://github.com/RSS-Engineering/undercloud-deploy/pull/1463/changes for netapp_pool_name_search_pattern = vol_(.+) |
cardoe
left a comment
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
| 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") | |||
There was a problem hiding this comment.
| 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( |
There was a problem hiding this comment.
| 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) |
There was a problem hiding this comment.
| 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( |
There was a problem hiding this comment.
| LOG.info( | |
| LOG.debug( |
| ) | ||
| svm_name = f"os-{volume['project_id']}" | ||
|
|
||
| LOG.info( |
There was a problem hiding this comment.
| LOG.info( | |
| LOG.debug( |
| ) | ||
|
|
||
| volume["host"] = original_host.replace(f"{svm_name}{_SVM_NAME_DELIM}", "") | ||
| LOG.info( |
There was a problem hiding this comment.
| LOG.info( | |
| LOG.debug( |
|
|
||
| def create_volume(self, volume): | ||
| """Create a volume.""" | ||
| LOG.info( |
There was a problem hiding this comment.
| LOG.info( | |
| LOG.debug( |
|
|
||
| def delete_volume(self, volume): | ||
| """Delete a volume.""" | ||
| LOG.info( |
There was a problem hiding this comment.
| LOG.info( | |
| LOG.debug( |
| else: | ||
| return svm_filter | ||
| result = combined | ||
| LOG.info("get_filter_function: filter=%s", result) |
There was a problem hiding this comment.
| LOG.info("get_filter_function: filter=%s", result) | |
| LOG.debug("get_filter_function: filter=%s", result) |
60010e8 to
449a7d6
Compare
449a7d6 to
68973b9
Compare
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