From: Zack Cerza Date: Wed, 1 Mar 2017 23:20:35 +0000 (-0700) Subject: cloud.openstack: Also retry on BaseHTTPError X-Git-Tag: 1.1.0~455^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1037%2Fhead;p=teuthology.git cloud.openstack: Also retry on BaseHTTPError 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 --- diff --git a/teuthology/provision/cloud/openstack.py b/teuthology/provision/cloud/openstack.py index b12d55b06..a8bb5c268 100644 --- a/teuthology/provision/cloud/openstack.py +++ b/teuthology/provision/cloud/openstack.py @@ -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):