-
Notifications
You must be signed in to change notification settings - Fork 180
Description
Describe the bug
I am trying to utilize the gRPC API to automate the setup of a distributed CORE emulation session (at least one node on a remote server – different server as the CORE daemon). My distributed setup works fine when I configure the session through the GUI. However, when I try using the API to establish a session where at least one node is assigned to run on the distributed server, the session gets stuck in the INSTANTIATION_STATE and never transitions to the RUNTIME_STATE. Note, when I do not assign any of my nodes to the distributed server, all runs fine and the session transitions to the RUNTIME_STATE.
In my code, I add the distributed servers to the session as follows where name =server_name is a string containing the host name of the server and the host=addr is the IP address of the distributed server in string format. Note, I am setting these to the same values that I would in the GUI:
session.servers.clear()
for server_name in dist_server_dict.keys():
addr = dist_server_dict[server_name]
session.servers.append(Server(name=server_name, host=addr))
To assign nodes to the distributed server, I use the following add_node function in the wrappers module. The node_server_dict[node1] is a dictionary that contains the remote server assignment of each node. If not assigned a remote server, it is assumed that the node is running locally:
session.add_node(node1, model="mdr", position=node_position, server=node_server_dict[node1] if node1 in node_server_dict.keys() else None)
After all servers and nodes have been added, then I call start_session.
Not sure if I am doing something incorrectly or I am encountering a bug. Any insight you could provide would be appreciated. Thanks.
To Reproduce
See description above
Expected behavior
Expected behavior is that all nodes, including those assigned to a distributed server are added to the session successfully and the session transitions to RUNTIME_STATE.
Desktop (please complete the following information):
OS: Ubuntu 22.04
CORE Version 9.0.3
EMANE Version - Not Installed