Skip to content

Use file_client=remote for pillar when file_client=local but use_master_when_local is true#56612

Merged
dwoz merged 8 commits intosaltstack:masterfrom
cro:minion-grains-cache-local
May 20, 2020
Merged

Use file_client=remote for pillar when file_client=local but use_master_when_local is true#56612
dwoz merged 8 commits intosaltstack:masterfrom
cro:minion-grains-cache-local

Conversation

@cro
Copy link
Contributor

@cro cro commented Apr 12, 2020

What does this PR do?

When file_client is 'local' this makes the minion masterless
but sometimes we want the minion to read its files from the local
filesystem instead of asking for them from the master, but still
get commands from the master.
To enable this functionality set file_client=local and
use_master_when_local=True in the minion config. Then here we override
the file client to be 'remote' for getting pillar. If we don't do this
then the minion never sends the event that the master uses to update
its minion_data_cache. If the master doesn't update the minion_data_cache
then the SSE salt-master plugin won't see any grains for those minions.

What issues does this PR fix or reference?

#56611

Previous Behavior

Entries in the master's minion data cache for minions with file_client=local and use_master_when_local=True would be missing.

New Behavior

Minion data cache entries for these minions are correctly created.

Docs & changelog written?

Not yet.

Yes/No

  • Docs
  • Changelog

Tests written?

Not yet

[NOTICE] Bug fixes or features added to Salt require tests.
Please review the test documentation for details on how to implement tests into Salt's test suite.

Yes/No

Commits signed with GPG?

Yes

@cro cro requested a review from a team as a code owner April 12, 2020 04:08
@ghost ghost requested a review from Ch3LL April 12, 2020 04:08
@cro cro force-pushed the minion-grains-cache-local branch from 83c44c5 to ad9860d Compare April 12, 2020 21:43
@sagetherage sagetherage added the ZRelease-Sodium retired label label Apr 15, 2020
@Ch3LL Ch3LL removed the request for review from a team April 15, 2020 14:12
@Ch3LL Ch3LL self-assigned this Apr 15, 2020
@dwoz dwoz added the needs-testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases label Apr 18, 2020
@sagetherage sagetherage linked an issue May 1, 2020 that may be closed by this pull request
@sagetherage sagetherage assigned xeacott and unassigned Ch3LL May 5, 2020
Copy link
Contributor

@xeacott xeacott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this just waiting on tests.

@xeacott xeacott changed the title WIP Use file_client=remote for pillar when file_client=local but use_master_when_local is true Use file_client=remote for pillar when file_client=local but use_master_when_local is true May 20, 2020
@xeacott xeacott added Merge Ready and removed needs-testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases labels May 20, 2020
@xeacott xeacott requested review from waynew and xeacott May 20, 2020 19:21
@dwoz dwoz merged commit 8a90bfb into saltstack:master May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ZRelease-Sodium retired label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Master will not create minion data cache for some minions

7 participants