When the volume service starts up, it goes through all
volumes for a host in the db and adds up the volume size as
a mechanism to account for that allocate space against the
backend. The problem was that the volume manager was only
counting volumes with a state of 'in-use' or 'available'.
If a volume has a host set on it, then we account for it's
allocated space.
This patch adds other volume states to use to account for
allocated space at volume service startup.
Closes-Bug: 1910767
Change-Id: I90d5dfbe62e630dc8042e725d411cadc2762db56
(cherry picked from commit 72da8249d910a307141bb9fec663d41cc28878bd)
Reviewed: https:/ /review. opendev. org/c/openstack /cinder/ +/863276 /opendev. org/openstack/ cinder/ commit/ aa920e2fd4b6d34 feef758620507c1 bb728b70a2
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/yoga
commit aa920e2fd4b6d34 feef758620507c1 bb728b70a2
Author: Hemna <email address hidden>
Date: Wed Jan 26 13:35:20 2022 -0500
Bugfix: Account for consumed space better
When the volume service starts up, it goes through all
volumes for a host in the db and adds up the volume size as
a mechanism to account for that allocate space against the
backend. The problem was that the volume manager was only
counting volumes with a state of 'in-use' or 'available'.
If a volume has a host set on it, then we account for it's
allocated space.
This patch adds other volume states to use to account for
allocated space at volume service startup.
Closes-Bug: 1910767 dc8042e725d411c adc2762db56 7141bb9fec663d4 1cc28878bd)
Change-Id: I90d5dfbe62e630
(cherry picked from commit 72da8249d910a30