Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-08-17

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

All times shown according to UTC.

Time Nick Message
00:00 dezertol https://bpaste.net/show/08b1d13d27c4
00:00 dezertol you trying to call your pillar vallues with out actually indicated that it's from a pillar
00:00 dezertol cert_details .. I assume is a pillar value?
00:01 dezertol o.. I see
00:01 dezertol from the script
00:01 Guest38709 I am getting all the values correctly...i can see the values in the minon log
00:01 Guest38709 but the script is not getting the keyword arguments
00:02 dezertol I'm not 100% sure on this, it's been some time since I did anything in bash.. but your passing in argv into the script.. but your calling htem by anme reference
00:03 dezertol don't you need to do like $0 and $1 etc.
00:03 dezertol for each var passed in?
00:03 MTecknology hm, how do you guys handle it if a state needs a module but the module requires a package to load? Can you tell a module to load after installing the package?
00:04 Guest38709 hmm let me try that out
00:04 MTecknology I really super duper wanna have the first highstate apply cleanly and I want the highstate to be the only provisioning the system gets
00:04 akhter joined #salt
00:04 dezertol you can use orchestration .. if you need order of ops like that.. otherwize you might get away with - require
00:05 MTecknology the modules are already loaded at that point, though
00:06 MTecknology I swear... this has been solved
00:06 MTecknology I seem to remember tom talking about that being the idea behind the lazyloader
00:08 dezertol the only thing I've had to do that's even close is with the gpg thing
00:08 dezertol and ended up modifying the bootstrap to load what I needed before the state ran
00:08 dezertol it's probablay not the best idea
00:09 Guest38709 dezertol it works on my local system
00:09 dezertol but I had issues with the encryption stuff states wouldn't run unless it was installed
00:09 Guest38709 isn't the kwargs passing the named arguments
00:10 Guest38709 if i run the script like country=US state=CA ./script.sh it runs well
00:10 dezertol I'm not sure about bash or sh scripts reading the variables in.. it's probaby passing htem fine
00:10 dezertol those are set as env vars ..
00:10 dezertol not command line arguments
00:10 Guest38709 oh okay..
00:10 Guest38709 thanks
00:11 dezertol i.e. ./script.sh us CA blah balh balh... will only be in the script as $0 $1 $2 etc..
00:12 netcho joined #salt
00:12 Guest38709 okay thanks
00:13 xbglowx joined #salt
00:13 ninjada joined #salt
00:16 MTecknology OMG! HELP!
00:16 brent__ joined #salt
00:16 MTecknology I need to figure out what I want to listen to while I salt. not a salsa day
00:20 ablinkin joined #salt
00:23 stanchan joined #salt
00:27 mpanetta joined #salt
00:28 stanchan joined #salt
00:28 blue0ctober joined #salt
00:38 shadoxx MTecknology: drum and bass is always a good choice. or chill jazz
00:41 ablinkin joined #salt
00:42 MTecknology I started w/ def leppart, I guess that's close.. :P
00:44 infrmnt1 joined #salt
00:45 amcorreia joined #salt
00:46 stanchan joined #salt
00:47 iggy <3 shadoxx
00:48 MTecknology iggy: billy shaddox?
00:48 iggy I was agreeing with the suggestion for D&B
00:49 MTecknology .... wow
00:51 shadoxx hahahah
00:51 chitown i just upgraded to 2015.5.11 (from 2014.7)  (yes, i know; WAY overdue...)
00:51 chitown having a problem with salt.wheel
00:51 chitown https://gist.github.com/craig5/f535164cfffb315c25905777125ad050
00:54 iggy chitown: https://github.com/saltstack/salt/issues/26415 ?
00:54 saltstackbot [#26415][MERGED] salt.wheel.WheelClient doesn't work follow the python api(AttributeError: 'NoneType' object has no attribute 'get') | ```python...
00:54 MTecknology I clicked Rock and then New Noise in Spotify and it gave me ... Green Day.  ... REALLY?!?!  *sigh*
00:54 chitown cool.... one sec
00:57 iggy that seems to say your version should be fixed, but you could still try passign kwargs={} to see what happens
00:57 chitown yes, that looks like it, but the fix (adding "kwarg={}") results in another exception
00:57 chitown CommandExecutionError: Module 'keys' is not available.
01:00 ninjada_ joined #salt
01:02 chitown updated above gist with the details
01:02 catpigger joined #salt
01:04 chitown (gotta catch a train... happy to try other stuff or create an issue in git)
01:07 edrocks joined #salt
01:13 ablinkin joined #salt
01:14 ninjada joined #salt
01:22 yo_ joined #salt
01:22 yo_ can anyone explain a little bit about Salt Engine's
01:23 ablinkin joined #salt
01:23 yo_ is it supposed to run only on master....something like listening for event and perform an action once that occurs
01:25 yo_ okay it can run on both.just found out.
01:25 yo_ Is there any good resource for looking into it
01:28 ablinkin joined #salt
01:29 hasues joined #salt
01:29 hasues left #salt
01:30 Nahual joined #salt
01:30 stanchan joined #salt
01:35 ablinkin joined #salt
01:38 ablinkin joined #salt
01:46 ablinkin joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.5.11, 2015.8.11, 2016.3.2 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
01:48 ablinkin joined #salt
01:52 akhter joined #salt
01:53 drawsmcgraw left #salt
01:55 pipps joined #salt
01:55 mapu joined #salt
01:56 pipps joined #salt
01:56 MTecknology shadoxx: I ended up going for Rammstein
01:57 MTecknology I wonder if I should just make pre-depends like python-git part of the deploy script. It's starting to see pretty sane.
01:57 ablinkin joined #salt
02:02 mpanetta_ joined #salt
02:06 ninjada joined #salt
02:08 bastiand1 joined #salt
02:10 ablinkin joined #salt
02:10 ninjada joined #salt
02:13 netcho joined #salt
02:19 pipps joined #salt
02:29 netcho joined #salt
02:35 ablinkin joined #salt
02:35 Brijesh1 joined #salt
02:39 ablinkin joined #salt
02:44 ninjada joined #salt
02:45 ajw0100 joined #salt
02:45 ageorgop joined #salt
02:45 ablinkin joined #salt
02:45 sarlalian joined #salt
02:46 scsinutz joined #salt
02:54 ablinkin joined #salt
03:01 ageorgop joined #salt
03:02 spuder joined #salt
03:05 lilvim joined #salt
03:09 ablinkin joined #salt
03:10 edrocks joined #salt
03:13 evle joined #salt
03:14 akhter joined #salt
03:28 ablinkin joined #salt
03:32 ablinkin joined #salt
03:35 spuder_ joined #salt
03:40 ablinkin joined #salt
03:41 aswini1 joined #salt
03:52 ablinkin joined #salt
03:55 tercenya joined #salt
04:02 spuder joined #salt
04:03 komputes joined #salt
04:08 pipps joined #salt
04:12 ablinkin joined #salt
04:24 scsinutz joined #salt
04:26 ablinkin joined #salt
04:30 netcho joined #salt
04:31 scsinutz1 joined #salt
04:32 ablinkin joined #salt
04:37 ablinkin_ joined #salt
04:38 writtenoff joined #salt
04:39 ageorgop joined #salt
04:48 pipps joined #salt
04:52 netcho joined #salt
05:03 jaybocc2 joined #salt
05:11 badon_ joined #salt
05:12 ablinkin joined #salt
05:13 edrocks joined #salt
05:17 othernamee joined #salt
05:30 scsinutz joined #salt
05:31 onlyanegg joined #salt
05:32 stanchan joined #salt
05:37 nidr0x joined #salt
05:41 ablinkin joined #salt
05:42 tercenya_ joined #salt
05:51 ablinkin joined #salt
05:56 bocaneri joined #salt
06:03 ivanjaros joined #salt
06:05 Miouge joined #salt
06:06 stanchan joined #salt
06:06 Brijesh1 joined #salt
06:06 rdas joined #salt
06:14 jxm_ joined #salt
06:17 ajw0100 joined #salt
06:20 kshlm joined #salt
06:20 amy_ joined #salt
06:22 ablinkin joined #salt
06:24 shoul joined #salt
06:25 Brijesh1 joined #salt
06:28 jaybocc2 joined #salt
06:29 netcho joined #salt
06:37 saintpablo joined #salt
06:42 ageorgop joined #salt
06:43 netcho joined #salt
06:45 fracklen joined #salt
06:47 stanchan joined #salt
06:51 Miouge joined #salt
06:51 fracklen joined #salt
06:52 N-Mi joined #salt
06:52 N-Mi joined #salt
06:53 netcho joined #salt
06:54 othernamee joined #salt
07:09 Mandorath joined #salt
07:12 ablinkin joined #salt
07:13 giany hi, i'm using salt-cloud to deploy servers in 2 clouds, problem is that on one cloud (aws) eth0 is used as main interface while on other cloud (softlayer) eth1 is used..is there I can separate the two providers and define for aws something like {% set ip =  grains['ip_interfaces']['eth0'][0] %} while for softlayer : {% set ip =  grains['ip_interfaces']['eth1'][0] %} ? (or maybe is there an easier way?)
07:15 edrocks joined #salt
07:15 JohnnyRun joined #salt
07:17 ivanjaros joined #salt
07:20 ThomasJ joined #salt
07:20 Electron^- joined #salt
07:30 Brijesh1 joined #salt
07:31 ablinkin joined #salt
07:33 ninjada joined #salt
07:34 JohnnyRun joined #salt
07:38 ablinkin joined #salt
07:40 netcho joined #salt
07:41 evilRails joined #salt
07:44 jhauser joined #salt
07:45 manji joined #salt
07:46 ablinkin joined #salt
07:48 netcho joined #salt
07:52 ablinkin joined #salt
07:57 ninjada joined #salt
07:58 Rumbles joined #salt
07:59 ronnix joined #salt
08:01 west575 joined #salt
08:02 ravenx joined #salt
08:04 jhauser joined #salt
08:05 ravenx joined #salt
08:08 jhauser_ joined #salt
08:09 ravenx joined #salt
08:15 GreatSnoopy joined #salt
08:17 s_kunk joined #salt
08:21 ablinkin_ joined #salt
08:25 keimlink joined #salt
08:25 brotatochip joined #salt
08:28 kbaikov joined #salt
08:29 ablinkin joined #salt
08:34 ablinkin joined #salt
08:36 Mandorath I have some states that switch between one primary state if the primary state succeeds the state a and b are executed and if it fails state x and z are executed. Now in both cases the states that are not executed will show as an error but in essence they are just skipped because i want them to. Is it possible to silence the errors for these specific states?
08:36 Mandorath I use the requisites require and onfail for this.
08:40 ablinkin joined #salt
08:43 AndreasLutro Mandorath: I don't think so, what type of states are we talking about?
08:45 Mandorath I want salt to check if there is a second disk with a specific lvm setup (i use pvdisplay with cmd.run to detect it) if this state succeeds i want it to do things like resize and mount in fstab. If it fails i want to 'simulate' it by just creating some directories.
08:47 AndreasLutro maybe move the pvdisplay from a cmd.run state to an "unless" arg to the state(s) that create the directories
08:48 Mandorath AndreasLutro: Yes but then the other states will still be executed and fail if there is no second disk. I also tried this with if and set but than the simulated directory setup always skips because the pvdisplay fails.
08:48 ablinkin_ joined #salt
08:48 AndreasLutro mm. can you show me what you tried exactly? like the full sls
08:49 Mandorath AndreasLutro: sure give me a sec
08:53 Mandorath AndreasLutro: I got the sls here http://pastebin.com/8T9FnDB5
08:55 AndreasLutro so basically you want to run one set of states if vgdisplay succeeds, another if it fails?
08:55 AndreasLutro if so, you could just do a jinja {% if salt['cmd.retcode']('vgdisplay ...') == 0 %}<states>{% else %}<states>{% endif %}
08:58 ablinkin joined #salt
09:02 ablinkin_ joined #salt
09:03 jhauser joined #salt
09:04 agentnoel joined #salt
09:04 agentnoel joined #salt
09:06 AirOnSkin joined #salt
09:08 AirOnSkin Hey guys. Is it possible to run a state via state.sls with a "no requirements" option? Temporarily ignoring requirements...
09:09 kaushal_ joined #salt
09:14 N-Mi joined #salt
09:18 izrail joined #salt
09:18 edrocks joined #salt
09:20 ablinkin joined #salt
09:22 felskrone joined #salt
09:22 ronnix joined #salt
09:24 Mandorath AndreasLutro: I tried a simmilar setup already but maybe i did somthing wrong then, il give this a go.
09:25 ronnix joined #salt
09:26 losh joined #salt
09:26 _W_ joined #salt
09:33 inad922 joined #salt
09:41 Rumbles joined #salt
09:44 lero joined #salt
09:46 jaybocc2 joined #salt
09:53 ablinkin joined #salt
09:58 kshlm joined #salt
09:58 robawt1 joined #salt
10:03 colegatron joined #salt
10:06 emid joined #salt
10:09 Rumbles joined #salt
10:12 netcho joined #salt
10:22 ablinkin joined #salt
10:26 ablinkin_ joined #salt
10:30 Brijesh1 joined #salt
10:30 Rumbles joined #salt
10:33 netcho joined #salt
10:35 ablinkin joined #salt
10:52 ablinkin joined #salt
10:59 kbaikov joined #salt
11:00 amcorreia joined #salt
11:02 impi joined #salt
11:21 edrocks joined #salt
11:25 akhter joined #salt
11:26 scavara joined #salt
11:26 antpa joined #salt
11:32 jaybocc2 joined #salt
11:35 scavara in my test env, among others, I've setup a sls which should handle apt pkg/confs. There is a portion which file.managed /etc/apt/apt.conf.d/98-no-recommends and it works as expected. Is there any way to check first if there any other file within apt.conf.d that does the same thing before creating/managing 98-no-recommends?
11:35 Brijesh1 joined #salt
11:39 AndreasLutro you could do "- unless: grep -r 'whatever' /etc/apt/apt.conf.d"
11:42 Mandorath How can i make sure a package i installed before a {% set %} is rendered. I tried this by setting up two states one that installes the package and one with the set which uses the package to do something. It will now fail because the set is rendered before the package is installed. I got the example here: http://pastebin.com/MF4DSbCK
11:42 Mandorath I also orderd the top file to first apply the package state
11:43 AndreasLutro Mandorath: you can't
11:43 AndreasLutro jinja/SLS files are rendered before they're executed
11:44 scavara @AndreasLutro thank you! worked like a charm!
11:44 AndreasLutro you can potentially use the cmd.run state with "stateful: true"
11:44 ablinkin joined #salt
11:44 AndreasLutro look up the docs for that
11:45 scavara ah...I did try with less, but I had cmd.run preceding it so it didn't work. Will look into stateful option as well.
11:46 Mandorath AndreasLutro: Thx, I will than add the package as a default package to a kickstart file making sure it is installed before salt is run :-D
11:54 ablinkin joined #salt
12:02 lero__ joined #salt
12:11 ablinkin_ joined #salt
12:11 edrocks joined #salt
12:18 sxar_ joined #salt
12:19 infrmnt joined #salt
12:24 ablinkin joined #salt
12:26 numkem joined #salt
12:32 jaybocc2 joined #salt
12:33 TooLmaN joined #salt
12:37 ablinkin joined #salt
12:41 Rumbles joined #salt
12:44 edrocks joined #salt
12:47 gh34 joined #salt
12:53 akhter joined #salt
12:53 cyborg-one joined #salt
12:58 MadHatter42 joined #salt
12:59 dyasny joined #salt
13:02 hasues joined #salt
13:02 hasues left #salt
13:03 MadHatter42 joined #salt
13:04 riftman joined #salt
13:14 ronnix joined #salt
13:18 stooj joined #salt
13:19 tiwula joined #salt
13:20 racooper joined #salt
13:22 ws2k3 joined #salt
13:23 tmilam joined #salt
13:29 nicksloan joined #salt
13:30 ablinkin joined #salt
13:34 tapoxi joined #salt
13:35 ablinkin joined #salt
13:42 ablinkin joined #salt
13:45 Rumbles joined #salt
13:47 edrocks joined #salt
13:49 scoates joined #salt
13:52 tmilam i'm following along with the saltstack fundamentals tutorial but keep getting 'Salt request timeout' sporadically. is this normal?
13:53 tmilam i'm using the vagrant demo from here: https://docs.saltstack.com/en/getstarted/fundamentals/index.html
13:54 ablinkin joined #salt
13:55 jerredbell joined #salt
14:05 AndreasLutro tmilam: not really. might be a network issue, or your salt master/minion aren't running properly. check /var/log/salt on all machines
14:08 krymzon joined #salt
14:10 mapu joined #salt
14:14 ThomasJ joined #salt
14:17 hasues joined #salt
14:18 hasues left #salt
14:21 akhter joined #salt
14:21 ablinkin joined #salt
14:21 kshlm joined #salt
14:33 danieloliveira joined #salt
14:33 jaybocc2 joined #salt
14:34 danieloliveira hello all.
14:34 danieloliveira after upgrade from 2015.8 to 2016.3.2 my salt-api stopped working
14:34 danieloliveira and keeps crashing
14:35 danieloliveira the cherrypy cant start the server
14:35 danieloliveira any idea?
14:36 KingOfFools you can try to run it with salt-api -l debug i guess
14:36 danieloliveira I tried already
14:37 danieloliveira File "/usr/lib/python2.7/dist-packages/cherrypy/process/servers.py", line 187, in _start_http_thread     self.httpserver.start()
14:37 danieloliveira ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer((‘xxx.xxx.xxx.xxx’, 8182)) already shut down
14:38 danieloliveira even changing the port didnt work
14:38 my10c permissons ?
14:38 danieloliveira running as sudo
14:39 my10c maybe : strace -o strace.out -f salt-api  whatever-flags
14:39 danieloliveira everything was working ok
14:39 my10c then check the strace.out for clue ?
14:39 danieloliveira until I run
14:39 danieloliveira apt-get upgrade salt-master
14:39 danieloliveira and then apt-get upgrade salt-api
14:40 my10c im still on 2016.3.1  : is cherrypy part of 2016.3.2 or did you installed it your self ?
14:40 sxar joined #salt
14:41 danieloliveira I think it is part of
14:42 danieloliveira salt-api --versions-report shows me cherrypy:3.2.2
14:42 sxar__ joined #salt
14:43 my10c mine shows : Salt: 2016.3.1
14:43 my10c and        cherrypy: Not Installed
14:43 krymzon joined #salt
14:43 danieloliveira weird
14:43 my10c let me fire up an vm and see if it comes with 2016.3.2
14:45 jaybocc2 joined #salt
14:45 danieloliveira thank you
14:46 teryx510 joined #salt
14:50 akhter joined #salt
14:50 spuder joined #salt
14:51 akhter_1 joined #salt
14:52 ronnix joined #salt
14:53 my10c fyi
14:53 my10c apt-cache policy salt-master
14:53 my10c salt-master:
14:53 my10c Installed: (none)
14:53 my10c Candidate: 2016.3.2+ds-1
14:53 my10c Version table:
14:53 my10c 2016.3.2+ds-1 0
14:53 my10c 500 http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/ trusty/main amd64 Packages
14:53 my10c 0.17.5+ds-1 0
14:53 my10c 500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
14:53 my10c let me get that now install and see what get installed : clean vm
14:54 danieloliveira ok
14:54 my10c python-cherrypy3 for salt-api ..
14:54 richardl joined #salt
14:54 richardl hi
14:54 my10c apt-cache policy salt-api
14:54 my10c salt-api:
14:54 my10c Installed: 2016.3.2+ds-1
14:54 my10c Candidate: 2016.3.2+ds-1
14:54 my10c Version table:
14:54 my10c *** 2016.3.2+ds-1 0
14:54 my10c 500 http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/ trusty/main amd64 Packages
14:54 my10c 100 /var/lib/dpkg/status
14:55 my10c Salt: 2016.3.2
14:55 richardl was wanting to know if any one has some idea how to setup x509 remote?
14:55 my10c cherrypy: 3.2.2
14:55 my10c so that get installed by salt-api
14:55 cmarzullo richardl: what do you mean?
14:55 danieloliveira tks my10c
14:56 danieloliveira I will investigate that
14:56 richardl I am trying to get remote cert signing
14:56 richardl I am working from the example in the documents however I am getting a render error
14:57 my10c @cmarzullo : can u share your salt-api config : see if i see any conflict ?
14:58 richardl @cmarzullo I have post detailing my issue here https://groups.google.com/forum/#!topic/salt-users/z_yAZ7Y-0vg
14:59 cmarzullo I have a meeting but I'll check back in a sec sorry. :(
15:00 ablinkin joined #salt
15:00 richardl @cmarzullo any help would be gratefully receivced
15:00 my10c no worry
15:01 akhter joined #salt
15:04 my10c @cmarzullo  : add a very basic config to test:
15:04 my10c rest_cherrypy: port: 8000 disable_ssl: True
15:04 my10c oops
15:04 my10c its
15:04 my10c rest_cherrypy:
15:04 my10c port: 8000
15:04 my10c disable_ssl: True
15:05 my10c started salt-api and no issue : make sure you config is correct (2 spaces: its yaml)
15:07 ablinkin joined #salt
15:09 svg joined #salt
15:11 akhter joined #salt
15:14 akhter_1 joined #salt
15:16 ablinkin joined #salt
15:21 akhter joined #salt
15:21 stanchan joined #salt
15:27 ablinkin joined #salt
15:28 dezertol joined #salt
15:30 Brijesh1 joined #salt
15:33 Brew joined #salt
15:33 akhter joined #salt
15:34 mapu joined #salt
15:40 akhter joined #salt
15:44 akhter joined #salt
15:45 my10c tested with ssl too : no issue....
15:46 ninjada joined #salt
15:48 om joined #salt
15:48 ablinkin joined #salt
15:48 Brijesh1 joined #salt
15:48 sp0097 joined #salt
15:49 dh__ joined #salt
15:49 spuder joined #salt
15:50 danieloliveira my10c no success here
15:51 danieloliveira I cant find what is wrong
15:51 my10c does a strace provide any more info ?
15:51 danieloliveira nope
15:51 danieloliveira using the same config files on a local vagrant machine
15:51 danieloliveira works just fine
15:51 my10c check /var/log/salt/master for possible more info about goes wrong.
15:52 danieloliveira but that local machine was not upgraded but provisioned with 2016.3.2
15:52 danieloliveira my remote environment started with 2015 and was working ok
15:52 my10c same here  : new vm and installed salt from the salt repo
15:52 danieloliveira just after upgrade stoped
15:52 stanchan joined #salt
15:52 dh__ Can anyone tell me if there is an easy way to run commands on the salt server, when targetting a minion? Or if it is possible to target a separate server in a salt state that targets a specific minion? I'd like to use pillar data for one minion to run a command on a second minion as defined in the first minions pillar
15:53 pmcg joined #salt
15:53 dh__ I'd also like to take that minions pillar data and create a new yaml file on the master based on those pillars (in the salt cloud dir)
15:53 my10c @danieloliveira maybe apt-get remove salt-master salt-api ; salt autoremove ; salt install salt-master salt-api ?
15:54 danieloliveira possible yes my10c
15:54 my10c also do tis : sudo lsof | grep TCP : and see if there is any process that is using the same port as what you have configured for salt-api ...
15:54 danieloliveira but my fear is if the problem is not just related to salt* but to any other lib or packaged that were installed during the upgrade
15:55 dezertol @dh__ sounds like you want to setup a salt-syndic https://docs.saltstack.com/en/latest/topics/topology/syndic.html
15:55 my10c possible a conflict ..
15:55 scsinutz joined #salt
15:56 danieloliveira I thought that but no port conflicts detected
15:56 ablinkin joined #salt
15:56 antpa joined #salt
15:57 my10c hmm out of idea : strace would be my next debug before the apt-get uninstall/autoremve/install
15:57 danieloliveira I see
15:58 my10c so is you do : ps -efsa | grep api : you do not see see salt-api running ? and want to be sure you did : service salt-api start : right ?
16:00 spuder_ joined #salt
16:02 danieloliveira I run salt-api -l debug
16:03 danieloliveira just to see the output
16:03 numkem joined #salt
16:03 danieloliveira but also tried service salt-api start
16:04 my10c sudo service salt-api stop
16:04 my10c sudo salt-api -l debug
16:04 my10c works here ....
16:04 danieloliveira I believe that during the upgrade some package was updated
16:04 danieloliveira I believe that during the upgrade some package was updated and broke
16:04 danieloliveira the remaining stuff
16:04 danieloliveira possible something with python
16:05 my10c salt-api --versions-report
16:05 my10c Salt Version:
16:05 my10c Salt: 2016.3.2
16:05 my10c Dependency Versions:
16:05 my10c cffi: Not Installed
16:05 my10c cherrypy: 3.2.2
16:05 my10c dateutil: 1.5
16:05 ablinkin joined #salt
16:05 my10c gitdb: 0.5.4
16:05 my10c gitpython: 0.3.2 RC1
16:05 my10c ioflo: Not Installed
16:05 my10c Jinja2: 2.7.2
16:05 my10c libgit2: Not Installed
16:05 my10c libnacl: Not Installed
16:05 my10c M2Crypto: Not Installed
16:05 my10c Mako: 0.9.1
16:05 my10c msgpack-pure: Not Installed
16:05 my10c msgpack-python: 0.4.6
16:05 my10c mysql-python: 1.2.3
16:05 my10c pycparser: Not Installed
16:05 my10c pycrypto: 2.6.1
16:05 my10c pygit2: Not Installed
16:05 my10c Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
16:06 my10c python-gnupg: Not Installed
16:06 my10c PyYAML: 3.10
16:06 my10c PyZMQ: 14.0.1
16:06 my10c RAET: Not Installed
16:06 my10c smmap: 0.8.2
16:06 my10c timelib: Not Installed
16:06 my10c Tornado: 4.2.1
16:06 my10c ZMQ: 4.0.5
16:06 my10c System Versions:
16:06 my10c dist: Ubuntu 14.04 trusty
16:06 my10c machine: x86_64
16:06 my10c release: 4.2.0-27-generic
16:06 my10c system: Linux
16:06 my10c version: Ubuntu 14.04 trusty
16:06 my10c fresh 14.04.4 LTS vm
16:07 jerredbell1 joined #salt
16:07 danieloliveira the differences are
16:07 danieloliveira ZMQ: 4.0.4
16:08 danieloliveira release: 3.19.0-59-generic
16:08 danieloliveira only
16:08 danieloliveira the remaining are the same
16:09 my10c 3.19 == 14.04.3 : so not an issue : zmq : zero mqueue shoudl not be the issue
16:09 my10c can you show me the error again ?
16:09 danieloliveira sure just a second please
16:10 DammitJim joined #salt
16:10 DammitJim is there a diffferent way to store passwords for a MongoDB in salt?
16:10 DammitJim I have been using the hash for mysql
16:10 DammitJim and have not done anything with GPG for Salt
16:11 my10c @DammitJim : not related but : mongodb with password is 'slower' then without
16:13 danieloliveira [ERROR   ] [17/Aug/2016:16:10:01] ENGINE Error in HTTP server: shutting down
16:13 danieloliveira File "/usr/lib/python2.7/dist-packages/cherrypy/process/servers.py", line 187, in _start_http_thread     self.httpserver.start()
16:13 danieloliveira File "/usr/lib/python2.7/dist-packages/cherrypy/wsgiserver/wsgiserver2.py", line 1824, in start     raise socket.error(msg)
16:13 danieloliveira error: No socket could be created
16:13 danieloliveira [INFO    ] [17/Aug/2016:16:10:02] ENGINE Bus STOPPING [INFO    ] [17/Aug/2016:16:10:02] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('xxx.xxx.xxx.xxx', 8080)) already shut down
16:13 DammitJim lol
16:13 DammitJim thanks for the tip my10c
16:14 DammitJim slower like an order of magnitude?
16:14 danieloliveira and keeps looping
16:15 my10c @DammitJim  : we have our mongo in a backend network so no access from the outside and no need for password : we do mot much : but in the old company it was 10-12 % slower : we were in AWS
16:15 my10c @danieloliveira tracing the code : give me a min or 2
16:15 heaje joined #salt
16:16 ablinkin joined #salt
16:17 danieloliveira tks
16:17 DammitJim crazy my10c
16:17 my10c check /var/run/salt/master/
16:17 my10c does it exist ?
16:18 danieloliveira ok
16:18 danieloliveira let me see
16:18 my10c the process creates /var/run/salt/master/master_event_pub.ipc and /var/run/salt/master/master_event_pull.ipc
16:18 danieloliveira they are there
16:19 edrocks joined #salt
16:19 danieloliveira but when I run the salt-api
16:19 danieloliveira they are not updated
16:19 danieloliveira should I delete them?
16:20 my10c do you have ssl enabled ? and cert has correct permission : owned by root and should be mnode 400: it might not check  it but is a good thing
16:20 my10c and yes delete them!
16:20 my10c it should be re-created
16:20 danieloliveira ok
16:20 sal joined #salt
16:23 Brew joined #salt
16:23 Guest10769 is there a way to set the run level on a debian repo install using a saltstate like pkgrepo.managed?
16:23 om joined #salt
16:23 my10c just an ither check salt-master and salt-api are both samr version right ?
16:23 Guest10769 trying to avoid the debian package auto starting
16:24 danieloliveira yes they are
16:24 danieloliveira files delted
16:24 danieloliveira permissions checked
16:24 danieloliveira service salt-api start
16:24 danieloliveira no files created
16:25 danieloliveira same error
16:25 danieloliveira no files recreated I meant
16:25 my10c an other test  : empty /etc/salt/master with only thes line: make sure to restart both salt-master and salt-api
16:25 my10c rest_cherrypy
16:25 my10c port: 8000
16:26 my10c disable_ssl: True
16:26 my10c so use all standard : see if there some configuration that bits you ,,
16:27 woodtablet joined #salt
16:28 danieloliveira now we are talking
16:28 danieloliveira working ok
16:29 my10c ok so some config issue :)
16:29 my10c better :)
16:29 danieloliveira so possible an issue with ssl
16:29 my10c how did you created your cert ?
16:29 danieloliveira possible something has been upgraded and broke it
16:29 my10c i have my own script (from back 1995 and still working :-))
16:29 danieloliveira wow
16:29 roldyx joined #salt
16:30 akhter joined #salt
16:30 roldyx Hola
16:30 danieloliveira but the question is
16:30 danieloliveira if the certificates were wrong
16:30 ablinkin joined #salt
16:30 danieloliveira why was they working?
16:30 my10c i need to make them available on github one of these days ...
16:30 my10c dunno : expired ?
16:30 danieloliveira yes you should
16:30 danieloliveira I created for 5 years
16:30 danieloliveira :)
16:30 danieloliveira it is a testing environment
16:31 my10c hehe i used 25 year... im lazy!
16:31 danieloliveira lol
16:31 my10c ok so now we know its possible cert : put back all config but still disable ssl :and restart : if it still work then its the certs
16:32 danieloliveira ok
16:32 danieloliveira thank you very much
16:35 my10c u bet!
16:36 danieloliveira I put all the config back
16:37 danieloliveira and when I uncomment the line where it is the IP
16:37 danieloliveira breaks
16:39 danieloliveira that is so weird
16:39 sesa joined #salt
16:39 jenastar joined #salt
16:40 my10c IP  line? show me the line and section please
16:40 my10c brb
16:40 danieloliveira rest_cherrypy:
16:41 danieloliveira port: 8080
16:41 danieloliveira host: 10.0.0.110 <---- this line
16:42 danieloliveira but using the public IP
16:43 my10c well the ip MUST be the ip that is on the interface!
16:43 danieloliveira yep
16:43 my10c ifconfig  : and see what ip is available
16:44 my10c letme emulate : on my vm
16:44 danieloliveira I see
16:44 danieloliveira your point
16:46 my10c if you using NAT then is all taken cares :)
16:46 danieloliveira yep
16:46 danieloliveira I am
16:46 danieloliveira cool
16:47 my10c all set :) have fun
16:47 danieloliveira tks again and how that was working previously I have no idea
16:48 dps i have a really dumb question.  is there a way to check if a user exists for templating in jinja?  i can't seem to do this :/
16:48 roldyx Hello, i have a problem with salt-ssh
16:48 roldyx Salt-ssh prueba mine.get prueba2 test.ping
16:49 roldyx Failure deploying thin
16:49 roldyx Checksum miatch
16:49 brotatochip joined #salt
16:50 roldyx Whats means it??
16:51 my10c @dps in the state an user will not be created if : it exist and any of the users value does not change...
16:53 Brijesh1 joined #salt
16:53 pipps joined #salt
16:54 pipps joined #salt
16:55 stanchan joined #salt
16:58 jenastar left #salt
17:07 Fiber^ joined #salt
17:08 akhter joined #salt
17:08 fredrick joined #salt
17:09 nicksloan joined #salt
17:09 ablinkin joined #salt
17:11 amcorreia joined #salt
17:14 shazaum left #salt
17:16 robawt joined #salt
17:16 sp0097 joined #salt
17:18 zmalone joined #salt
17:18 stanchan joined #salt
17:20 akhter joined #salt
17:20 TooLmaN joined #salt
17:21 ablinkin joined #salt
17:23 akhter joined #salt
17:26 akhter joined #salt
17:27 akhter joined #salt
17:27 jenastar joined #salt
17:28 numkem joined #salt
17:31 stanchan joined #salt
17:31 pipps joined #salt
17:35 pipps99 joined #salt
17:36 teryx510 joined #salt
17:37 akhter joined #salt
17:44 systemdave joined #salt
17:45 devopsprosiva joined #salt
17:46 devopsprosiva Hi, Does salt expose the aws instance tags inside an instance?
17:48 ivanjaros joined #salt
17:49 ablinkin joined #salt
17:52 jaybocc2 joined #salt
17:53 akhter joined #salt
17:53 my10c @devopsprosiva can be done in several way
17:53 my10c we use our own baked grain to get the tags
17:53 mapu joined #salt
17:56 devopsprosiva @my10c Do you have an example for a grain to grab the tags?
17:56 pipps joined #salt
17:57 my10c i was about to push it to my github
17:57 my10c give me couple hours ...
17:57 antpa joined #salt
17:57 my10c need to cleanup stuff
17:58 devopsprosiva @my10c Awesome. Thanks!!
17:58 stanchan joined #salt
17:58 Sokel In salt pillar, I use key: | to start doing multiline data. However, when trying to pull from that information with contents_pillar, it gives me "TypeError: must be a string, not OrderedDict". The data in that key has dashes in it. I'm not sure if that's the real issue. Any ideas?
17:59 ablinkin joined #salt
18:00 akhter joined #salt
18:01 domel joined #salt
18:02 dps my10: thank you for replying.  i am trying to check if a user exsts in jinja logic
18:02 domel hi there anyone have any idea how to append data from pillar to existing defaults values pulled from yaml file?
18:02 domel rather than merge
18:02 akhter_1 joined #salt
18:03 domel seems to override values from pillar than append as additions
18:07 domel https://gist.github.com/larry-kulak/d77d62675a88aa8379b3ac68f2a99a05
18:09 nicksloan joined #salt
18:10 my10c @domel : tip for readable
18:10 my10c hosts_allow:
18:10 my10c sshd:
18:10 my10c - '1.1.1.1'
18:10 my10c - '2.2.2.2'
18:10 my10c sendmail:
18:10 ablinkin joined #salt
18:10 my10c - '127.0.0.1'
18:10 my10c nrpe:
18:10 my10c - '1.2.3.4'
18:10 my10c - '5.6.7.8'
18:10 my10c easy on the eyes :)
18:11 domel lol thx ill use that from now on
18:18 keimlink joined #salt
18:19 akhter joined #salt
18:23 ablinkin joined #salt
18:25 pipps joined #salt
18:25 my10c @devopsprosiva you still here ?
18:26 devopsprosiva yeah
18:27 my10c https://github.com/my10c/salt-tools
18:27 my10c quick push
18:27 Jason__ joined #salt
18:27 GreatSnoopy joined #salt
18:27 my10c there are 2 more grains i need to cleanup before i can make it public
18:27 onlyanegg joined #salt
18:27 my10c the dosalt script is my tools : being very lazy :)
18:28 devopsprosiva @my10c You rock!!!
18:28 my10c i put it put there for whoever want it...
18:28 cmarzullo I'm pushing to the mine using a state. What do I need to put so it doesn't register as a change?
18:28 my10c i got tons of helps here! im NO expert ! still learing tons!
18:33 cmarzullo how about. . . what module should I run to stick true or false into the mine. So like I want the mine value myapp_master: true or myapp_master: false
18:34 Jason__ Sorry to be such a noob but I just started using salt.  Is this irc channel the right place to ask for advice on something or is there a community forum somewhere that would be better suited?
18:35 cmarzullo this will work. there's a little traffic on reddit.
18:36 my10c @Jason__  yes
18:36 Jason__ ok, thanks.  I'm trying to run "salt '*' mysql.db_repair" but I'm looking for an all-databases option.  I can't seem to come up with a simple solution.
18:38 danieloliveira Jason are you using grains?
18:38 danieloliveira or mine?
18:38 my10c look there is no option todo all ...
18:40 Jason__ "mine" I think.  Sorry, I just got into it.
18:41 danieloliveira Salt Mine :)
18:41 danieloliveira could you give me a better view about what you are trying to do?
18:42 danieloliveira your database minions have set some kind of role or grain?
18:42 danieloliveira that could be used like
18:42 dezertol there isn't an all db options you'll need to loop a list
18:42 danieloliveira salt -G "roles:db" mysql.db_repair?
18:42 danieloliveira salt -G "roles:db" state.apply mysql.db_repair?
18:42 dezertol there is an undocumented "tables" option -> def db_repair(name,   table=None,   **connection_args):
18:42 dezertol but I don't see any flag for all
18:43 dezertol not undocumented.. I mean its there just not in the example
18:43 my10c yeah loop or write a module to do it ...
18:44 akhter joined #salt
18:44 Jason__ Maybe I'm thinking about it the wrong way.  Could I access the mysql connection info from an arbitrary cmd?
18:45 dezertol typically you'd store the connection info in the pillar
18:45 Jason__ In the end, I'd like to run the command  "mysqlcheck --repair --all-databases -u root -p < mysqlpassword"
18:45 dezertol you can do that.. with cmd.run
18:46 dezertol if that's what you need
18:46 irated joined #salt
18:46 dezertol tho.. I have to admit.. if your database is so sketchy that you need to run salt states to repair it over and over.. you likely have bigger problems
18:48 Jason__ It's not a frequent need at all which is why I don't want to write a module for it.  But it would help if the need arises
18:48 dezertol cmd.run then
18:48 dezertol would be the quick and dirty
18:49 my10c @danieloliveira you still here ?
18:50 danieloliveira yes
18:50 my10c https://github.com/my10c/ssl-tools
18:50 my10c enjoy
18:50 Jason__ Once in a great while I';ll have a xenserver failure which requires a hard reboot.  But then some of the databases on the virtual machines need to be repaired
18:50 lane_ joined #salt
18:51 danieloliveira tks my10c
18:51 danieloliveira pretty cool
18:51 my10c ubet!
18:51 stanchan joined #salt
18:52 wryfi question about shells
18:52 wryfi when we develop our salt states in our vagrants, we are running highstates locally, so they run with bash
18:52 wryfi however, when the same states get deployed to our masters, and run on a schedule on our minions, they appear to use /bin/sh
18:53 wryfi this leads to subtle bugs in our salt states due to shell differences (primarily in cmd.run states)
18:53 wryfi is there any way to force the master-initiated runs to run on the minions with bash instead of sh?
18:53 cmarzullo I believe you can.
18:53 cmarzullo shell
18:53 cmarzullo The shell to use for execution, defaults to the shell grain
18:54 wryfi cmarzullo: where?
18:54 domel https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html
18:54 fracklen joined #salt
18:54 wryfi i'd prefer to not have to specify shell: /bin/bash for every cmd.run state that gets written
18:55 wryfi is there no global setting somewhere?
18:56 * wryfi sighs
18:58 cmarzullo If you paramterize your states it ain't so bad.
18:58 DammitJim I am working with the salt state for mongodb_user
18:58 cmarzullo alternatively check your grains. If your grain is /bin/sh that's what you get. Why are you getting different grain on vagrant vs prod? There must be something missing.
18:59 DammitJim and I am getting an error that seems to have been fixed a Loooong time ago
18:59 DammitJim ValueError: dictionary update sequence element #0 has length 1; 2 is required
18:59 DammitJim https://github.com/saltstack/salt/issues/8933
18:59 saltstackbot [#8933][MERGED] mongodb_user not creating users | This has been an ongoing issue. I posted about it in the mailing list here:...
18:59 DammitJim oh wow
18:59 DammitJim so, I can't use this for now, huh?
18:59 cmarzullo wryfi: salt-call grains.get shell
18:59 wryfi /bin/bash on both vagrant and prod host
19:00 cmarzullo then that is odd.
19:00 domel what about env
19:00 domel does env return bin/sh?
19:00 DammitJim what the heck? so, it's not resolved?
19:01 wryfi nope, $SHELL is /bin/bash for my user and for root
19:02 wryfi in fact, not a single user in /etc/passwd has /bin/sh set as its shell
19:02 cmarzullo when you say '... run on a schedule on our minions' is this through cron? Pillar sheduling?
19:02 wryfi pillar scheduling
19:03 * wryfi thinks /bin/sh must just be the default for cmd.run
19:03 cmarzullo to the source!
19:03 domel https://github.com/saltstack/salt/blob/develop/salt/states/cmd.py
19:04 cmarzullo interstingly cmd.wait defaults to /bin/sh
19:04 domel may want to change branch to version you are using
19:04 Sokel Have you tried setting the SHELL environment variable? You can set environment variables for cmd.run. You can also call your scripts via /bin/bash /path/to/script if that's what you're doing.
19:04 Rumbles joined #salt
19:06 hoonetorg joined #salt
19:07 wryfi Sokel: i'm looking for a generic solution that does not involve setting something in every single cmd.run in my state tree
19:08 wryfi cmd.run appears to default to /bin/sh from the docs/source ... so the bigger question might be why i'm getting /bin/bash in my local vagrant set up
19:09 pipps joined #salt
19:09 * wryfi 's hope that there was be an easy answer has been dashed
19:10 cmarzullo here looks like it defaults to the grain: https://github.com/saltstack/salt/blob/develop/salt/states/cmd.py#L822
19:10 cmarzullo what version you on?
19:11 wryfi oh thanks cmarzullo, i overlooked that line. unfortunately it still doesn't help (shell grain is /bin/bash everywhere). will have to dig further.
19:12 wryfi 2016.3.1
19:13 cmarzullo imo if you require features of a shell, you should declare that and not assume you'll get the right one.
19:14 domel when you run  salt-call --local grains.item shell it returns bin/bash?
19:14 wryfi cmarzullo: it's an issue for other developers who don't grok the subtle differences between sh and bash
19:14 domel on the minion
19:14 wryfi domel: yes
19:20 cmarzullo how about. . . what module should I run to stick true or false into the mine. So like I want the mine value myapp_master: true or myapp_master: false
19:20 DammitJim anybody? mongodb with salt?
19:20 domel dunno if this is related https://github.com/saltstack/salt/issues/32989
19:20 saltstackbot [#32989][OPEN] salt and salt-call do not return the same shell grain | Description of Issue/Question...
19:25 ajw0100 joined #salt
19:25 my10c @DammitJim  : have a super simple pillar/state with mongodb : but no password....
19:26 my10c is highly customized for our own env
19:28 DammitJim my10c, aren't you getting an error when trying to create a user?
19:28 wryfi cmarzullo: yes, that is exactly the issue! nice find!
19:29 cmarzullo credit to domel :)
19:30 wryfi oh, wrong user. yes, thanks domel
19:30 edrocks joined #salt
19:30 wryfi it looks like modifying our upstart script for salt might fix it
19:31 my10c i do not create user!
19:31 my10c i have 3 severs : then one iot set replication : and I am done....
19:32 my10c so password no user
19:33 my10c here is one of the state
19:33 my10c /data/mongodb/setup/setup_mongo.js:
19:33 my10c file.managed:
19:33 my10c - user: 'root'
19:33 my10c - group: 'root'
19:33 my10c - mode: '0644'
19:33 my10c - source: 'salt://mongo/setup_mongo.js'
19:33 my10c - context:
19:33 my10c mongo_servers: {{ mongo_servers }}
19:33 my10c - template: 'jinja'
19:33 my10c - require:
19:33 my10c - file: '/data/mongodb/setup'
19:33 DammitJim yikes
19:33 my10c and the js script
19:34 my10c sleep(500)
19:34 my10c rs.initiate()
19:34 my10c {%- for mongo_server in mongo_servers %}
19:34 my10c rs.add("{{ mongo_server }}")
19:34 my10c {%- endfor %}
19:34 my10c sleep(500)
19:34 my10c cfg = rs.conf()
19:34 DammitJim due
19:34 my10c cfg.members[0].priority = 1
19:34 DammitJim before you get kicked out
19:34 my10c rs.reconfig(cfg, {force: 1})
19:34 DammitJim pastie
19:34 my10c rs.status()
19:34 DammitJim or pastebin or something
19:34 my10c rs.conf()
19:34 my10c nothing fancy : works for us :)
19:35 my10c keep forgeting todo so: in the middle of coding some salt modules :)
19:35 _Cyclone_ joined #salt
19:36 M___ joined #salt
19:39 akhter joined #salt
19:39 Tom______ joined #salt
19:40 jgarr how should I run wheel.key commands via the salt-api? should the tgt be the salt master?
19:40 Tom______ Does anyone have experience in purchasing support for non-Enterprise support?
19:41 jgarr was trying pepper 'master' wheel.key.delete minion but getting u"'wheel.key.delete minion' is not available."
19:41 cmarzullo jgarr: we did it with a webhook to a reactor.
19:42 jgarr cmarzullo: that sounds interesting. I use reactor to delete keys via salt-call but not sure how to do it with a webhook
19:42 Tom______ sorry the was non-Enterprise Salt.
19:43 jgarr cmarzullo: something like this? https://github.com/madflojo/salt-api-reactor-formula
19:44 cmarzullo trying to find the spot where we do it. But pretty sure it's just in the /etc/salt/master file.
19:46 ablinkin joined #salt
19:46 cmarzullo salt/netapi/hook/keyrevoke
19:46 cmarzullo salt/netapi/hook/keyaccept
19:47 cmarzullo jgarr: how we do it is when reprovisioning hardware a first boot will do a curl to remoke any keys with his minion name. install salt. Then curl to accept his new key
19:49 theblazehen joined #salt
19:51 stanchan joined #salt
19:51 jgarr cmarzullo: ya, I'm looking to do the same. Right now I'm doing it via salt-call but I like the hooks idea. I'll get that set up with those examples. Looks easy enough
19:52 ablinkin joined #salt
19:55 akhter joined #salt
19:58 domel you can also use https://docs.saltstack.com/en/latest/ref/configuration/master.html#autosign-file
19:59 ry joined #salt
20:00 dh__ Does anyone know of a way to print jinja variables for debugging/?
20:00 cmarzullo echo {{ var }}: cmd.run
20:00 cmarzullo is my dirty go to. Otherwise I use the test module for more information.
20:01 cmarzullo the dirty version works, but only if it's a string.
20:01 ALLmightySPIFF joined #salt
20:01 dh__ looks like it's a json object, which causes echo to fail
20:02 cmarzullo yeah probably a dictorinary or something.
20:02 dh__ any tips on using test module? im reading now
20:03 win_salt i use the pyobjects renderer, and Cmd.run('echo {}'.format(var)) works
20:03 fannet joined #salt
20:03 cmarzullo I think i've done it a couple of ways. Like doing a quick template to /var/tmp and spittig stuff out.
20:04 my10c did some that modified file during patch
20:04 my10c during test i had teh module write stuff under /tmp
20:05 akhter joined #salt
20:06 sp0097 joined #salt
20:09 dh__ Do you know if I can pass a variable to a jinja template? I have defined it in the salt state but it isn't in the pillar.
20:11 dh__ nvm, found it -- context
20:14 hackel joined #salt
20:15 cmarzullo using salt mine. How do you push arbitratry text into the mine? myhost1: foo myhost2: bar
20:17 stanchan joined #salt
20:21 akhter joined #salt
20:24 cmarzullo it's ugly but you can do a cmd.run: echo lol  and lol will be the mine value.
20:24 cmarzullo seems there should be a better way.
20:28 PerilousApricot joined #salt
20:35 akhter joined #salt
20:38 pipps joined #salt
20:41 pfallenop joined #salt
20:41 sp0097 joined #salt
20:43 devopsprosiva Do we still need to install the salt develop branch to use the ec2 autoscale reactor?
20:45 om joined #salt
20:48 sp0097_ joined #salt
20:54 ablinkin joined #salt
20:55 jenastar left #salt
20:55 ageorgop joined #salt
21:00 raiden joined #salt
21:00 stanchan joined #salt
21:00 Guest6001 I am trying to host the salt cache on apache server...on the master I have created alias for this :
21:01 Guest6001 http://pastebin.com/8ujQjEZL
21:01 Guest6001 now the problem is that I want to display only some files directly which are inside some subfolder
21:01 Guest6001 how do i do that
21:05 pipps joined #salt
21:08 heaje joined #salt
21:09 pipps joined #salt
21:09 ablinkin joined #salt
21:12 cmarzullo didn't know you could serve the cache from apache. Seems odd.
21:14 stanchan joined #salt
21:15 Guest6001 I mean through apache we can share any folder outside its root folder...
21:16 ponyofdeath joined #salt
21:22 cmarzullo sure. but why the minion cache?
21:23 cmarzullo so you can use http urls instead of salt urls
21:26 Guest6001 i need a way to make some file from cache to be available conviniently. so instead of searching through cache it will just be available on the web server
21:26 stanchan joined #salt
21:26 Guest6001 i can't move it to some other folder other that the salt cache otherwise that would have been fine
21:26 Guest6001 and since there are many minions we have many folders in the cache
21:26 Guest6001 do you have a better solution?
21:27 mohae_ joined #salt
21:29 cmarzullo I can't say I grok your use case. In my test saltmaster I only see binary data in the master's minion cache.
21:30 antpa joined #salt
21:30 Guest6001 actually i have some files that I am pushing from minion to the master's cache
21:30 Guest6001 weird requirements i guess..i have to implement though :x
21:31 cmarzullo I see that's a little more clear. You are trying to aggregate files from your minions on the master.
21:32 Guest6001 yeah... and then someone wants to easily access them somewhere
21:32 Guest6001 if you have multiple minions it is hard to open and check every folder
21:33 Guest6001 i can try doing it using reactor and runners but i was just wondering if there was an easy way
21:33 cmarzullo yeah I can see that being an issue. How are you pushing now to the minion cache?
21:33 cmarzullo Or are these files generated by salt for the minions, and they just happen to be layig around.
21:34 cmarzullo in the caceh
21:34 cmarzullo cache
21:34 ablinkin joined #salt
21:35 cmarzullo cp.push?
21:35 Guest6001 yes
21:35 cmarzullo and upload_path doesn't push to a different dir?
21:36 mikea joined #salt
21:36 stanchan joined #salt
21:36 Guest6001 it can only push to master's cache directory
21:36 mikea Can someone help me out really quick
21:36 mikea I'm new to salt and I'm trying to loop some stuff
21:36 cmarzullo https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html#salt.modules.cp.push
21:36 mikea and I'm getting conflicting ids
21:36 mikea http://pastebin.com/sag51jmp
21:36 Guest6001 and the issue is that i am not able to configure apache to find which directory has that file and then use that file
21:37 cmarzullo seems to indicate you can push to an 'upload_path' does that not work?
21:37 cmarzullo I guess it says minionfiles cachedir but their example says /new/path/fstab
21:37 Guest6001 that will upload to some special path in the cache dir
21:37 sagerdearia joined #salt
21:37 Guest6001 but it can not push to some directory like /srv/folder1
21:37 cmarzullo mikea: that's private
21:37 Guest6001 yeah not opening
21:38 Guest6001 damm last week of my internship...i am supposed to finish this :x
21:38 cmarzullo craming IRL :)
21:38 mikea cmarzullo, http://pastebin.com/YRW3VdHv sorry
21:39 cmarzullo mikea: yeah you have conflicting state ids.
21:39 mikea I get that, but how do I change them and specify the right module to run?
21:40 mikea like if I change pkg.installed it changes the functionality of that block, right?
21:41 cmarzullo http://pastebin.com/ESMwG6Tb'
21:41 cmarzullo http://pastebin.com/ESMwG6Tb
21:41 cmarzullo without the trailing quote
21:42 mikea okay so I put them all under their own id
21:42 mikea instead of grouping them under install_beats:
21:42 cmarzullo see the example. the ID is dynamically generated
21:42 cmarzullo beat_package_{{ beat }}:
21:42 mikea yeah, I see
21:42 cmarzullo so first id will be beat_package_filebeat
21:43 cmarzullo oh that's what that first line was?
21:44 cmarzullo I prefer specific state_ids. Makes troublshootin issues a lot better. If you get and error sls id 'install' failed.
21:44 cmarzullo was it the package, file , or service that failed.
21:44 mikea that worked well
21:44 mikea thanks
21:44 cmarzullo your welcome.
21:54 edrocks joined #salt
21:56 ablinkin joined #salt
22:00 beowuff joined #salt
22:02 stanchan joined #salt
22:05 tiwula joined #salt
22:14 PerilousApricot joined #salt
22:21 stanchan joined #salt
22:26 raspy joined #salt
22:26 tawm04 joined #salt
22:27 yidhra joined #salt
22:27 raspy hi all, for salt-cloud we create ec2 instances and have volumes attached/created through salt. If we remove the configs to lets say remove creating a partition or remove the part where we define partitions, will that remove the partitions on the minions as well?
22:29 xbglowx Question about the top file and environments. I noticed that when running salt-call if saltenv is not set it will default to base. The minion never tries any other environment in the top file and fails since it could not find anything that matches in base.
22:29 raspy we do have a schedule on the minions which runs a state.apply every 15 minutes so im worried that if we change the state file on the salt master, if it will also delete those partitions on the minions
22:30 tehsu joined #salt
22:33 onlyanegg joined #salt
22:33 ablinkin joined #salt
22:38 xbglowx Just found this in the docs: "Changed in version 2014.7.0: If no saltenv is specified, the minion config will be checked for a saltenv parameter and if found, it will be used. If none is found, base will be used. In prior releases, the minion config was not checked and base would always be assumed when the saltenv was not explicitly set.
22:38 xbglowx ". I think I need to change my top file base filters
22:38 bluenemo joined #salt
22:39 hackel left #salt
22:42 iggy raspy: salt-cloud/salt.*.cloud doesn't do anything unless you tell it to... you'd have to do a .absent or whatever to get it to remove things
22:44 raspy okay thx iggy so salt doesnt "undo" system level changes if the config is no longer present?
22:44 iggy right
22:44 raspy config in the state file within the master
22:44 raspy okay cool
22:44 raspy thx
22:45 iggy there's always `test=True` if you want to be absolutely sure
22:45 raspy nice ill try that
22:49 ninjada joined #salt
22:52 sxar__ joined #salt
22:54 stanchan joined #salt
22:55 PerilousApricot joined #salt
22:55 sp0097 joined #salt
22:57 danieloliveira joined #salt
22:57 danieloliveira did anybody have problems using reactor+gitfs?
22:58 danieloliveira my reactor config is
22:58 danieloliveira reactor:
22:58 danieloliveira - salt/job/*/ret/*:
22:58 danieloliveira - /srv/salt/reactor/job_ret.sls
22:58 devopsprosiva joined #salt
22:59 danieloliveira my local test environment using vagrant works just fine
22:59 danieloliveira they only difference between both envs is the gitfs
23:00 danieloliveira Gathering reactors for tag salt/job/20160817225227656534/ret/servername
23:00 danieloliveira but nothing happens
23:00 ajw0100 joined #salt
23:02 ninjada joined #salt
23:03 babilen danieloliveira: I typically place reactor files in file_roots and address them with salt://
23:03 babilen (just a sidenote, not necessarily related to your problem)
23:03 babilen Well, I have them in GitFS
23:04 pipps joined #salt
23:04 ablinkin joined #salt
23:06 danieloliveira tks babilen
23:07 danieloliveira not sure if it is related but looks like during the render action the salt master updates the gitfs stuff
23:07 danieloliveira and not sure it breaks anything
23:10 PerilousApricot joined #salt
23:11 babilen I haven't used globbing there before
23:12 danieloliveira reactor is really hard to debug
23:13 om joined #salt
23:16 spuder joined #salt
23:19 spuder_ joined #salt
23:25 ablinkin joined #salt
23:25 agentnoel Is there a way to test if a package is installed before invoking a SLS state?
23:25 PerilousApricot joined #salt
23:25 xbglowx Hi all, how should I setup my top file if I am strictly using only gitfs, with one repo? I want to map master branch to prod and stage to stage. Currently, minions default to base when connecting to saltmasters and never check the stage branch.
23:30 raiden joined #salt
23:30 babilen xbglowx: My recommendation would be to not use environments at all, but configure individual masters for each environment and have them pull different git branches
23:31 Guest94904 whoever was helping me ....just wanted to let you know... i managed to get the salt cache to display only required folders on apache
23:31 Guest94904 had to write a index.php and then got the path of the folder which I wanted :)
23:32 xbglowx babilen ok thanks for the tip
23:33 xbglowx I was trying to follow the salt docs and it is not that straight forward for a beginner. I was hoping to have one management saltmaster environment that could talk to all the other environments and use the branches to push changes
23:34 xbglowx Looks like I would need to either use the environment minion config option or update my cron salt-call to use saltenv. Otherwise, it will use base.
23:35 stanchan joined #salt
23:35 babilen xbglowx: I had nothing by pain with environments (and proper git merging strategies) and gave up on them. The situation is a bit different now that you can whitelist and blacklist branches and whatnot, but in general, I'd just stick to individual masters and explicit branch configuratoin
23:37 xbglowx babilen I am very close to doing what you recommended. Thanks so much for your insight.
23:42 nicksloan joined #salt
23:50 akhter joined #salt
23:54 edrocks joined #salt
23:55 brent__ joined #salt
23:56 iggy danieloliveira: you are putting the actual filesystem path to the reactor sls file, but with gitfs, you have no files on the master
23:56 ajw0100_ joined #salt
23:56 pipps joined #salt

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