Skip to content

Commit

Permalink
Merge pull request #122 from openshift/revert-120-bz-1876852
Browse files Browse the repository at this point in the history
Revert "Bug 1876852: ceph: fix to support TLS enabled rgw-endpoint"
  • Loading branch information
leseb committed Sep 14, 2020
2 parents 60075b3 + 9770d92 commit adb385e
Showing 1 changed file with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,17 @@ def _invalid_endpoint(self, endpoint_str):
"Out of range port number: {}".format(port))
return False

def endpoint_dial(self, endpoint_str, timeout=3):
protocols = ["http", "https"]
for prefix in protocols:
try:
ep = "{}://{}".format(prefix, endpoint_str)
r = requests.head(ep, timeout=timeout)
if r.status_code == 200:
return
except:
continue
raise ExecutionFailureException(
"unable to connect to endpoint: {}".format(endpoint_str))
def endpoint_dial(self, endpoint_str):
try:
ep = "http://" + endpoint_str
r = requests.head(ep)
rc = r.status_code
if rc != 200:
raise ExecutionFailureException(
"wrong return code {} on rgw endpoint http header request".format(rc))
except requests.ConnectionError:
raise ExecutionFailureException(
"failed to connect to rgw endpoint {}".format(ep))

def __init__(self, arg_list=None):
self.out_map = {}
Expand Down

0 comments on commit adb385e

Please sign in to comment.