]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/services/iscsi_cli.py
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / pybind / mgr / dashboard / services / iscsi_cli.py
index d7a0a0139cd9a612c37c47b223254d11992c29b6..fca1f61b3cc14db1a24a176f935bad97ba016bfb 100644 (file)
@@ -8,7 +8,7 @@ from mgr_module import CLIReadCommand, CLIWriteCommand
 
 from .iscsi_client import IscsiClient
 from .iscsi_config import IscsiGatewaysConfig, IscsiGatewayAlreadyExists, InvalidServiceUrl, \
-    ManagedByOrchestratorException, IscsiGatewayDoesNotExist, IscsiGatewayInUse
+    ManagedByOrchestratorException, IscsiGatewayDoesNotExist
 from ..rest_client import RequestException
 
 
@@ -41,16 +41,8 @@ def add_iscsi_gateway(_, service_url):
                  'Remove iSCSI gateway configuration')
 def remove_iscsi_gateway(_, name):
     try:
-        try:
-            iscsi_config = IscsiClient.instance(gateway_name=name).get_config()
-            if name in iscsi_config['gateways']:
-                raise IscsiGatewayInUse(name)
-        except RequestException:
-            pass
         IscsiGatewaysConfig.remove_gateway(name)
         return 0, 'Success', ''
-    except IscsiGatewayInUse as ex:
-        return -errno.EBUSY, '', str(ex)
     except IscsiGatewayDoesNotExist as ex:
         return -errno.ENOENT, '', str(ex)
     except ManagedByOrchestratorException as ex: