swift: make sure to retry if the client cannot find Swift
swift: make sure to retry if the client cannot find Swift

The following can happen:

2017-05-02 15:21:24.363 96139 CRITICAL gnocchi [-] ClientException: Endpoint for object-store not found - have you specified a region?
2017-05-02 15:21:24.363 96139 ERROR gnocchi Traceback (most recent call last):
2017-05-02 15:21:24.363 96139 ERROR gnocchi   File "/usr/bin/gnocchi-statsd", line 10, in <module>
2017-05-02 15:21:24.363 96139 ERROR gnocchi     sys.exit(statsd())
2017-05-02 15:21:24.363 96139 ERROR gnocchi   File "/usr/lib/python2.7/site-packages/gnocchi/cli.py", line 74, in statsd
2017-05-02 15:21:24.363 96139 ERROR gnocchi     statsd_service.start()
2017-05-02 15:21:24.363 96139 ERROR gnocchi   File "/usr/lib/python2.7/site-packages/gnocchi/statsd.py", line 174, in start
2017-05-02 15:21:24.363 96139 ERROR gnocchi     stats = Stats(conf)
2017-05-02 15:21:24.363 96139 ERROR gnocchi   File "/usr/lib/python2.7/site-packages/gnocchi/statsd.py", line 38, in __init__
2017-05-02 15:21:24.363 96139 ERROR gnocchi     self.storage = storage.get_driver(self.conf)
2017-05-02 15:21:24.363 96139 ERROR gnocchi   File "/usr/lib/python2.7/site-packages/gnocchi/storage/__init__.py", line 158, in get_driver
2017-05-02 15:21:24.363 96139 ERROR gnocchi     return get_driver_class(conf)(conf.storage)
2017-05-02 15:21:24.363 96139 ERROR gnocchi   File "/usr/lib/python2.7/site-packages/gnocchi/storage/swift.py", line 98, in __init__
2017-05-02 15:21:24.363 96139 ERROR gnocchi     self.swift.put_container(self.MEASURE_PREFIX)
2017-05-02 15:21:24.363 96139 ERROR gnocchi   File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 1728, in put_container
2017-05-02 15:21:24.363 96139 ERROR gnocchi     query_string=query_string)
2017-05-02 15:21:24.363 96139 ERROR gnocchi   File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 1635, in _retry
2017-05-02 15:21:24.363 96139 ERROR gnocchi     self.url, self.token = self.get_auth()
2017-05-02 15:21:24.363 96139 ERROR gnocchi   File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 1587, in get_auth
2017-05-02 15:21:24.363 96139 ERROR gnocchi     timeout=self.timeout)
2017-05-02 15:21:24.363 96139 ERROR gnocchi   File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 662, in get_auth
2017-05-02 15:21:24.363 96139 ERROR gnocchi     auth_version=auth_version)
2017-05-02 15:21:24.363 96139 ERROR gnocchi   File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 596, in get_auth_keystone
2017-05-02 15:21:24.363 96139 ERROR gnocchi     'have you specified a region?' % service_type)
2017-05-02 15:21:24.363 96139 ERROR gnocchi ClientException: Endpoint for object-store not found - have you specified a region?
2017-05-02 15:21:24.363 96139 ERROR gnocchi

Make sure we retry.

Change-Id: I12ad167962aa62c22785c32394a607929ca8b925

sileht/gnocchi,gnocchixyz/gnocchi,sileht/gnocchi,leandroreox/gnocchi,leandroreox/gnocchi,gnocchixyz/gnocchi