Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-03-03

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

All times shown according to UTC.

Time Nick Message
00:00 cro joined #salt
00:04 baweaver joined #salt
00:08 bujordan_ joined #salt
00:12 ajw0100 joined #salt
00:17 baweaver joined #salt
00:18 jalbretsen joined #salt
00:19 joe_n joined #salt
00:21 bujordan joined #salt
00:22 aw110f joined #salt
00:25 darix joined #salt
00:26 baweaver joined #salt
00:28 ajw0100 joined #salt
00:29 akhter joined #salt
00:30 berserk joined #salt
00:30 baweaver joined #salt
00:33 jimklo joined #salt
00:34 fridder joined #salt
00:35 flowstate joined #salt
00:35 PredatorVI If I define 'project_name' in the pillar, can I change the value in a state file?
00:36 PredatorVI I need 'project_name' to change based on the state that is running
00:39 darix joined #salt
00:40 darix joined #salt
00:43 bujordan joined #salt
00:45 akhter joined #salt
00:49 digitalhero joined #salt
00:50 tjones2 joined #salt
00:51 mavhq joined #salt
00:53 chamunks I'm trying to run 'salt '*' state.highstate' and its returning http://hastebin.com/bucuyajubi.vhdl
00:53 chamunks Snippet of error: Specified SLS users.fatboy2380.sls in saltenv base is not available on the salt master or through a configured fileserver
00:57 Ch3LL_ chamunks: that error is stating there is no sls file users.fatboy2380 in your base file_roots. For example by default it would look in /srv/salt/users/fatboy2380.sls
00:57 chamunks Yeah the worst part is it is there Ch3LL_
00:58 Ch3LL_ whats your base file_roots? and are your sls files in that directory?
00:58 chamunks Let me set the repo to public for a second.
00:58 Ch3LL_ oh your using gitfs?
00:58 chamunks nothing that advanced.
00:58 chamunks Just following a tutorial to get started.
00:58 Ch3LL_ oh okay cool. yeah point me to the repo and i'll see if i can replicate real quick
00:59 chamunks https://gitlab.com/servercubes/servercubes-salt-config Ch3LL_
01:00 ajw0100 joined #salt
01:00 Ch3LL_ what version of salt are you using?
01:01 akhter joined #salt
01:02 chamunks Ch3LL_ a quick search didn't result in how to get that.  I tried salt -version and it spit out stuff about the GNU license.
01:02 chamunks GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu)
01:02 chamunks Which doesn't seem quite version related one sec let me dig a bit more.
01:03 tweakism lol try --version :)
01:03 chamunks The minions are on various versions it seems.
01:04 chamunks One is on salt-minion 2015.8.5 (Beryllium) and another is on salt-minion 2016.3.0-172-gbf4b651 (Boron)
01:04 Ch3LL_ how bout just hte master version
01:04 chamunks one more sec on its way.
01:04 chamunks salt 2015.8.5 (Beryllium)
01:05 chamunks I git pull my files to /srv/[salt|pillar|etc]
01:05 chamunks on my master.
01:05 chamunks The master is running inside of a docker container but that shouldn't mean anything.
01:05 Ch3LL_ oh you are actually doing a git pull instead of using gitfs?
01:05 Ch3LL_ okay cool i'll pull them down then real quick
01:05 RobertChen117 joined #salt
01:05 chamunks I could do gitfs but I don't really want to overcomplicate anything.
01:06 Ch3LL_ no worries. just making sure my env is similar to urs
01:07 kevinquinnyo1 joined #salt
01:08 chamunks Ideally I try to bootstrap my minions with "curl -L https://bootstrap.saltstack.com | sudo sh -s -- -A 0.servercubes.net -P -i $HOSTNAME git develop
01:08 chamunks "
01:09 baweaver joined #salt
01:10 Aleks3Y joined #salt
01:11 berserk joined #salt
01:11 ageorgop joined #salt
01:11 Ch3LL_ chamunks: found a couple of changes you need to make: https://gist.github.com/Ch3LL/24e0ef8021941f2e5c46
01:11 chamunks ah man thats the second time I've run into problems with - over _
01:11 hasues joined #salt
01:12 hasues left #salt
01:12 Ch3LL_ ahha no worries. ive done it plenty of times
01:12 woodtablet left #salt
01:15 ValF joined #salt
01:16 chamunks so just to make sure I'm understanding this correctly.  the included sls files still need to contain the .sls extension but not in the include
01:17 chamunks Ch3LL_ ^ (sorry I didnt include the ping in the message)
01:18 joe_n joined #salt
01:19 chamunks Ch3LL_  I figured it out thanks for the help!
01:19 Ch3LL_ no prob. glad its working :)
01:20 chamunks I knew I wasn't far off.
01:21 MindDrive joined #salt
01:23 flowstate joined #salt
01:23 ValF Hi, I have minions not responding to any salt command after applying the following custom grains to it : https://gist.github.com/anonymous/4bfc791bc876d71d34a5
01:24 ValF Error in minion log file is : RuntimeError: maximum recursion depth exceeded   -----  If anyone came across this problem, let me know ;)
01:24 W1nd5urf joined #salt
01:25 quasiben joined #salt
01:28 tweakism almost certainly a bug in your code
01:28 iggy you can't do that
01:31 mdasilva joined #salt
01:31 tweakism I assume every time you call salt.loader.grains(minion_config) it's in turn calling ip_type()
01:31 iggy ^
01:32 akhter joined #salt
01:43 hasues joined #salt
01:44 akhter joined #salt
01:47 s_kunk joined #salt
01:50 hasues left #salt
01:52 whytewolf I'm trying to figure out why you would even want such a beast. when you could just use the modules.network functions to sus out the same info
01:55 malinoff joined #salt
01:57 noraatepernos joined #salt
02:01 iceyao joined #salt
02:07 RobertChen117 joined #salt
02:11 akhter joined #salt
02:12 catpigger joined #salt
02:13 InAnimaTe joined #salt
02:14 akhter joined #salt
02:14 baweaver joined #salt
02:14 lempa joined #salt
02:15 malinoff1 joined #salt
02:15 joe__n joined #salt
02:16 quasiben1 joined #salt
02:17 tristianc_ joined #salt
02:17 rem5_ joined #salt
02:18 patrek_ joined #salt
02:18 demonkeeper joined #salt
02:18 nihe_ joined #salt
02:18 gerhardq1x joined #salt
02:19 lynxman_ joined #salt
02:19 BogdanR_ joined #salt
02:19 Icefoz_ joined #salt
02:19 hlub_ joined #salt
02:19 nkuttler_ joined #salt
02:19 B1nny_ joined #salt
02:19 mariusv_ joined #salt
02:19 jgelens_ joined #salt
02:19 asoc_ joined #salt
02:19 rogst_ joined #salt
02:22 ashmckenzie_ joined #salt
02:22 zengine joined #salt
02:22 StevenGFX- joined #salt
02:22 jab416171_ joined #salt
02:22 justanot1eruser joined #salt
02:23 manfred joined #salt
02:23 akhter joined #salt
02:24 fxhp joined #salt
02:24 tkharju joined #salt
02:24 ValF joined #salt
02:25 ry joined #salt
02:25 alvinstarr joined #salt
02:26 subsignal joined #salt
02:28 michelangelo joined #salt
02:36 jfelchner_ joined #salt
02:36 jwinters Question on external pillars, I have a custom one setup. However it looks like its getting called twice for each highstate I do. Is this normal or did I screw something up?
02:37 flowstate joined #salt
02:37 tweakism jwinters: 2 minions?
02:37 tweakism it should get called once per minion.
02:38 jwinters hmm okay, yeah its getting called twice per minion.
02:38 jwinters I'll have to see if I have a loop somewhere.
02:39 zzzirk joined #salt
02:40 jwinters Its 1 second apart each time.
02:40 shaggy_surfer joined #salt
02:41 racooper joined #salt
02:42 marsdominion joined #salt
02:46 tweakism is it defined twice in your config? :)
02:46 jwinters No, I have pillar_roots as a place on disk. Then I load my custom ext_pillar after that.
02:47 quasiben joined #salt
02:55 ageorgop joined #salt
02:55 bujordan joined #salt
02:55 bujordan joined #salt
02:57 iceyao_ joined #salt
02:58 zzzirk joined #salt
02:58 mrbobbytables joined #salt
03:02 zzzirk_ joined #salt
03:03 rem5 joined #salt
03:09 josuebrunel joined #salt
03:11 hal58th joined #salt
03:14 AdamSewell joined #salt
03:17 iggy do you use pillar.item(s) anywhere in tour state
03:17 iggy *your
03:21 akhter joined #salt
03:21 thehaven_ joined #salt
03:21 west575_ joined #salt
03:21 jhujhiti_ joined #salt
03:23 logandg_ joined #salt
03:23 chamunks- joined #salt
03:23 m0nky__ joined #salt
03:23 hal58th_ joined #salt
03:24 hacfi_ joined #salt
03:24 iamtew joined #salt
03:24 Taytay joined #salt
03:24 NVX joined #salt
03:25 iggy_ joined #salt
03:25 rubenb joined #salt
03:25 ujjain- joined #salt
03:25 sybix joined #salt
03:25 Hipikat_ joined #salt
03:25 tampakrap_ joined #salt
03:25 mephx_ joined #salt
03:25 honestly_ joined #salt
03:25 cswang__ joined #salt
03:25 frew1 joined #salt
03:25 jcastle_ joined #salt
03:25 nahamu_ joined #salt
03:25 mrMute_ joined #salt
03:25 saltsa_ joined #salt
03:26 cornfeedhobo_ joined #salt
03:26 LostSoul_ joined #salt
03:26 JoeJulian_ joined #salt
03:26 dork_ joined #salt
03:26 sirtaj_ joined #salt
03:26 tongpu__ joined #salt
03:26 whyteaway joined #salt
03:26 pprkut_ joined #salt
03:26 atoponce joined #salt
03:26 liqw joined #salt
03:26 kiorky joined #salt
03:26 simmel joined #salt
03:26 jab416171 joined #salt
03:26 ValF whytewolf, fairly new to writing custom grains and didn't consider my options, thanks for pointing out to use existing salt modules ( https://gist.github.com/anonymous/cdb6e304d6a07d2aeda8 )
03:26 ekkelett joined #salt
03:26 lorengordon joined #salt
03:26 ksalman1 joined #salt
03:27 FreeSpencer joined #salt
03:27 FreeSpencer joined #salt
03:27 scooby2 joined #salt
03:28 jalbretsen joined #salt
03:28 Diaoul joined #salt
03:29 aurynn joined #salt
03:30 jhujhiti joined #salt
03:32 eliasp joined #salt
03:32 the_lalelu joined #salt
03:35 Jimlad joined #salt
03:36 flowstate joined #salt
03:37 michelangelo joined #salt
03:44 pfallenop joined #salt
03:45 Antiarc joined #salt
03:48 bujordan joined #salt
03:51 Qwazerty joined #salt
03:52 zzzirk joined #salt
03:52 aRkadeFR joined #salt
03:52 davisj joined #salt
03:55 zzzirk_ joined #salt
03:56 Antiarc joined #salt
04:01 digitalhero joined #salt
04:10 rem5 joined #salt
04:10 onlyanegg joined #salt
04:15 akhter joined #salt
04:19 anmol joined #salt
04:23 Laserwhit joined #salt
04:24 jeffspeff tossing this out here, hoping to get some traction with it. https://github.com/saltstack/salt/issues/31624
04:24 saltstackbot [#31624]title: Windows Salt Minion - User Notification | ### Windows Salt Minion - User Notification...
04:26 zzzirk joined #salt
04:27 anmol joined #salt
04:33 brianfeister joined #salt
04:35 flowstate joined #salt
04:37 digitalhero joined #salt
04:48 RobertChen117 joined #salt
04:53 joe__n joined #salt
04:55 thebwt joined #salt
04:56 zzzirk joined #salt
05:04 bujordan joined #salt
05:06 tjones2 joined #salt
05:10 jonydose joined #salt
05:11 hal58th joined #salt
05:14 RobertChen117 joined #salt
05:18 jonydose Hey there
05:19 fgimian joined #salt
05:20 rdas joined #salt
05:27 jfindlay joined #salt
05:28 MaZ- joined #salt
05:35 joe__n joined #salt
05:36 flowstate joined #salt
05:40 XenophonF joined #salt
05:43 beardedeagle joined #salt
05:44 digitalhero joined #salt
05:45 kshlm joined #salt
05:49 perfectsine joined #salt
05:51 futuredale joined #salt
06:03 sauvin joined #salt
06:13 linjan_ joined #salt
06:15 digitalhero joined #salt
06:18 aarontc joined #salt
06:37 felskrone joined #salt
06:38 favadi joined #salt
06:39 felskrone1 joined #salt
06:40 flowstate joined #salt
06:40 Rumbles joined #salt
06:41 rem5 joined #salt
06:46 malinoff joined #salt
06:46 Miker_ joined #salt
06:47 felskrone joined #salt
06:53 liskl joined #salt
06:55 bhosmer_ joined #salt
07:04 josuebrunel joined #salt
07:07 malinoff joined #salt
07:10 evle joined #salt
07:28 overyander joined #salt
07:31 jimklo joined #salt
07:33 mr_chris joined #salt
07:33 malinoff1 joined #salt
07:34 malinoff1 joined #salt
07:35 duncanmv joined #salt
07:37 flowstate joined #salt
07:37 fracklen joined #salt
07:38 fracklen joined #salt
07:45 fracklen joined #salt
07:46 babilen Is there an easy way to get the home dir of the user the salt-minion runs as? Background to this is that I have to set $HOME for a cmd.run state (cf.
07:46 babilen https://github.com/saltstack/salt/issues/19869) and I don't necessarily want to hardcode it.
07:46 saltstackbot [#19869]title: Salt don't seem to set $HOME when issuing commands | Hi,...
07:48 babilen (or alternatively: Just the user)
07:48 tweakism shell script?  python?
07:49 babilen In a salt state (cmd.run to be precise)
07:49 k_sze[work] erm, it looks like my salt master lost track of a job?
07:49 k_sze[work] salt-run jobs.active doesn't show it, and salt-run jobs.lookup_jid also doesn't show it.
07:50 babilen tweakism: I'm running a command with cmd.run that requires HOME to be set.
07:50 k_sze[work] How is that possible?
07:50 AndreasLutro k_sze[work]: multiple masters? you delete your job cache too often? the jid is wrong?
07:50 k_sze[work] I have only one master.
07:51 k_sze[work] re. job cache deletion
07:51 k_sze[work] how do I check when it was last deleted?
07:51 tweakism does cmd.run call a shell to execute the command?
07:52 k_sze[work] And the jid is definitely correct. I copy-pasted it directly from the terminal.
07:52 k_sze[work] Does the minion know about its own job ID?
07:52 k_sze[work] I mean, does the minion have its own job cache?
07:56 tweakism sh -c 'eval "HOMED=~$(id -un) your_real_command"'
07:56 tweakism s/D//
07:56 tweakism babilen: how's that
07:57 babilen tweakism: That might work, but I'd still like to be able to pass it in cmd.run's env dictionary if I could. Thanks for that idea though :D
07:57 tweakism wouldn't you need to be able to calculate it on the master side to do that?
07:57 atmosx joined #salt
07:59 tweakism I don't think you need the sh -c wrapper either
08:00 mitsuhiko joined #salt
08:03 tweakism and fwiw, I think it might be posix :)  not sure though.
08:07 tweakism well, except $() isn't posix is it
08:09 tweakism but, it'll always be correct for whatever user the cmd is really ultimately running as.
08:09 Rumbles joined #salt
08:09 tweakism anyway, g/l
08:10 kawa2014 joined #salt
08:12 dgutu joined #salt
08:13 sevano joined #salt
08:14 sevano Hi, I think the there is one small problem in the docs of saltStack
08:15 sevano https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.pkgutil.html -> salt '*' pkgutil.latest_version CSWpython need to be salt '*' pkg.latest_version CSWpython
08:16 alinuxninja joined #salt
08:16 sevano all pkgutil need to be replaced with pkg
08:18 Miouge joined #salt
08:19 KermitTheFragger joined #salt
08:23 fredvd joined #salt
08:23 ajw0100 joined #salt
08:24 _beardedeagle joined #salt
08:24 JohnnyRun joined #salt
08:27 bujordan joined #salt
08:28 slav0nic joined #salt
08:29 beardedeagle joined #salt
08:31 bujordan joined #salt
08:32 malinoff joined #salt
08:34 _JZ_ joined #salt
08:34 flowstate joined #salt
08:35 _JZ_ joined #salt
08:42 VR-Jack joined #salt
08:45 dariusjs joined #salt
08:46 akhter joined #salt
08:55 sfxandy joined #salt
08:55 aw110f joined #salt
08:58 dgutu joined #salt
09:00 josuebrunel joined #salt
09:01 teryx510 joined #salt
09:02 teryx5101 joined #salt
09:03 teryx5102 joined #salt
09:05 jhauser joined #salt
09:10 brianfeister joined #salt
09:12 dmaiocchi joined #salt
09:14 s_kunk joined #salt
09:20 GreatSnoopy joined #salt
09:33 LondonAppDev joined #salt
09:35 flowstate joined #salt
09:37 MadHatter42 joined #salt
09:46 pooogles joined #salt
09:49 pooogles_ joined #salt
09:49 impi joined #salt
09:50 q1x joined #salt
09:51 teryx510 joined #salt
09:52 q1x joined #salt
09:55 geomacy joined #salt
09:55 fracklen joined #salt
10:01 N-Mi joined #salt
10:01 N-Mi joined #salt
10:01 kukacz joined #salt
10:04 fracklen joined #salt
10:14 fracklen joined #salt
10:21 traph joined #salt
10:22 geomacy joined #salt
10:33 bhosmer joined #salt
10:35 flowstate joined #salt
10:54 ronnix joined #salt
10:56 fracklen joined #salt
10:57 ronnix joined #salt
10:58 tyler-baker joined #salt
10:59 brianfeister joined #salt
11:00 joe__n joined #salt
11:05 abednarik joined #salt
11:08 kshlm joined #salt
11:18 colegatron joined #salt
11:22 q1x joined #salt
11:22 brianfeister joined #salt
11:26 jbrnds joined #salt
11:29 ronnix joined #salt
11:32 sfxandy joined #salt
11:34 flowstate joined #salt
11:38 mdasilva joined #salt
11:42 sfxandy hello all
11:47 iceyao joined #salt
11:50 jbrnds joined #salt
11:51 kim0 joined #salt
11:53 bluenemo joined #salt
11:56 akhter joined #salt
11:58 vilitux joined #salt
12:02 amcorreia joined #salt
12:05 Rumbles joined #salt
12:14 Netwizard joined #salt
12:15 ronnix joined #salt
12:17 sunilnair_ joined #salt
12:32 jbrnds joined #salt
12:35 sunilnair_ hi
12:42 malinoff joined #salt
12:42 linjan_ joined #salt
12:42 av_ joined #salt
12:48 josuebrunel joined #salt
12:53 kawa2014 joined #salt
12:57 jbrnds2 joined #salt
13:01 fracklen joined #salt
13:03 rem5 joined #salt
13:04 flowstate joined #salt
13:06 mdasilva joined #salt
13:08 cswang_ joined #salt
13:09 jbrnds joined #salt
13:09 impi joined #salt
13:13 geomacy joined #salt
13:14 denys joined #salt
13:18 _Cyclone_ joined #salt
13:23 ronnix joined #salt
13:27 akhter joined #salt
13:27 flowstate joined #salt
13:27 numkem joined #salt
13:29 akhter_1 joined #salt
13:31 akhter_1 joined #salt
13:31 fracklen joined #salt
13:34 XenophonF sevano: it really rather depends on what version of solaris you're talking about
13:34 spottedkangaroo left #salt
13:34 ggoZ joined #salt
13:35 XenophonF sevano: also salt.modules.pkgutil exports itself as 'pkgutil', which you can see in the virtual function in salt/modules/pkgutil.py
13:35 west575 joined #salt
13:36 spiette joined #salt
13:36 XenophonF sevano: you're probably thinking of the 'pkg' state, which is more abstract and hides whether it's calling aptpkg, yumpkg, pkgng, pkgutil, etc.
13:43 N-Mi joined #salt
13:43 N-Mi joined #salt
13:44 akhter joined #salt
13:46 khuff joined #salt
13:46 gh34 joined #salt
13:47 fracklen joined #salt
13:48 jbrnds joined #salt
13:50 cyborg-one joined #salt
13:51 mavhq joined #salt
13:52 kim0 joined #salt
13:54 amcorreia joined #salt
13:56 aanriot joined #salt
13:59 quasiben joined #salt
14:00 subsignal joined #salt
14:02 _Cignacio_ joined #salt
14:04 pppingme joined #salt
14:04 quasiben1 joined #salt
14:05 subsigna_ joined #salt
14:06 _Cignacio_ joined #salt
14:08 _Cignacio_ joined #salt
14:10 bhosmer joined #salt
14:10 pooogles_ joined #salt
14:11 SunPowered joined #salt
14:13 Muchoz joined #salt
14:14 uictamale joined #salt
14:14 uictamale left #salt
14:14 uictamale joined #salt
14:17 zengine joined #salt
14:18 toastedpenguin joined #salt
14:19 kshlm joined #salt
14:19 iceyao joined #salt
14:22 maoli Currently I set a header manually in each my managed files to show where is the original location on my salt master. Can I generate a such header (e.g. using jinja)?
14:22 tweakism yes
14:23 zzzirk joined #salt
14:23 maoli I found it few months ago but I have lost the link. I can't find it in saltstack documentation
14:26 SunPowered maoli: There is no one page in the docs describing what you are asking
14:26 SunPowered You are looking to make a jinja macro that can generate the header for you
14:26 tweakism I bet the main issue is getting at the template file name from jinja?
14:27 abednarik joined #salt
14:27 SunPowered right, I was thinking you would have to enter that as an argument to the macro
14:28 geomacy joined #salt
14:29 fracklen joined #salt
14:30 fracklen_ joined #salt
14:32 scoates joined #salt
14:34 malinoff joined #salt
14:35 tjones2 joined #salt
14:36 babilen maoli: Are you looking for {{ src }} ?
14:37 babilen I typically have a "# This file is generated by salt via {{ src }}" line in the "DO NOT EDIT" block at the top where {{ src }} will be replaced by the path.to.the.template
14:38 perfectsine joined #salt
14:38 shiriru joined #salt
14:40 SunPowered babilen: good to know.  btw where in the source would I find all common template contexts?
14:42 babilen That is knowledge that will only be shared once you reached the "okuden" initiation ...
14:43 babilen IOW: I have no idea if such a place exists
14:44 SunPowered I might go digging
14:44 tweakism there's a debug tool somewhere on the google that dumps the context from jinja, though
14:44 cpowell joined #salt
14:44 racooper joined #salt
14:44 tweakism I don't think it's built into salt
14:44 higuita when i do  salt  srv-A13 pillar.get "bigip:ip" , i get the list twice, when the bipip.sls only have the ip list once
14:45 higuita i load the pillar in top.sls, with a plain "base: '*'  - bigip" setup
14:45 higuita is this a bug, feature or is something only happens to me?
14:46 RabidCicada joined #salt
14:47 JohnnyRun joined #salt
14:47 Tanta joined #salt
14:47 maoli I will try using {{ src }} as you say
14:48 N-Mi joined #salt
14:48 N-Mi joined #salt
14:48 babilen maoli: s/src/source/ :)
14:49 maoli ok, I am editing a file right now to check this
14:50 babilen I hate it that one can no longer tell google to not tokenize/normalise or stem queries with + as before. Makes it so much trickier to google for "{{ source }}"
14:50 babilen *sigh
14:50 babilen *
14:50 tweakism babilen: I agree so, so hard
14:51 tweakism I don't know if it ever paid attention to special chars
14:51 tweakism but I can no longer use + to mean "no, this is not a misspelling"/"ignore 'similar' words"/"always force-include this short string"
14:51 babilen yeah
14:51 babilen It did in phrases
14:52 tweakism that doesn't jive w/ my memory, but I'll take your word for it
14:52 tweakism seems like it only cared about a couple like _
14:52 tweakism there are code searches and stuff, but I have no experience w/ them and old habits die hard.
14:52 LotR I thought google code search died too
14:55 zmalone joined #salt
14:57 bhosmer joined #salt
14:59 flowstate joined #salt
14:59 elwoodTX joined #salt
14:59 pooogles joined #salt
15:00 flowstate joined #salt
15:01 rem5 joined #salt
15:01 ZiLi0n joined #salt
15:02 elwoodTX joined #salt
15:03 zengine joined #salt
15:04 ZiLi0n Hi everyone, I am playing with onchanges: = sls: mysls. I am using onchanges to trigger a cmd.run state. I expected that if there is one change, at least one, in the entire sls file then cmd.run will be triggered, buy as far as I can see it is not working for me. So my goal is to execute cmd.run state is at least one thing changes in mysls state file
15:05 rem5 joined #salt
15:05 Brew joined #salt
15:05 Rumbles joined #salt
15:06 zsoftich4 joined #salt
15:07 AndreasLutro ZiLi0n: onchanges has been using AND logic up until 2016.3, so it's possible your onchanges would only trigger if all states in your sls file have made changes
15:07 abednarik joined #salt
15:07 Sketch what's the best way to copy a file from the master to a minion one time with salt?  there doesn't really seem to be any file state suited to it
15:08 Sketch hmm, now that i think about it, that might not even work, because there might be a default file in the package.  nevermind ;)
15:08 ZiLi0n AndreasLutro thank you, that makes sense. So is there any OR I could use?
15:09 Sketch i guess i should just out how to mangle the original file rather than replacing it outright
15:10 AndreasLutro ZiLi0n: no, it's not configurable
15:10 RabidCicada ZiLi0n: https://github.com/saltstack/salt/issues/19592
15:10 saltstackbot [#19592]title: Execute a state when any of several other states change | I was trying to use 'onchanges' to execute a state whenever any of several other states change, but it seems the logic currently requires *all* the states to change before an 'onchanges' state will execute....
15:10 tweakism Sketch: I prefer to manage entire files
15:10 tweakism Sketch: if you do file.managed/contents etc., it doesn't trigger changes if the same file already exists unchanged
15:10 garphy joined #salt
15:11 RabidCicada ZiLi0n: Looks like they are moving towards OR.  I note that that is already merged...but perhaps you are not using the newest code as it's not in stable.
15:12 AndreasLutro https://github.com/saltstack/salt/commit/e6dcf3ab1298bcfb300fee3692cc39c4c6be17a0
15:12 AndreasLutro looks like it's in 2015.8
15:12 totte joined #salt
15:12 Sketch tweakism: yeah, but in this case, the file contains (unimportant) info which gets changed at runtime, so file.managed causes salt to want to keep replacing the file.  it's not really a major problem, just a minor annoyance to me
15:13 tweakism ah
15:13 drawsmcgraw joined #salt
15:13 RabidCicada AndreasLutro: herp derp on my part....still not a github/git expert...and just saw it was checked into develop:)
15:14 tweakism RabidCicada: it's not foolproof depending on how people do their merges and stuff, but works for salt
15:15 tweakism RabidCicada: you can ask git to tell you all branches/refs that contain a given commit
15:17 mdasilva joined #salt
15:17 AndreasLutro RabidCicada: yeah it's a bit tricky... the original PR was against develop, but it was merged before develop was branched into 2015.8
15:18 AndreasLutro I just click on the merge commit of a PR to find out
15:18 RabidCicada Ok...my turn for help...Doing a headless local run using salt-call with --file-root --local --pillar-root.  May not be relevent context.  But the question...how do I get data about the user salt is being run as?  Is there any mechanism to run a cmd and get the string result as part of the jinja stuff so I can use the local user homedirectory for file.managed?  I don't want to configure it using
15:18 RabidCicada pillar ahead of time...just want to use the "current user"
15:19 RabidCicada Any method to do so would be helpful...the "proper" method would be best:)
15:19 tweakism AndreasLutro: I think github shows the containing branches on every commit
15:19 tweakism but on the command line it's just git branch --contains
15:21 newsalt joined #salt
15:22 newsalt WIth map.jinja, you can do things like: {% set vim = salt['grains.filter_by']  is it possible to also do something like {% set vim = pillar['vim:config:colors'] etc...
15:22 newsalt i.e. template off existing pillar data rather then grain data
15:24 ZiLi0n RabicCicada, Andreaslutro thanks I see. My master is running 2015.8.7 (Beryllium)  and Minion is running 2015.5.5 (Lithium)
15:26 maoli babilen: I tried with with {{ source }} variable and it's a good start. But do you know if we can show the absolute path instead of salt relative path (salt://) ?
15:34 ZiLi0n why cmd.run: -name: echo "sleep 3; shutdown -r now" does not reboot the minion host? I see in the logs it executes cmd.run and completes it, but nothing happens
15:36 tweakism I always do:  echo "shutdown -r now" | at now
15:36 tweakism so that shutdown script doesn't get killed when it kills whatever I'm network connected over
15:36 abednarik joined #salt
15:36 tweakism not 100% it should be required here, but you can try it and see if fixes your issue
15:37 ZiLi0n tweakism thanks I tried, but looks like my fedora does not have "at" command
15:37 tweakism weird.
15:38 tweakism it might work to run nohup shutdown -r now, then
15:39 babilen maoli: No, don't think that's possible.
15:40 perfectsine joined #salt
15:40 Heartsbane joined #salt
15:40 Heartsbane joined #salt
15:40 babilen maoli: But then .. how would you want the absolute path to a git repository ? I mean it shouldn't be tricky to find the file in question if you have the relative path from the root (be that file_roots or a git remote)
15:40 ZiLi0n tweakism, thanks, I have installed at and started atd manually and it reboots now. I am going to try nohup too
15:41 flowstate joined #salt
15:42 ageorgop joined #salt
15:43 perfectsine_ joined #salt
15:43 ZiLi0n tweakism nohup does not work either. mmmm I would like to avoid having to install at and run atd :)
15:43 cpowell joined #salt
15:44 tweakism I don't have any other ideas right now
15:44 tweakism (obviously you can start atd at boot, which the package probably does byd efault(
15:46 tweakism or maybe you can find a way to shutdown via something like telinit
15:46 tweakism or systemctl reboot
15:46 tweakism not sure how that would differ from shutdown
15:46 tweakism hopefully not by much
15:46 ZiLi0n tweakism I found module.run -name; system.reboot, that is working is rebooting the host
15:48 RabidCicada Is there any mechanism to run a cmd and get the string result while salt is doing processing so I can use the local user homedirectory for file.managed?  I don't want to configure it using pillar ahead of time...just want to use the "current user".  I'm running the salt minion as a non-root user.
15:49 RabidCicada rather...using salt-call
15:49 maoli babilen: hum I'm not using git The idea is if a colleague sees a file managed on salt, he connects with SSH on the master and paste the full path
15:49 quasiben joined #salt
15:49 maoli then he/she updates the file as needed
15:49 mpanetta joined #salt
15:50 sevano aha right because on debian and ubuntu executing as pkgutil doesnt work. no module found..
15:50 quasiben joined #salt
15:50 sevano i need to go bye
15:50 tweakism maoli: it seems easy enough to have some internal docs / expect people modifying salt config to understand the basics of your salt installation.
15:51 tweakism maoli: you can even include in your header, "(these files usually live in /srv/salt on host.example.com.)
15:51 abednarik joined #salt
15:51 saywhat joined #salt
15:52 cpowell joined #salt
15:52 zzzirk joined #salt
15:52 toanju joined #salt
15:54 maoli right. Anyway your answers are what I was looking for. Thank you
15:54 mdasilva i've recently upgraded my minions from 2014.7 to 2015.8 and running into issue where servers need to be restarted for the changes to take effect (restarting the salt-minion service does not help)
15:55 mdasilva i notice when running pip freeze, the salt package still shows the 2014.7 version, is there a technique to refresh the python packages?
15:56 tweakism no, that shouldn't happen
15:56 tweakism are you sure you really upgraded?
15:56 tweakism did you do something silly like install originally from packages and then use pip to upgrade, or vice-versa?
15:56 mdasilva yes the apt packages are upgraded, the files in /usr/lib/python2.7/dist-packages/salt are upgraded
15:56 mdasilva but when commands from the salt master is received, it doesn't appear to be running the correct version of the salt minion
15:57 babilen maoli: I'll let you know if I find something that includes the full path, but {{ source }} is, most likely, as good as it gets and will allow you to use GitFS in the future without having to change the workflow
15:57 mdasilva (in particular the minion errors with salt.util.is_proxy() which is present in 2015.8 /usr/lib/python2.7/dist-packages/salt/utils/__init__.py)
15:57 zsoftich4 joined #salt
15:57 elwoodTX joined #salt
15:57 mdasilva restarting the server fixes the issue
15:58 mdasilva im not sure if its a bad reference or cache with the python packages, or with systemd
15:58 tweakism afaik python doesn't do anything like that
15:58 tweakism sounds like maybe the service restart is not actually killing the old process, though
15:58 deus_ex joined #salt
15:58 tweakism possibly because of a change to the service description file or something like that between versions.
15:59 mdasilva i tried doing a hard kill as well
15:59 mdasilva but it maybe a systemd issue
15:59 mdasilva tho im not sure where it would be accessing the old 2014.7 minion files
15:59 tweakism a running process doesn't need its files on disk to continue to exist
15:59 mdasilva i checked the python sys.path and /usr/lib/python2.7/dist-packages is the only place there is salt
16:00 mdasilva tweakism: this is after stoping and starting the salt-minion service
16:00 tweakism you said you "tried" doing a manual kill, but you didn't make it clear you confirmed it worked.
16:01 phx joined #salt
16:01 mdasilva the salt-minion process was killed
16:02 ronnix joined #salt
16:05 jbrnds joined #salt
16:06 rem5 joined #salt
16:11 Aleks3Y joined #salt
16:12 permalac joined #salt
16:12 zsoftich4 joined #salt
16:13 dfinn joined #salt
16:14 rem5 joined #salt
16:14 debian112 joined #salt
16:16 beardedeagle joined #salt
16:18 andrew_v joined #salt
16:18 ZiLi0n EabidCicada https://github.com/saltstack/salt/issues/19592 to give this a try I will need to install develop at the master or the minion?
16:18 saltstackbot [#19592]title: Execute a state when any of several other states change | I was trying to use 'onchanges' to execute a state whenever any of several other states change, but it seems the logic currently requires *all* the states to change before an 'onchanges' state will execute....
16:19 abednarik joined #salt
16:25 karlthane joined #salt
16:28 digitalhero joined #salt
16:30 Laserwhit joined #salt
16:32 fredvd joined #salt
16:32 RabidCicada ZiLi0n: According to AndreasLutro it's been checked in to stable since 2015.8  So update both master and minion to at least 2015.8.  From your previous messages it looks like you will only need to update Minion since it is at 2015.5.5
16:33 ZiLi0n RabidCicada AndreasLutro thanks a lot, uprading the minion to 2015.8
16:39 jimklo joined #salt
16:39 ZiLi0n RabicCicada AndreasLutro sweet! great! it is running cmd.run just due to a change in one state, excellent! this is awesome!
16:41 akhter_1 joined #salt
16:44 anmol joined #salt
16:44 morissette joined #salt
16:45 writtenoff joined #salt
16:45 digitalhero joined #salt
16:46 zzzirk joined #salt
16:47 SmokeBeast joined #salt
16:48 zerthimon joined #salt
16:48 CeBe joined #salt
16:48 dgutu joined #salt
16:50 SmokeBeast Hi All.  I'm attempting to use Salt-ssh to provision a new Linux server.  when i run salt-ssh -i <HOSTNAME in ROSTER> pkg.install what-ever It prompts for authentication.  I say YES to it, then I get the following message in STDERR
16:50 SmokeBeast ----------
16:50 SmokeBeast retcode:
16:50 SmokeBeast 1
16:50 SmokeBeast stderr:
16:50 SmokeBeast Traceback (most recent call last):
16:50 SmokeBeast File "/tmp/.root_65ad4e_salt/salt-call", line 4, in <module>
16:50 SmokeBeast salt_call()
16:50 SmokeBeast File "/tmp/.root_65ad4e_salt/salt/scripts.py", line 329, in salt_call
16:50 SmokeBeast import salt.cli.call
16:50 SmokeBeast File "/tmp/.root_65ad4e_salt/salt/cli/call.py", line 6, in <module>
16:50 SmokeBeast from salt.utils import parsers
16:50 SmokeBeast File "/tmp/.root_65ad4e_salt/salt/utils/parsers.py", line 26, in <module>
16:50 SmokeBeast import salt.config as config
16:50 SmokeBeast File "/tmp/.root_65ad4e_salt/salt/config.py", line 35, in <module>
16:50 SmokeBeast import salt.utils.network
16:50 SmokeBeast File "/tmp/.root_65ad4e_salt/salt/utils/network.py", line 31, in <module>
16:50 mpanetta My EYES!
16:50 SmokeBeast from salt._compat import subprocess
16:50 SmokeBeast File "/tmp/.root_65ad4e_salt/salt/_compat.py", line 19, in <module>
16:50 SmokeBeast import xml.etree.cElementTree as ElementTree
16:50 SmokeBeast File "/tmp/.root_65ad4e_salt/xml/etree/cElementTree.py", line 3, in <module>
16:50 SmokeBeast from _elementtree import *
16:50 beardedeagle SmokeBeast: Put that in a gist
16:50 SmokeBeast File "<string>", line 147, in <module>
16:50 SmokeBeast AttributeError: 'module' object has no attribute 'fromstringlist'
16:50 beardedeagle Stop pasting in here
16:50 SmokeBeast stdout:
16:50 SmokeBeast Any thoughts?
16:51 RabidCicada SmokeBeast:....usa gist or pastebin
16:51 SmokeBeast Sorry.. New to IRC.
16:51 RabidCicada no problem
16:51 digitalhero joined #salt
16:52 amcorreia joined #salt
16:53 SmokeBeast http://pastebin.com/raw/8TTSeUCi
16:55 SmokeBeast left #salt
16:55 SmokeBeast joined #salt
16:55 aharvey joined #salt
16:56 akhter joined #salt
16:56 SmokeBeast My apologies to the channel for multi-line pasting.
16:57 akhter joined #salt
16:57 SmokeBeast Here is a pastebin of the message I get when attempting to use salt-ssh http://pastebin.com/raw/8TTSeUCi
16:59 digitalhero joined #salt
17:00 RabidCicada SmokeBeast: looks like it has to do with Python versions https://github.com/saltstack/salt/issues/26584
17:00 saltstackbot [#26584]title: salt-master receives 'AttributeError: 'module' object has no attribute 'fromstringlist | I have asked this in [Stackoverflow too] (http://stackoverflow.com/questions/32094600/salt-master-receives-attributeerror-module-object-has-no-attribute-fromstri)...
17:02 abednarik joined #salt
17:03 digitalhero joined #salt
17:03 geomacy joined #salt
17:04 RabidCicada This gist linked to from my previous issue is the workaround: https://gist.github.com/dreampuf/a07fd546857f8444b90d
17:05 noraatepernos joined #salt
17:06 RabidCicada SmokeBeast: You can force same python version or use the workaround linked above
17:07 adelcast joined #salt
17:09 digitalhero joined #salt
17:10 Ahlee {%- if salt['pillar.get']('foo:bar') is defined %} appears to always resolve to true, what's the proper way for this?
17:13 RabidCicada Ahlee: I think you should use the conventional approach of "salt['pillar.get']('foo', 'default')" and check for the default value.
17:14 RabidCicada Ahlee:  I don't know about the intricacies of jinja and python playing together but my guess is that the return value of the function always 'is defined' and what you need is  sentinel value rather than checking for 'defined'.
17:14 Ahlee RabidCicada: blah. Yeah, that makes sense
17:16 impi joined #salt
17:16 bluenemo joined #salt
17:17 Ahlee well, it works. Now to document 'never set you rpillar value to UNDEFINED' and push that out
17:21 bowhunter joined #salt
17:24 nate_c joined #salt
17:27 grumm_servire joined #salt
17:29 flowstate joined #salt
17:30 hal58th joined #salt
17:32 hasues joined #salt
17:35 babilen Ahlee: "is defined" only works on the actual dictionary, not on the return value of .get() .. So, assuming "foo = salt['pillar.get']('foo', {})" you can do "if foo.bar is defined"
17:38 coval3nce joined #salt
17:38 baweaver joined #salt
17:38 coval3nce Anyone seen ZMQError: Operation not permitted when trying to work with a local dev version of salt in a venv?
17:39 jim__ joined #salt
17:42 hasues left #salt
17:42 quix joined #salt
17:42 bhosmer_ joined #salt
17:43 tweakism coval3nce: you should be able to get a bit more of an error than that
17:43 tweakism it may be trying to bind to a priviledged port
17:44 Ahlee babilen: ah.
17:44 bhosmer_ joined #salt
17:44 coval3nce tweakism: https://gist.github.com/dkiser/42d7e709d5f58bc4e3b9
17:46 tweakism hrm, it's a unix socket
17:46 tweakism and you're running as root
17:46 rm_jorge joined #salt
17:46 coval3nce tweakism: added a version report, its from develop branch pulled last night
17:47 tweakism are you running SElinux or anything of that nature on your system?
17:47 coval3nce checked to make sure selinux was off
17:47 coval3nce ah i bet i know whats up!
17:47 coval3nce venv is inside a vagrant mounted shared folder
17:48 coval3nce could be something related to that
17:49 tweakism seems pretty reasonable
17:50 tweakism maybe sockets aren't valid where it's trying to create one
17:50 tweakism or it's a ro fs or something
17:50 coval3nce tweakism: tsting that theory out
17:50 RabidCicada I've seen executable permission errors when using shared folders from vmware or virtualbox stuff...I don't know what your virtual host system is (driven by vagrant)
17:50 ronnix joined #salt
17:50 ericsysmin joined #salt
17:50 coval3nce RabidCicada: virtualbox
17:51 coval3nce confirmed, moved venv out of the shared folder and i’m rockin’ rolling
17:55 jim__ I just found https://docs.saltstack.com/en/develop/topics/spm/
17:55 jim__ big thumbs up to that feature
17:55 shaggy_surfer joined #salt
17:55 jim__ is it targeted to any particular release?
17:57 cberndt joined #salt
17:59 shaggy_surfer joined #salt
17:59 antpa joined #salt
18:00 kaptk2 joined #salt
18:01 RabidCicada jim__: looks intriguing but I still like having formulas and pillar in git
18:01 bujordan joined #salt
18:01 ronnix joined #salt
18:05 abednarik joined #salt
18:06 mariusv joined #salt
18:06 mariusv joined #salt
18:06 RabidCicada Did anyone ever get ext_piller git support to parity with normal gitfs support?  And enable full trigger based update for the git sources?  As in not bound to loop_interval but updated per checkin of the git source?
18:07 Laserwhit I am running a command in state.sls that shows success but doesn't do anything http://pastebin.com/7xdaCQbD  When I run the install on the command line it actually installs but in the state.sls call it does not.
18:07 ZiLi0n joined #salt
18:07 ahammond shared folders are a nightmare when you start trying to use docker. I'm all about the gitfs. :)
18:09 ZiLi0n Hello everyone, thank for all your help, great and fantastic community!. the distro I am using is Fedora, I got the saltstack repo for CentOS/RedHat, version 2015.8.7 is working fine, but I have just realized that a version of 2016 is out. Did you recommend to upgrade to it? is there a saltstack repo that I could use to upgrade?
18:10 Eugene 2015.8.7 is the current stable. The 2016.3 tag exists in git, but its not an official "release" yet.
18:10 baweaver joined #salt
18:10 coval3nce Hmmm config.option isn’t picking up my key from grains...
18:10 saywhat joined #salt
18:11 jim__ RabidCicada: Our org has ~5 different salt repos in git, for the different codebases, and we're having issues with code drift for common modules
18:11 jim__ for example I wrote a module that installs consul and gets the cluster running
18:11 Eugene There is an official https://repo.saltstack.com/, but I've found the packages in EPEL to be up-to-date enough
18:11 jim__ I fixed a bug with that module in one codebase, but then need to manually push that update to the others
18:12 mdasilva joined #salt
18:12 babilen jim__: Why don't you maintain it in one repo and include that in all places?
18:12 noraatepernos joined #salt
18:12 ZiLi0n Eugene oh I see, thank you. I though it wasn't the latest
18:12 RabidCicada ZiLi0n: My favorite method is to use bootstrap with the git tag I want to install from.  But if you want stability....you should use the official saltstack repo so that dependencies are encoded 100%
18:13 RabidCicada jim__ you using git for pillars too?
18:13 MindDrive joined #salt
18:13 saywhat Hey guys, anyone using s3 as a pillar backend? I have a fresh salt master install running latest stable but i'm running into this exact issue https://github.com/saltstack/salt/pull/28690/files
18:13 saltstackbot [#28690]title: Fix 28689 : Check s3 ext pillar cache file before calculating expiration | Fix https://github.com/saltstack/salt/issues/28689
18:13 RabidCicada jim__: and are you using git triggered fileserver/pillar refreshes with reactor or something?...or just waiting for the loop_interval to come around?
18:14 ZiLi0n RabidCicada thanks a lot! I have tried to use salt-bootstrap but I get an error, looks like the repo bootstrap sh was using has been moved
18:14 RabidCicada I remember people saying that loop_interval with a mid range of git remotes became refresh hell as the query time on each repo made the refrash load VERY HEAVY on the master
18:14 shaggy_surfer joined #salt
18:15 RabidCicada Ohhh!....https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.git_pillar.html  I have some reading to do!
18:15 RabidCicada It's been a long while since I heavily played with salt.  It's exciting to get back in
18:15 a_little_birdie joined #salt
18:16 a_little_birdie Hello.. I'm having trouble with file watch on a directory created with file.recurse, can anyone help?
18:16 coval3nce If grains.get works for a grain, shouldn’t config.option also pick it up?
18:19 Laserwhit I am running a command in state.sls that shows success but doesn't do anything http://pastebin.com/7xdaCQbD  When I run the install on the command line it actually installs but in the state.sls call it does not.  Any thoughts?  I assume that I'm having a permissions or user issue on Windows 7.  I'm using the 'Local System account' with 'Allow service to interact with the desktop' checked.
18:19 babilen coval3nce: yea
18:19 baweaver joined #salt
18:20 t0m0 joined #salt
18:21 digitalhero joined #salt
18:21 a_little_birdie What's the difference between file.managed and file.recurse?  I am trying to copy configurations files to the minion where there are subdirectories...
18:21 nate_c joined #salt
18:21 jim__ babilen what's the idiomatic way to include that formula in my disparate salt repos? git submodules seems hacky
18:22 jim__ RabidCicada: right now I have a bash script that deploys the latest git commit
18:22 coval3nce babilen: https://gist.github.com/dkiser/42d7e709d5f58bc4e3b9#file-config-option-woes-txt  <— weird right?
18:22 Laserwhit a_little_birdie: I use file.recurse to copy a directory structure to my minion.  I use file.manage to manage one file.
18:22 jim__ which we'll use until I get CI setup for saltstack
18:22 a_little_birdie Ok thanks
18:22 a_little_birdie I am doing the same
18:23 a_little_birdie But I'm having problems when I want to watch just one file within the files I copied
18:23 a_little_birdie watch.file seems to actually watch a state not a file
18:23 a_little_birdie The state name has to match
18:23 a_little_birdie Also globs don't work right
18:23 babilen jim__: Just define multiple gitfs_remotes
18:24 babilen jim__: I do that often and manage the master with the salt-formula
18:25 babilen coval3nce: Might be related to it being in a venv, works fine here
18:25 jim__ babilen: I'll dig into the docs for gitfs then. I had issues last time I tried, but that was ~18 months ago.
18:25 mdasilva joined #salt
18:26 jim__ babilen: is there any way to pin the gitfs remote to a particular commit or version tag?
18:26 jim__ a single branch maybe?
18:28 babilen jim__: You can configure different branches, yeah .. Take a look at https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#gitfs-per-remote-config
18:28 babilen I'd also recommend to use https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#environment-whitelist-blacklist as you'd end up with lots of "environments" simply because you pushed a branch ..
18:28 babilen The "branch == environment" automatism is a bit, well, annoying with GitFS
18:29 babilen In particular you want to set gitfs_base for your "base" branch
18:30 Laserwhit a_little_birdie: what are you trying to accomplish with your 'watch' primitive?  Are you wanting to restart a service or what?  If you are watching a file then if the file changes then the service will restart etc..
18:30 babilen jim__: Naturally it tracks HEAD, so don't push what you don't want there.
18:30 snowwolf joined #salt
18:30 digitalhero joined #salt
18:31 jim__ I'll give that a peek. I don't love that I can have a `git push` that breaks my salt configuration(s)
18:31 jim__ babilen:
18:31 t0m0 joined #salt
18:31 a_little_birdie Laserwhit: I'm trying to configure nginx and bareos.. they each have a directory under etc.. eg: /etc/bareos .  So I do /etc/bareos:  file.recurse
18:31 a_little_birdie That works
18:32 flowstate joined #salt
18:32 RabidCicada jim__: I know what you mean...but you can work around it by having a dev branch and a stable branch
18:32 bhosmer joined #salt
18:32 RabidCicada jim__:  And test with the dev one
18:32 a_little_birdie But then, if anything in there changes, I want to restart bareos-director service, so I put a file watch on /etc/bareos .. that works
18:32 RabidCicada jim__: promote from dev to stable by using pullrequest/merges
18:33 babilen jim__: Well .. a "salt '*' system.poweroff" can sort of break everything .. ;) -- If you want to test things then test them before merging them or pushing them into production.
18:33 babilen I mean the code has to live somewhere ..
18:33 cberndt joined #salt
18:33 a_little_birdie But then, ONLY if /etc/bareos/bareos-fd.conf changes.. I want to restart the bareos-fd service, but I can't put a watch on it.. "requisite doesn't exist"
18:34 babilen I typically develop on local vagrant boxes, push that to a "dev" branch and run on production close boxes, before merging it into production/base
18:34 a_little_birdie So Laserwhit:  does this mean I have to manage each file in the directory separately?  Because there are a bunch of them
18:35 a_little_birdie I thought that watch.file watches an actual pathname but it seems that it is actually watching a state name, is that true?
18:36 RabidCicada a_little_birdie: having your actual files woudl be useful for diagnosis...or the actual output of a salt run.
18:36 RabidCicada a_little_birdie: I imagine your problem actually has to do with properly setting up dependencies
18:36 RabidCicada to make sure the states execute in the correct order
18:36 RabidCicada a_little_birdie: But I'm not sure because there's not enough context/log files being provided by you
18:37 RabidCicada a_little_birdie: give us the output of your highstate command or salt-call or whatever in a gist or pastebin
18:37 Laserwhit a_little_birdie: It sounds like you need to have /etc/bareos/bareos-fd.conf managed and then your watch should fire on that file.
18:38 RabidCicada a_little_birdie: And yes...the watch format is <Pkg>: <ID or name>
18:38 RabidCicada a_little_birdie:I actually just updated the docs for them to clarify exactly that:)
18:38 RabidCicada a_little_birdie: I mean <state>: <ID or name>
18:38 bujordan joined #salt
18:39 q1x joined #salt
18:39 ericsysmin joined #salt
18:40 a_little_birdie Thanks RabidCicada, here are my files: https://gist.github.com/benmehlman/ab477c87ef52cebc33e9 https://gist.github.com/benmehlman/64f4b18822121c6c2c9c
18:41 flowstate joined #salt
18:41 ZiLi0n is it possible to see the status (just in case there is an error) of a highstate of a minion from the master?
18:42 flowstate joined #salt
18:44 a_little_birdie RabidCicada: Ok I get it now, so watch just has to match the name and module, if there is a change then it triggers whatever behavior is coded in the current module.
18:44 a_little_birdie If you include a glob in the name part, that's a wildcard match on the name/id, not on any file path
18:45 baweaver joined #salt
18:45 a_little_birdie .. so if I understand it right.. if I do a file.recurse, I can only watch the whole directory
18:46 a_little_birdie but there's nothing stopping me from doing a file.recurse and then doing a file.managed of a file that is within the same directory is there?  They execute independently??  It is a little bit wasteful but worth it if it works.
18:49 dlam joined #salt
18:50 bhosmer joined #salt
18:52 RabidCicada a_little_birdie: Yeah...form my limited experience, that's what I would suggest.  file.recurse then file.managed just to get the name in scope for a watch
18:53 RabidCicada a_little_birdie: There might be a better way...but I am too green to know:)
18:55 digitalhero joined #salt
18:56 jim__ salt mine has old minions still. anyone dealt with that?
18:56 baweaver joined #salt
18:56 zzzirk joined #salt
18:57 Fiber^ joined #salt
18:57 a_little_birdie Thanks everyone I'll try it
18:58 babilen jim__: flush then update
19:00 babilen jim__: If you already removed those minions see https://github.com/saltstack/salt/issues/11389
19:00 saltstackbot [#11389]title: Feature request: cleanup old mine data on master | Whenever I remove a node, master still keeps it's mine information cached and sends it to all minions. Calling salt '*' mine.flush doesn't help, as master still has old mine data from not existing nodes. Calling salt-run cache.clear_mine on master also leaves all the cached data on master unchanged....
19:01 spankalish joined #salt
19:02 spankalish can anyone help me with installing nginx onto 6 nodes using saltstack?
19:02 AndreasLutro spankalish: do you have a more specific question?
19:02 mdasilva joined #salt
19:03 jim__ yeah should have googled that first @babilen
19:03 babilen spankalish: Configure https://github.com/saltstack-formulas/nginx-formula/ on your master, include "- nginx.ng.install" and, if wanted, "- nginx.ng.service" (add as needed) and you are done. If you have a more specific problem then, please, provide details.
19:03 AndreasLutro jim__ babilen: fwiw I tested using cache.clear_all today and it cleared mine data
19:04 babilen AndreasLutro: Wonderful!
19:04 babilen So they fixed that
19:04 AndreasLutro I guess so?
19:04 spankalish I keep getting this error The following packages failed to install/update: nginx
19:05 spankalish I'm using a yaml file
19:05 spankalish nginx:
19:05 spankalish pkg:
19:05 spankalish - installed
19:05 AndreasLutro maybe there isn't a package named nginx? maybe there are conflicts with other packages?
19:05 babilen spankalish: When do you get that error? What is the debug output on the minion when you run that? Could you paste your state and the "salt-minion -ldebug" output from your minion of the state run to one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, … ?
19:06 AndreasLutro ^
19:06 bhosmer joined #salt
19:06 babilen spankalish: Are you sure that the package is called "nginx" and not, say, nginx-server or so?
19:06 denys joined #salt
19:07 spankalish I'm brand new to this, it's a learning curve. I am using ubuntu/trusty64
19:07 babilen spankalish: fwiw, the currently best style if to use "nginx: \n pkg.installed: []" (or pkg.installed: - name: nginx) rather than the pkg: - installed variant
19:07 spankalish Ok
19:09 babilen spankalish: Well, it looks as if salt correctly identified your wish to install the "nginx" package, but that the actual apt-get run on the minion failed for some reason. We would see what it did and why it failed if you were to provide the minion output from either "salt-call -ldebug state.sls your.nginx.state" (on the minion) or run the minion with "salt-minion -ldebug" and then fire off the state on the m
19:09 babilen aster
19:10 aharvey joined #salt
19:10 RabidCicada spankalish: put it in a pastebin or gist for us to see
19:10 digitalhero joined #salt
19:10 RabidCicada I just checked and there is a package names nginx on ubuntu...so I don't think you have a naming problem
19:11 babilen We'll see it in the paste
19:11 fracklen joined #salt
19:12 felskrone joined #salt
19:12 spankalish gistfile1.txt on github
19:13 bhosmer joined #salt
19:13 spankalish Thanks
19:13 coval3nce https://github.com/saltstack/salt/issues/31661  <— be nice to get some feedback from you guys.
19:13 saltstackbot [#31661]title: Feature request: iptables-save: filter out lines via regex | ### Description of Issue/Question...
19:13 babilen spankalish: Do you have the URL?
19:14 spankalish https://gist.github.com/Spankalish/1d76999496fa21b1c8de
19:15 RabidCicada spankalish: give us the failed output from running the minion in debug mode, or master in debug mode, or salt-call, or however you are triggering it:)
19:15 spankalish It's probably all over the place I am brand new to DevOps
19:16 spankalish I'm using state.highstate
19:16 babilen spankalish: That's perfectly fine. Could you login to the minion and run "salt-call -ldebug state.highstate" and show us the output?
19:17 babilen (fwiw, you also want file.managed: on line 15 there for consistency, but that's no error just style)
19:23 onlyanegg joined #salt
19:24 coval3nce Does “_modules/“ for for gitfs file backends?
19:24 babilen coval3nce: It does [ .... ] for gitfs backends, yeah
19:25 coval3nce perfect babilen thanks
19:25 * babilen assumed "work"
19:25 coval3nce I’ll be trying it after lunch ;)
19:26 GreatSnoopy joined #salt
19:26 bhosmer joined #salt
19:26 dlam joined #salt
19:27 babilen spankalish: Is there anything we can do to help?
19:27 mdasilva joined #salt
19:29 digitalhero joined #salt
19:32 fracklen joined #salt
19:33 tweakism coval3nce: wouldn't it be easier and cleaner to segregate dynamic rules like that into their own chains
19:33 bhosmer joined #salt
19:33 amcorreia joined #salt
19:33 coval3nce tweakism: they often are, but iptables-save does not allow you to redact chains, only option is you can save a specific table if you want
19:34 coval3nce so, when you have things like Docker/
19:34 coval3nce Rancher, whatever PaaS also playing with iptables (specifically nat table entries for network magic forwarding to containers) it poses an issue when trying to also manage the hosts’ tables with something like Puppet/Salt
19:35 tweakism oh that's so weird, you're right
19:35 tweakism I could have sworn that was there
19:35 coval3nce I wish! ;)
19:35 coval3nce this regex should be powerfull enough for someone to craft what they need
19:35 coval3nce A future PR could allow for configuring a list of tables you’d wish to save maybe. (to give you more power)
19:36 aharvey joined #salt
19:36 tweakism I'm not a fan of the approach at all, but no doubt people would use it
19:36 spankalish sorry about that I got a phone call
19:36 spankalish The minion keeps giving back this error
19:36 spankalish Exception ValueError: 'I/O operation on closed file' in <bound method SyncWrapper.__del__ of <salt.utils.async.SyncWrapper object at 0x7f894c536310>> ignored
19:36 coval3nce tweakism: it was  the least common denominator way i found, any other ideas given what iptables-save provides?
19:37 tweakism you could add chain-exclusion to the salt module :)
19:37 spankalish sorry should have been ran as sudo
19:37 tweakism I can't really recommend that either though
19:37 coval3nce tweakism: totally and i’d like to, but then again i’d probably do so via regex as well (due to iptabls-save output)
19:37 babilen spankalish: Could you paste your command and its entire output please?
19:38 tweakism I don't seem to have the same thoughts and goals as the average salt user, but for what I'm going for, iptables-save has pretty much zero place in my config management.
19:38 coval3nce tweakism: e.g. you have to parse the complete blob it outputs: only other real way to do it right is see if there is a programable interface to iptables outside of the CLI utils
19:39 tweakism currently, the easiest thing seems to be using salt to create the save file itself, and letting iptables-restore bootscript load it
19:39 coval3nce How do you manage your host FW's?
19:39 spankalish This is the debug: https://gist.github.com/Spankalish/22fcde979c681acc9ae4
19:39 coval3nce Ah, yeah you could totally go that route as well.  I already had a bunch of states and pillars written to use the iptables state…sooo…. ;)
19:40 tweakism coval3nce: oh by the way, the per-chain iptables-save does exist, I wasn't crazy
19:40 tweakism it's just arguments to the iptables command itself, go figure
19:41 tweakism iptables -t table -S chain
19:42 babilen spankalish: https://gist.github.com/Spankalish/22fcde979c681acc9ae4#file-gistfile1-txt-L209 -- everything is fine in regards to nginx, but your somehow broke you packaging system. What does "apt-cache policy nginx fontconfig-config fonts-dejavu-core" and "sudo apt-get -f install" give you?
19:42 tweakism coval3nce: it's just, I don't want one-off modifications to ever leak into the established and documented configuration
19:42 tweakism and it's established and documented in salt stuff, and salt is managing everything that requires firewall rules, so it has no problem creating them all
19:42 tim_s007 joined #salt
19:42 coval3nce tweakism: ha, man page doesn’t show the -S option for me, but it works.
19:42 tkharju joined #salt
19:43 tweakism coval3nce: and i would have commented on your issue like you asked
19:43 spankalish babilen: on the minion?
19:43 ZiLi0n Hello everyone, how can I know from the master if a minion has executed a highstate properly to completion?
19:43 tweakism but i realize this whole conversation is opinionated and a tangent
19:43 SmokeBeast joined #salt
19:43 coval3nce tweakism: what about a use case where you only want to save some rules in a chain?
19:44 tweakism coval3nce: honestly can't think of one that doesn't seem like a really bad idea / better done some other way
19:44 babilen spankalish: Yeah
19:44 coval3nce tweakism: fair enough
19:44 babilen spankalish: That problem is not related to salt, but to your packaging system state on the minion
19:44 coval3nce tweakism: can rewrite this possibly to use specific configurable tables and chains, then aggregate it all before output to the persistent file (but i dont have time to do that today ;) )
19:45 samantha joined #salt
19:45 tweakism coval3nce: doesn't mean there won't ever be one though.  salt doesn't seem to try to be Opinionated™ and force people to do things a certain right way.  and does seem to strive to be flexible enough for use in unusual / novel applications.
19:45 spankalish babilen: The -f install wants to install  fonts-dejavu-core
19:46 babilen spankalish: Show me
19:46 cyborg-one joined #salt
19:47 fracklen joined #salt
19:47 spankalish babilen: https://gist.github.com/Spankalish/c729315f59ca2def2e97
19:47 peter_the_cheatr left #salt
19:48 spankalish babilen: https://gist.github.com/Spankalish/68bf05403445cb8baed3
19:48 babilen spankalish: So .. run the "apt-get -f install" and I'm sure it'll sort itself out. As you can see https://gist.github.com/Spankalish/68bf05403445cb8baed3#file-gistfile1-txt-L2 is installed and happy. It is just that the apt-get process returned an unrelated error.
19:48 babilen Not sure why.
19:49 spankalish babilen: weird
19:52 spankalish babilen: that worked.
19:52 babilen Great .. enjoy!
19:53 spankalish Just going to destroy this test bed and load it up again. Maybe I messed it up some how. Thanks for the help, I'll probably be back at some stage :)
19:53 babilen Sure, keep the questions coming and welcome to Salt.
19:53 spankalish Thnaks
19:53 spankalish Thanks even
19:55 digitalhero joined #salt
19:57 tellendil joined #salt
19:58 fracklen_ joined #salt
20:00 baweaver joined #salt
20:00 digitalhero joined #salt
20:04 josue joined #salt
20:10 denys joined #salt
20:16 fracklen joined #salt
20:17 Reilly joined #salt
20:17 akhter joined #salt
20:19 Reilly Is there any good way to store entire files in the pillar for use with states?
20:19 aharvey joined #salt
20:20 iggy https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.file_tree.html#module-salt.pillar.file_tree ?
20:22 aharvey joined #salt
20:22 tkharju joined #salt
20:22 fracklen joined #salt
20:23 noraatepernos joined #salt
20:23 ryan___ joined #salt
20:23 brianfeister joined #salt
20:23 iggy there's also a ticket open for better handling of binary data
20:23 Reilly I saw that. I'm reading that page now, thank you
20:24 flowstate joined #salt
20:28 josuebrunel joined #salt
20:29 fracklen joined #salt
20:29 ajw0100 joined #salt
20:29 digitalhero joined #salt
20:32 aw110f joined #salt
20:33 ryan___ is there an existing module/function that allows for for adding a domain user to the local administrators group on a windows machine?
20:35 snowwolf joined #salt
20:35 t0m0 joined #salt
20:37 GreatSnoopy joined #salt
20:37 Reilly So with salt.pillar.file_tree am I able to include a directory that is stored in the pillar folder or does it need to be outside of the pillar folder?
20:37 josuebrunel joined #salt
20:38 iggy Reilly: it should probably be a separate tree, but you might be able to make it work all in one
20:38 tweakism I think people do overlap them a lot, but it bothers me and I don't.
20:42 flowstate joined #salt
20:45 s_kunk joined #salt
20:47 flowstate joined #salt
20:49 flowstate joined #salt
20:49 GreatSnoopy joined #salt
20:49 baweaver joined #salt
20:51 digitalhero joined #salt
20:51 akhter joined #salt
20:53 shaggy_surfer joined #salt
21:02 spiette joined #salt
21:05 ajw0100 joined #salt
21:07 morissette joined #salt
21:08 digitalhero joined #salt
21:14 Muchoz joined #salt
21:15 bucky_ joined #salt
21:25 akhter joined #salt
21:28 ekristen joined #salt
21:29 digitalhero joined #salt
21:31 digitalh_ joined #salt
21:34 spiette joined #salt
21:46 pcdummy joined #salt
21:46 pcdummy joined #salt
21:50 flowstate joined #salt
21:55 mavhq joined #salt
21:56 scoates joined #salt
22:01 mavhq joined #salt
22:03 jcristau joined #salt
22:06 sjmh joined #salt
22:07 mavhq joined #salt
22:09 mavhq joined #salt
22:14 baweaver joined #salt
22:15 sfxandy joined #salt
22:18 edrocks joined #salt
22:18 mavhq joined #salt
22:18 SmokeBeast79 joined #salt
22:21 antpa joined #salt
22:21 PredatorVI joined #salt
22:26 mavhq joined #salt
22:27 amcorreia joined #salt
22:29 jim__ joined #salt
22:29 PredatorVI Howdy folks!  I have a shared state that deploys a war to tomcat (see https://gist.github.com/PredatorVI/0723b0f9999b07d873bb).  When I run it I get the error: " State file.prepend found in sls deploy_webapp is unavailable" and I dont' know why?  Anyone have a minute to see what I'm doing wrong?
22:30 PredatorVI the state is included in a parent state by doing {% include 'tomcat/deploy_single.sls' %}
22:30 lazybear joined #salt
22:32 PredatorVI It was working but in an attempt to allow this state to be imported by multiple parent states during a highstate run, I add '-{{ project_name }}' to the state ids (most of them) so they are unique
22:35 flowstate joined #salt
22:35 subsignal joined #salt
22:37 garphy joined #salt
22:41 mavhq joined #salt
22:41 zenlot6 joined #salt
22:42 jim__ joined #salt
22:43 PredatorVI slow day...
22:50 morissette joined #salt
22:50 ajw0100 joined #salt
22:55 t0m0 joined #salt
22:56 snowwolf joined #salt
22:57 bhosmer joined #salt
23:01 _JZ_ joined #salt
23:02 sjmh joined #salt
23:03 tweakism seeking advice on handling serial number for salt-managed bind zone file (i.e., want to use salt to remove individual entries.)
23:04 tweakism want to avoid unnecessary changes, i.e. generating a serial number every highstate
23:06 PredatorVI tweakism:  Just spitballing, but you could look at the on_changes requisite (or one like it) to only generate a new serial if the state making zone changes actually changes
23:08 babilen Might set the current one as grain
23:09 mavhq joined #salt
23:09 babilen Could also parse the file itself
23:10 brianfeister joined #salt
23:11 aboe joined #salt
23:14 SmokeBeast79 Rebuilt my master and minion today and now I cannot get the minion to check in to the master.
23:15 baweaver joined #salt
23:15 SmokeBeast79 In fact, I have rebuilt both master and minion and the minion still will not check in with the master.
23:16 SmokeBeast79 running salt-minion -l debug on the minion shows SaltReqTimeoutError
23:16 PredatorVI how are you determining if it has not checked in?  do you need to accept keys?  Is /etc/salt/minion configured to point to the master?
23:17 SmokeBeast79 I am running salt-key -L on the master to see if there are any unaccepted keys.  I don't even see the minion in the list
23:17 PredatorVI firewall?
23:17 opdude joined #salt
23:18 babilen tweakism: So, grains.present with +1 in an onchanges state. That way you have the correct number *iff* there are other changes
23:18 SmokeBeast79 Both machines are running CentOS 7.2 and are on the same subnet.  SELINUX is disabled on both.  No IPTABLES in 7
23:20 quix joined #salt
23:21 PredatorVI cliluw,
23:21 PredatorVI oops
23:22 aharvey joined #salt
23:23 flowstate joined #salt
23:26 mavhq joined #salt
23:33 SmokeBeast79 http://pastebin.com/raw/eUPMGUQP
23:33 SmokeBeast79 This is the output from salt-minion -l debug
23:36 flowstate joined #salt
23:39 a_little_birdie left #salt
23:40 SmokeBeast79 \
23:40 SmokeBeast79 oops
23:41 quix_ joined #salt
23:45 morissette joined #salt
23:45 PredatorVI SmokeBeast79:  Is the IP of the master it is connecting to correct?  If so, I would think it must be a network config, firewall or master process issue.
23:47 PredatorVI So if you can ping minion, and telnet to salt-master port then it should work...
23:47 PredatorVI *ping master*
23:47 dyasny joined #salt
23:47 SmokeBeast79 I can ping the master from the minion and the minion from the master perfectly.
23:47 PredatorVI What about telnet to the master/minion ports?
23:48 rem5 joined #salt
23:50 SmokeBeast79 telnet says No route to host.
23:51 dyasny joined #salt
23:51 bhosmer joined #salt
23:56 rem5 joined #salt
23:57 SmokeBeast79 nmap scan from the minion to the master shows port 22
23:59 dyasny joined #salt

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