Skip to content

Instantly share code, notes, and snippets.

@thatch45
Created June 15, 2012 22:07
Show Gist options
  • Save thatch45/2938937 to your computer and use it in GitHub Desktop.
Save thatch45/2938937 to your computer and use it in GitHub Desktop.
just a file
/etc/conf.d/iptables.rules:
file.managed:
- source: salt://iptables/iptables.rules
- user: root
- group: root
- mode: 600
@bciceron
Copy link

so similar to mine and still the file aint get dropped :(

in dist/init.sls (dist/ is at same directory level as top.sls)

/tmp/dist.tar.gz:
file.managed:
- source: salt://dist/dist.tar.gz
- user: bensix
- group: bensix
- mode: 644

salt -v * state.sls dist

Executing job with jid 20120616061237521721

{'hk06.mydomain.com': {}}

debug output of minion:

06:12:37,595 [salt.minion ][INFO ] User bensix Executing command state.sls with jid 20120616061237521721
06:12:37,595 [salt.minion ][DEBUG ] Command details {'tgt_type': 'compound', 'jid': '20120616061237521721', 'tgt': '', 'ret': '', 'user': 'bensix', 'arg': ['dist'], 'fun': 'state.sls'}
06:12:43,076 [salt.minion ][INFO ] User bensix Executing command saltutil.find_job with jid 20120616061243000796
06:12:43,076 [salt.minion ][DEBUG ] Command details {'tgt_type': 'compound', 'jid': '20120616061243000796', 'tgt': '
, 'ret': '', 'user': 'bensix', 'arg': ['20120616061237521721'], 'fun': 'saltutil.find_job'}
06:12:43,079 [cmdmod_module ][INFO ] Executing command ps -efH in directory /home/bensix

06:12:43,115 [salt.minion ][INFO ] Returning information for job: 20120616061243000796
06:21:51,457 [salt.minion ][INFO ] User bensix Executing command state.sls with jid 20120616062151363692
06:21:51,457 [salt.minion ][DEBUG ] Command details {'tgt_type': 'glob', 'jid': '20120616062151363692', 'tgt': '*', 'ret': '', 'user': 'bensix', 'arg': ['dist'], 'fun': 'state.sls'}

on syndic :
06:21:51,421 [salt.master ][INFO ] Clear payload received with command publish
06:21:51,422 [salt.master ][INFO ] User bensix Published command state.sls with jid 20120616062151363692
06:21:51,422 [salt.master ][DEBUG ] Published command details {'tgt_type': 'glob', 'jid': '20120616062151363692', 'tgt': '*', 'ret': '', 'user': 'bensix', 'arg': ['dist'], 'fun': 'state.sls'}
06:21:51,466 [salt.master ][INFO ] Clear payload received with command _auth
06:21:51,467 [salt.master ][INFO ] Authentication request from hk06.mydomain.com
06:21:51,467 [salt.master ][INFO ] Authentication accepted from hk06.mydomain.com
06:21:51,555 [salt.master ][INFO ] AES payload received with command _master_opts
06:21:51,557 [salt.master ][INFO ] AES payload received with command _file_list
06:21:51,648 [salt.master ][INFO ] Clear payload received with command _auth
06:21:51,648 [salt.master ][INFO ] Authentication request from hk06.mydomain.com
06:21:51,648 [salt.master ][INFO ] Authentication accepted from hk06.mydomain.com
06:21:51,744 [salt.master ][INFO ] AES payload received with command _pillar
06:21:51,745 [salt.loader ][INFO ] Cython is enabled in the options but not present in the system path. Skipping Cython modules.
06:21:51,768 [salt.loader ][INFO ] Cython is enabled in the options but not present in the system path. Skipping Cython modules.
06:21:51,770 [salt.loader ][DEBUG ] Failed to import module yaml_mako, this is most likely NOT a problem: No module named mako.template
06:21:51,833 [salt.master ][INFO ] AES payload received with command _return
06:21:51,834 [salt.master ][INFO ] Got return from hk06.mydomain.com for job 20120616062151363692

[DEBUG ] User bensix Executing syndic command state.sls with jid 20120616062151363692
[DEBUG ] Command details: {'tgt_type': 'glob', 'jid': '20120616062151363692', 'tgt': '*', 'ret': '', 'to': 4, 'user': 'bensix', 'arg': ['dist'], 'fun': 'state.sls'}
[INFO ] Returning information for job: 20120616062151363692

on master :

06:21:51,369 [salt.master ][INFO ] Clear payload received with command publish
06:21:51,369 [salt.master ][INFO ] User bensix Published command state.sls with jid 20120616062151363692
06:21:51,369 [salt.master ][DEBUG ] Published command details {'tgt_type': 'glob', 'jid': '20120616062151363692', 'tgt': '*', 'ret': '', 'to': 5, 'user': 'bensix', 'arg': ['dist'], 'fun': 'state.sls'}
06:21:51,838 [salt.master ][INFO ] AES payload received with command _syndic_return
06:21:51,838 [salt.master ][INFO ] Got return from hk06.mydomain.com for job 20120616062151363692

@thatch45
Copy link
Author

Where is this sls file? why do you have a syndic in place and only one minion? It looks like the sls file is just not being found

@bciceron
Copy link

file is dist/init.sls (dist/ is at same directory level as top.sls)
several syndic with their attached minion .
all minion return same empty {} and no file dropped.

@bciceron
Copy link

the issue seem to be when going through the syndic.
salts drops the file as expected when minion directly attached to master, without syndic in between.

@thatch45
Copy link
Author

states don't work through a syndic

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