Description
===========
Three cinder-volume services was started in different hosts and
they all refer to the same rbd backend by setting same cinder backend
configuration. In order to achieve Active-Active configurations
the cluster configuration option is defined in the [DEFAULT] section
of cinder.conf for each cinder-volume service.
After these cinder-volume services was started, three records could be
seen in volume service list. However, just one record could be seen for
cinder get-pools conmmand.
When 10 volumes of 10GB of that backend was created successfully, three
different values of allocation_capacity_gb i.e. 30, 40 and 30 could be
inspected by executing cinder get-pools conmmand many times.
Therefore, each cinder-volume service has its own allocation_capacity_gb
and allocation_capacity_gb does not have Active-Active realization.
Steps to reproduce
==================
1. Spawn three cinder-volume services which all refer to the same rbd
backend and belong to one cluster whose name is clus1 e.g.
$ openstack volume service list
+------------------+-----------------------+-------------+---------+-------+----------------------------+
| Binary | Host | Zone | Status | State | Updated At |
+------------------+-----------------------+-------------+---------+-------+----------------------------+
| cinder-volume | host1@rbd-clus-1 | az-stackdev | enabled | up | 2022-10-30T11:29:07.000000 |
| cinder-volume | host2@rbd-clus-1 | az-stackdev | enabled | up | 2022-10-30T11:29:07.000000 |
| cinder-volume | host3@rbd-clus-1 | az-stackdev | enabled | up | 2022-10-30T11:27:51.000000
Description
===========
Three cinder-volume services was started in different hosts and
they all refer to the same rbd backend by setting same cinder backend
configuration. In order to achieve Active-Active configurations
the cluster configuration option is defined in the [DEFAULT] section
of cinder.conf for each cinder-volume service.
After these cinder-volume services was started, three records could be
seen in volume service list. However, just one record could be seen for
cinder get-pools conmmand.
When 10 volumes of 10GB of that backend was created successfully, three capacity_ gb i.e. 30, 40 and 30 could be
different values of allocation_
inspected by executing cinder get-pools conmmand many times.
Therefore, each cinder-volume service has its own allocation_ capacity_ gb capacity_ gb does not have Active-Active realization.
and allocation_
Steps to reproduce
==================
1. Spawn three cinder-volume services which all refer to the same rbd
backend and belong to one cluster whose name is clus1 e.g.
$ openstack volume service list ------- -----+- ------- ------- ------- -+----- ------- -+----- ----+-- -----+- ------- ------- ------- ------+ ------- -----+- ------- ------- ------- -+----- ------- -+----- ----+-- -----+- ------- ------- ------- ------+ 30T11:29: 07.000000 | 30T11:29: 07.000000 | 30T11:27: 51.000000
+------
| Binary | Host | Zone | Status | State | Updated At |
+------
| cinder-volume | host1@rbd-clus-1 | az-stackdev | enabled | up | 2022-10-
| cinder-volume | host2@rbd-clus-1 | az-stackdev | enabled | up | 2022-10-
| cinder-volume | host3@rbd-clus-1 | az-stackdev | enabled | up | 2022-10-
$ cinder get-pools --filters name=clus1@ rbd-clus- 1#rbd-clust- 1 --detail ------- ------- ------- --+---- ------- ------- ------- ------- ------- ------- ------- ----+ ------- ------- ------- --+---- ------- ------- ------- ------- ------- ------- ------- ----+ capacity_ gb | 0 | ceph/ceph_ a4842e0c- 3207-4. ....:cinder. volumes | subscription_ ratio | 20 | clus-1# rbd-clust- 1 | ng_support | True | 30T11:35: 29.157787 | ------- ------- ------- --+---- ------- ------- ------- ------- ------- ------- ------- ----+
+------
| Property | Value |
+------
| allocated_
| backend_state | up |
| driver_version | 1.2.0 |
| filter_function | None |
| free_capacity_gb | 5912.85 |
| goodness_function | None |
| location_info | ceph:/etc/
| max_over_
| multiattach | True |
| name | clus1@rbd-
| replication_enabled | False |
| reserved_percentage | 0 |
| storage_protocol | ceph |
| thin_provisioni
| timestamp | 2022-10-
| total_capacity_gb | 6310.3 |
| vendor_name | Open Source |
| volume_backend_name | rbd-clust-1 |
+------
2. Create 10 volumes of 10GB of that cinder backend e.g. ------- ------- ------- ------- ----+-- ------- -+----- ------+ ------+ ------- ------+ ------- ------- ------- ------- ----+-- ------- -+----- ------+ ------+ ------- ------+ 6017-4f96- b05e-126b1dbe6b 75 | clus-v10 | available | 10 | | 8e57-4a4c- ac9c-daaa335464 bc | clus-v9 | available | 10 | | fe09-45e0- 980e-be6ab3279b 22 | clus-v8 | available | 10 | | d407-4089- 8c4f-574c74874c 86 | clus-v7 | available | 10 | | 88cf-409b- 9bcf-a3a5901bd6 7e | clus-v6 | available | 10 | | 1c21-45d0- 964f-1532f894b8 a8 | clus-v5 | available | 10 | | 79ba-4f64- b8b6-f443b9d8ae 11 | clus-v4 | available | 10 | | cb2f-4ca5- a594-196067cf64 9e | clus-v3 | available | 10 | | d8d2-47e5- be40-ce910e2771 3e | clus-v2 | available | 10 | | 805d-4491- 9d03-70183359ff 85 | clus-v1 | available | 10 | | ------- ------- ------- ------- ----+-- ------- -+----- ------+ ------+ ------- ------+
$ for i in {1..10};do openstack volume create --type rbd-clust-1 --size 10 clus-v$i;done
$ openstack volume list
+------
| ID | Name | Status | Size | Attached to |
+------
| 20ac2305-
| a902574e-
| 5a3e85f3-
| 1c0d720f-
| d7c08ba6-
| 5d01544e-
| b510820d-
| 139c1922-
| 888e3fc7-
| 82b29c4c-
+------
3. Inspect the allocated_ capacity_ gb value by executing cinder get-pools conmmand many times.
Expected result capacity_ gb value returns 100 no matter how many times cinder get-pools
===============
The allocated_
conmmand is executed.
Actual result capacity_ gb values are returned and in aggregate they are accurate.
=============
Different allocated_
[stackdev- hci]root@ hci-001: ~# cinder get-pools --filters name=clus1@ rbd-clus- 1#rbd-clust- 1 --detail ------- ------- ------- --+---- ------- ------- -----+ ------- ------- ------- --+---- ------- ------- -----+ capacity_ gb | 30 | hci]root@ hci-001: ~# cinder get-pools --filters name=clus1@ rbd-clus- 1#rbd-clust- 1 --detail ------- ------- ------- --+---- ------- ------- -----+ ------- ------- ------- --+---- ------- ------- -----+ capacity_ gb | 40 | hci]root@ hci-001: ~# cinder get-pools --filters name=clus1@ rbd-clus- 1#rbd-clust- 1 --detail ------- ------- ------- --+---- ------- ------- -----+ ------- ------- ------- --+---- ------- ------- -----+ capacity_ gb | 30 |
+------
| Property | Value |
+------
| allocated_
...
[stackdev-
+------
| Property | Value |
+------
| allocated_
...
[stackdev-
+------
| Property | Value |
+------
| allocated_
...
Environment
===========
Victoria branch Of Openstack