Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Limmen committed Feb 4, 2024
1 parent 6a16b7c commit d1e30cf
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4487,6 +4487,10 @@ def check_pid(ip: str, port: int, pid: int) -> csle_cluster.cluster_manager.clus
:param pid: the PID to check
:return: The operation outcome
"""
config = MetastoreFacade.get_config(id=1)
ips = [node.ip for node in config.cluster_config.cluster_nodes]
if ip not in ips:
return csle_cluster.cluster_manager.cluster_manager_pb2.OperationOutcomeDTO(outcome=False)
# Open a gRPC session
with grpc.insecure_channel(f'{ip}:{port}', options=constants.GRPC_SERVERS.GRPC_OPTIONS) as channel:
stub = csle_cluster.cluster_manager.cluster_manager_pb2_grpc.ClusterManagerStub(channel)
Expand Down

0 comments on commit d1e30cf

Please sign in to comment.