Glance stores library
Go to file
whoami-rajat a4ba0c4fde Correct retry interval during attach volume
When we try to simultaneously attach same volume multiple times
(multiattach), there are multiple attachments created, suppose
attachA and attachB. If attachA marks the volume "reserved" then
attachB can't proceed until the volume is in "in-use" or "available"
state. We retry until we reach any of these states for which we use
the retrying library.

The retrying library defaults to 1 second retry[1] (5 times) which causes
the original failure as the volume takes time to transition between
"reserved" -> "in-use" state. This patch corrects it by adding an
exponential retry time and max exponential retry i.e.

1: 2 ** 1 = 2 seconds
2: 2 ** 2 = 4 seconds
3: 2 ** 3 = 8 seconds
4: 2 ** 4 = 16 seconds (but max wait time is 10 seconds)
5: 2 ** 5 = 32 seconds (but max wait time is 10 seconds)

[1] https://github.com/rholder/retrying/blob/master/retrying.py#L84

Closes-Bug: #1969373

Change-Id: I0094b044085d7f92b07ea86236de3b6efd7d67ea
(cherry picked from commit ba4af147fb)
(cherry picked from commit c6716cb8fb)
2022-04-25 14:56:39 +02:00
doc Add cinder's new attachment support 2021-07-23 10:22:12 -04:00
etc/glance Add lock per share for cinder nfs mount/umount 2020-05-01 11:35:01 +00:00
glance_store Correct retry interval during attach volume 2022-04-25 14:56:39 +02:00
releasenotes Correct retry interval during attach volume 2022-04-25 14:56:39 +02:00
tools Stop to use the __future__ module. 2020-06-02 20:14:52 +02:00
.gitignore Add .stestr to gitignore 2018-01-29 06:26:30 +00:00
.gitreview Update .gitreview for stable/xena 2021-09-10 14:32:09 +00:00
.stestr.conf Update tox.ini to conform to the PTI 2018-07-16 04:52:57 +00:00
.zuul.yaml Drop lower-constraints job 2021-08-12 05:17:45 -04:00
LICENSE Copying from glance 2014-01-24 18:30:46 +01:00
README.rst Add release notes link in readme 2019-10-06 14:37:10 +08:00
requirements.txt Fix lower_constraints and requirements 2020-12-18 11:11:40 +00:00
run_tests.sh Don't include openstack/common in flake8 exclude list 2016-07-12 14:27:23 +08:00
setup.cfg vmware: Use cookiejar from oslo.vmware client directly 2021-04-30 12:08:50 +00:00
setup.py Cleanup py27 support 2020-04-05 08:20:21 +02:00
test-requirements.txt Add cinder's new attachment support 2021-07-23 10:22:12 -04:00
tox.ini Update TOX_CONSTRAINTS_FILE for stable/xena 2021-09-10 14:32:12 +00:00

README.rst

Team and repository tags

The following tags have been asserted for the Glance Store
Library:
"project:official",
"stable:follows-policy",
"vulnerability:managed".
Follow the link for an explanation of these tags.

Glance Store Library

Glance's stores library

This library has been extracted from the Glance source code for the specific use of the Glance and Glare projects.

The API it exposes is not stable, has some shortcomings, and is not a general purpose interface. We would eventually like to change this, but for now using this library outside of Glance or Glare will not be supported by the core team.