Feature request: allow master_tops to be single source of truth #67705
Replies: 13 comments
-
Hello! When you say all states from all other environments are running, do you mean just the ones that are assigned to '*' in the top.sls files? Daniel |
Beta Was this translation helpful? Give feedback.
-
Hello,
Yes. |
Beta Was this translation helpful? Give feedback.
-
I am going to double check, but I think that that doesn't specifically assign ONLY the stuff from the master_tops, but is added to what is in the top.sls In a same way that external pillars don't make it so that you don't have any other pillars, but add to what other pillars are also configured, possibly in /srv/pillar/top.sls But let me double check. |
Beta Was this translation helpful? Give feedback.
-
Yup, this should not be happening. All the base ones should be there, but the stuff in gui should not be, because you specifically have the environment set to @cro can you take a look at this? I have a docker container with it at
|
Beta Was this translation helpful? Give feedback.
-
I need some clarification:
To me this isn't consistent - master_tops output can alter environment but not the states? |
Beta Was this translation helpful? Give feedback.
-
Could someone advise roughly what is the status of this ticket? |
Beta Was this translation helpful? Give feedback.
-
I removed the info needed. @cro is working on fixing this issue. |
Beta Was this translation helpful? Give feedback.
-
Awaiting re-assignment to an available developer. |
Beta Was this translation helpful? Give feedback.
-
@gtmanfred your example used a masterless minion, and master_tops uses a remote master command to get the ext_nodes data, so ext_nodes will never have any matches for masterless. In addition, based on this code snippet, ext_nodes seems intended to merely supplement what is configured in the top file(s), not replace it. @thatch45, @cachedout is this the case? I've never used this feature before and the docs don't explicitly define the role of |
Beta Was this translation helpful? Give feedback.
-
master_tops is intended to extend an existing top file, not replace it. I think that it would make sense given the nature of this issue to allow for master tops to be the single source of truth in certain situations but that would need to be configurable.... |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Beta Was this translation helpful? Give feedback.
-
gladly reopen the issue. master_tops now amends the top.sls (same old behavior). I guess there is still no final answer what should the default behavior be |
Beta Was this translation helpful? Give feedback.
-
Thank you for updating this issue. It is no longer marked as stale. |
Beta Was this translation helpful? Give feedback.
-
Description of Issue/Question
Having salt configured with multiple environments (see topfiles in setup section) and
master_tops (ext_nodes) subsystem configured, during state.apply I expect running states designated by master_tops.
Whereas all states from all environments are run.
In following example I simply expect only the:
from base environment to be run.
Function state.show_top also displays all states from all environments.
Is it bug/misconfiguration or my misunderstanding of something in salt?
Initially question was asked in salt usergroup
Setup
Master config file (master.d/custom):
/usr/bin/foreman-node
for my sample node returns following YAML:My top files:
base/top.sls
gui/top.sls
Steps to Reproduce Issue
Use master_tops (ext_nodes) with multiple environments configured like in setup section.
This particular example comes from foreman with salt integration.
Versions Report
Master:
Minion:
Beta Was this translation helpful? Give feedback.
All reactions