Is /etc/salt/master used to configure Salt in Qubes OS?

I’m attempting to modify the Salt configuration in R4.1. My understanding is that /etc/salt/master is the place to do that, but the changes I make don’t seem to have any effect.

Specifically, I’m attempting to silence the following warning:

# dom0

sudo qubesctl state.apply
# [WARNING] top_file merging strategy is set to 'merge' and multiple top files were found. Merging order in not deterministic, it may be desirable to either set top_file_merging_strategy  to 'same' or use the 'env_order' configuration parameter to specify the merging order.

I’ve tried without success at removing the warning:

  1. Creating `/etc/salt/master.d/user.conf as follows:
top_file_merging_strategy: merge
env_order: ['base', 'user', 'dev', 'prod']
  1. Editing /etc/salt/master as follows:
- # top_file_merging_strategy: merge
+ top_file_merging_strategy: merge

- # env_order: ['base', 'dev', 'prod']
+ env_order: ['base', 'user', 'dev', 'prod']
  1. Editing /etc/salt/master as follows (just to try):
- # top_file_merging_strategy: merge
+ top_file_merging_strategy: same

Docs I’ve been referring to:

Loosely related to: What is the pillar import path when using Salt user directories?

1 Like

I thought Salt ran in masterless mode in dom0. I can’t find the keyword “masterless” in the Qubes Salt documentation. But it does say that qubesctl replaces salt-call --local. The --local flag makes salt-call operate in masterless mode.

What happens if you update the same configuration key in /etc/salt/minion.d/f_defaults.conf?

1 Like

I just had time to try this. I would also like for Salt to be happier so we don’t see this warning.

This made it go away for me. I only have base and user environments. I set these keys in /etc/salt/minion.d/f_defaults.conf:

top_file_merging_strategy: merge
env_order: ['base', 'user']

No more warning. Thanks for this config, @gonzalo-bulnes !

1 Like

Yes!! Confirmed on my side as well.

Your reasoning made sense, and indeed that was the right place to add the config. Until you said it, it didn’t even cross my mind that the master file could not be adequate for Salt in masterless mode. Great insight! :clap:

I ended up creating a new file for ease of tracking modifications:

# /etc/salt/minion.d/user.conf

top_file_merging_strategy: merge
env_order: ['base', 'user']

Thanks @brian !

2 Likes