Sending files from master to syndic? #38665

Open
NickDubelman opened this Issue Jan 10, 2017 · 2 comments

Projects

None yet

2 participants

@NickDubelman
NickDubelman commented Jan 10, 2017 edited

Sending files from master to syndic?

What is the suggested way for syncing files from a master down to a syndic?

The syndic documentation suggests that a syndic node should also have a minion running on it. I interpret this to mean that the syndic node should be a minion of itself. In this case, cp.get_file and cp.get_dir will not work for sending files from a master to a syndic, because these commands will attempt to use the file_roots (ie: salt://) on the syndic as the source of the copy (instead of the master).

I have seen some people suggest setting up a state that recurses and syncs the file_roots of the master down to the syndic, but have been unable to get this to work (because this too will attempt to use salt:// on the syndic rather than the master).

Any help here is much appreciated.

Update: We have settled on an approach that involves making syndic nodes regular minions of the master of masters.

@Ch3LL
Contributor
Ch3LL commented Jan 11, 2017

@NickDubelman looks like you found a solution but I want to approve this as a feature request. Maybe there coulde be a module that syncs certain directories or a configuration option. But I like this idea. I couldn't find another issue that already requested this which surprised me, so if anyone does find one please link it to this one. Thanks

@Ch3LL Ch3LL added this to the Approved milestone Jan 11, 2017
@NickDubelman

Can you provide any insight as to whether or not the method we went with has any shortcomings?

In the syndic docs it says that you want a minion running on a syndic node for better performance, does this mean you specifically want a minion that is connected to the syndic node itself, or is it sufficient to have a minion running that is connected to some other master?

With our method, we are able to enjoy the benefits of a syndic topology while still being able to treat syndic nodes as minions (for example, these minions have access to salt:// on their master and can therefore copy files from their master). I'm wondering if our method has any known shortcomings. If not, it could be easy enough to just change the docs to include this kind of usage of syndics, rather than adding a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment