Skip to content

Fix manage.status reporting all minions as up (#69582)#69585

Open
dwoz wants to merge 2 commits into
saltstack:3008.xfrom
dwoz:dwoz/fix/issue-69582-manage-up-down
Open

Fix manage.status reporting all minions as up (#69582)#69585
dwoz wants to merge 2 commits into
saltstack:3008.xfrom
dwoz:dwoz/fix/issue-69582-manage-up-down

Conversation

@dwoz

@dwoz dwoz commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

salt-run manage.status, manage.up, and manage.down once again
report which minions actually responded. They were reporting every
targeted minion as up and never listing any minion as down.

What issues does this PR fix or reference?

Fixes #69582

Previous Behavior

On 3008.1, salt-run manage.down always returned an empty list, even
for minions that were stopped or unreachable, and salt-run manage.up
returned every targeted minion.

New Behavior

manage.status, manage.up, and manage.down distinguish between
minions that returned and minions that timed out. Down minions show
up in manage.down (and are excluded from manage.up) the way they
did on prior releases.

Root cause

manage._ping iterates the events yielded by
LocalClient.get_cli_event_returns and adds every minion id it sees
to its returned set. After get_cli_event_returns started defaulting
expect_minions to True so the salt CLI emits per-target timeout
rows, the manage runner also started receiving synthesized no_return
rows for minions that did not respond. _ping treated those rows as
successful returns, leaving not_returned empty.

The fix passes expect_minions=False from _ping (the runner derives
up/down from real returns, not from synthesized rows) and skips
no_return rows defensively in case a caller threads
expect_minions=True through kwargs.

Merge requirements satisfied?

  • Docs
  • Changelog
  • Tests written/updated

Commits signed with GPG?

Yes

manage._ping iterates the events yielded by
LocalClient.get_cli_event_returns and adds every minion id it sees to
the returned set. After get_cli_event_returns started defaulting
expect_minions to True, the iteration also receives synthesized
``no_return`` rows for minions that did not respond. _ping treated
those rows as successful returns, so manage.status reported every
targeted minion as up and manage.down returned nothing.

Pass expect_minions=False explicitly from _ping and skip any
``no_return`` row that does sneak through, so the runner once again
derives up/down from real returns.

Fixes saltstack#69582
Cover the runner end to end against live salt-minions plus a fake
accepted-but-absent minion key. Reproduces the original symptom of
issue saltstack#69582 without mocks: before the runner fix, manage.status
returned every targeted minion in ``up`` and an empty ``down`` list
because the synthesized ``no_return`` rows from
LocalClient.get_cli_event_returns were counted as successful returns.
The new tests verify that live minions land in ``up``, the fake
absent minion lands in ``down``, and no ``no_return`` placeholder
strings leak through to the runner output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant