]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
cloud.openstack: Also retry on BaseHTTPError 1037/head
authorZack Cerza <zack@redhat.com>
Wed, 1 Mar 2017 23:20:35 +0000 (16:20 -0700)
committerZack Cerza <zack@redhat.com>
Wed, 1 Mar 2017 23:20:35 +0000 (16:20 -0700)
We attach volumes immediately after creating them; sometimes they are
still momentarily in the 'creating' state, causing the attach call to
throw a BaseHTTPError. When that happens, simply retry the request
instead of failing node creation, starting the entire cycle all over
again.

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/provision/cloud/openstack.py

index b12d55b06097d07c9cf28708a094cf69ad175c19..a8bb5c268f0fc2567f98779561d5d2c4786ec6fd 100644 (file)
@@ -7,7 +7,7 @@ import urllib
 import yaml
 
 from copy import deepcopy
-from libcloud.common.exceptions import RateLimitReachedError
+from libcloud.common.exceptions import RateLimitReachedError, BaseHTTPError
 
 from paramiko import AuthenticationException
 from paramiko.ssh_exception import NoValidConnectionsError
@@ -23,7 +23,7 @@ from teuthology.provision.cloud.base import Provider
 log = logging.getLogger(__name__)
 
 
-RETRY_EXCEPTIONS = (RateLimitReachedError, )
+RETRY_EXCEPTIONS = (RateLimitReachedError, BaseHTTPError)
 
 
 def retry(function, *args, **kwargs):