Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListDevices returns output of command executed using RunCommand with --reply argument #6743

Open
kubamaruszczak opened this issue Jan 29, 2025 · 0 comments
Labels

Comments

@kubamaruszczak
Copy link

kubamaruszczak commented Jan 29, 2025

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:

Image

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:

Image

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:

  1. In one terminal window run infinite loop which will execute echo hello command on one device using RunCommand with --reply option
  2. In a separate terminal window run infinite loop which will try to list that device using ListDevices --filter <agent-name> command
  3. Observe the output of ListDevices command while RunCommand 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant