Skip to content

Fix LocalClient.cmd_subset crashing on failed minion probing (#68103)#69437

Open
dwoz wants to merge 1 commit into
saltstack:3006.xfrom
dwoz:fix/issue-68103
Open

Fix LocalClient.cmd_subset crashing on failed minion probing (#68103)#69437
dwoz wants to merge 1 commit into
saltstack:3006.xfrom
dwoz:fix/issue-68103

Conversation

@dwoz

@dwoz dwoz commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Stops LocalClient.cmd_subset from raising TypeError: argument of type 'bool' is not iterable when one or more targeted minions fail the sys.list_functions probe. Failed minions surface as False in the probe result and are now skipped during subset selection.

What issues does this PR fix or reference?

Fixes #68103

Previous Behavior

cmd_subset iterates the result of a sys.list_functions probe with if fun in minion_ret[minion]. When a minion failed to respond, LocalClient.cmd records its entry as False, so the membership test raised TypeError: argument of type 'bool' is not iterable and aborted the call:

File "salt/client/__init__.py", line 539, in cmd_subset
    if fun in minion_ret[minion]:
TypeError: argument of type 'bool' is not iterable

New Behavior

Failed minions (non-container probe responses) are skipped during the subset loop. cmd_subset returns the subset of responsive minions and never raises on this code path.

Merge requirements satisfied?

  • Used a Salt Project PR template
  • Tests written/updated
  • Changelog entry
  • Documentation updated (no user-facing docs change required)

Commits signed with GPG?

Yes

cmd_subset called sys.list_functions on the targets and then iterated
the response with ``if fun in minion_ret[minion]``. When a targeted
minion failed to respond the LocalClient.cmd code path records that
minion's value as ``False``, which made the membership test raise
``TypeError: argument of type 'bool' is not iterable``.

Skip minions whose probe response is not a container so the subset
loop transparently passes over failed minions instead of crashing.

Fixes saltstack#68103
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