跳转到主内容

OpenStack:正则表达式模式匹配不适用于"netapp_pool_name_search_pattern"cinder 驱动程序配置选项

Views:
9
Visibility:
Public
Votes:
0
Category:
openstack
Specialty:
virt
Last Updated:

适用于

  • Openstack(有多个版本......从 Stein 到 Train)
  • Cinder 驱动程序

问题

在 cinder.conf 中使用 'netapp_pool_name_search_pattern' 配置选项过滤可用池时:

  • 您实际可以使用的内容受到限制,因为正则表达式模式匹配似乎不起作用。
  • Openstack 文档表明支持正则表达式。
  • 测试表明,当您指定 cinder get-pools --detail 报告的确切 'pool_name' 时,'netapp_pool_name_search_pattern' 配置选项有效。 

例如,假设您有三个具有以下名称的 Cinder 池:

  • openstack_iscsi_backing_01
  • openstack_iscsi_backing_02
  • openstack_iscsi_backing_03

如果按如下方式配置 'netapp_pool_name_search_pattern',则过滤将按预期工作:

  • netapp_pool_name_search_pattern=(openstack_iscsi_backing_01)
  • netapp_pool_name_search_pattern=(openstack_iscsi_backing_01|openstack_iscsi_backing_02| openstack_iscsi_backing_03)

使用正则表达式模式匹配配置"netapp_pool_name_search_pattern"时,过滤不起作用。  例如,以下内容不起作用:

netapp_pool_name_search_pattern=(openstack)
netapp_pool_name_search_pattern=(openstack_*)

 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.