]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/cephadm/registry.py
import ceph quincy 17.2.4
[ceph.git] / ceph / src / pybind / mgr / cephadm / registry.py
index 7b293a4c1a5280cb1e71db63e359885966716bc3..31e5fb23e807bc0453c43fd1efc8c0dfb7420a85 100644 (file)
@@ -39,7 +39,11 @@ class Registry:
         headers = {'Accept': 'application/json'}
         url = f'https://{self.api_domain}/v2/{image}/tags/list'
         while True:
-            r = requests.get(url, headers=headers)
+            try:
+                r = requests.get(url, headers=headers)
+            except requests.exceptions.ConnectionError as e:
+                msg = f"Cannot get tags from url '{url}': {e}"
+                raise ValueError(msg) from e
             if r.status_code == 401:
                 if 'Authorization' in headers:
                     raise ValueError('failed authentication')