saltstack / saltstack/salt

[BUG] Salt API 3004.2 returning empty response when calling GET minions endpoint /minions/<mid>

Open
#64,596 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
After some amount of calls to the SALT API checking if a minion exists I get empty responses from minions that do exist. When I call the SALT api I get empty response (16 bytes) and status code 200, but when I call salt 'minion1' test.ping from the command line, I get the proper response True. The amount of calls is 60 in parallel every 5 seconds.

[27/Jun/2023:03:54:45] "GET /minions/minion1 HTTP/1.1" 200 16 "" "Go-http-client/1.1"

Setup

Custom options that might be relevant:

worker_threads: 12
sock_pool_size: 15

System setup:

  • VM running in Linode: 6 CPU Cores, 16 GB RAM
  • used bootstrap to install

Steps to Reproduce the behavior
We are calling the salt api multiple times in parallel. 60 calls in parallel every 5 seconds.

Expected behavior
If the salt-api is overloaded why is it not returning 429 or 500 status code, it's returning 200 instead.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Salt API GET /minions/ endpoint and the configured worker_threads and sock_pool_size values. Reproduce the reported 60-parallel-calls-every-5-seconds workload, compare the API response with salt 'minion1' test.ping, and inspect whether overloaded requests return an empty 200 response. Done means the behavior is understood and the endpoint returns a meaningful response or appropriate error status under load.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.