Comment 0 for bug 1756222

Revision history for this message
Yafei Yu (yu-yafei) wrote :

Volume backend with several pools may return wrong backend state

if volume backend is consists of two pools,one of the pool's backend_state is up and another is down, the backend state would be down.

For example:
Two pools:
{u'name': u'cinder@ZTE_FCSAN-2#pool1', u'capabilities': {u'location_info': u'000000000000', u'pool_name': u'pool1', u'contiguous_capacity_gb': 0, u'QoS_support': True, u'is_pool': True, u'thick_provisioning_support': True, u'provisioned_capacity_gb': 165, u'timestamp': u'2018-03-15T02:52:43.480504', u'allocated_capacity_gb': 0, u'volume_backend_name': u'FCSAN_2', u'thin_provisioning_support': False, u'free_capacity_gb': 2609, u'driver_version': u'6.0.0', u'total_capacity_gb': 2775, u'reserved_percentage': 0, u'multiattach': True, u'vendor_name': u'ZTE', u'max_over_subscription_ratio': 20.0, u'storage_protocol': u'iSCSI'}},

{u'name': u'cinder@ZTE_FCSAN-2#pool111', u'capabilities': {u'location_info': u'000000000000', u'pool_name': u'pool111', u'contiguous_capacity_gb': 0, u'QoS_support': True, u'is_pool': True, u'thick_provisioning_support': True, u'provisioned_capacity_gb': 0, u'timestamp': u'2018-03-15T02:52:43.480504', u'allocated_capacity_gb': 0, u'volume_backend_name': u'FCSAN_2', u'thin_provisioning_support': False, u'free_capacity_gb': 0, u'driver_version': u'6.0.0', u'total_capacity_gb': 0, u'reserved_percentage': 0, u'multiattach': True, u'vendor_name': u'ZTE', u'max_over_subscription_ratio': 20.0, u'storage_protocol': u'iSCSI'}}]

But backend_state_map={u'cinder@ZTE_FCSAN-2': u'down'}

[root@2c510 tecs(keystone_admin)]# cinder service-list
+------------------+--------------------------+------+---------+-------+----------------------------+-----------------+---------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason | Backend State |
+------------------+--------------------------+------+---------+-------+----------------------------+-----------------+---------------+
| cinder-scheduler | cinder | nova | enabled | up | 2018-03-15T03:13:35.000000 | - | |
| cinder-volume | cinder@ZTE_FCSAN-2 | nova | enabled | up | 2018-03-15T03:13:28.000000 | - | down |
+------------------+--------------------------+------+---------+-------+----------------------------+-----------------+---------------+

[root@2c510 tecs(keystone_admin)]# cinder get-pools --detail
+-----------------------------+----------------------------+
| Property | Value |
+-----------------------------+----------------------------+
| QoS_support | True |
| allocated_capacity_gb | 0 |
| backend_state | up |
| contiguous_capacity_gb | 0 |
| driver_version | 6.0.0 |
| free_capacity_gb | 2609 |
| is_pool | True |
| location_info | 000000000000 |
| max_over_subscription_ratio | 20.0 |
| multiattach | True |
| name | cinder@ZTE_FCSAN-2#pool1 |
| pool_name | pool1 |
| provisioned_capacity_gb | 165 |
| reserved_percentage | 0 |
| storage_protocol | iSCSI |
| thick_provisioning_support | True |
| thin_provisioning_support | False |
| timestamp | 2018-03-15T03:12:49.800234 |
| total_capacity_gb | 2775 |
| vendor_name | ZTE |
| volume_backend_name | FCSAN_2 |
+-----------------------------+----------------------------+

+-----------------------------+----------------------------+
| Property | Value |
+-----------------------------+----------------------------+
| QoS_support | True |
| allocated_capacity_gb | 0 |
| backend_state | down |
| contiguous_capacity_gb | 0 |
| driver_version | 6.0.0 |
| free_capacity_gb | 0 |
| is_pool | True |
| location_info | 000000000000 |
| max_over_subscription_ratio | 20.0 |
| multiattach | True |
| name | cinder@ZTE_FCSAN-2#pool111 |
| pool_name | pool111 |
| provisioned_capacity_gb | 0 |
| reserved_percentage | 0 |
| storage_protocol | iSCSI |
| thick_provisioning_support | True |
| thin_provisioning_support | False |
| timestamp | 2018-03-15T03:12:49.800234 |
| total_capacity_gb | 0 |
| vendor_name | ZTE |
| volume_backend_name | FCSAN_2 |
+-----------------------------+----------------------------+