attachment_swift: share a session for all connections

OVH's Swift applies a rate limit on the authentication.

attachment_swift authenticates again each time it has to read/write an
attachment. When running upgrades on upgrades of files or installing a
new DB, at some point, we get rejected with HTTP 429.

This commit introduces a shared storage for Swift Session. All
connections will reuses the same authentication token created the first
time a connection needs a Session.

Note: needs python-swiftclient>=3.7.0 to have
https://github.com/openstack/python-swiftclient/commit/1971ef880ff225379d4a91f00f89f323a1605eeb
This commit is contained in:
Guewen Baconnier
2019-05-09 10:10:58 +02:00
parent 339876236e
commit c6456a58f7
3 changed files with 108 additions and 16 deletions
+3 -2
View File
@@ -2,5 +2,6 @@ boto3==1.9.102
redis==2.10.5
python-json-logger==0.1.5
statsd==3.2.1
python-swiftclient==3.4.0
python-keystoneclient==3.13.0
python-swiftclient==3.7.0
python-keystoneclient==3.19.0
keystoneauth1==3.14.0