Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-06-30

| Channels | #salt index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 ajw0100 joined #salt
00:07 pmcg joined #salt
00:10 seandavi Do I need to do anything besides specify the private key file in my provider config?  In particular, do I need to have an ssh agent running and add the key?
00:13 glyf joined #salt
00:13 woodtablet make sure iptables is open, and perhaps restart the minions and master. i have noticed that if the minions lose connection (depending on the number of retries set) it wont reconnect
00:14 woodtablet left #salt
00:18 seandavi Opened iptables on both master and minions and restarted master/minion. Here is the output of salt -l debug '*' test.ping: https://gist.github.com/seandavi/f907c6ad5c6da7c16f1fe61375c993c3
00:19 seandavi Note that the master is salted and returns just fine.
00:19 seandavi The minions still do not return, though.
00:28 nZac joined #salt
00:28 rem5 joined #salt
00:30 abednarik joined #salt
00:39 cableninja I just upgraded from 2015.5.3 to 2016.3.0; All of my minions are now giving 'No Top file or external nodes data matches found'; any suggestions? tried clearing cache, restarting all the things
00:41 netcho joined #salt
00:51 seandavi joined #salt
00:51 dendazen joined #salt
00:52 iggy seandavi: the master does not connect to the minion and neither uses ssh keys
00:53 iggy cableninja: try search the channel archives... istr someone else having a similar issue a while back
00:54 infrmnt joined #salt
00:55 seandavi thanks, iggy. So, any other suggestions? I've tried all the troubleshooting I can think of, and clearly I was a bit off in how I was thinking, anyway.
00:56 iggy seandavi: on the minion run `salt-call -l debug test.ping`
00:56 iggy when you run salt from the master, you're just debugging the code that runs on the master... the work is all actually done on the minion
00:57 cableninja iggy, I'd been googling for an hour before asking here with no luck
00:57 cableninja I went back to the 2015 version, and it all works again
01:04 badon joined #salt
01:05 iceyao_ joined #salt
01:06 iceyao_ joined #salt
01:06 fannet_ joined #salt
01:08 iceyao_ joined #salt
01:09 aqua^c_ joined #salt
01:10 iceyao joined #salt
01:11 InAnimaTe joined #salt
01:13 mohae joined #salt
01:13 glyf joined #salt
01:16 rem5 joined #salt
01:16 abednarik joined #salt
01:16 dyasny joined #salt
01:18 seandavi Thanks, again, iggy. I added debug logging from both master and a minion to the gist here: https://gist.github.com/seandavi/f907c6ad5c6da7c16f1fe61375c993c3
01:19 seandavi I know that logs are a pain to examine, but I cannot find anyone local here (I'm a scientist, not IT) to go over them with me.
01:20 iceyao joined #salt
01:21 A||SySt3msG0 joined #salt
01:21 fannet_ joined #salt
01:21 thejrose1984 joined #salt
01:33 noraatepernos joined #salt
01:38 catpigger joined #salt
01:38 Vaelatern joined #salt
01:39 DEger joined #salt
01:46 rem5 joined #salt
01:51 ewd84 joined #salt
01:52 ewd84 Hi, trying to install a state module and seeing this error:     Specified SLS install in saltenv base is not available on the salt master or through a configured fileserver
01:57 fannet__ joined #salt
01:58 ajw0100 joined #salt
01:58 dyasny joined #salt
01:59 k3y joined #salt
02:03 teryx510 joined #salt
02:06 fannet_ joined #salt
02:16 beardedeagle joined #salt
02:17 Derailed Hey everyone, is there a safe and convenient way to match pillar data directly by minion id? that is, if I have a minion called "my_minion" I'd always like it to get "my_minion.sls", can I do a a regex match where the match is used to resolve the filename?
02:22 glyf joined #salt
02:23 justanotheruser joined #salt
02:24 A||SySt3msG0 joined #salt
02:26 Guest94548 left #salt
02:27 A||SySt3msG0 joined #salt
02:36 hasues joined #salt
02:36 hasues left #salt
02:41 netcho joined #salt
03:06 edrocks joined #salt
03:14 edrocks_ joined #salt
03:16 kawa2014 joined #salt
03:17 MeltingFiction joined #salt
03:18 edrocks joined #salt
03:24 _JZ_ joined #salt
03:32 manson joined #salt
03:33 rem5 joined #salt
03:45 djgerm joined #salt
04:05 jab416171 joined #salt
04:06 djgerm ok so i have a couple masters in failover, and one of those masters was rebooted, and some of the minions now don't return (you know with "    Minion did not return. [Not connected]"). They're over on the other master.
04:06 djgerm now I know that if I restart minion on them, they'll go back to the other master
04:06 djgerm but it's a lot of minions
04:06 djgerm and I am lazy. will they fix them selves eventually? or… do I have to affirmative action
04:17 sjmh djgerm there's a fix for that already
04:17 sjmh sec, lemme find it
04:18 djgerm we're running like… 2015.8.8.5 or something
04:19 djgerm kewl!
04:23 sjmh djgerm : https://github.com/saltstack/salt/pull/31962
04:23 saltstackbot [#31962][MERGED] Features/intuit failover failback | What does this PR do?...
04:24 sjmh so if a master goes down, and then comes back up, the minion will return back to the first master in it's failover list
04:24 djgerm oooh yes. perfect!
04:25 sjmh you may need to go to 2015.8.10 for it
04:25 sjmh but should be what you want
04:25 djgerm yeah that'll never happen. but it's so cool to see. the future is so bright I need sunglasses B)
04:29 nZac joined #salt
04:34 sjmh is there some way to regenerate the cache data.p file for a minion?
04:34 sjmh https://github.com/saltstack/salt/issues/17204
04:34 saltstackbot [#17204][OPEN] Refresh minion cache data on master restart if the /var/cache/salt/master is gone | If the `/var/cache/salt/master` directory is deleted, the master should refresh all the minion's cached data upon a restart. It does not currently do this, which leads to some very odd and bad behavior by other functions in salt....
04:34 sjmh this has happened to us, and the minions aren't regenerating their cache
04:37 bfig joined #salt
04:38 bfig__ joined #salt
04:41 netcho joined #salt
04:46 djgerm huh. that sounds bizarre.
04:53 whaity joined #salt
04:53 MeltingFiction joined #salt
04:59 ajw0100 joined #salt
04:59 dh__ joined #salt
05:01 dh__ Is there a way to target pillar data for another host, or if not then by file name?
05:03 DarkKnightCZ joined #salt
05:04 futuredale joined #salt
05:12 Linuturk joined #salt
05:18 sjorge joined #salt
05:23 sauvin joined #salt
05:38 Guest6 joined #salt
05:49 djgerm pillar data can be referenced in any state applied to a minion, but the minion might not be able to render it based on the top.sls in the pillar
05:50 kshlm joined #salt
05:56 felskrone joined #salt
06:07 rdas joined #salt
06:10 _JZ_ joined #salt
06:19 onlyanegg joined #salt
06:26 manji joined #salt
06:32 fannet_ joined #salt
06:34 Rumbles joined #salt
06:47 ravenx joined #salt
06:55 manji joined #salt
06:56 deniszh joined #salt
06:59 fracklen joined #salt
07:01 fracklen_ joined #salt
07:03 fracklen joined #salt
07:04 fracklen_ joined #salt
07:06 Guest6 joined #salt
07:14 KermitTheFragger joined #salt
07:14 ravenx has the salt hanging on service scripts been fixed?
07:15 ravenx google has yielded similar problems, and from what i've seen it looks to be closed.
07:15 ravenx howeve,r i am still experiencing this problem.
07:15 philiaagape joined #salt
07:16 fredvd joined #salt
07:16 Rumbles joined #salt
07:20 onlyanegg joined #salt
07:28 babilen ravenx: issue?
07:30 keimlink joined #salt
07:33 Electron^- joined #salt
07:33 guedressel joined #salt
07:36 AndreasLutro I'm using event returners to send notifications on failed jobs, but if there's an SLS rendering issue there often isn't a job being sent out at all so the event returner doesn't get triggered - anyone solved this problem in any way?
07:44 krymzon joined #salt
07:47 GreatSnoopy joined #salt
07:47 kshlm joined #salt
07:48 garphy joined #salt
07:53 badon_ joined #salt
07:55 krymzon joined #salt
08:05 lero joined #salt
08:09 _JZ__ joined #salt
08:16 iceyao joined #salt
08:19 Rumbles joined #salt
08:21 onlyanegg joined #salt
08:24 ravenx babilen: the issue is that using salt-master's cmd.run, for starting a service script
08:25 babilen It sounded as if you were referring to a specific bug report
08:25 ravenx like:  "cd project/ && . venv/bin/activate && project/bin/sevice start"  , salt master does not return and just hangs.
08:25 linjan joined #salt
08:25 ravenx i was.  well there were multiple ones that dealt with service start scripts not returning
08:25 ravenx back in '12, '13
08:25 ravenx lol
08:28 tuxick btw,  https://github.com/saltstack/salt-vim
08:28 tuxick makes life easier
08:28 AndreasLutro if you're doing project/bin/service instead of actually starting a service I doubt those bug reports are relevant to you
08:28 bantone i love salt-vim
08:28 AndreasLutro your problem is clearly just that project/bin/service start hangs
08:28 AndreasLutro why it hangs is not salt's problem
08:29 babilen (or maybe it doesn't close all file descriptors on daemonisation)
08:30 babilen ravenx: Given that this is a Python daemon, does it follow https://www.python.org/dev/peps/pep-3143/ ?
08:30 ravenx tuxick: thanks.  it helps. this version of salt-vim doesn't quite have the syntax highlighting for '- onchanges' yet
08:31 tuxick this thing gets re-indenting right as well
08:31 ravenx AndreasLutro: i see.  does it matter if it works on the command line?
08:31 tuxick except for the crazy cazes where double indendation is required
08:31 ravenx babilen: thanks, i will look into that to see if it abides to those rules
08:31 tuxick for some reason way behind my comprehension
08:31 babilen ravenx: https://pypi.python.org/pypi/python-daemon/ might come in handy
08:31 ravenx babilen:
08:32 ravenx AndreasLutro, babilen intrestingly enough, adding use_vt: True seems to have fixed it:
08:32 netcho joined #salt
08:32 ravenx https://discuss.elastic.co/t/weird-filebeat-init-script-issue/35486  <-- as described here.
08:33 fannet_ joined #salt
08:33 AndreasLutro ravenx: subshells/subprocesses always behave slightly different from running things in an interactive shell so no it doesn't really matter
08:34 ravenx o_O
08:34 ravenx then, my state file working all of a sudden is a coincidence?
08:35 AndreasLutro no, if you added use_vt and that solves your problem then I'd say it's a bug in whatever project/bin/service is preventing it from working with python subprocesses
08:35 AndreasLutro but I can only guess
08:37 ravenx i see
08:38 babilen ravenx: I am almost certain that it would work fine if you implement proper daemonisation (closing al FDs, double forking, ...)
08:39 kshlm joined #salt
08:39 ravenx true.  i think that is the best practice as well.
08:39 ravenx gonna give these a read and make changes to my program
08:39 ravenx thanks babilen
08:44 renaissancedev joined #salt
08:44 s_kunk joined #salt
08:45 tuxick upgraded salt-master to 2016.3.0 but still getting "Module 'firewalld' is not available"
08:45 RandyT joined #salt
08:46 babilen tuxick: Can you call "firewall-cmd" on the minion?
08:46 tuxick yes
08:46 babilen And did you restart the minion after you installed whatever package provides that command?
08:47 tuxick and i see the python module as well
08:47 tuxick i didn't change things on minion
08:47 tuxick just master was ancient, as in centos6
08:47 Sylvain31 joined #salt
08:47 tuxick so i installed from saltstack repo now
08:48 babilen But you didn't restart the minion?
08:49 tuxick i did now
08:49 tuxick but as expected that didn't make any diff
08:51 babilen tuxick: Could you run "salt 'YOURMINION' sys.list_modules" and paste the output to one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, … ?
08:51 babilen (replace YOURMINION with the name of the minion in question)
08:51 tuxick that shows firewalld
08:51 babilen So it is loaded
08:52 babilen You might want to provide more details about the exact problem you are trying to fix as, obviously, firewalld is available on the minion
08:52 babilen (at least now)
08:53 tuxick what i'm trying to fix is using firewalld module :)
08:53 Sylvain31 Hi, I've programmed a formula and a pillar for managing minion for the notion of customers (web/db/dns/sftp) How do I select a pillar or another on the saltmaster minion for generating pillar for the destination minions? I need to have an common config, for generating 4 minions, and a particular config, or a single minion which is for a single customer having both database and web on the same minion.
08:53 babilen Why do you think that it isn't working, tuxick ?
08:53 tuxick it tells me
08:53 tuxick Comment: State 'firewalld.bind' was not found in SLS 'roles.mail-imap'
08:53 tuxick Reason: Module 'firewalld' is not available.
08:54 AndreasLutro maybe firewall-cmd is not in salt's $PATH?
08:54 cosming joined #salt
08:55 Sylvain31 may be selecting pillar by a common grain? for the same group of minion?
08:55 babilen tuxick: What does? Lets take things step-by-step. Can you run "salt 'YOURMINION' firewalld.get_zones" ?
08:55 tuxick hmm that does work
08:55 babilen AndreasLutro: The module wouldn't be loaded in that case, but it seems to appear in the sys.list_modules output
08:55 tuxick hmm, salt is pretty good at producing very misleading error messages
08:55 babilen tuxick: So the module is there .. which brings us to "What does?"
08:56 tuxick well i added a firewalld.bind section to the init.sls for this particular role
08:57 AndreasLutro try salt-call with -l debug
08:57 AndreasLutro sometimes a python fatal error/syntax error can cause modules to not load
08:57 babilen tuxick: Which version do you have on the minion? Please provide "salt-call --versions-report" in additino to the "salt-call -ldebug" output.
08:57 babilen *addition
08:57 k3y-w joined #salt
08:58 tuxick owww )$*#@%@
08:58 tuxick Salt: 2015.5.8
08:58 AndreasLutro well aren't you a silly person
08:58 tuxick i was expecting centos7 to be at least a BIT up to date
08:58 tuxick crapOS
08:58 RandyT joined #salt
08:59 tuxick sorry i've only used sane linuxes the past 10+ years :)
08:59 SheetiS1 joined #salt
08:59 babilen :D
08:59 tuxick ok this might explain
08:59 AndreasLutro debian isn't sane?
09:00 mage__ joined #salt
09:00 babilen centos7 is not Debian?
09:00 bstaz_ joined #salt
09:00 ravenx debian is best distro
09:00 AndreasLutro centos7 is sane as well if you ask me
09:00 AndreasLutro but I'm referring to debian stable having 2014.1 in its official repos
09:00 AndreasLutro doesn't make it less sane in my eyes
09:00 tuxick well, it seems to still have outdated salt
09:01 kawa2014 joined #salt
09:01 eseyman tuxick: centos7 is based on RHEL 7 which is 2 years old, at this point
09:01 davroman1ak joined #salt
09:01 tuxick yup
09:01 babilen Well, there is *no way* Debian could have a newer version in its repositories for jessie
09:01 btilton joined #salt
09:01 babilen "stable" means "not changing"
09:01 tuxick i tend to use debian testing
09:01 tuxick debian stale is indeed a bit stale ;p
09:01 babilen jessie-backports has 2016.3.0
09:01 eseyman and RH is putting the finishing touchs on RHEL 8
09:01 CeBe joined #salt
09:01 wryfi_ joined #salt
09:02 babilen tuxick: Well, that is by design. It is hard to criticise something for doing what it was designed for :)
09:02 mirko joined #salt
09:02 tuxick well, 'stable' leaves some room for interpretation
09:02 ]V[_ joined #salt
09:02 tuxick "worked 5 years ago" is a bit lame argument :)
09:03 tuxick anyway
09:03 babilen No, it is pretty clearly defined as "not changing" in the context of Debain
09:03 tuxick :)
09:03 colinstgeorge_ joined #salt
09:03 AndreasLutro I'm happy with stable/stale but I'd rather they didn't include fast-moving projects at all than include an old version
09:04 AndreasLutro doesn't affect me though since I just add the custom repos
09:04 tuxick anyway, i don't understand why i saw salt/firewalld in the python tree
09:04 babilen That has nothing to do with "working" or "bug free". Debian, naturally, tries to ensure that its stable releases are bug free and wonderful, but "stable" really just means "not changing"
09:04 chesty joined #salt
09:04 tuxick while i do get message it's not available
09:04 edulix_ joined #salt
09:04 garphy` joined #salt
09:05 babilen AndreasLutro: There's jessie-updates and jessie-backports for that.
09:05 tuxick brings me to another question: how to use salt to make minion use the salt repository?
09:05 tuxick i can't imagine i need cmd for that
09:05 babilen You could write a pkgrepo.managed state for that
09:06 eichiro_ joined #salt
09:06 babilen https://github.com/saltstack-formulas/salt-formula/tree/master/salt/pkgrepo might provide some inspiration
09:06 babilen (or just use the formula)
09:06 tuxick i only started using this stuff end last week
09:06 zz_Cidan joined #salt
09:06 tuxick coming from ansible world :)
09:06 tuxick but will have a look
09:07 arnaud__ joined #salt
09:07 sarlalian_ joined #salt
09:07 bantone_ joined #salt
09:07 Ahlee_ joined #salt
09:07 AndreasLutro we make sure to add the saltstack repo (actually our own self-hosted mirror) when the machine gets provisioned, so before the salt minion is installed at all
09:08 JPT_ joined #salt
09:08 Cidan joined #salt
09:08 bryguy joined #salt
09:08 dustywusty joined #salt
09:09 ThomasJ joined #salt
09:09 __number5__ joined #salt
09:10 johtso joined #salt
09:11 ventris joined #salt
09:12 _JZ_ joined #salt
09:13 tuxick ye i've got a kickstart in the making
09:13 tuxick indeed a better place to do this
09:13 Ssquidly joined #salt
09:13 ahammond joined #salt
09:13 tuxick only started at this job this month, large TODO :)
09:13 patarr joined #salt
09:15 linovia joined #salt
09:15 babilen And it will continue growing, I'm sure :)
09:15 twork_ joined #salt
09:16 tuxick i hope so, anything to get out of second line call duty pool :)
09:17 Electron^- joined #salt
09:18 gmoro joined #salt
09:21 karlthane joined #salt
09:21 feld joined #salt
09:22 ravenx how can i use the output of a cmd.run (that script generates a file)
09:22 ravenx into my next cmd.run (which uses that file)
09:25 badon_ joined #salt
09:27 kawa2014 joined #salt
09:28 Satyajit joined #salt
09:32 illern joined #salt
09:47 netcho joined #salt
09:53 tuxick ok, now to figure out how to get firewalld module to activatve home zone
10:01 dmaiocchi joined #salt
10:01 tuxick ah --reload required :)
10:08 tracphil joined #salt
10:10 netcho joined #salt
10:16 netjak joined #salt
10:17 Electron^- joined #salt
10:17 babilen ravenx: Shouldn't the file be available on the minion?
10:20 dmaiocchi joined #salt
10:21 onlyanegg joined #salt
10:32 ravenx no no
10:32 ravenx it zips up a file
10:32 ravenx that gets generated
10:32 ravenx so i have a cmd.run:  - name:  do-something-that-generates-file.sh
10:32 ravenx and salt is gonna output the filename that got generated from that.
10:33 ravenx babilen: and my next state:    cmd.run:  - name:  read-file-that-was-generated.sh <filename>
10:33 ravenx the <filename> i wish for it to be the one that was generated from the first cmd.run
10:33 netcho joined #salt
10:34 fannet_ joined #salt
10:34 Sylvain31 ravenx: {%- set res = salt['cmd.run']('echo -e "- yaml\n- is fun"') | load_yaml %}
10:34 Sylvain31 ?
10:34 babilen ravenx: So you don't know what the filename will be nor can you influence it?
10:35 Sylvain31 ravenx: you then use: t: cmd.run: - name: echo "{{ res[0]  }} and {{ res[1] }}"
10:36 ravenx babilen: yeah, i won't know UNTIL i look at my salt '*' state.sls stuff  output.
10:36 ravenx Sylvain31: will that print the result of the previous command?
10:36 babilen ravenx: I'd write a state module in that case
10:36 babilen Anway, lunch .. bbl
10:36 ravenx what is a state module?
10:37 Sylvain31 http://paste.debian.net/772351/
10:38 Sylvain31 salt-call state.apply test.t (if in test/t.sls)
10:39 Sylvain31 ravenx: https://docs.saltstack.com/en/latest/topics/tutorials/states_pt3.html#calling-salt-modules-from-templates enjoy!
10:40 ravenx hang on hang on, let me paste you something
10:40 ravenx maybe i'm not explaining myself that well
10:41 Sylvain31 2 min, called for lunch too
10:41 ravenx Sylvain31: ttps://paste.debian.net/772354/
10:42 ravenx Sylvain31: https://paste.debian.net/772354/
10:43 Sylvain31 ravenx: best would be to pass the name 12345.txt as argument.
10:43 ravenx the thing is that a new one with a new combination of digits get generated each time
10:43 ravenx there is no way i could tell what will be genreated
10:43 ravenx the enxt run could be 621351.txt
10:43 Sylvain31 other idea, it to ls it? name: file-processor.sh "$(ls | find it here)"
10:44 ravenx that ....may work.  kinda hacky.
10:44 Sylvain31 or third: do a up script wrapping both, they run on the same minion?
10:44 ravenx i'm looking for soemtign cleaner
10:44 ravenx like is there a salt command that can retrieve the output of the previous?
10:44 ntropy joined #salt
10:45 ravenx lik  salt[previous.command].stdout   :P
10:45 toabi joined #salt
10:45 Sylvain31 jinja module call I sent you: {%- set res = salt['cmd.run']('ls the good file"')  %}
10:46 alxchk joined #salt
10:46 Sylvain31 or: {%- set res = salt['cmd.run']('file-gen.sh get_last_generated name')  %}
10:46 cliffstah joined #salt
10:46 mrud joined #salt
10:46 mrud joined #salt
10:46 ravenx alrgiht, i will give that a shot.
10:46 ravenx thanks Sylvain31
10:46 tuxick if i use salt 'foo' firewalld.add_source trusted x.x.x.x it works
10:47 tuxick but when called from init.sls i get 'firewalld.add_source' is not available.
10:47 Sylvain31 going for lunch see also cmd.script state. https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.script
10:47 ravenx Sylvain31: will do, thanks
10:47 tuxick once again not making sense, i assume i use wrong syntax
10:48 thalleralexander joined #salt
10:50 dendazen joined #salt
10:51 tuxick meh
10:53 mrBen2k2k2k joined #salt
10:53 Electron^- joined #salt
10:55 Satyajit joined #salt
10:57 davromaniak joined #salt
11:00 tuxick i honestly have no idea why it's acting so stupid this time
11:02 keimlink joined #salt
11:05 babilen tuxick: firewalld.add_source is a function in the firewalld execution module (cf. https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.firewalld.html)
11:06 babilen tuxick: In states you use the https://docs.saltstack.com/en/latest/ref/states/all/salt.states.firewalld.html state module
11:06 tuxick oooh
11:07 tuxick no idea how to use execution module :)
11:07 tuxick at least not from sls
11:07 tuxick anyway, the cli thing returned success but failed silently
11:07 tuxick i don't see change on minion
11:08 dariusjs joined #salt
11:09 babilen Execution modules are the interactive bits of salt and therefore the functions you'd call on the CLI. States are built on top of them and add tests to check if the state has been achieved or not.
11:09 babilen You might want to check the salt minion debug output when you call that function
11:12 babilen What does that give you?
11:12 tuxick sorry trying to parse :)
11:13 tuxick add_source via cli did work, according to firewall-cmd --list-sources
11:13 tuxick i just didn't find it in /etc/firewalld/
11:13 babilen If you run the minion in debug mode (i.e. "salt-minion -ldebug") and then run the firewalld.add_source command again: What is the output that results in? Could you paste it?
11:13 babilen So it did work?
11:13 tuxick yes, i was assuming it'd show up in firewalld config files
11:14 tuxick but of course my goal is doing this via state
11:14 babilen Okay, so your problem is that you want to add sources in a state, but that no state for that has been implemented yet?
11:14 tuxick ack
11:14 tuxick guess i'll have to work around that using config file
11:15 babilen You can either implement the state yourself or use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html#salt.states.module.run
11:15 babilen If there is another way to achieve the same goal you might want to investigate that.
11:15 tuxick ah ok
11:16 babilen firewalld seems to be pretty new
11:16 tuxick quite
11:16 babilen You could, presumably, just configure iptables directly
11:16 tuxick well that's a the problem a bit
11:17 tuxick when i started here i faced some decisions already made
11:17 tuxick like using saltstack, centos
11:17 tuxick and firewalld :)
11:17 babilen And "We use firewalld in case somebody suggests that we use Debian in the future" was one of them?
11:17 tuxick haha who knows
11:18 tuxick actually there is some debian stuff in the salt master as well
11:18 tuxick i prefer generic solutions but ok
11:19 tuxick btw, i assume the documentation is taken from the code, what's the generator used for that?
11:19 babilen Fair enough, you obviously have to work with it. If you know Python programming it isn't typically too much work to implement suitable states that do what you want yourself and then ship a custom state modules in _states. If you submit your changes upstream it'll make it into one of the future reelases
11:19 tuxick need to pick up python anyway, might as well start here
11:20 tuxick looking at the module code it seems easy enough to add some function
11:21 kawa2014 joined #salt
11:22 babilen The state can be found in https://github.com/saltstack/salt/blob/develop/salt/states/firewalld.py -- You would implement a "source_present" that might calls firewalld.get_sources to check if it has already been added beforehand and, if not, calls firewalld.add_source to add it.
11:23 babilen The only tricky bit would be the "parse the get_sources" output and check if specified source has been added already
11:24 babilen https://docs.saltstack.com/en/latest/ref/states/writing.html has an overview about writing states
11:24 babilen Sorry that firewalld does not have a complete state module yet
11:25 tuxick was on that page already :)
11:26 A||SySt3msG0 joined #salt
11:26 tuxick is there some upstream/git to check?
11:27 tuxick found it :)
11:32 tuxick hmm if i put one in _states using the name firewalld, that one gets precedence? no conflict?
11:32 tuxick or could i even use inheritance?
11:32 babilen No
11:32 babilen The one in _states is used
11:32 tuxick ok
11:32 tuxick won't tell boss i'm wasting time then ;p
11:33 babilen (don't forget to sync it to the minion -- https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.sync_all)
11:33 tuxick oww they both need awareness
11:33 tuxick makes sense
11:35 tuxick any standard location for _states?
11:35 Trauma joined #salt
11:35 babilen You are actually looking for sync_states, but sync_all syncs everything
11:35 tuxick yes, it's in the writing doc
11:36 babilen You keep _states somewhere in file_roots. You might want to use a separate git repo for custom states that you reference via GitFS
11:36 babilen If you have a repository for all your firewall related config that might also be a good place.
11:36 tuxick we have a git repository yes
11:37 babilen Just one?
11:37 tuxick i mean for own use
11:37 babilen That would be the place then
11:37 tuxick i'll just stick in /srv/_states
11:38 tuxick since /srv is in git already
11:43 babilen Oh, you mix states and pillars?
11:43 tuxick ?
11:43 tuxick both are in /srv if that's what you mean
11:43 abednarik joined #salt
11:44 babilen Yeah, so you mix them in the same repository
11:44 tuxick ah yes
11:44 tuxick might look into that later
11:44 babilen You want it in /srv/salt/_states then
11:45 babilen (whatever that corresponds to in your git repo)
11:46 tuxick ooh ok
11:46 tuxick ah rights, there's _grains there as well
11:46 babilen Oh, you use custom grains already?
11:47 amcorreia joined #salt
11:48 tuxick someone did yes
11:48 tuxick guy who did initial setup
11:48 tuxick hmm major differences between actual module and the one on github??
11:49 tuxick the github one misses functionality
11:49 babilen The one on GH would be from the develop branch, while the "actual module" would be from the 2016.3 branch
11:49 tuxick well, for examply firewalld.bind is missing there
11:50 babilen Jesus christ ..
11:50 babilen https://github.com/saltstack/salt/blob/2016.3/salt/states/firewalld.py is the one from the 2016.3 branch
11:51 tuxick i was assuming develop branch was ahead :)
11:51 babilen Why on earth somebody decided that it is a good idea to develop that in the 2016.3 branch rather than develop is beyond me
11:51 babilen Yes, you would assume that
11:51 tuxick ah ok, so it's not just me :)
11:51 Sylvain31 is there a state that will fail the entire sls?
11:51 tuxick coma ;p
11:51 babilen Sylvain31: failhard: True
11:52 Sylvain31 in https://docs.saltstack.com/en/latest/ref/states/all/salt.states.test.html ?
11:52 babilen tuxick: IMHO developing it in 2016.3 is not in line with the contribution guidelines on https://docs.saltstack.com/en/latest/topics/development/contributing.html#the-develop-branch
11:53 tuxick ye well, i'm not going to interfere there now :)
11:53 tuxick but maybe this explains some delay
11:54 Sylvain31 found: https://docs.saltstack.com/en/latest/ref/states/failhard.html
11:54 notCalle joined #salt
11:55 babilen Sylvain31: But the answer to your question is "No"
12:03 tracphil joined #salt
12:06 Sylvain31 babilen: I did not read that doc, just tested and it works as I expect, so I guess it's OK. It should be available to all state… I suppose.
12:09 Trauma joined #salt
12:09 ravenx can i write functions for saltstack?
12:09 dps joined #salt
12:09 ravenx i find that i'm repeating myself a lot
12:09 ravenx ideally i would like to call a git.latest state
12:09 ravenx with the only thing i pass in being the project name.
12:09 ravenx what should i be googlign?
12:10 Sylvain31 ravenx: why not put that in a state_file.sls: salt 'minino' state.apply state_file
12:11 ravenx well i was thinking of making a generic  gitlatest.sls
12:11 ravenx and then from each of the project1.sls, call gitlatest.sls from there.
12:12 babilen Sylvain31: That doesn't fail a single SLS
12:12 dps hi.  sorry to drop this question again.  still scratching my head over this.  would somebody be able to tell me why my output of cp.list_master_dirs looks like this?  I have used this command before and the output did NOT look like a JSON stack trace.  All I have is one node configred in my roster.  https://gist.github.com/dsulli99/64c4c7d75bd345dab8d4a5e34131d27d
12:12 Sylvain31 ravenx: pillar: projects: - project1 - project2 and in the state {% for p in salt['pillar.get']('projects') %} put your code in a for loop ?
12:13 babilen ravenx: The basic way is to provide data via pillars and to use that data for generating states
12:13 ravenx Sylvain31: sorry, for that, that is not qquite what im' looking for
12:13 ravenx babilen: so hardcode it, instead of passing it in each time
12:13 ravenx Sylvain31: after reading state.apply, i'm not too sure what it does
12:14 Sylvain31 ravenx: state.apply "call" as sls file for the minion
12:14 babilen ravenx: What do you mean by "passing it in each time" ? Are you referring to passing in data via the command line?
12:16 ravenx babilen: sorry.  let me clarify myself:  i would like to take out repeated states in an sls file, put it in their own .sls file.  Then in the main .sls file, call that repetitive state (in my case, git.latest)
12:16 babilen ravenx: Could you paste an example of that?
12:16 dariusjs_ joined #salt
12:16 ravenx sure thing
12:17 kawa2014 joined #salt
12:18 TooLmaN joined #salt
12:19 netcho joined #salt
12:20 ravenx babilen: https://paste.debian.net/772375/
12:21 babilen ravenx: You'd write a generic "project.sls" that uses data from pillars to generate the specific states in question
12:22 Sylvain31 ravenx: as mentioned, could be accomplished by a loop, or a jinja macro too
12:22 ravenx Sylvain31: i think jinja macro is what i'm looking for
12:22 ravenx babilen: a generic project.sls works too.  but i have to pass in data from pillars and not within the .sls file?
12:23 babilen {% for project in salt['pillar.get']('ravenx:projects', {}) %} DO THE MAGIC {% endfor %}
12:23 babilen Yeah, that would be one way
12:23 Sylvain31 ravenx: could be achievd vim orchestrtation too…
12:23 Sylvain31 ravenx: could be achievd vim orchestrtation too…
12:23 Sylvain31 ravenx: could be achieved with orchestrtation too…
12:25 babilen Your project pillar would contain all settings you would ever want to define for a project and you could then just target - ravenx.projects to your minion and that would just do the right thing based on your pillar data
12:25 babilen (and if there is no pillar data they wouldn't do anything)
12:26 ravenx aah
12:26 ravenx gotcha.
12:35 fannet_ joined #salt
12:35 renaissancedev joined #salt
12:37 tuxick meh, current firewalld.py is also completely different from github one 16.3
12:37 tuxick what a mess
12:38 Electron^- joined #salt
12:39 Trauma joined #salt
12:40 debian112 left #salt
12:41 tuxick ah :)
12:42 babilen huh?
12:42 netjak does salt have anz modules for deploying/rollbacking applications?
12:43 netjak or it needs to be done with shell sripts
12:43 netjak anyone uses salt for stuff like that?
12:43 Sylvain31 netjak: could be achieved with git branches?
12:44 Ahlee_ joined #salt
12:44 netjak Sylvain31:  what do u mean?
12:45 iceyao joined #salt
12:45 Sylvain31 netjak: deploying a new branch of the code under git, if you want to rollback use the previous working branch
12:46 numkem joined #salt
12:46 AndreasLutro netjak: I think you'd be better suited using a standalone deploy tool for that
12:46 netjak yeah i would like to loose capistrano and use salt
12:46 netjak not a rubz fan
12:47 netjak ruby
12:47 AndreasLutro fabric is a python alternative
12:48 manji netjak, generally, deploying and especially rolling back applications
12:48 manji as in custom apps
12:48 manji is a very very complicated process
12:48 manji one can't expect any configuration management tool to do that for them
12:49 netjak i do net except out of the box solution ofc, just a way to do it
12:49 manji if you want to use salt, you will need to write your own module
12:49 rem5 joined #salt
12:50 manji unless there is a deployment salt module out there that someone has written and suits your needs as well
12:50 netjak hm
12:50 AndreasLutro writing it in salt would simply be more trouble than it's worth if you ask me
12:50 manji depends on the complexity of your app honestly
12:51 manji if what you need is a simple git pull, reload nginx/frontend
12:51 manji maybe a runner is fine
12:51 netjak the idea is for jenkins to do the build and test, compresses artifacts and puts them on S3 bucket then with salt i download it from s3 and untar
12:52 manji then start off with a simple state that gets the artifacts from s3
12:52 manji and see where it takes you
12:56 glyf joined #salt
12:56 tuxick heh when i copy existing state module to _states and add a function, salt claims existing functions no longer exist :)
12:56 Rumbles joined #salt
12:56 tuxick function/state whatever to call it
12:58 west575_ joined #salt
13:00 dendazen joined #salt
13:01 tuxick mind, the file is definitely used
13:01 tuxick when i comment out my added code it works again :)
13:02 AndreasLutro probably means you have a syntax error or something
13:05 netjak 10x guzs
13:05 bearonis joined #salt
13:07 tuxick AndreasLutro: indeed, amazing how confusing the error handling is
13:07 tuxick dunno if i have to blame python for this
13:07 tuxick but ok, lesson learned again
13:09 west575 joined #salt
13:09 ivanjaros joined #salt
13:10 dariusjs joined #salt
13:23 cyborg-one joined #salt
13:23 onlyanegg joined #salt
13:24 Electron^- joined #salt
13:28 tuxick Warnings: 'name' is an invalid keyword argument for 'firewalld.add_source'.
13:28 tuxick no idea what that means, there's no 'name' there
13:30 nZac joined #salt
13:31 AndreasLutro state functions *must* have a name argument
13:32 protoz joined #salt
13:33 Qlawy joined #salt
13:33 Qlawy Hi Guys
13:33 Qlawy Im trying to somehow differ packages installed on different OSes
13:34 Qlawy I read that it should/might be done by maps, but have no idea how to do this :/
13:34 AndreasLutro Qlawy: no need, just wrap the package name in if statements
13:34 AndreasLutro check out jinja if statements and how to use grains in sls files
13:34 Qlawy That was my first idea ;)
13:36 tuxick AndreasLutro: i already found it confusing to see the documentation refer to 'name' where 'zone' would have been a lot clearer
13:36 AndreasLutro too bad!
13:36 netcho joined #salt
13:36 tuxick what's the reasoning behind this?
13:36 numkem joined #salt
13:37 AndreasLutro ask the people who wrote salt I guess
13:37 tuxick :)
13:37 DammitJim joined #salt
13:38 tuxick while at it i'll ask for better exception handling
13:39 debian112 joined #salt
13:39 tuxick changed it but it still complains about zone, some cache somewhere?
13:40 mapu joined #salt
13:40 AndreasLutro saltutil.sync_all ?
13:41 tuxick did that
13:42 tuxick saltutil.clear_cache
13:42 tuxick lessee
13:42 tuxick thing is *slow*
13:42 tuxick meh that didn't help either
13:43 MadHatter42 joined #salt
13:44 kbaikov joined #salt
13:46 WKNiGHT joined #salt
13:47 Trauma joined #salt
13:48 dyasny joined #salt
13:49 babilen tuxick: Could you paste the code/whatever it complains about?
13:50 tuxick http://pastebin.com/K2PXt9YK
13:50 tuxick addition for firewalld state module
13:50 tuxick i'm completely new to python/salt so prolly overlooking something very silly
13:53 AndreasLutro what is the exact error message?
13:53 tuxick Warnings: 'zone' is an invalid keyword argument for 'firewalld.add_source'.
13:54 AndreasLutro well, you don't specify a "zone" argument in your function definition
13:54 tuxick oh preceded by "Comment: Unknown zone"
13:54 tuxick that narrows it down
13:54 tuxick hmm, scope problem?
13:55 fannet_ joined #salt
13:55 AndreasLutro no
13:55 AndreasLutro you're calling your function with an argument "zone" but the function doesn't accept a "zone" argument
13:55 AndreasLutro programming 101
13:56 tuxick aargh
13:56 * tuxick slapts self
13:56 tuxick the sls!
13:56 tuxick too bleeding obvious
13:56 tuxick cheers :)
13:57 tuxick great
13:59 tuxick but hey, at least i added exception handling, it won't try to add source twic :)
13:59 DEger joined #salt
14:02 Rumbles joined #salt
14:05 hasues joined #salt
14:07 mpanetta joined #salt
14:07 dyasny joined #salt
14:08 Slimmons joined #salt
14:12 ajv joined #salt
14:12 hasues left #salt
14:14 kaptk2 joined #salt
14:15 toastedpenguin joined #salt
14:17 onlyanegg joined #salt
14:17 tuxick but when succesful it now throws "SaltException: Malformed state return, return must be a dict"
14:17 tuxick after it indeed sets source
14:18 tuxick ooh think i see
14:19 tuxick \o/
14:22 tuxick ok, took me a few hours but got what i needed :)
14:24 rem5 joined #salt
14:27 babilen tuxick: Congratulations
14:27 tuxick :)
14:28 berserk joined #salt
14:28 berserk joined #salt
14:32 mpanetta joined #salt
14:32 deniszh joined #salt
14:34 berserk joined #salt
14:34 deniszh joined #salt
14:36 nZac joined #salt
14:36 subsignal joined #salt
14:37 subsignal joined #salt
14:38 lazybear joined #salt
14:39 rhodgin joined #salt
14:40 deniszh1 joined #salt
14:41 ivanjaros joined #salt
14:42 coval3nce joined #salt
14:43 ravenx if i run this:salt serv1 state.sls super-app, how am i able to get the name "super-app" from within my super-app/init.sls
14:43 lazybear joined #salt
14:43 ravenx is there a way to:  salt['statename'].get or smething like that?
14:44 Guest6 joined #salt
14:45 ruxu joined #salt
14:46 ruxu left #salt
14:46 ruxu joined #salt
14:48 bearonis joined #salt
14:49 ajw0100 joined #salt
14:53 bluenemo joined #salt
14:53 nZac joined #salt
14:54 rem5 joined #salt
14:54 babilen joined #salt
14:55 corichar joined #salt
14:58 debian112 joined #salt
14:59 bluenemo hi guys, hi iggy - I'm (still) trying to sync /srv/salt/_states/my_state.py to a minion using 2015.8.8.2 on both master and minion. python my_state.py works, it shows up in cp.list_master but it wont sync it to the minion via saltutil.sync_all
15:01 beardedeagle joined #salt
15:02 bluenemo if i set log_level to debug and grep for my modules name, it does now show up when i execute the saltutil.sync_all
15:03 berserk joined #salt
15:04 onlyanegg joined #salt
15:05 nZac joined #salt
15:11 bluenemo reinstalling everything and using the default /etc/salt for both master and minion didnt help. using deb http://repo.saltstack.com/apt/debian/8/amd64/archive/2015.8.8.2 jessie main
15:12 manji joined #salt
15:13 bluenemo really dont get it :(
15:15 manji joined #salt
15:17 lazybear joined #salt
15:17 br joined #salt
15:18 Electron^- joined #salt
15:20 lazybear joined #salt
15:24 fannet_ joined #salt
15:26 subsigna_ joined #salt
15:26 bearonis joined #salt
15:27 bowhunter joined #salt
15:29 bluenemo manually copying the files from a working master to /var/cache/salt/master/roots/hash/base/_states/, /var/cache/salt/minion/extmods/states/ and /var/cache/salt/minion/files/base/_states/ solved the problem.
15:29 nZac joined #salt
15:32 tapoxi joined #salt
15:34 debian112 joined #salt
15:39 Brew joined #salt
15:42 teryx510 joined #salt
15:43 fannet_ joined #salt
15:46 keimlink joined #salt
15:53 deniszh1 joined #salt
15:59 p3rror joined #salt
15:59 nZac joined #salt
16:03 Electron^- joined #salt
16:08 netcho joined #salt
16:11 djgerm joined #salt
16:12 onlyanegg joined #salt
16:13 beardedeagle joined #salt
16:17 writtenoff joined #salt
16:19 bltmiller joined #salt
16:21 bltmiller joined #salt
16:21 snergster joined #salt
16:26 deniszh joined #salt
16:30 debian112 joined #salt
16:34 Lionel_Debroux joined #salt
16:35 br joined #salt
16:38 woodtablet joined #salt
16:39 bfig_ joined #salt
16:40 dmaiocchi joined #salt
16:41 djgerm left #salt
16:44 irctc396 joined #salt
16:44 bfig joined #salt
16:45 irctc396 hey there. short question, i want to distribute a file only once. how to do that?
16:45 irctc396 ^^ i.e: if the file exist on the minion: do nothing
16:47 mapu joined #salt
16:51 debian112 joined #salt
16:52 tuxick irctc396: that's standard behaviour
16:54 rem5 joined #salt
16:56 rem5 joined #salt
16:59 irctc396 got it. {% if not salt['file.file_exists' ]('/etc/passwd') %} blah_blah_blah {% endif %}
16:59 fracklen joined #salt
16:59 tuxick uhm why bother? file.managed does it for you
17:00 ageorgop joined #salt
17:01 irctc396 i want to distribute a file only once
17:01 glyf joined #salt
17:02 irctc396 so something like {% if not salt['file.file_exists' ]('/etc/passwd') %} file.managed: ...  {% endif %}
17:04 Ahlee irctc396: - unless: test -f /etc/passwd
17:04 fannet_ joined #salt
17:05 irctc396 file.managed knows "unless"?
17:06 Eugene Yup; unless and onlyif are available in every state that i've tried.
17:06 Eugene irctc396 - this is how I do it: https://github.com/EugeneKay/srv-salt/blob/pepper/states/system/authentication/init.sls#L32
17:07 gimpy2938 joined #salt
17:07 Eugene I suggest using `test` directly because it is shell-independent.
17:07 toastedpenguin joined #salt
17:08 gimpy2938 salt-minion is crashing on one of my minions - caused by something in schedule.py, anything I should do when I open a bug on it?  (strace, dmumps, etc...)
17:09 Eugene The New Issue template on github lists the info that it wants
17:10 concernedcitizen joined #salt
17:10 concernedcitizen joined #salt
17:11 higuita joined #salt
17:11 irctc396 https://gist.github.com/anonymous/e5d60a6a9c6afa9ed1fa2d2bc043ad61
17:13 irctc396 and this one: https://gist.github.com/anonymous/6d0d74363d2b052158c5e5a853053868
17:14 manji joined #salt
17:14 irctc396 Eugene i think i cant use "onlyif" in this situation?
17:15 Eugene I don't see why not, but I also don't see why you wouldn't want to continue having file.managed apply
17:15 Eugene The idea behind it is that it ensures the file stays up-to-date with the source
17:15 bltmiller joined #salt
17:16 higuita i'm trying to use salt-ssh and it works for installing package, copy files, etc. but when i try a more complex template it errors with this:
17:16 higuita https://gist.github.com/anonymous/5ae225d92d659cd0fb1c3c783b073cc0
17:16 irctc396 i just need some content in the file to start the service.
17:16 higuita i suspect that i'm missing some enviromnent config, but do not understand what
17:17 DarkKnightCZ joined #salt
17:17 irctc396 the file will be managed outside salt, therefore "just run only once, if file does not exist..."
17:18 lompik joined #salt
17:20 Rumbles joined #salt
17:22 sjmh git really needs to figure out a way to specify certain files to be included in a merge.  sigh.
17:22 Eugene higuita - I believe you need to do some extra hoop-jumping to use mines with ssh
17:23 Eugene sjmh - git merges Trees, not Files.
17:23 sjmh Eugene - I know.
17:23 Eugene You can do magic with --no-commit and then fix it manually before commit-ing
17:24 sjmh Sure, but that's painful.  git has evolved to much more than 'source control', and it makes it difficult to test or keep certain branches in sync, when you have a few files ( like database configurations ), that you want to remain different in each branch.
17:24 Eugene git was originally meant to be a database layer for a "real" VCS built on-top. It's not git's fault that never materialized; the tooling sucks.
17:26 sjmh I'm surprised no one's come up with a workflow for it - something that auto-copies the files from a list out to a temp safe spot, merges the branch, copies back the real files and commits them.  You'd end up with some pointless commits but could squash them.
17:26 higuita Eugene: yes, but mines are working, the command salt-ssh   ngicinga01   mine.get ngicinga01 network.interfaces   returns everything i need
17:27 higuita the error complains about the opts['python2_bin'], after reading the environment.py
17:27 higuita that is why i suspect that i'm missing something to setup the correct environments for jinja to work
17:30 irctc396 Thanks <Eugene>: https://docs.saltstack.com/en/latest/ref/states/requisites.html#unless
17:35 Ayo joined #salt
17:38 irctc396 so  "unless" is much smarter than the solution before:
17:38 irctc396 https://gist.github.com/anonymous/ea70a0fbb4da43a293e4aad368c3e121
17:38 irctc396 https://gist.github.com/anonymous/6d0d74363d2b052158c5e5a853053868
17:38 irctc396 so, thanks again.
17:39 bearonis joined #salt
17:42 dh__ joined #salt
17:44 keys joined #salt
17:58 iggy sjmh: use 2 git trees?
17:59 sjmh iggy : not sure how that'd help?
18:00 iggy sjmh: keep the stuff that's safe to merge in one tree and the problematic stuff somewhere else (I said another git tree... but that doesn't necessarily have to be the case)
18:08 nZac joined #salt
18:08 bowhunter joined #salt
18:08 Ayo_ joined #salt
18:08 deniszh joined #salt
18:08 netcho joined #salt
18:09 krymzon joined #salt
18:09 nZac joined #salt
18:12 Rumbles joined #salt
18:13 subsignal joined #salt
18:16 subsignal joined #salt
18:17 kevinqui1nyo joined #salt
18:20 cableninja_ joined #salt
18:20 _JZ_ joined #salt
18:21 DarkKnightCZ joined #salt
18:22 blueelvis joined #salt
18:28 infrmnt joined #salt
18:30 amcorreia joined #salt
18:33 bluenemo joined #salt
18:35 Trauma joined #salt
18:44 GreatSnoopy joined #salt
18:46 ponyofdeath hi, how can i get salt-call --local to reat pillar items from /srv/pillar ?
18:46 ruxu joined #salt
18:48 ponyofdeath figured it out mixup in my top.sls in pillar dir
18:51 bluenemo joined #salt
18:51 jav joined #salt
18:52 keys can anyone point me to a template for a working config in gitfs_remotes for a private repo on github?
18:52 keys feeling pretty salty atm
18:54 mrueg joined #salt
18:55 ajw0100 joined #salt
19:09 netcho joined #salt
19:16 cableninja__ joined #salt
19:23 bltmiller joined #salt
19:23 bluenemo joined #salt
19:26 tapoxi joined #salt
19:27 tapoxi hey everyone, I have a ton of pillar data to store and I'm trying to map out in my head the best way to do it
19:27 tapoxi is there a way to view pillar data in a hierarchy?
19:28 tapoxi basically just a fancy way of calling pillar.ls/pillar.keys
19:30 mrueg joined #salt
19:33 bluenemo joined #salt
19:46 nZac_ joined #salt
19:47 MeltingFiction joined #salt
19:47 amcorreia joined #salt
19:51 hoonetorg joined #salt
19:54 mapu joined #salt
19:57 glyf_ joined #salt
20:00 nZac joined #salt
20:03 cableninja__ joined #salt
20:05 nZac joined #salt
20:07 nZac joined #salt
20:08 qriff_ joined #salt
20:10 qriff_ I have to setup a system that can't reach our salt-master ( a remote, standalone system, at our clients site).  All of our build has moved to saltstack, so our old docs are very outdated..  How can I, for example, print out a list of ALL packages that saltstack installs/checks for a system?
20:13 babilen qriff_: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.show_top
20:15 babilen Assuming you mean "SLS" by "package" -- If you are referring to actual packages I'd take a look with the package manager at manually installed packages (exact approach differs between package managers here)
20:15 qriff_ babilen: thanks that is helpful, but only state files.
20:15 qriff_ I was actually trying to figure out the system applications (RPM's)
20:16 qriff_ I guess I could run a state.highstate on a system, with test=True, and use that output?
20:16 babilen Take a look at show_highstate then and filter the output. Might be easier to do with JSON output and tools such as jq
20:17 babilen You know that you could copy your salt state/pillar tree to the remote system and run it locally with salt-call, don't you? salt-ssh might be another options.
20:18 qriff_ wow.. state.show_highstate is going to be awesome!
20:18 qriff_ I did know that.. but we mostly need the directory structure, and package deps.. since its remote, most of the states won't work, like seting up our AD authentication, satellite update servers, etc
20:25 west575_ joined #salt
20:25 keimlink joined #salt
20:25 babilen Sure, just thought I'd mention it in case it would be a sensible alternative
20:26 Trauma_ joined #salt
20:28 Netwizard joined #salt
20:31 fracklen joined #salt
20:36 onlyanegg joined #salt
20:44 toddnni joined #salt
20:44 nZac joined #salt
20:44 glyf joined #salt
20:45 TyrfingMjolnir joined #salt
20:46 xenosln joined #salt
20:47 Lionel_Debroux_ joined #salt
20:49 cabal51 left #salt
20:51 rylnd joined #salt
20:56 mapu joined #salt
21:00 tapoxi joined #salt
21:01 rem5_ joined #salt
21:02 rem5 joined #salt
21:04 cyborg-one joined #salt
21:06 mapu_ joined #salt
21:07 AirOnSkin joined #salt
21:09 alxchk joined #salt
21:09 glyf joined #salt
21:14 blue0ctober joined #salt
21:23 onlyanegg joined #salt
21:25 netcho joined #salt
21:29 macheck joined #salt
21:30 devster31 joined #salt
21:36 onlyanegg joined #salt
21:38 yidhra_ joined #salt
21:39 darix- joined #salt
21:40 KingJ_ joined #salt
21:40 Slimmons joined #salt
21:40 Slimmons Still having problems setting up a salt-api environment.  Here's what I'm doing. https://gist.github.com/Slimmons/a6ed94db751cf57bec59519155af9ecd
21:40 B1nny joined #salt
21:40 Slimmons also, I'v easked the question here. http://stackoverflow.com/questions/38133606/why-isnt-salt-api-working-with-this-configuration
21:40 darix- joined #salt
21:42 feld joined #salt
21:42 klaas- joined #salt
21:44 deniszh joined #salt
21:45 feld left #salt
21:46 mapu joined #salt
21:48 Llmiseyhaa joined #salt
21:49 Llmiseyhaa Yargh. Been fighting with this one off and on all day and I'm about out of google-foo and such.  Cannot seem to get top.sls to work when using pure gitfs
21:58 Llmiseyhaa found it... argh
21:59 mapu joined #salt
21:59 Llmiseyhaa oh, nope... argh, even more annoying )=
22:01 Llmiseyhaa argh the rules for top.sls from gitfs are baffling and seemingly contradict the documentation
22:03 kevinqui1nyo is there a document that shows when the next release is planned for?
22:05 keys I too have this issue
22:05 keys and have also spent last day or two smashing head into keyboard
22:06 mapu joined #salt
22:06 bltmiller joined #salt
22:08 kevinqui1nyo Slimmons: i don't think you can issue cmd.run directly in your reactor file
22:08 Llmiseyhaa keys: Re top.sls+gitfs?
22:08 keys yes, in a private repo on github
22:09 keys I am at the point where I just scrapped everything start over
22:09 keys no top file found
22:09 keys forever
22:09 keys had it reading pillar ok
22:10 Llmiseyhaa Ok I've got it finding a top file finally... my repo has 'salt-base', 'master', and 'develop' currently.  salt-base contains ONLY top.sls (not the most clean, but, didn't want a ton of repos floating around for this).  So anyway... somehow it doesn't seem to be matching properly
22:10 Llmiseyhaa ... and now it's no contents found in top file wat
22:10 Llmiseyhaa ;..;
22:10 kevinqui1nyo Slimmons: notice how in the examples https://docs.saltstack.com/en/latest/topics/reactor/ you can call things like runners, or apply a state, but you can't call state modules directly from that reactor context to my knowledge
22:10 keys well farther than I got :/
22:11 keys I'm starting to feel like Tourettes guy
22:11 kevinqui1nyo Slimmons: what you can do is create a state that does the cmd.run, and pass any context data from your postdata to the state via pillar
22:12 Llmiseyhaa yeah.  I've got it running states fine when I do state.apply myformula.state saltenv=x
22:12 Llmiseyhaa but clearly I can't leave it that way for prod
22:15 hightekvagabond joined #salt
22:16 hightekvagabond Any clue what this means?
22:16 hightekvagabond cludavdev:
22:16 hightekvagabond Data failed to compile:
22:16 hightekvagabond ----------
22:16 hightekvagabond The function "state.highstate" is running as PID 1414 and was started at 2016, Jun 30 15:02:18.799981 with jid 20160630150218799981
22:16 hightekvagabond ERROR: Minions returned with non-zero exit code
22:17 hightekvagabond I don't see pid 1414 running in my process table
22:17 babilen hightekvagabond: Stop your minion and check if there are remaining salt-minion processes
22:18 mapu joined #salt
22:19 hightekvagabond oh, so it's a locked process on the minion not the master? that makes sense
22:19 shadoxx joined #salt
22:19 shadoxx what's this channels' policy on salt-based puns?
22:19 tracphil joined #salt
22:21 * Llmiseyhaa cries.  Whhhhhhhhy is it matching her dev systems fine but not her prod systems despite using the same syntax and and and and ;..;
22:24 badon joined #salt
22:25 Slimmons kevinquilnyo: Thanks for the info.  I'll try that out
22:31 Llmiseyhaa https://github.com/saltstack/salt/issues/31385
22:31 saltstackbot [#31385][MERGED] top.sls it taken from master rather than defined in base for gitfs_remotes | I've faced with strange behavior, when I have top.sls in master - everything is working fine, but when I have top.sls in branch, while master has it's own top.sls - salt-master takes top.sls from master branch. Example:...
22:31 Llmiseyhaa yeah that's looking like the bug I'm seeing
22:31 Llmiseyhaa looks like it only looks in master for the top.sls...
22:35 zenlot joined #salt
22:38 gimpy2938 left #salt
22:38 Llmiseyhaa ok debug mode enabled
22:38 Llmiseyhaa and...
22:38 Llmiseyhaa I want to cry for real now
22:44 bowhunter joined #salt
22:57 babilen Llmiseyhaa I would recommend against using environment, but did you set top_file_merging_strategy to 'same' ?
22:59 cliluw joined #salt
23:03 kevinquinnyo joined #salt
23:09 netcho joined #salt
23:12 TyrfingMjolnir joined #salt
23:14 renaissancedev joined #salt
23:15 blarghmatey joined #salt
23:17 kevinquinnyo left #salt
23:18 onlyanegg joined #salt
23:23 rem5 joined #salt
23:24 glyf joined #salt
23:37 Garo_ joined #salt
23:40 rem5 joined #salt
23:42 teryx510 joined #salt
23:54 rem5 joined #salt

| Channels | #salt index | Today | | Search | Google Search | Plain-Text | summary