Skip to content

Resources: configurable pillar key; clear when key omitted#68922

Open
dwoz wants to merge 1 commit intosaltstack:resourcesfrom
dwoz:feature/resource-pillar-key-and-discovery
Open

Resources: configurable pillar key; clear when key omitted#68922
dwoz wants to merge 1 commit intosaltstack:resourcesfrom
dwoz:feature/resource-pillar-key-and-discovery

Conversation

@dwoz
Copy link
Copy Markdown
Contributor

@dwoz dwoz commented Apr 10, 2026

Add minion option resource_pillar_key (default resources) with VALID_OPTS and DEFAULT_MINION_OPTS entries. Introduce salt.utils.resources helpers so discovery and ssh/dummy resource modules read the same pillar subtree.

_discover_resources now uses pillar_resources_tree(), so a missing top-level pillar key clears opts['resources'] like an empty mapping, without preserving stale discovery output.

Update unit tests for discovery behavior and add tests for the new helpers.

Add minion option resource_pillar_key (default resources) with VALID_OPTS and
DEFAULT_MINION_OPTS entries. Introduce salt.utils.resources helpers so discovery
and ssh/dummy resource modules read the same pillar subtree.

_discover_resources now uses pillar_resources_tree(), so a missing top-level
pillar key clears opts['resources'] like an empty mapping, without preserving
stale discovery output.

Update unit tests for discovery behavior and add tests for the new helpers.
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