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 | +-----------------------------+----------------------------+
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: 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'}},
Two pools:
{u'name': u'cinder@
{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 ------- -----+- ------- ------- ------- ----+-- ----+-- ------- +------ -+----- ------- ------- ------- --+---- ------- ------+ ------- ------- -+ ------- -----+- ------- ------- ------- ----+-- ----+-- ------- +------ -+----- ------- ------- ------- --+---- ------- ------+ ------- ------- -+ 15T03:13: 35.000000 | - | | 15T03:13: 28.000000 | - | down | ------- -----+- ------- ------- ------- ----+-- ----+-- ------- +------ -+----- ------- ------- ------- --+---- ------- ------+ ------- ------- -+
+------
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason | Backend State |
+------
| cinder-scheduler | cinder | nova | enabled | up | 2018-03-
| cinder-volume | cinder@ZTE_FCSAN-2 | nova | enabled | up | 2018-03-
+------
[root@2c510 tecs(keystone_ admin)] # cinder get-pools --detail ------- ------- ------- --+---- ------- ------- ------- ---+ ------- ------- ------- --+---- ------- ------- ------- ---+ capacity_ gb | 0 | capacity_ gb | 0 | subscription_ ratio | 20.0 | ZTE_FCSAN- 2#pool1 | capacity_ gb | 165 | ing_support | True | ng_support | False | 15T03:12: 49.800234 | ------- ------- ------- --+---- ------- ------- ------- ---+
+------
| Property | Value |
+------
| QoS_support | True |
| allocated_
| backend_state | up |
| contiguous_
| driver_version | 6.0.0 |
| free_capacity_gb | 2609 |
| is_pool | True |
| location_info | 000000000000 |
| max_over_
| multiattach | True |
| name | cinder@
| pool_name | pool1 |
| provisioned_
| reserved_percentage | 0 |
| storage_protocol | iSCSI |
| thick_provision
| thin_provisioni
| timestamp | 2018-03-
| total_capacity_gb | 2775 |
| vendor_name | ZTE |
| volume_backend_name | FCSAN_2 |
+------
+------ ------- ------- ------- --+---- ------- ------- ------- ---+ ------- ------- ------- --+---- ------- ------- ------- ---+ capacity_ gb | 0 | capacity_ gb | 0 | subscription_ ratio | 20.0 | ZTE_FCSAN- 2#pool111 | capacity_ gb | 0 | ing_support | True | ng_support | False | 15T03:12: 49.800234 | ------- ------- ------- --+---- ------- ------- ------- ---+
| Property | Value |
+------
| QoS_support | True |
| allocated_
| backend_state | down |
| contiguous_
| driver_version | 6.0.0 |
| free_capacity_gb | 0 |
| is_pool | True |
| location_info | 000000000000 |
| max_over_
| multiattach | True |
| name | cinder@
| pool_name | pool111 |
| provisioned_
| reserved_percentage | 0 |
| storage_protocol | iSCSI |
| thick_provision
| thin_provisioni
| timestamp | 2018-03-
| total_capacity_gb | 0 |
| vendor_name | ZTE |
| volume_backend_name | FCSAN_2 |
+------