From e44ba732705371f488ed0efa91bdf2c7b9ec64d0 Mon Sep 17 00:00:00 2001 From: matancarmeli7 Date: Mon, 30 Jan 2023 16:08:39 +0200 Subject: [PATCH 1/4] separate addon code from controller server Signed-off-by: matancarmeli7 --- controllers/scripts/csi_general/csi_pb2.sh | 1 + .../servers/csi/controller_server_manager.py | 5 +- .../servers/csi/csi_addons_server/__init__.py | 0 .../csi_addons_server_manager.py | 50 +++++++++++++++++++ .../identity_controller_servicer.py | 50 +++++++++++++++++++ .../replication_controller_servicer.py} | 0 controllers/servers/csi/main.py | 17 ++++++- .../controller_server/addons_server_test.py | 2 +- 8 files changed, 118 insertions(+), 7 deletions(-) create mode 100644 controllers/servers/csi/csi_addons_server/__init__.py create mode 100644 controllers/servers/csi/csi_addons_server/csi_addons_server_manager.py create mode 100644 controllers/servers/csi/csi_addons_server/identity_controller_servicer.py rename controllers/servers/csi/{addons_server.py => csi_addons_server/replication_controller_servicer.py} (100%) diff --git a/controllers/scripts/csi_general/csi_pb2.sh b/controllers/scripts/csi_general/csi_pb2.sh index d485fabc4..f012dc491 100755 --- a/controllers/scripts/csi_general/csi_pb2.sh +++ b/controllers/scripts/csi_general/csi_pb2.sh @@ -12,6 +12,7 @@ cd ./proto/${PB2_DIR} curl -O https://raw.githubusercontent.com/container-storage-interface/spec/${CSI_VERSION}/csi.proto curl -O https://raw.githubusercontent.com/IBM/csi-volume-group/${VG_VERSION}/volumegroup/volumegroup.proto curl -O https://raw.githubusercontent.com/csi-addons/spec/v0.2.0/replication/replication.proto +curl -O https://raw.githubusercontent.com/csi-addons/spec/main/identity/identity.proto sed -i 's|github.com/container-storage-interface/spec/lib/go/csi/csi.proto|csi_general/csi.proto|g' replication.proto cd - diff --git a/controllers/servers/csi/controller_server_manager.py b/controllers/servers/csi/controller_server_manager.py index e5458403a..2dd9d341f 100644 --- a/controllers/servers/csi/controller_server_manager.py +++ b/controllers/servers/csi/controller_server_manager.py @@ -3,12 +3,11 @@ from concurrent import futures import grpc -from csi_general import csi_pb2_grpc, replication_pb2_grpc, volumegroup_pb2_grpc +from csi_general import csi_pb2_grpc, volumegroup_pb2_grpc from controllers.common.config import config from controllers.common.csi_logger import get_stdout_logger from controllers.common.settings import CSI_CONTROLLER_SERVER_WORKERS -from controllers.servers.csi.addons_server import ReplicationControllerServicer from controllers.servers.csi.csi_controller_server import CSIControllerServicer from controllers.servers.csi.volume_group_server import VolumeGroupControllerServicer @@ -24,7 +23,6 @@ class ControllerServerManager: def __init__(self, array_endpoint): self.endpoint = array_endpoint self.csi_servicer = CSIControllerServicer() - self.replication_servicer = ReplicationControllerServicer() self.volume_group_servicer = VolumeGroupControllerServicer() def start_server(self): @@ -33,7 +31,6 @@ def start_server(self): csi_pb2_grpc.add_ControllerServicer_to_server(self.csi_servicer, controller_server) csi_pb2_grpc.add_IdentityServicer_to_server(self.csi_servicer, controller_server) - replication_pb2_grpc.add_ControllerServicer_to_server(self.replication_servicer, controller_server) volumegroup_pb2_grpc.add_ControllerServicer_to_server(self.volume_group_servicer, controller_server) # bind the server to the port defined above diff --git a/controllers/servers/csi/csi_addons_server/__init__.py b/controllers/servers/csi/csi_addons_server/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/controllers/servers/csi/csi_addons_server/csi_addons_server_manager.py b/controllers/servers/csi/csi_addons_server/csi_addons_server_manager.py new file mode 100644 index 000000000..146765cb4 --- /dev/null +++ b/controllers/servers/csi/csi_addons_server/csi_addons_server_manager.py @@ -0,0 +1,50 @@ +import os +import time +from concurrent import futures + +import grpc +from csi_general import identity_pb2_grpc, replication_pb2_grpc + +from controllers.common.csi_logger import get_stdout_logger +from controllers.common.settings import CSI_CONTROLLER_SERVER_WORKERS +from controllers.servers.csi.csi_addons_server.replication_controller_servicer import ReplicationControllerServicer +from controllers.servers.csi.csi_addons_server.identity_controller_servicer import IdentityControllerServicer + +logger = get_stdout_logger() + + +def get_max_workers_count(): + cpu_count = (os.cpu_count() or 1) + 4 + return CSI_CONTROLLER_SERVER_WORKERS if cpu_count < CSI_CONTROLLER_SERVER_WORKERS else None + + +class CSIAddonsServerManager: + def __init__(self, csi_addons_endpoint): + self.endpoint = csi_addons_endpoint + self.replication_servicer = ReplicationControllerServicer() + self.identity_servicer = IdentityControllerServicer() + + def start_server(self): + max_workers = get_max_workers_count() + csi_addons_server = grpc.server(futures.ThreadPoolExecutor(max_workers=max_workers)) + + replication_pb2_grpc.add_ControllerServicer_to_server(self.replication_servicer, csi_addons_server) + identity_pb2_grpc.add_IdentityServicer_to_server(self.identity_servicer, csi_addons_server) + + # bind the server to the port defined above + # controller_server.add_insecure_port('[::]:{}'.format(self.server_port)) + # controller_server.add_insecure_port('unix://{}'.format(self.server_port)) + csi_addons_server.add_insecure_port(self.endpoint) + + # start the server + logger.debug("Listening for connections on endpoint address: {}".format(self.endpoint)) + + csi_addons_server.start() + logger.debug('CSI Addons Server running ...') + + try: + while True: + time.sleep(60 * 60 * 60) + except KeyboardInterrupt: + csi_addons_server.stop(0) + logger.debug('CSI Addons Server Stopped ...') diff --git a/controllers/servers/csi/csi_addons_server/identity_controller_servicer.py b/controllers/servers/csi/csi_addons_server/identity_controller_servicer.py new file mode 100644 index 000000000..637254e4e --- /dev/null +++ b/controllers/servers/csi/csi_addons_server/identity_controller_servicer.py @@ -0,0 +1,50 @@ +import grpc + +from csi_general import identity_pb2 as pb2 +from csi_general import identity_pb2_grpc as pb2_grpc + +from controllers.common.config import config as common_config +from controllers.servers.csi.decorators import csi_method +from controllers.servers.csi.exception_handler import build_error_response +from controllers.common.csi_logger import get_stdout_logger + +logger = get_stdout_logger() + + +class IdentityControllerServicer(pb2_grpc.IdentityServicer): + + @csi_method(error_response_type=pb2.GetIdentityResponse) + def GetIdentity(self, request, context): + name = common_config.identity.name + version = common_config.identity.version + + if not name or not version: + message = "plugin name or version cannot be empty" + return build_error_response(message, context, grpc.StatusCode.INTERNAL, pb2.GetIdentityResponse) + + return pb2.GetIdentityResponse(name=name, vendor_version=version) + + def GetCapabilities(self, request, context): + logger.info("GetCapabilities") + response = pb2.GetCapabilitiesResponse( + capabilities=[self._get_replication_capability(), + self._get_controller_capability()]) + + logger.info("finished GetCapabilities") + return response + + def _get_replication_capability(self): + types = pb2.Capability.VolumeReplication.Type + capability_enum_value = types.Value("VOLUME_REPLICATION") + return pb2.Capability( + volume_replication=pb2.Capability.VolumeReplication(type=capability_enum_value)) + + def _get_controller_capability(self): + types = pb2.Capability.Service.Type + capability_enum_value = types.Value("CONTROLLER_SERVICE") + return pb2.Capability( + service=pb2.Capability.Service(type=capability_enum_value)) + + def Probe(self, request, context): + context.set_code(grpc.StatusCode.OK) + return pb2.ProbeResponse() diff --git a/controllers/servers/csi/addons_server.py b/controllers/servers/csi/csi_addons_server/replication_controller_servicer.py similarity index 100% rename from controllers/servers/csi/addons_server.py rename to controllers/servers/csi/csi_addons_server/replication_controller_servicer.py diff --git a/controllers/servers/csi/main.py b/controllers/servers/csi/main.py index f17018bf0..e82dfd18f 100644 --- a/controllers/servers/csi/main.py +++ b/controllers/servers/csi/main.py @@ -1,19 +1,32 @@ from argparse import ArgumentParser +from threading import Thread from controllers.common.csi_logger import set_log_level from controllers.servers.csi.controller_server_manager import ControllerServerManager +from controllers.servers.csi.csi_addons_server.csi_addons_server_manager import CSIAddonsServerManager def main(): parser = ArgumentParser() parser.add_argument("-e", "--csi-endpoint", dest="endpoint", help="grpc endpoint") + parser.add_argument("-a", "--csi-addons-endpoint", dest="addonsendpoint", help="CSI-Addons grpc endpoint") parser.add_argument("-l", "--loglevel", dest="loglevel", help="log level") arguments = parser.parse_args() set_log_level(arguments.loglevel) - server_manager = ControllerServerManager(arguments.endpoint) - server_manager.start_server() + csi_controller_server_manager = ControllerServerManager(arguments.endpoint) + csi_addons_server_manager = CSIAddonsServerManager(arguments.addonsendpoint) + _start_servers(csi_controller_server_manager, csi_addons_server_manager) + + +def _start_servers(csi_controller_server_manager, csi_addons_server_manager): + servers = ( + csi_controller_server_manager.start_server, + csi_addons_server_manager.start_server) + for server_function in servers: + thread = Thread(target=server_function,) + thread.start() if __name__ == '__main__': diff --git a/controllers/tests/controller_server/addons_server_test.py b/controllers/tests/controller_server/addons_server_test.py index 5db76d15f..9eb5b4e18 100644 --- a/controllers/tests/controller_server/addons_server_test.py +++ b/controllers/tests/controller_server/addons_server_test.py @@ -7,7 +7,7 @@ from controllers.servers.settings import PARAMETERS_SYSTEM_ID, PARAMETERS_COPY_TYPE, PARAMETERS_REPLICATION_POLICY from controllers.array_action.settings import REPLICATION_TYPE_MIRROR, REPLICATION_TYPE_EAR, REPLICATION_COPY_TYPE_SYNC from controllers.array_action.array_action_types import ReplicationRequest -from controllers.servers.csi.addons_server import ReplicationControllerServicer +from controllers.servers.csi.csi_addons_server.replication_controller_servicer import ReplicationControllerServicer from controllers.tests import utils from controllers.tests.common.test_settings import VOLUME_NAME, VOLUME_UID, OBJECT_INTERNAL_ID, \ OTHER_OBJECT_INTERNAL_ID, REPLICATION_NAME, SYSTEM_ID, COPY_TYPE, SECRET_USERNAME_VALUE, SECRET_PASSWORD_VALUE, \ From 583fc2def93823fb4e4733e83342b31d715ff46b Mon Sep 17 00:00:00 2001 From: matancarmeli7 Date: Sun, 5 Feb 2023 10:13:15 +0200 Subject: [PATCH 2/4] fix unit tests Signed-off-by: matancarmeli7 --- controllers/tests/controller_server/addons_server_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/tests/controller_server/addons_server_test.py b/controllers/tests/controller_server/addons_server_test.py index 9eb5b4e18..b980cb0ee 100644 --- a/controllers/tests/controller_server/addons_server_test.py +++ b/controllers/tests/controller_server/addons_server_test.py @@ -16,7 +16,7 @@ from controllers.tests.controller_server.csi_controller_server_test import (CommonControllerTest) from controllers.tests.utils import ProtoBufMock -ADDON_SERVER_PATH = "controllers.servers.csi.addons_server" +ADDON_SERVER_PATH = "controllers.servers.csi.csi_addons_server.replication_controller_servicer" class BaseReplicationSetUp(unittest.TestCase): From 651d2210bb4675450ed3c51b51eca7cf9657b1e0 Mon Sep 17 00:00:00 2001 From: matancarmeli7 Date: Sun, 12 Feb 2023 17:44:00 +0200 Subject: [PATCH 3/4] unify server_manager Signed-off-by: matancarmeli7 --- .../servers/csi/controller_server_manager.py | 54 ------------------- .../csi_addons_server_manager.py | 50 ----------------- controllers/servers/csi/main.py | 49 +++++++++++++++-- controllers/servers/csi/server_manager.py | 34 ++++++++++++ 4 files changed, 79 insertions(+), 108 deletions(-) delete mode 100644 controllers/servers/csi/controller_server_manager.py delete mode 100644 controllers/servers/csi/csi_addons_server/csi_addons_server_manager.py create mode 100644 controllers/servers/csi/server_manager.py diff --git a/controllers/servers/csi/controller_server_manager.py b/controllers/servers/csi/controller_server_manager.py deleted file mode 100644 index 2dd9d341f..000000000 --- a/controllers/servers/csi/controller_server_manager.py +++ /dev/null @@ -1,54 +0,0 @@ -import os -import time -from concurrent import futures - -import grpc -from csi_general import csi_pb2_grpc, volumegroup_pb2_grpc - -from controllers.common.config import config -from controllers.common.csi_logger import get_stdout_logger -from controllers.common.settings import CSI_CONTROLLER_SERVER_WORKERS -from controllers.servers.csi.csi_controller_server import CSIControllerServicer -from controllers.servers.csi.volume_group_server import VolumeGroupControllerServicer - -logger = get_stdout_logger() - - -def get_max_workers_count(): - cpu_count = (os.cpu_count() or 1) + 4 - return CSI_CONTROLLER_SERVER_WORKERS if cpu_count < CSI_CONTROLLER_SERVER_WORKERS else None - - -class ControllerServerManager: - def __init__(self, array_endpoint): - self.endpoint = array_endpoint - self.csi_servicer = CSIControllerServicer() - self.volume_group_servicer = VolumeGroupControllerServicer() - - def start_server(self): - max_workers = get_max_workers_count() - controller_server = grpc.server(futures.ThreadPoolExecutor(max_workers=max_workers)) - - csi_pb2_grpc.add_ControllerServicer_to_server(self.csi_servicer, controller_server) - csi_pb2_grpc.add_IdentityServicer_to_server(self.csi_servicer, controller_server) - volumegroup_pb2_grpc.add_ControllerServicer_to_server(self.volume_group_servicer, controller_server) - - # bind the server to the port defined above - # controller_server.add_insecure_port('[::]:{}'.format(self.server_port)) - # controller_server.add_insecure_port('unix://{}'.format(self.server_port)) - controller_server.add_insecure_port(self.endpoint) - - logger.info("Controller version: {}".format(config.identity.version)) - - # start the server - logger.debug("Listening for connections on endpoint address: {}".format(self.endpoint)) - - controller_server.start() - logger.debug('Controller Server running ...') - - try: - while True: - time.sleep(60 * 60 * 60) - except KeyboardInterrupt: - controller_server.stop(0) - logger.debug('Controller Server Stopped ...') diff --git a/controllers/servers/csi/csi_addons_server/csi_addons_server_manager.py b/controllers/servers/csi/csi_addons_server/csi_addons_server_manager.py deleted file mode 100644 index 146765cb4..000000000 --- a/controllers/servers/csi/csi_addons_server/csi_addons_server_manager.py +++ /dev/null @@ -1,50 +0,0 @@ -import os -import time -from concurrent import futures - -import grpc -from csi_general import identity_pb2_grpc, replication_pb2_grpc - -from controllers.common.csi_logger import get_stdout_logger -from controllers.common.settings import CSI_CONTROLLER_SERVER_WORKERS -from controllers.servers.csi.csi_addons_server.replication_controller_servicer import ReplicationControllerServicer -from controllers.servers.csi.csi_addons_server.identity_controller_servicer import IdentityControllerServicer - -logger = get_stdout_logger() - - -def get_max_workers_count(): - cpu_count = (os.cpu_count() or 1) + 4 - return CSI_CONTROLLER_SERVER_WORKERS if cpu_count < CSI_CONTROLLER_SERVER_WORKERS else None - - -class CSIAddonsServerManager: - def __init__(self, csi_addons_endpoint): - self.endpoint = csi_addons_endpoint - self.replication_servicer = ReplicationControllerServicer() - self.identity_servicer = IdentityControllerServicer() - - def start_server(self): - max_workers = get_max_workers_count() - csi_addons_server = grpc.server(futures.ThreadPoolExecutor(max_workers=max_workers)) - - replication_pb2_grpc.add_ControllerServicer_to_server(self.replication_servicer, csi_addons_server) - identity_pb2_grpc.add_IdentityServicer_to_server(self.identity_servicer, csi_addons_server) - - # bind the server to the port defined above - # controller_server.add_insecure_port('[::]:{}'.format(self.server_port)) - # controller_server.add_insecure_port('unix://{}'.format(self.server_port)) - csi_addons_server.add_insecure_port(self.endpoint) - - # start the server - logger.debug("Listening for connections on endpoint address: {}".format(self.endpoint)) - - csi_addons_server.start() - logger.debug('CSI Addons Server running ...') - - try: - while True: - time.sleep(60 * 60 * 60) - except KeyboardInterrupt: - csi_addons_server.stop(0) - logger.debug('CSI Addons Server Stopped ...') diff --git a/controllers/servers/csi/main.py b/controllers/servers/csi/main.py index e82dfd18f..ba77b66d9 100644 --- a/controllers/servers/csi/main.py +++ b/controllers/servers/csi/main.py @@ -1,9 +1,19 @@ +import os from argparse import ArgumentParser from threading import Thread +from concurrent import futures +import grpc +from concurrent import futures + +from csi_general import csi_pb2_grpc, volumegroup_pb2_grpc, identity_pb2_grpc, replication_pb2_grpc from controllers.common.csi_logger import set_log_level -from controllers.servers.csi.controller_server_manager import ControllerServerManager -from controllers.servers.csi.csi_addons_server.csi_addons_server_manager import CSIAddonsServerManager +from controllers.common.settings import CSI_CONTROLLER_SERVER_WORKERS +from controllers.servers.csi.server_manager import ServerManager +from controllers.servers.csi.csi_controller_server import CSIControllerServicer +from controllers.servers.csi.volume_group_server import VolumeGroupControllerServicer +from controllers.servers.csi.csi_addons_server.replication_controller_servicer import ReplicationControllerServicer +from controllers.servers.csi.csi_addons_server.identity_controller_servicer import IdentityControllerServicer def main(): @@ -14,12 +24,43 @@ def main(): arguments = parser.parse_args() set_log_level(arguments.loglevel) + controller_server = _create_grpc_server() + csi_addons_server = _create_grpc_server() - csi_controller_server_manager = ControllerServerManager(arguments.endpoint) - csi_addons_server_manager = CSIAddonsServerManager(arguments.addonsendpoint) + csi_controller_server_manager = ServerManager(arguments.endpoint, "Controller", + _add_csi_controller_servicers(controller_server)) + csi_addons_server_manager = ServerManager(arguments.addonsendpoint, "CSI Addons", + _add_csi_addons_servicers(csi_addons_server)) _start_servers(csi_controller_server_manager, csi_addons_server_manager) +def _create_grpc_server(): + max_workers = _get_max_workers_count() + return grpc.server(futures.ThreadPoolExecutor(max_workers=max_workers)) + + +def _get_max_workers_count(): + cpu_count = (os.cpu_count() or 1) + 4 + return CSI_CONTROLLER_SERVER_WORKERS if cpu_count < CSI_CONTROLLER_SERVER_WORKERS else None + + +def _add_csi_controller_servicers(controller_server): + csi_servicer = CSIControllerServicer() + volume_group_servicer = VolumeGroupControllerServicer() + csi_pb2_grpc.add_ControllerServicer_to_server(csi_servicer, controller_server) + csi_pb2_grpc.add_IdentityServicer_to_server(csi_servicer, controller_server) + volumegroup_pb2_grpc.add_ControllerServicer_to_server(volume_group_servicer, controller_server) + return controller_server + + +def _add_csi_addons_servicers(csi_addons_server): + replication_servicer = ReplicationControllerServicer() + identity_servicer = IdentityControllerServicer() + replication_pb2_grpc.add_ControllerServicer_to_server(replication_servicer, csi_addons_server) + identity_pb2_grpc.add_IdentityServicer_to_server(identity_servicer, csi_addons_server) + return csi_addons_server + + def _start_servers(csi_controller_server_manager, csi_addons_server_manager): servers = ( csi_controller_server_manager.start_server, diff --git a/controllers/servers/csi/server_manager.py b/controllers/servers/csi/server_manager.py new file mode 100644 index 000000000..0c80e4c19 --- /dev/null +++ b/controllers/servers/csi/server_manager.py @@ -0,0 +1,34 @@ +import time + +from controllers.common.config import config +from controllers.common.csi_logger import get_stdout_logger + +logger = get_stdout_logger() + + +class ServerManager: + def __init__(self, array_endpoint, server_type, grpc_server): + self.endpoint = array_endpoint + self.server_type = server_type + self.grpc_server = grpc_server + + def start_server(self): + # bind the server to the port defined above + # grpc_server.add_insecure_port('[::]:{}'.format(self.server_port)) + # grpc_server.add_insecure_port('unix://{}'.format(self.server_port)) + self.grpc_server.add_insecure_port(self.endpoint) + + logger.info("{} version: {}".format(self.server_type, config.identity.version)) + + # start the server + logger.debug("Listening for connections on endpoint address: {}".format(self.endpoint)) + + self.grpc_server.start() + logger.debug('{} Server running ...'.format(self.server_type)) + + try: + while True: + time.sleep(60 * 60 * 60) + except KeyboardInterrupt: + self.grpc_server.stop(0) + logger.debug('Controller Server Stopped ...') From 6287eeefdcf15c53556d60afa8d2bc1291c83350 Mon Sep 17 00:00:00 2001 From: matancarmeli7 Date: Wed, 15 Feb 2023 10:13:49 +0200 Subject: [PATCH 4/4] remove identity_controller_servicer.py Signed-off-by: matancarmeli7 --- .../identity_controller_servicer.py | 50 ------------------- controllers/servers/csi/main.py | 3 -- 2 files changed, 53 deletions(-) delete mode 100644 controllers/servers/csi/csi_addons_server/identity_controller_servicer.py diff --git a/controllers/servers/csi/csi_addons_server/identity_controller_servicer.py b/controllers/servers/csi/csi_addons_server/identity_controller_servicer.py deleted file mode 100644 index 637254e4e..000000000 --- a/controllers/servers/csi/csi_addons_server/identity_controller_servicer.py +++ /dev/null @@ -1,50 +0,0 @@ -import grpc - -from csi_general import identity_pb2 as pb2 -from csi_general import identity_pb2_grpc as pb2_grpc - -from controllers.common.config import config as common_config -from controllers.servers.csi.decorators import csi_method -from controllers.servers.csi.exception_handler import build_error_response -from controllers.common.csi_logger import get_stdout_logger - -logger = get_stdout_logger() - - -class IdentityControllerServicer(pb2_grpc.IdentityServicer): - - @csi_method(error_response_type=pb2.GetIdentityResponse) - def GetIdentity(self, request, context): - name = common_config.identity.name - version = common_config.identity.version - - if not name or not version: - message = "plugin name or version cannot be empty" - return build_error_response(message, context, grpc.StatusCode.INTERNAL, pb2.GetIdentityResponse) - - return pb2.GetIdentityResponse(name=name, vendor_version=version) - - def GetCapabilities(self, request, context): - logger.info("GetCapabilities") - response = pb2.GetCapabilitiesResponse( - capabilities=[self._get_replication_capability(), - self._get_controller_capability()]) - - logger.info("finished GetCapabilities") - return response - - def _get_replication_capability(self): - types = pb2.Capability.VolumeReplication.Type - capability_enum_value = types.Value("VOLUME_REPLICATION") - return pb2.Capability( - volume_replication=pb2.Capability.VolumeReplication(type=capability_enum_value)) - - def _get_controller_capability(self): - types = pb2.Capability.Service.Type - capability_enum_value = types.Value("CONTROLLER_SERVICE") - return pb2.Capability( - service=pb2.Capability.Service(type=capability_enum_value)) - - def Probe(self, request, context): - context.set_code(grpc.StatusCode.OK) - return pb2.ProbeResponse() diff --git a/controllers/servers/csi/main.py b/controllers/servers/csi/main.py index ba77b66d9..830253f26 100644 --- a/controllers/servers/csi/main.py +++ b/controllers/servers/csi/main.py @@ -13,7 +13,6 @@ from controllers.servers.csi.csi_controller_server import CSIControllerServicer from controllers.servers.csi.volume_group_server import VolumeGroupControllerServicer from controllers.servers.csi.csi_addons_server.replication_controller_servicer import ReplicationControllerServicer -from controllers.servers.csi.csi_addons_server.identity_controller_servicer import IdentityControllerServicer def main(): @@ -55,9 +54,7 @@ def _add_csi_controller_servicers(controller_server): def _add_csi_addons_servicers(csi_addons_server): replication_servicer = ReplicationControllerServicer() - identity_servicer = IdentityControllerServicer() replication_pb2_grpc.add_ControllerServicer_to_server(replication_servicer, csi_addons_server) - identity_pb2_grpc.add_IdentityServicer_to_server(identity_servicer, csi_addons_server) return csi_addons_server