Description
Describe the bug
I have production EC2 instance running Meshcentral server with DocumentDB as its database. There are over 2500 linux agents connected to the server. I've created a bash script which allows me to execute command on each of the agents synchronously and to get the output back. It lists all of the devices using ListDevices
, iterates over all of them and executes command on each connected agent using RunCommand --reply
. See the screenshot below:
While the script is executing commands on the devices and I try to list device using ListDevices
command, instead of the device I get output of the command executed on one of the devices like on the screenshot below:
I can see is that this RunCommand --reply
feature was added here -> #5932
To Reproduce
It's harder to reproduce in lower latency environment. However, I managed to do so with the below steps.
Steps to reproduce the behavior:
- In one terminal window run infinite loop which will execute
echo hello
command on one device usingRunCommand
with--reply
option - In a separate terminal window run infinite loop which will try to list that device using
ListDevices --filter <agent-name>
command - Observe the output of
ListDevices
command whileRunCommand
is being constantly executed. For some of the calls it will return 'hello' instead of the actual device info.
Expected behavior
I would like ListDevices command to return device instead of output from RunCommand --reply command.