Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-04-14

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

All times shown according to UTC.

Time Nick Message
00:09 edrocks joined #salt
00:13 qman__ joined #salt
00:13 onlyanegg joined #salt
00:14 hal58th_ joined #salt
00:23 spuder joined #salt
00:27 spuder_ joined #salt
00:28 Cogent joined #salt
00:32 bowhunter joined #salt
00:38 onlyanegg joined #salt
00:41 flowstate joined #salt
00:45 goal joined #salt
00:47 oida joined #salt
00:51 bltmiller joined #salt
00:52 brianvdawson joined #salt
01:00 cpowell joined #salt
01:02 whatevsz joined #salt
01:04 onlyanegg joined #salt
01:11 edrocks joined #salt
01:13 spuder joined #salt
01:14 spuder__ joined #salt
01:25 antpa joined #salt
01:25 michelangelo joined #salt
01:26 kevinquinnyo long shot here: gtmanfred are you still around?  Remember I asked earlier how I should handle ensuring/fixing percona xtradb clusters, and provided this url as an example of what i need to handle:  http://severalnines.com/blog/how-bootstrap-mysqlmariadb-galera-cluster ?  Well, with a runner, I think the best way for me to handle it is running a script on each minion that just queries it's wsrep status.
01:28 kevinquinnyo But to do that, i think i would need invoke cmd.run or it's friends.  Can I do that from a runner if I have the minion_id?  I want to get the output from each one, then decide what to do based on the current aggregate state of this database cluster, in the runner
01:28 kevinquinnyo if that makes sense
01:29 phx joined #salt
01:30 ivanjaros joined #salt
01:32 gtmanfred yes
01:32 kevinquinnyo the "aggregate state" being one of the many possibilities in that url.   Then i know what to do on which minions, to ensure (or force) that db cluster to be in a good state
01:32 gtmanfred just import salt.client.LocalClient
01:32 gtmanfred and then run
01:33 gtmanfred kevinquinnyo: https://docs.saltstack.com/en/latest/ref/clients/#salt.client.LocalClient
01:33 kevinquinnyo oh is it that easy
01:33 gtmanfred you can use that to target and run all the things
01:33 gtmanfred the LocalClient is what the salt binary uses basically
01:33 catpigger joined #salt
01:33 gtmanfred salt.client.Caller is salt-call
01:33 gtmanfred i forget where the runner client is at
01:34 gtmanfred but yeah, everything is documented in that doc page for all the different clients
01:34 racooper joined #salt
01:34 sagerdearia joined #salt
01:35 kevinquinnyo ok thanks, let me review this
01:35 gtmanfred and with that, I am out for the evening, good luck kevinquinnyo
01:35 kevinquinnyo i think this is really easy now
01:35 gtmanfred yar :)
01:35 kevinquinnyo thanks man
01:35 gtmanfred no problem :)
01:38 capricorn_1 joined #salt
01:39 kevinquinnyo omg that's awesome
01:39 gtmanfred it is pretty nifty.  Nice and modular
01:40 gtmanfred also exposed through an api if you wanted...
01:40 gtmanfred https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html
01:40 gtmanfred that can hit all the different clients
01:40 gtmanfred aight, now I am out o/
01:40 kevinquinnyo o/
01:41 flowstate joined #salt
01:46 cyborg-one joined #salt
01:46 TheoSLC joined #salt
01:53 akhter joined #salt
01:56 sjmh joined #salt
02:02 brotatochip joined #salt
02:06 nZac joined #salt
02:06 quasiben joined #salt
02:09 onlyanegg joined #salt
02:15 i90rr joined #salt
02:16 blu_ joined #salt
02:34 iggy kevinquinnyo: it's a total pita
02:34 tristianc joined #salt
02:36 iggy I was considering going the custom module route and using publish to get status
02:36 esharpmajor joined #salt
02:37 hightekvagabond joined #salt
02:40 iggy if you get something usable, it would be awesome to share (I wouldn't mind rolling it into a formula)
02:40 flowstate joined #salt
02:41 Miouge_ joined #salt
02:48 brotatochip joined #salt
02:50 evle joined #salt
02:52 nethershaw joined #salt
02:53 sagerdearia joined #salt
03:04 k_sze[work] joined #salt
03:06 antpa joined #salt
03:09 beardedeagle joined #salt
03:12 jalbretsen joined #salt
03:12 cpowell joined #salt
03:13 edrocks joined #salt
03:17 nZac joined #salt
03:18 barajasfab joined #salt
03:19 antpa joined #salt
03:38 brotatochip joined #salt
03:39 flowstate joined #salt
03:42 beardedeagle joined #salt
03:43 beardedeagle joined #salt
03:44 my50c joined #salt
03:53 armguy joined #salt
04:02 nZac joined #salt
04:02 PeterO joined #salt
04:07 beardedeagle I'm not entirely sure include_rejected=include_rejected, include_denied=include_denied does anything for wheel.key.accept
04:07 josuebrunel joined #salt
04:08 favadi joined #salt
04:09 cyborg-one joined #salt
04:18 garphy`aw joined #salt
04:20 sjmh joined #salt
04:27 bltmiller joined #salt
04:28 notnotpeter joined #salt
04:28 mackripe_ joined #salt
04:28 watersoul_ joined #salt
04:29 nebuchad` joined #salt
04:29 notnotp__ joined #salt
04:30 AndreasLutro` joined #salt
04:30 mrtrosen_ joined #salt
04:30 Lionel_Debroux joined #salt
04:31 fhh joined #salt
04:31 cberndt joined #salt
04:31 SamYaple joined #salt
04:31 saltsa joined #salt
04:31 stn_ joined #salt
04:31 quarcu_ joined #salt
04:32 tristianc joined #salt
04:32 samed joined #salt
04:32 tedski joined #salt
04:32 samed joined #salt
04:33 arif-ali joined #salt
04:33 djinni` joined #salt
04:34 cyberviking joined #salt
04:35 Shirkdog joined #salt
04:36 jacksontj joined #salt
04:37 justanotheruser joined #salt
04:38 `chris joined #salt
04:38 tkeith joined #salt
04:39 canci joined #salt
04:39 flowstate joined #salt
04:52 kevinquinnyo iggy: sorry i missed your msg, are you talking about percona-xtradb ?
04:53 kevinquinnyo i was working on something else, but i'm pretty confident i can create a "runner" that will do it's best to ensure health on a percona-xtradb cluster
04:54 kevinquinnyo if i make it work, i will definitely share it
04:56 armguy joined #salt
05:00 cyborglone joined #salt
05:03 nZac joined #salt
05:04 brianfeister joined #salt
05:06 sauvin joined #salt
05:07 favadi joined #salt
05:13 akhter joined #salt
05:13 cpowell joined #salt
05:15 kawa2014 joined #salt
05:15 edrocks joined #salt
05:16 source47 joined #salt
05:17 source47 hi guys, i am having some problems connecting to salt-api
05:17 source47 i keep getting unauthroized
05:17 source47 i am using external_auth and trying a login from my local system
05:20 beardedeagle can you gist the external auth part of your master config? and your salt-api configuration?
05:20 beardedeagle also did you create the local user
05:20 beardedeagle set its password
05:20 beardedeagle hit the login endpoint first
05:20 beardedeagle so forth
05:22 source47 beardedeagle: i am using vagrant, so i set a password for my vagrant user. i checked independantly and the password works to login to the machine via ssh
05:22 beardedeagle ok so local user is present and can auth. whats your configs look like?
05:22 source47 master gist https://gist.github.com/developerinlondon/6e8b898d1c8ed1cddbdeec057b236705
05:23 source47 gist for curl command https://gist.github.com/developerinlondon/e6febbc94e1e74b13f49b629b9468176
05:23 beardedeagle are you hitting /login to get your token first?
05:23 beardedeagle it's a token auth'd api
05:23 source47 well according to the above curl, thats what i thought i am doing there?
05:24 beardedeagle looking
05:25 impi joined #salt
05:26 beardedeagle hrm, everything looks correct except the indent on your - .*
05:26 source47 good point. let me try changing that
05:27 source47 that was it thanks!
05:27 beardedeagle np
05:27 teatime it's not an error
05:28 teatime (also yamllint is dumb and it makes me sad)
05:28 beardedeagle agreed
05:31 beardedeagle looks like I am going to have to take my salt-api cli app public early to get extra eyeballs on it. reimplementing salt-key is having some unexpected issues.
05:33 cyberviking_ joined #salt
05:40 flowstate joined #salt
05:49 msn joined #salt
05:50 punkoivan joined #salt
05:53 Rajan joined #salt
06:02 mackripeum joined #salt
06:02 tristianc_ joined #salt
06:02 joren_ joined #salt
06:02 _workthrick joined #salt
06:03 TTimo_ joined #salt
06:03 cwright_ joined #salt
06:04 bantone_ joined #salt
06:04 Sacro_ joined #salt
06:04 iggy__ joined #salt
06:04 DaveQB14 joined #salt
06:05 riftman1 joined #salt
06:05 jY- joined #salt
06:05 sarlalian_ joined #salt
06:05 kidneb_ joined #salt
06:05 Heartsbane_ joined #salt
06:05 txmoose_ joined #salt
06:05 BogdanR_ joined #salt
06:05 hlub joined #salt
06:06 rideh joined #salt
06:06 RandyT_ joined #salt
06:06 izrail_ joined #salt
06:06 Mate joined #salt
06:06 Mate joined #salt
06:06 dunz0r_ joined #salt
06:07 garphyx joined #salt
06:08 winterblack joined #salt
06:08 SpX joined #salt
06:08 cro_ joined #salt
06:09 [BNC]aboe joined #salt
06:09 M-MadsRC joined #salt
06:09 M-MadsRC joined #salt
06:09 debian112 joined #salt
06:10 intr1nsic joined #salt
06:10 mavhq joined #salt
06:10 ablemann joined #salt
06:10 Sketch joined #salt
06:10 punkoivan joined #salt
06:11 antpa joined #salt
06:11 twiedenbein joined #salt
06:12 ajolo joined #salt
06:13 arnaud joined #salt
06:13 asoc joined #salt
06:14 Laogeodritt joined #salt
06:14 minesskyline joined #salt
06:14 catpigger joined #salt
06:14 kawa2014 joined #salt
06:15 afics joined #salt
06:15 cyberviking_ joined #salt
06:16 izibi joined #salt
06:16 davisj joined #salt
06:17 dayid joined #salt
06:17 dayid joined #salt
06:17 bbradley joined #salt
06:18 danemacmillan joined #salt
06:19 supermike joined #salt
06:19 linovia joined #salt
06:19 ajw0100 joined #salt
06:20 rdas joined #salt
06:20 cberndt joined #salt
06:21 pid1 joined #salt
06:21 joshin joined #salt
06:21 joshin joined #salt
06:21 MK_FG joined #salt
06:21 dean|away joined #salt
06:22 ivanjaros joined #salt
06:23 djinni` joined #salt
06:25 antonw joined #salt
06:28 ribx joined #salt
06:29 OliverMT joined #salt
06:31 mowntan joined #salt
06:32 mowntan joined #salt
06:32 KermitTheFragger joined #salt
06:33 analogby1 joined #salt
06:35 favadi joined #salt
06:37 ToeSnacks joined #salt
06:44 msn how do i load a file from pillar
06:45 msn I have dev/qa hosts which are using self signed SSL certs I want to obtain the certs/keys from pillar so that each host only gets itsown
06:46 AndreasLutro msn: do the certs need to be in git?
06:47 msn preferably with the rest of the salt
06:47 msn the git access is well controlled  so not an issue there
06:47 averell joined #salt
06:48 AndreasLutro you have two options, convert them to ascii and add them to your existing pillars, or use ext_pillar file_tree, which means you need to configure them separate from your other pillars and it won't work with gitfs
06:49 msn well they are already in my existing pillar what i was asking was How do i access them i mean what reference variable to use
06:50 gazarsgo joined #salt
06:51 aljosa joined #salt
06:51 yawniek joined #salt
06:52 mattl joined #salt
06:53 brianfeister joined #salt
06:55 AndreasLutro erm
06:55 AndreasLutro have you read the docs? https://docs.saltstack.com/en/latest/topics/pillar/
06:56 msn that one i read a few times I am using it too
06:56 msn it tells how to get a dict variable, how to get a file which is not n any variable just a part of pillar
06:57 felskrone joined #salt
06:57 msn thanks though i will hunt more sure there must be an option
07:00 dyasny joined #salt
07:03 al joined #salt
07:03 AndreasLutro msn: that's all pillars are, a dict of variables
07:03 AndreasLutro you can't get a single file from the pillars
07:03 AndreasLutro only a single variable
07:03 msn yeah i thought so, just wondering how i can work around that :)
07:03 AndreasLutro you can't
07:04 simonmcc joined #salt
07:04 mavhq speaking of importing pillars, can I use a script to generate some pillar data in yaml format and use some kind of include statement add it to an existing pillar? Or do I need to merge the files beforehand?
07:04 JonGretar joined #salt
07:06 sfz- joined #salt
07:07 illern joined #salt
07:13 skrobul joined #salt
07:13 teatime you can have a script put yaml data directly into pillar_roots dir.  or, you can have a scrit put yaml/json/etc. data to some random file, and slurp it into pillar w/ jinja.  or, you can write an ext_pillar, which isn't hard.  or yes, I believe there is an include in pillar that mirrors the sls include for states.
07:13 ivanjaros joined #salt
07:13 mavhq thanks, will go hunting
07:14 cpowell joined #salt
07:15 bbradley joined #salt
07:16 Salter joined #salt
07:16 cyberviking joined #salt
07:16 Salter Hey guys, how can i write a salt state that will do " pm2 start server.js -n app" ?
07:17 teatime I dunno what that command does.  salt can run arbitrary shell commands, though, so I'd have to say yes.
07:17 josuebrunel joined #salt
07:17 Salter yes but i need to do it in a state pm2.sls
07:18 kawa2014 joined #salt
07:18 edrocks joined #salt
07:21 teatime Salter: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html
07:22 slav0nic joined #salt
07:26 jhauser joined #salt
07:31 honestly urgh is there no way to copy files using the file states and preserve the file mode?
07:32 honestly oh there is preserve but it doesn't exist for file.recurese it seems
07:36 ravenx joined #salt
07:36 ravenx using the client acl, i know i can allow users to run .sls files for states
07:36 ravenx how can i allow them to run modules
07:36 ravenx like supervisord?
07:40 flowstate joined #salt
07:42 dmaiocchi joined #salt
07:44 Edgan joined #salt
07:47 slav0nic joined #salt
07:48 akhter joined #salt
07:52 Obrit joined #salt
07:52 dmaiocchi joined #salt
07:55 geomacy joined #salt
07:57 Rumbles joined #salt
07:58 Salter Is it the right way to write it? http://paste.ubuntu.com/15825121/
07:58 Salter salt-master gets stuck when i state.apply with it
07:59 impi joined #salt
07:59 pjs joined #salt
08:01 ronnix joined #salt
08:05 vivek joined #salt
08:05 Guest24972 hi
08:06 Guest24972 please tel how to escape special character in State file
08:06 Guest24972 ++++++++++++++
08:06 Guest24972 file.append:
08:06 Guest24972 - text:
08:06 Guest24972 - "export VAULT_ADDR=https://{{ pillar['vault_details']['vault_advertise_addr']"
08:06 Guest24972 ++++++++++++++++++++++
08:07 Guest24972 m getting tthis error :  Rendering SLS 'prod:vault' failed: Jinja syntax error: expected token 'variable_end', got 'string'; line 26
08:07 Guest24972 please suggest ..
08:13 ravenx my client acl system doesn't seem to be working
08:14 bryguy joined #salt
08:14 tyler-baker joined #salt
08:14 ravenx i am running salt-master as a 'salt-user'
08:14 ravenx and i have set the acl such taht salt-user can only run test.ping
08:14 ravenx but i noticed i can run cmd.run as well
08:15 ravenx but if i use the client_acl_blacklist, i cannot run cmd.run AND test.;ing
08:23 Rumbles joined #salt
08:24 keimlink joined #salt
08:25 berto- joined #salt
08:28 s_kunk joined #salt
08:28 kbaikov joined #salt
08:30 lero joined #salt
08:32 salty joined #salt
08:32 salty Hey, is it the right way to run this command? http://paste.ubuntu.com/15825392/
08:32 salty i want to run cd /optimove/gateway && pm2 start server.js -n gateway
08:32 salty sorry cd /code/gateway && pm2 start server.js -n gateway
08:34 SheetiS joined #salt
08:39 ggoZ joined #salt
08:41 SheetiS1 joined #salt
08:41 flowstate joined #salt
08:42 brianfeister joined #salt
08:43 froztbyte salty: use the `cwd` parameter of https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.run
08:43 N-Mi joined #salt
08:46 kaictl joined #salt
08:46 LondonAppDev joined #salt
08:47 salty thanks. my issue is that its trying to run this command as script. its actuall running /bin/bash cd /code/gateway &&....
08:51 dgutu joined #salt
09:01 teatime grr why did Guest24972 leave
09:02 teatime if there's one thing Jinja does well, it's string quoting.
09:02 teatime ahh, that was vivek.
09:08 ronnix joined #salt
09:12 antpa joined #salt
09:15 cpowell joined #salt
09:18 geomacy joined #salt
09:19 edrocks joined #salt
09:20 favadi joined #salt
09:29 Ryan_Lane joined #salt
09:30 ivanjaros3916 joined #salt
09:31 antonw joined #salt
09:32 subsignal joined #salt
09:32 josuebrunel joined #salt
09:32 VSpike_ joined #salt
09:33 NV joined #salt
09:33 tristianc_ joined #salt
09:33 pmcg joined #salt
09:34 R0N joined #salt
09:35 ribx joined #salt
09:37 hlub joined #salt
09:37 OliverMT joined #salt
09:38 rrei joined #salt
09:38 rrei hi
09:38 gazarsgo joined #salt
09:38 Cottser joined #salt
09:39 foundatron joined #salt
09:39 devtea joined #salt
09:39 mrtrosen joined #salt
09:39 rrei I'm trying to use the stateconf renderer to write my sls files, and I'm starting off with a very simple file, and using state.show_sls to inspect what the renderer produces
09:40 jY joined #salt
09:40 ToeSnacks joined #salt
09:40 rrei however, I get a File "/usr/lib/python2.7/dist-packages/salt/state.py", line 647, in _gather_pillar     self.opts['environment'], KeyError: 'environment'
09:40 gnord joined #salt
09:40 linovia joined #salt
09:40 rrei using version 2015.8.8.2 btw
09:41 rrei searched google and found nothing. any ideas?
09:41 mattl joined #salt
09:42 cro_ joined #salt
09:42 Guest56680 joined #salt
09:42 terratoma joined #salt
09:45 ravenx joined #salt
09:45 ravenx how can i file.managed a directory
09:45 ravenx i just need to write that part so that i can have a 'watch' part in one of my states
09:45 fredvd joined #salt
09:45 ravenx essentially, i want to see if my directory changes, if so, i run gulp deploy
09:45 ravenx file.managed doesnt' work as it is a dir
09:45 joshin joined #salt
09:45 joshin joined #salt
09:45 ravenx file.recruse only does it from a salt:// remote soource.
09:46 sfz- joined #salt
09:46 patarr joined #salt
09:46 sauvin joined #salt
09:47 alvinstarr joined #salt
09:47 JonGretar joined #salt
09:47 teatime ravenx: ok, so... you can manage a directory, however changes to the files in the dir (that happen outside of salt, for example) != changes to the directory state, and so won't trigger the requisites
09:48 teatime ravenx: however, if you can have salt manage the entire contents of the directory, then it will work.
09:48 ravenx how can i get salt to manage the entire contents of the dir?
09:50 ravenx that makes sense though.  the first point.  so outside of salt meaning on git, no?
09:50 ravenx only if i git pull will salt detect the changes?
09:51 teatime here is an example, of how to enforce a directory is empty except for state-managed files (I have this example already, and it's similar to what you want)
09:51 teatime http://paste.debian.net/plain/432685
09:52 ravenx weird.  which version of salt do you use that has the file.direcotry?
09:53 teatime ravenx: if you manually git pull and it changes files in the directory, no salt will not detect the changes / trigger requisites.  Only if you are using a state to do the git checkout, and there's a relationship between that state and the directory state, will it notice the git pull causes changes and trigger the requisites.
09:53 bbradley joined #salt
09:53 teatime ravenx: *shrug* it's been in for at least a while?
09:54 fhh joined #salt
09:54 ravenx ah i see. i was looking at the file module
09:54 ravenx instead of file state doc.
09:54 felskrone joined #salt
09:54 k_sze[work] joined #salt
09:55 teatime basically, salt doesn't watch things like files, directories, IP addrs, etc. and trigger watches/requisites based on them.
09:55 k_sze[work] left #salt
09:55 ravenx then what does it do
09:55 teatime it watches *other states* for changes, and triggers watches etc. based on them.
09:55 teatime if you don't have a state to manage something, you can't watch it from another state.
09:55 ravenx doesn't your example show that you have a file.directory that salt manages
09:55 ravenx and if a file gets an update, it will detect a change?
09:55 ravenx ah wait
09:55 teatime understand the distinction between the file.directory state, and the directory it causes to come into existence
09:55 teatime 2 different things
09:56 ravenx so if a user uses vim to edit things, in that dir, salt does not detect it?
09:56 k_sze[work] joined #salt
09:56 teatime so, if you don't have a state to manage a given file, you can't watch that file from a directory or anything else.
09:56 ravenx only if a state in the .sls file changes it?
09:56 teatime and if your file state doesn't trigger changes, it won't cause requisites to trigger, even if you manually change the file.
09:57 antpa joined #salt
09:57 teatime ravenx: exactly.
09:57 ravenx teatime: i do have git state managing this directory in question.
09:57 ravenx and i want to use file.directory to watch that the next git pull chagnes something in there
09:57 ravenx that is the correct way to go about using it, no?
09:57 teatime I don't understand the bit about the git pull
09:57 teatime could you be clearer?
09:58 ravenx the git.latest state
09:58 teatime ah yes that should work fine
09:58 ravenx i have that, and everytime i highstate, it pulls changes (if there is any upstream)
09:58 teatime what are you wanting to be detected automatically / happen automatically?
09:58 ravenx within my repo, i have a folder called assets/
09:58 ravenx assets/ sometimes have new changes or sometimes not.
09:58 teatime oh right, you said you need to run a grunt build or something like that?
09:59 ravenx i want to run a `build` command based on if assets/ (within my git.latest repo) changed
09:59 teatime after checkout
09:59 ravenx yes
09:59 ravenx a grunt build
09:59 ravenx if and only if assets/ WITHIN the repo changes
09:59 ravenx and the repo is maanged via git.latest state.
09:59 ravenx i watn to hook a file.directory managed on that directory after git cloning.
09:59 teatime you need to just make a state that does your git pull, and then a cmd.run or whatever state that does watch_in on the git.latest state, to run your build command
10:00 teatime it will run any time the git.latest pulls changes
10:00 ravenx oh, so all that can be condensed under a 'git.latest'?
10:00 bbradley joined #salt
10:00 teatime you can't separately watch for changes to files salt doesn't manage, but you can make your build script smart enough to not update files that don't need to be probably
10:01 ravenx by manage, do you mean file.managed, or as long as it is under a salt state command like git.latest, i am good.
10:01 teatime you need to grunt build anytime git.latest causes *any* changes (not just changes in assets/)
10:01 teatime I can't think of an easy way to do otherwise, right off
10:03 ravenx yes, i would like to grunt build any time git.latest causes changes .
10:03 ravenx but iw ant to be more specific:
10:03 ravenx within the repo, there is that assets/ folder.
10:03 ravenx well it's not realyl a grunt build
10:03 ravenx a more customized one just for public/
10:03 teatime I understand that's what you want.
10:03 teatime I do not know of an easy way to do that, right off.
10:03 ravenx ah okay
10:03 teatime I can think of a couple of hacky ways.
10:04 ravenx that probably will make my salt.sls grow
10:04 teatime btw, this is the requisite documentation, for reference:  https://docs.saltstack.com/en/latest/ref/states/requisites.html
10:04 ravenx i rather stick to normal methods
10:04 ravenx teatime: thanks a bunch, teatime
10:04 teatime lol.
10:04 teatime ok.
10:04 ravenx cuz hacky methods
10:04 ravenx gonna get me in shit.
10:05 teatime ravenx: can you think of any way to run a command to determine whether or not the buidl needs to be done?
10:05 ravenx a diff, probably
10:05 teatime like, outside of salt, if you wanted to write a shell function that prints 'needs updating?' or 'up-to-date.', could you
10:05 ravenx cuz if i can avoid rebuilding, it shaves off like 10 seconds from my deploy time.
10:06 ravenx teatime: that's one hacky method, hahaha
10:06 ravenx that way i can use cmd.run with "onlyif"
10:06 ravenx or 'unless'
10:06 teatime because cmd.run has unless: and onlyif: arguments... you pass a command to onlyif:, it runs it, and then the main command is only run if the onlyif command returned ture.
10:06 teatime *true
10:06 teatime yes :)
10:06 teatime heh, that's not very hacky.  I had much uglier methods in mind :)
10:08 Hydrosine joined #salt
10:10 ravenx hahaha
10:10 ravenx good call, i will tinker around with that.
10:14 cro_ joined #salt
10:19 Nils- joined #salt
10:21 foundatron joined #salt
10:23 LondonAppDev__ joined #salt
10:26 AndreasLutro does anyone have an overview of how much of salt-cloud relies on the default salt-bootstrap script?
10:29 chrismoos joined #salt
10:29 cliffstah joined #salt
10:30 lazybear joined #salt
10:30 Gabemo joined #salt
10:30 ronnix joined #salt
10:30 brianfeister joined #salt
10:31 pmcnabb joined #salt
10:31 liskl joined #salt
10:33 feld joined #salt
10:33 feld joined #salt
10:39 LondonAppDev joined #salt
10:56 amcorreia joined #salt
10:57 salty_ joined #salt
10:57 salty_ Hey, getting this error when using git.sls
10:57 salty_ error: Your local changes to the following files would be overwritten by merge:                 server.js
10:57 salty_ im using force_clone: True
10:57 salty_ error: Your local changes to the following files would be overwritten by merge:                 server.js               Please, commit your changes or stash them before you can merge.               Aborting
10:58 salty_ I want it to close anyways, how can i do that?
11:00 rrei joined #salt
11:01 rrei hi again
11:01 rrei i've figured out my earlier problem to some extent
11:01 rrei so here's the description
11:01 rrei of what i think is happening
11:02 rrei I have {% set password = salt.pillar.get('users:fabamaq:password', 'asf123') %}
11:02 rrei and the problem is that {{ password }} does not contain a string
11:02 rrei but instead it contains a function caller object
11:02 AndreasLutro use salt['pillar.get'] instead
11:02 rrei <function caller at 0x7fa3dd2c6b90>
11:02 anandnevase joined #salt
11:02 AndreasLutro salt.pillar.get is unreliable in my experience
11:02 rrei the result is the same
11:03 AndreasLutro mmmm that should be impossible
11:03 AndreasLutro I'd double check if I were you
11:04 rrei yes, I'm doing that right now
11:04 rrei thanks for the tip
11:04 rrei I think this is working correclty now
11:04 rrei I thought salt.<module>.<function> was equivalent to salt['<mod>.<func>']
11:05 rrei I'm almost sure I've read in the docs that the two forms were equivalent
11:05 rrei apparently they're not
11:05 AndreasLutro like I said, in my experience it's unreliable
11:05 rrei yes, and you're absolutely right
11:05 rrei thanks a lot ;)
11:06 rrei they should be equivalent, because the dot notation is much nicer imo
11:07 teatime the dot one is newer-ly available, I think.
11:09 teatime rrei: if you like, you can make a file like this  http://paste.debian.net/plain/432696  and then import from it like this:  {% from util.jinja import pget, gget %}
11:10 rrei nice!
11:12 rrei thank you, that's a great idea :)
11:12 bbradley joined #salt
11:12 teatime I wish jinja would let you do {% import 'util.jinja' %} and get everything imported... #pocoo just called me names for suggesting that idea was anything short of retarded, though.
11:12 teatime they also seemed to have some animosity toward salt, heh.
11:13 rrei that's strange, I'd guess that salt is a major force driving use of jinja, and they should support it and like it, no?
11:13 rrei weird
11:14 AndreasLutro wut
11:15 quasiben joined #salt
11:15 Guest79 joined #salt
11:17 salty_ Hey, got this problem when trying to pull from git repository
11:17 salty_ error: Your local changes to the following files would be overwritten by merge:                 server.js               Please, commit your changes or stash them before you can merge.               Aborting
11:17 salty_ using states
11:17 salty_ anyone got an idea?
11:17 AndreasLutro it is what it says
11:19 rrei your repo is not in a clean state
11:19 rrei you have uncommitted local changes
11:19 teatime salty_: from glancing at the docs, you probably want force_reset instead of force_clone
11:19 rrei that would be lost if it were to merge
11:20 teatime (or both)
11:20 rrei {% set password = salt['pillar.get']('users:fabamaq:password', '123') %}
11:20 salty_ ill try
11:21 Ashald joined #salt
11:21 rrei okay, this now gets my pillar data correctly
11:21 rrei but
11:21 rrei {% set hashed_password = salt['shadow.gen_password'](password) %}
11:21 rrei this does not generate a hashed password, it fails
11:21 salty_ @teatime it doesn't help.
11:21 edrocks joined #salt
11:22 rrei forget it, I think i'm accidentally passing an integer to gen_password
11:22 rrei will check further
11:22 Hydrosine joined #salt
11:22 rrei apologies for spamming the channel
11:22 teryx510 joined #salt
11:25 akhter joined #salt
11:32 evidence joined #salt
11:32 quasiben1 joined #salt
11:32 hlub I just realized that when publishing something via mine, it is possible to bruteforce values from pillar.
11:33 teatime hlub: hmm?
11:36 paolo_ joined #salt
11:36 hlub for instance, if there is a private key stored in pillar in some_private:key. Then just iterate over all possible keys: salt-call mine.get 'some_private:key:<varying prefix>*' published_function pillar
11:37 teatime pillar data shouldn't exist in mine unless you put it there?
11:37 teatime and if you put sensitive data in mine, you should be aware that by default all minions can access all mine data for all minons (but this can be restricted if you wish)
11:38 salty_ Hey, trying to use git.sls to update a repository gets me this error:
11:38 salty_ error: Your local changes to the following files would be overwritten by merge:                 server.js               Please, commit your changes or stash them before you can merge.               Aborting
11:38 teatime hlub: or am i missing something?
11:38 hlub pillar is not there but you can query with pillar data.
11:38 salty_ i am using force_clone
11:39 teatime hlub: hrm, well, you can only get pillar data for the local minion that way; normally a minion can see all of its pillar data anyway.  e.g., you could just do `salt-call pillar.items` instead.
11:40 teatime hlub: so, are you in a restricted configuration where you're not normally allowed to run pillar.items etc., but you are allowed to run mine.get?
11:40 teatime or am I still missing something?
11:40 iceyao joined #salt
11:41 hlub teatime: yes you are
11:41 kbaikov joined #salt
11:44 hlub teatime: if you publish any function in mine. Then any other minion can make a mine query get the data. It does not matter here what the data is. The point is the way in which you choose, who is returning the data.
11:45 teatime I beleive I get it now.
11:45 hlub If I say that I want to query some data from minions whose pillar contains some_private:key:<some key data> and it returns something, then I know the key.
11:46 teatime I notice pillar.get says "Note that all pillar matches, whether using the compound matching system or the pillar matching system, will be exact matches, with globbing disabled.", I wonder if that was related in some way.  doesn't prevent the issue, though.
11:47 hlub I just tested with version 2015.8.8 and was able to use globbing.
11:47 teatime even worse, then.
11:47 hlub furthermore, the documentation of mine.get lists options like pillar and pillar_pcre.
11:49 teatime sounds like a CVE-to-be.  sorry for being dense hlub.
11:52 hlub teatime: btw, your nick name reminds me of a book written by Terry Pratchett, and was just wondering whether you got inspiration from there. :)
11:52 teatime hlub: /whois me
11:53 flowstate joined #salt
11:53 kawa2014 joined #salt
11:53 salty_ Hey, getting this error when using git.sls
11:53 salty_ error: Your local changes to the following files would be overwritten by merge:                 server.js               Please, commit your changes or stash them before you can merge.               Aborting
11:54 salty_ anyone have an idea how to fix it?
11:54 hlub teatime: jeah, got my answer :D
11:54 slav0nic salty_, revert local changes
11:54 salty_ what do you mean?
11:55 slav0nic salty_, check git status, you have local changes in repote repo clone or you can try use force_checkout: True
11:56 teatime salty_: run `git reset --HARD head` (will discard all local changes!), or the salt equivalent, in the repo.
11:56 teatime salty_: yeah; have you tried all 3 of force_{checkout,clone,reset}
11:56 salty_ yes i did try it...
11:56 slav0nic salty_, before teatime dont forget do git diff for chack what is was really changed)
11:56 LondonAppDev joined #salt
11:57 slav0nic *recommendation
11:57 teatime salty_: all 3 together?
11:57 salty_ no
11:57 salty_ should i do all 3 toghter?
11:57 slav0nic `_checkout` will be sufficient
11:58 salty_ it doesn't work ..
11:58 slav0nic yo use git.latest?
11:58 salty_ yes
11:58 akhter joined #salt
12:00 salty_ http://paste.ubuntu.com/15828322/
12:01 slav0nic maybe force_fetch: True
12:01 salty_ tried that too
12:03 teatime there's always https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.git.html#salt.modules.git.reset if all else fails.
12:03 slav0nic salty_, ok, reset it manually) like `git checkout .` or via hard reset
12:04 salty_ I can't do that. the whole point of this project is automation. i need it to work
12:04 salty_ i need it to work via states
12:05 teatime you can use modules in states
12:05 flebel joined #salt
12:05 salty_ what line to add there?
12:05 slav0nic salty_, look like someone changed server.js file on server manually ;)
12:06 rylnd joined #salt
12:06 hlub I tested mine.get a bit more. It seems that globbing is not working but pillar_pcre option allows regex matches.
12:07 salty_ slav0nic i want to apply changes from the git
12:07 teatime salty_: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html
12:07 arif-ali joined #salt
12:07 renoirb_ joined #salt
12:08 watersoul joined #salt
12:09 thebwt joined #salt
12:09 intr1nsic joined #salt
12:10 SubOracle joined #salt
12:10 mrtrosen joined #salt
12:10 kaictl joined #salt
12:11 stooj joined #salt
12:11 crashmag joined #salt
12:12 M-MadsRC joined #salt
12:14 \ask joined #salt
12:14 Mate joined #salt
12:16 mackripe_ joined #salt
12:16 iggy joined #salt
12:17 dgutu joined #salt
12:17 Rumbles joined #salt
12:18 kawa2014 joined #salt
12:18 impi joined #salt
12:18 titilambert joined #salt
12:18 kows joined #salt
12:19 dayid joined #salt
12:19 dayid joined #salt
12:19 brianfeister joined #salt
12:22 akhter joined #salt
12:24 s_kunk joined #salt
12:25 jY joined #salt
12:27 eseyman joined #salt
12:29 rdas joined #salt
12:33 MadHatter42 joined #salt
12:33 SheetiS joined #salt
12:35 fhh joined #salt
12:36 Freek joined #salt
12:39 numkem joined #salt
12:39 OliverMT joined #salt
12:41 newjersey joined #salt
12:41 danemacmillan joined #salt
12:42 smakar joined #salt
12:46 punkoivan joined #salt
12:50 DammitJim joined #salt
12:51 Heartsbane joined #salt
12:51 Heartsbane joined #salt
12:53 impi joined #salt
12:54 toastedpenguin joined #salt
12:55 teryx510 joined #salt
13:02 sab3r joined #salt
13:03 systeem joined #salt
13:03 rrei sorry guys, again having trouble with jinja
13:03 rrei i have
13:04 rrei {% set raw_password = "123" %}
13:04 rrei {% set hashed_password = salt['shadow.gen_password'](raw_password) %}
13:04 rrei this gives me an error because the 'raw_password' variable is passed to shadow.gen_password as an integer
13:04 babilen heh
13:05 rrei I tried using the |string filter
13:05 rrei no effect
13:05 mapu joined #salt
13:05 babilen That would have been the first thing I tried also
13:06 babilen (even though it should be string already)
13:06 rrei yeah, that's my reasoning too, but it is passed as an integer to gen_password, which only deals with strings
13:07 rrei I know I could just change the password to something that is unequivocally a string, like abc123, but still I would like to know how to work around this for knowledge's sake
13:08 babilen I have to think of PHP for some reason
13:08 AndrewPashkin joined #salt
13:08 rrei ?!?
13:08 babilen (PHP does "magic" conversions/typecasts all the time)
13:09 ronnix joined #salt
13:09 rrei ah okay, I've never used PHP
13:09 teatime rrei: if you want to force a value in YAML to be a string when it would otherwise be recognized as an int, date/time, etc, just quote it
13:09 subsignal joined #salt
13:09 teatime i.e., mode: '0644' instead of mode: 0644
13:09 edrocks joined #salt
13:09 rrei I know that, but it's actually inside the jinja that the problem exists
13:10 teatime yeah, I was referring to how to fix it in your pillar
13:10 babilen Which pillar?
13:10 teatime wherever it's set
13:10 rrei yes, it is quoted in the pillar already and the same thing occurs
13:10 rrei but I wrote a small example just to show the problem
13:11 babilen I only see literals .. but then, this is obviously a simplified version
13:11 subsignal joined #salt
13:11 rrei {% set raw_password = "123" %} #salt['pillar.get']('users:fabamaq:password', '123') %} {% set hashed_password = salt['shadow.gen_password'](raw_password) %}
13:11 rrei ops
13:11 rrei {% set raw_password = "123" %} #salt['pillar.get']('users:fabamaq:password', '123') %}
13:11 rrei {% set hashed_password = salt['shadow.gen_password'](raw_password) %}
13:11 rrei these two lines
13:11 punkoivan left #salt
13:11 * teatime has never seen # like that
13:11 rrei this is enough for gen_password to raise an error
13:12 rrei it's commented out in yaml
13:12 AndrewPashkin Hello, everybody! Does anyone know - is it possible to modify __opts__ in a modle-wrapper around state.highstate?
13:12 subsigna_ joined #salt
13:12 rrei the actual line is {% set raw_password = "123" %}
13:12 teatime oh yeah ok I guess that works.
13:12 quix joined #salt
13:13 kbyrne joined #salt
13:13 rrei the problem is that the raw_password variable is being substituted on the second line as an integer
13:14 rrei even using the |string filter
13:14 lempa joined #salt
13:14 drawsmcgraw Hoping for a little more traction this morning - > When I write an engine, is there a way to get errors/stacktraces from my Engine to fully show up in the logs?
13:14 babilen morning?
13:14 drawsmcgraw As it is, I'm just getting single-line errors
13:14 akhter_1 joined #salt
13:15 drawsmcgraw babilen: Fair enough. This current time (I asked the question late last night, my time)
13:15 MadHatter42 joined #salt
13:16 racooper joined #salt
13:16 AndreasLutro rrei: salt-call cmd.run 'echo {% set raw_password = "123" %}{% set hashed_password = salt["shadow.gen_password"](raw_password) %}{{ hashed_password }}' template=jinja
13:16 quasiben joined #salt
13:16 AndreasLutro works fine for me
13:16 cpowell joined #salt
13:16 VSpike_ joined #salt
13:16 drawsmcgraw1 joined #salt
13:16 renoirb_ joined #salt
13:17 AndreasLutro if I replace "123" with 123 (int literal), I get an error
13:17 toastedpenguin joined #salt
13:17 felskrone1 joined #salt
13:17 edrocks joined #salt
13:17 wryfi_ joined #salt
13:17 Nils-_ joined #salt
13:17 drawsmcgraw1 babilen: connection dropped for a second. Hoping against hope you might have said something re: the Engine question while I was out :)
13:17 jnials_ joined #salt
13:17 afics joined #salt
13:17 BogdanR joined #salt
13:17 drawsmcgraw1 huhn... identity issues....
13:18 drawsmcgraw1 left #salt
13:18 TomJepp joined #salt
13:18 t0m0 joined #salt
13:18 sybix joined #salt
13:18 rrei yes, it works for me on the cli too, but not in an sls file
13:18 nahamu_ joined #salt
13:18 georgemarshall joined #salt
13:18 Ashald joined #salt
13:18 jY joined #salt
13:18 oliv` joined #salt
13:18 jcastle joined #salt
13:18 ashmckenzie joined #salt
13:18 drawsmcgraw1 joined #salt
13:18 stooj joined #salt
13:18 oliv` joined #salt
13:18 Guest60912 joined #salt
13:18 B1nny joined #salt
13:19 fxhp joined #salt
13:19 AndrewPashkin joined #salt
13:19 DammitJim joined #salt
13:19 \ask joined #salt
13:19 zsoftich1 joined #salt
13:19 s_kunk joined #salt
13:19 ekkelett joined #salt
13:19 rrei I have these two lines in an sls file and running: salt-ssh remote state.show_sls foo --out=yaml
13:19 Nebraskka joined #salt
13:19 davisj joined #salt
13:20 rrei it is complaining about the argument being an integer instead of a string
13:20 AndreasLutro works fine here too
13:20 rrei really
13:20 rrei ?!?
13:20 cwyse joined #salt
13:20 rrei weird
13:20 AndreasLutro I think you're just messing up
13:20 gh34 joined #salt
13:20 teatime also works here, just finished testing.
13:20 sab3r joined #salt
13:20 teatime in a state.sls
13:20 drawsmcgraw joined #salt
13:20 rrei wo
13:20 rrei wow
13:21 gazarsgo joined #salt
13:21 rrei okay, I'll take an even closer inspection
13:21 teatime btw there is a |yaml_encode filter, if you ever need to stringify a value yaml would recognize as a diff type.  not that you should need it here, just ffr
13:22 Shirkdog joined #salt
13:22 colttt joined #salt
13:22 adelcast joined #salt
13:23 teatime what is the actual error message?
13:25 Dr_Jazz joined #salt
13:25 kows joined #salt
13:26 yidhra joined #salt
13:26 rrei just a sec please
13:26 Rumbles joined #salt
13:26 flowstate joined #salt
13:27 rrei https://gist.github.com/rrei/01795e319b60dc26a9d11367cb0e527e
13:28 rrei added the output of state.show_sls as a comment
13:29 AndreasLutro that's like
13:29 AndreasLutro a completely unrelated error
13:29 AndreasLutro oh nevermind I misread
13:29 quasiben1 joined #salt
13:29 NaPs joined #salt
13:30 rrei my understanding is that jinja is passing the integer 123 to gen_password
13:30 rrei which is returning a dict
13:30 rrei with the error message, status code, etc
13:30 AndreasLutro right so this is a quirk with how salt-ssh works
13:31 punkoivan joined #salt
13:31 rrei so this works on your system using the regular salt command?
13:32 AndreasLutro https://github.com/saltstack/salt/issues/31542
13:32 saltstackbot [#31542]title: jinja stringifies dict before passing it to execution module (maybe salt-ssh specific?) | ### Expected Behavior...
13:32 punkoivan joined #salt
13:32 rrei what's even stranger to me is that I tried the echo command you put above on the CLI and it works as expected, but not in the sls file
13:32 AndreasLutro it has to do with how the jinja renderer calls salt module functions
13:33 AndreasLutro but only in salt-ssh
13:33 terratoma joined #salt
13:35 rrei oh man, there goes the "promise" of everything working the same on both flavors of salt
13:35 rrei Andreas, thank you very much for your help, I would have never figured this out by myself
13:36 AndreasLutro would've been a lot easier if you just provided all theinformation up front, like what command you ran and the exact output
13:37 cpowell joined #salt
13:39 rrei sorry, I just assumed that the promise of equal functionality between salt-ssh and salt was true
13:39 subsignal joined #salt
13:39 peters-tx joined #salt
13:40 _mel_ can salt 2015.5 configure secondary ip addresses in debian jessie?
13:45 evle joined #salt
13:45 notnotpeter joined #salt
13:46 darvon joined #salt
13:46 spuder joined #salt
13:46 honestly goddammit jinja
13:46 cpowell_ joined #salt
13:46 Tanta joined #salt
13:46 AndreasLutro it's actually got nothign to do with jinja and all to do with salt-ssh
13:47 SpX joined #salt
13:47 dasmith91 joined #salt
13:47 honestly oh yeah that's my bug
13:47 honestly I was actually just venting about something completely unrelated
13:47 quasiben joined #salt
13:48 anthpa joined #salt
13:48 honestly (jinja doesn't have a uniq filter)
13:48 flowstat_ joined #salt
13:48 wryfi joined #salt
13:48 AndreasLutro aha
13:48 Guest79 joined #salt
13:48 AndreasLutro well jinja isn't being used for what it's intended to in salt
13:48 AndreasLutro not really jinja's fault :p
13:48 tristianc joined #salt
13:49 LondonAppDev__ joined #salt
13:49 nebuchad` joined #salt
13:49 newjersey joined #salt
13:49 Sacro joined #salt
13:49 stn_ joined #salt
13:50 arnaud joined #salt
13:50 honestly actually, I would expect a uniq filter from any serious templating language
13:50 tedski joined #salt
13:50 honestly that said I would also expect a way to break out into a proper language
13:51 nZac joined #salt
13:51 hlub joined #salt
13:52 AndreasLutro you and jinja have different goals
13:53 cpowell joined #salt
13:53 AndreasLutro jinja aims to be sandboxed and safe, so safe that you can let potentially malicious users enter arbitrary code and run it
13:53 AndreasLutro which limits what you can do with it quite a lot
13:53 quarcu joined #salt
13:53 thebwt joined #salt
13:54 samed joined #salt
13:54 samed joined #salt
13:54 ajolo joined #salt
13:54 honestly I'm pretty sure the conditions where jinja is actually safe are extremely narrow
13:54 honestly I'd expect that as soon as you pass an object in, you can get busted
13:54 mrtrosen joined #salt
13:54 rogst joined #salt
13:54 flebel joined #salt
13:55 ashmckenzie joined #salt
13:55 AndreasLutro sure, but that's up to the developer passing objects in - as a contrast, in mako, you can construct objects inside the template
13:55 teatime I think it's more about, jinja is opinionated that logic in html templates should be minimal and simple
13:56 teatime honestly: you can call any methods on an object :(
13:56 AndreasLutro that's definitely part of it too
13:56 honestly teatime: exactly
13:56 Dr_Jazz joined #salt
13:56 teatime I was planning to write some useful filters etc. for jinja for salt, but then I found ways to do all the stuff I needed
13:57 teatime but *then* I ran across some Ansible docs on the ones they give you, and there were a bunch of useful ones
13:57 honestly AndreasLutro: none of that excuses the lack of uniq
13:57 teatime so yeah, perhaps I should do that after all.
13:57 AndreasLutro anyone here use salt-cloud with aws? I can't find the right combination of subnet/security group arguments
13:57 teatime honestly: I wonder if you can declare a set in jinja like you can in python with { }  :)
13:57 Mr-Manor joined #salt
13:57 gnord joined #salt
13:58 Mr-Manor left #salt
13:58 AndreasLutro pretty sure { } is a dict
13:58 rrei if I remember correctly, no, you can't
13:58 rrei it is a set if you include values in the literal
13:58 rrei {1, 2, 3, "afjldsf"}
13:58 rrei this is a set
13:58 gtmanfred i do not believe you can define that
13:58 rrei but I think you can't do that in jinja
13:59 rrei jinja != python, they emphasize that a lot
13:59 gtmanfred set is a keyword, so you also can't do set()
13:59 gtmanfred because you have {% set foo = 'bar' %}
14:00 AndreasLutro I think the lexer is good enough to tell the difference - but I still don't think sets are added to jinja
14:00 kevinquinnyo joined #salt
14:00 cro joined #salt
14:00 armguy joined #salt
14:00 jacksontj joined #salt
14:00 gtmanfred pretty sure it isn't
14:00 barajasfab joined #salt
14:01 teatime I'm not sure what each of you are saying, but to be clear {1, 2, 3, 4} is a set in python
14:01 teatime jinja, yeah, probably not, but I can wish.
14:01 cpowell joined #salt
14:02 AndreasLutro poke this issue I guess ;) https://github.com/pallets/jinja/issues/347
14:02 saltstackbot [#347]title: Support set literals | Currently Jinja only supports dict literals and trying to write a set literal causes an error saying that there is a colon missing (which would be necessary for a dict). This is an unnatural restriction and it would be nice to support sets too.
14:02 teatime salt provides like, 4 or 5 nonstandard filters.  here are the ansible ones:  http://docs.ansible.com/ansible/playbooks_filters.html
14:02 teatime ^^ who would like me to add these to salt?
14:03 riftman1 joined #salt
14:03 mavhq joined #salt
14:04 cpowell joined #salt
14:04 mpanetta_ joined #salt
14:04 gtmanfred meh
14:04 gtmanfred add a |unique filter
14:05 teatime lol.
14:05 _JZ_ joined #salt
14:05 brianfeister joined #salt
14:05 cpowell joined #salt
14:05 gtmanfred but add it to jinja
14:05 gtmanfred contributeing upstream!
14:05 teatime pretty sure I have zero desire to interact with jinja folks again.
14:05 kaictl joined #salt
14:06 jerredbell joined #salt
14:06 honestly AndreasLutro: take that, jinja! http://ix.io/wI9/jinja
14:07 rogst joined #salt
14:07 dayid joined #salt
14:08 edrocks joined #salt
14:10 kaptk2 joined #salt
14:11 SamYaple joined #salt
14:13 cyborg-one joined #salt
14:14 honestly (here's the one that actually works: http://ix.io/wIa/jinja)
14:17 tharkun joined #salt
14:19 teatime from the ansible doc, these are ones that seem useful to me:  mandatory, min, max, unique, union, intersection, difference, symmetric_difference, shuffle, ipaddr/ipv4/ipv6 + I'd like to have various to manipulate/filter ipaddr based on e.g. cidr, strip cidr specifier off of ipaddr, and xform cidr mask -> netmask.  some of those may probs already exist.
14:21 teatime or I suppose there's modules for that too.
14:21 gtmanfred yeah
14:21 gtmanfred if you have a module in salt, you can use it as a jinja filter i would think
14:21 bluenemo joined #salt
14:25 mowntan joined #salt
14:26 ivanjaros joined #salt
14:27 bowhunter joined #salt
14:27 dasmith91 Hey all, is there a simple way of having one generic set of salt states but being able to define environment specific pillars? Salt seems to panic when I define env=production and it can't find a prod environment in my states.
14:33 hjghjghjghjghj joined #salt
14:36 flowstate joined #salt
14:39 TheoSLC joined #salt
14:45 mohae joined #salt
14:54 PeterO joined #salt
14:55 dkrae joined #salt
14:57 tharkun joined #salt
14:57 TheoSLC joined #salt
14:58 beardedeagle joined #salt
14:59 gmoro joined #salt
15:07 colttt joined #salt
15:08 Fabbe joined #salt
15:10 hasues joined #salt
15:10 spuder joined #salt
15:13 blu_ joined #salt
15:14 hightekvagabond joined #salt
15:15 hasues left #salt
15:15 irctc008 joined #salt
15:15 gmoro joined #salt
15:18 irctc008 Hey, got a quick question, couldn't find it in the docs. Is there a way to force salt to run a state immediately before another state, regardless of whether it has already been run? Basically I want to make sure a directory(and all subdirectories) are owned by the correct user before running another state.
15:19 irctc008 I thought prereq might do it, but, assuming I'm reading the docs correctly, that won't run the requiring state if the prereq won't result in changes?
15:21 LondonAppDev joined #salt
15:21 AndreasLutro irctc008: a state can only be ran once per highstate, so if you need the same state to run more than once you have to duplicate it
15:22 toastedpenguin joined #salt
15:25 teatime irctc008: depends which prereq
15:26 teatime irctc008: sounds like you just need to include your dir state that enforces ownwership, and then your other state that require's the dir state.
15:26 gtmanfred irctc008: prereq also runs the state with test=True, and doesn't make any changes
15:28 brotatochip joined #salt
15:30 peters-tx Can I set/create grains for minions at the master via top.sls?
15:30 peters-tx Or are grains 100% minion-side driven?
15:30 ekristen joined #salt
15:31 gtmanfred they are minion side
15:31 gtmanfred you can set them using a state file or from salt \* grains.setval
15:31 gtmanfred but it has to be set on the minon
15:31 gtmanfred if you want master side stuff, check pillars
15:32 peters-tx gtmanfred, Well I have a nice pillar set up but I can't create other pillars that refer to pillar #1; at least everything I've read (and tried) lead me to understand the pillar-to-pillar problem
15:33 peters-tx Is this correct?
15:33 gtmanfred correct
15:33 peters-tx Thanks!
15:34 irctc008 So, there are multiple states that require this directory to have the correct ownership, and some of them run much earlier in the build. So if I just require, the directory state has definitely already run, but there's no guarantee that something else hasn't come along in-between when it ran and when this last state needs to run. I'm trying to track down where the directory is getting changed, but in general I'd like this to be somet
15:34 peters-tx gtmanfred, Do you have any docs on setting a grain via a state file?  Is that a state file on the master?
15:34 gtmanfred check out the salt states grains doc
15:34 gtmanfred https://docs.saltstack.com/en/latest/ref/states/all/salt.states.grains.html
15:34 gtmanfred check out grains.present
15:35 gtmanfred peters-tx: https://docs.saltstack.com/en/latest/topics/tutorials/starting_states.html
15:35 irctc008 gtmanfred: so then if I use prereq specifically that will run the requiring state regardless?
15:35 peters-tx Aha, salt.states.grains .. I'd only looked at salt.modules.grains; Got it, I'll RTFM, thanks
15:36 gtmanfred irctc008: the prereq state will always be run with test=True, if it it returns back that anything will change, it then runs the state you put the prereq in, then it will run your state that you set the prereq on (the one that just ran with test=True)
15:37 drawsmcgraw joined #salt
15:38 irctc008 gtmanfred: I see, so that sounds like not what I need, then. I need the prerequiring state to check if there will be any changes to the prerequired state and, if so, run the prerequired state, _then_ run the prerequiring state.
15:38 irctc008 gtmanfred: Thanks for clarifying.
15:39 pfallenop joined #salt
15:40 MadHatter42 joined #salt
15:41 gtmanfred so
15:41 gtmanfred the whole first step should not be needed
15:41 gtmanfred run the prerequired state, it should be idempotent
15:42 gtmanfred and only make changes if there will be changes
15:42 gtmanfred your order just sounds redundent and already covered by the way salt manages idempotency
15:43 TheoSLC joined #salt
15:43 irctc008 fair
15:44 Porco joined #salt
15:45 _AndrewPashkin_ joined #salt
15:46 quasiben Any reason why pkg.install might not work when salt '*' test.ping does ?
15:47 TheoSLC joined #salt
15:47 quasiben salt '*' pkg.install java returns nothing
15:50 gtmanfred if the java package is already installed
15:51 gtmanfred [root@salt /]# salt minion\* pkg.install openssh
15:51 gtmanfred minion-ae6fd472d4bc:
15:51 gtmanfred ----------
15:51 gtmanfred minion-51ca72d27116:
15:51 gtmanfred ----------
15:52 edrocks joined #salt
15:53 antpa joined #salt
15:55 dfinn joined #salt
16:05 VSpike_ Hm, why am I getting the enclosing list on this pillar data? https://bpaste.net/show/97feff797474
16:05 renaissancedev joined #salt
16:07 VSpike This is the code I'm trying to get working ... it used to just use mine data, but I need to be able to override it https://bpaste.net/show/0b76377d115a
16:09 onlyanegg joined #salt
16:09 grumm_servire joined #salt
16:11 ekristen joined #salt
16:13 cyborg-one joined #salt
16:14 VSpike When I load it into yaml directly it seems to behave as expected https://bpaste.net/show/95f38fa8b5de
16:14 SheetiS joined #salt
16:16 alemeno22 joined #salt
16:19 cpowell joined #salt
16:21 hightekvagabond joined #salt
16:21 cpowell joined #salt
16:25 writtenoff joined #salt
16:27 flowstate joined #salt
16:32 ageorgop joined #salt
16:34 cyberviking joined #salt
16:39 ageorgop joined #salt
16:40 cyberviking joined #salt
16:42 Fiber^ joined #salt
16:43 teatime So... how is the march toward v2016.3.0 going?
16:45 iggy you know as much as we do
16:45 ronnix joined #salt
16:46 teatime (and, can ./salt/cloud/clouds/vultrpy.py be included with it?)
16:46 teatime iggy: how do you figure?
16:46 teatime iggy: if I thought that was the case, I wouldn't have asked.
16:46 iggy there have been emails about the release process publicly... that's all any of us know
16:47 kbyrne joined #salt
16:48 honestly I should keep opening "salt-ssh utterly broken" bugs, that will surely help
16:49 teatime hlub: did you open an issue for the pillar/mine brute-force vuln?
16:51 impi joined #salt
16:55 teatime iggy: since you opened https://github.com/saltstack/salt/issues/31388 let me ask you,
16:55 saltstackbot [#31388]title: [salt-cloud - vultr provider] - salt-cloud hangs trying to spin up new instance | salt-cloud hangs trying to spin up a new node on vultr...
16:57 KyleG joined #salt
16:57 KyleG joined #salt
16:57 teatime 1) do you know if that bug is still in develop,  2) have you encountered any other issues w/ salt-cloud + vultr,
16:57 flowstate joined #salt
16:57 teatime and 3) how is it that you have the vultr provider pre-develop... did you drop the vultr.py file into an older tree manually?
16:58 KyleG joined #salt
16:58 KyleG joined #salt
17:00 gtmanfred teatime: we have a couple blocker bugs (i closed 2 of them yesterday) but it is going
17:01 gtmanfred please report any bugs in rc2 to the issue tracker
17:02 ninkotech joined #salt
17:04 teatime nm re: vultr cloud provider in 2016.3;  I made an error, it's already in the rc's.
17:04 flowstate joined #salt
17:06 teatime gtmanfred: is that what the B-{1,2,3} milestones represent?
17:07 gtmanfred those are our sprint trackers
17:08 gtmanfred B0 is when we wanted boron out, but we are at -2 and -3 it looks like now
17:08 teatime oh.
17:08 sjorge joined #salt
17:08 gtmanfred still elemenating the blocker bugs
17:09 gtmanfred i closed one of them yesterday https://github.com/saltstack/salt/issues?q=is%3Aissue+label%3ABoron+is%3Aclosed
17:10 gtmanfred and afaik, we are still looking for feedback on 2016.3rc2
17:10 beardedeagle I am still waiting on dmurphy's docs for salt-pack to drop so I can get winexe in for centos 7.2
17:10 gtmanfred heh
17:10 beardedeagle I wanted to get that in before boron released
17:11 ajw0100 joined #salt
17:11 beardedeagle Pretty sure I can make an educated guess as to what to do though if needed
17:11 teatime hlub: described an interesting (i.e., probably high prio) issue around 11:55 UTC, if you didn't see it
17:12 sjmh joined #salt
17:12 beardedeagle https://github.com/saltstack/salt-pack/issues/13 , 22 days ago was the last response I got on the matter though. Being patient sucks.
17:12 saltstackbot [#13]title: add minimum documentation | Would it be possible to add minimum documentation to the readme to explain how to use salt-pack to generate the salt packages?
17:13 beardedeagle I've been in email contact with him though, so that's good at least
17:14 zer0def joined #salt
17:17 ronnix joined #salt
17:18 brianfei_ joined #salt
17:18 _beardedeagle joined #salt
17:18 pcn joined #salt
17:19 onlyaneg1 joined #salt
17:19 SheetiS1 joined #salt
17:19 quasiben1 joined #salt
17:21 wryfi joined #salt
17:21 whatevsz joined #salt
17:22 jfindlay _beardedeagle: you should just go for it and submit the pull request :-)
17:22 TooLmaN joined #salt
17:22 ivanjaros joined #salt
17:22 Dr_Jazz joined #salt
17:22 arnaud joined #salt
17:22 terratoma joined #salt
17:22 Sacro joined #salt
17:22 BogdanR joined #salt
17:22 _beardedeagle yar, there are a couple of packages I could model after that should work. I don't agree with how winexe for cent6 is packaged, it just seams...hoaky
17:22 _beardedeagle seems*, even
17:23 nZac joined #salt
17:24 iggy teatime: my master runs develop, I haven't tried a new vultr instance in a while, but I can real quick if you want someone to test
17:24 flowstate joined #salt
17:24 ivanjaros3916 joined #salt
17:25 bbradley joined #salt
17:26 crashmag joined #salt
17:26 stooj joined #salt
17:27 teatime iggy: you can if you like, it'd interest me; but don't got o any trouble for it.
17:27 cro joined #salt
17:28 afics joined #salt
17:28 dayid joined #salt
17:29 aw110f joined #salt
17:32 brotatochip joined #salt
17:32 armguy joined #salt
17:34 gmoro joined #salt
17:34 _AndrewPashkin_ joined #salt
17:34 riftman1 joined #salt
17:34 hal58th joined #salt
17:36 joren joined #salt
17:38 danemacmillan joined #salt
17:38 kbyrne joined #salt
17:41 kevinquinnyo joined #salt
17:41 Lionel_Debroux joined #salt
17:43 AndreasLutro https://github.com/saltstack/salt/pull/32588 wee
17:43 saltstackbot [#32588]title: Fix salt-ssh module function call argument type juggling - JSON encode arguments passed to an execution module function call | This fixes problems where you could pass a string to a module function, which thanks to the yaml decoder which is used when parsing command line arguments could change its type entirely. For example:...
17:48 writteno1 joined #salt
17:48 mpanett__ joined #salt
17:48 lazybear joined #salt
17:48 ajw0100_ joined #salt
17:49 KyleG1 joined #salt
17:50 sjorge_be joined #salt
17:50 aurynn_ joined #salt
17:50 felskrone joined #salt
17:50 Nils- joined #salt
17:50 catpig joined #salt
17:51 Lionel_Debroux_ joined #salt
17:51 ekkelett joined #salt
17:51 tristianc joined #salt
17:51 s0undt3ch joined #salt
17:51 stickmack joined #salt
17:52 \ask joined #salt
17:53 honestly AndreasLutro: you actually figured it out? nice!
17:54 onlyanegg joined #salt
17:55 honestly AndreasLutro: heh, that is a pretty simple PR
17:56 kaictl joined #salt
17:56 teatime joined #salt
17:56 edrocks joined #salt
17:57 AndreasLutro it is a quick and dirty fix
17:59 tru_tru joined #salt
18:00 cliluw joined #salt
18:00 jfindlay AndreasLutro: should those `json.dumps` be in try blocks?
18:00 M-MadsRC1 joined #salt
18:01 honestly jfindlay: why? it's not like a failure would be recoverable :)
18:01 AndreasLutro hm..
18:01 AndreasLutro let me see what happens if I pass in some weird object to a module function
18:02 akhter joined #salt
18:02 jfindlay honestly: no specific reason
18:03 honestly I guess if the raw exception output doesn't make it clear where the problem occurred it should be wrapped and given a nice error message.
18:04 AndreasLutro https://github.com/saltstack/salt/pull/32588#issuecomment-210079345 I think this behaviour is fine, so I wouldn't wrap it in a try/catch
18:04 saltstackbot [#32588]title: Fix salt-ssh module function call argument type juggling by JSON encoding them | This fixes problems where you could pass a string to a module function, which thanks to the yaml decoder which is used when parsing command line arguments could change its type entirely. For example:...
18:05 AndreasLutro though possibly json.dumps(str(val)) as a fallback for things that can't be json serialized but can be cast to a string?
18:05 akhter joined #salt
18:06 honestly is json really the right format anyway?
18:06 sparksa joined #salt
18:06 AndreasLutro json is valid yaml, and actually the safest way to encode yaml in my experience
18:07 AndreasLutro plus I think the json encoder is the most likely to be performant in python
18:07 honestly json is a subset of yaml though
18:07 honestly isn't it?
18:08 kevinquinnyo inside a reactor, i need to apply a highstate to a target first, *then* run a customer runner function on the target.  Is it possible for me to ensure that order within the reactor itself?
18:08 s_kunk joined #salt
18:08 s_kunk joined #salt
18:08 honestly i.e. you can't convert all valid yaml to json without losing information
18:08 aw110f joined #salt
18:08 AndreasLutro while json does have fewer types than json on paper, I've yet to bump into an issue with it
18:09 honestly okay
18:09 babilen Could it be that pillar merging (in particular lists) and salt-ssh does not really play well together? (tried something simple and the list seems to be replaced, despite pillar_merge_lists being True)
18:09 AndreasLutro kevinquinnyo: make your reactor call an orchestrator, which supports requires
18:10 kevinquinnyo but can the orchestrate runner call another runner function?
18:10 AndreasLutro babilen: in my experience, setting pillar_merge_lists has no effect whatsoever
18:10 kevinquinnyo maybe i should just add the local.state.apply directly in my custom runner and just call only that from the reactor
18:10 AndreasLutro kevinquinnyo: I think an orchestrator can do anything
18:11 babilen AndreasLutro: Well, at least that means that it fails consistently :)
18:11 honestly babilen: lots of things simply don't do anything in salt-ssh :)
18:11 babilen \o/
18:11 AndreasLutro babilen: could be worse - just take a look at this! https://github.com/saltstack/salt/pull/30813
18:11 saltstackbot [#30813]title: Properly set the default value for pillar_merge_lists | Issue: #30809...
18:12 baweaver joined #salt
18:12 babilen AndreasLutro: Seriously? *sigh*
18:12 patarr joined #salt
18:12 honestly babilen: here's another exciting one: https://github.com/saltstack/salt/issues/31236#issuecomment-189246474
18:12 saltstackbot [#31236]title: States using the cp module don't work when Py renderer is used | This reproduces on develop branch and with every salt release that can be installed on my target system (Ubuntu 14.04 LTS). Most functions in the cp module, e.g. `cp.get_file_str` or `cp.cache_file` do not work....
18:14 quix joined #salt
18:14 AndreasLutro my favorite salt-ssh bug is if you output a string with "password:" in it, it thinks you're being prompted for a password
18:14 babilen hahahahahaahaha
18:14 babilen *sob*
18:14 AndreasLutro https://github.com/saltstack/salt/issues/25721
18:15 saltstackbot [#25721]title: Strange "Permission denied" error with "/etc/apache2/sites-available/default-ssl.conf" with salt-ssh | I noticed a strange error when I tried to write a state which manages `/etc/apache2/site-available/default-ssl.conf`....
18:15 babilen That's brilliant :)
18:15 babilen Well, I guess I have to dive a bit deeper into the code than I planned to do. Thanks for the pointers! :)
18:17 evidence joined #salt
18:17 cliffstah joined #salt
18:17 Gabemo joined #salt
18:17 chrismoos joined #salt
18:18 brianvdawson joined #salt
18:19 dmaiocchi joined #salt
18:19 sparksa can i ask for advice how to debug a salt-ssh issue, salt 2015.8.8.2 on centos6 ... it relates to the requiretty issue
18:19 pmcnabb joined #salt
18:19 liskl joined #salt
18:19 AndreasLutro you can try
18:19 cyborg-one joined #salt
18:20 sparksa trying to use the sudo:true and tty:true saltfile option, but while i can run actions ok, trying to apply it throws a lot of data back including:
18:20 sparksa _error:
18:20 sparksa Failed to return clean data
18:20 sjorge joined #salt
18:20 feld joined #salt
18:20 feld joined #salt
18:20 AndreasLutro define "run actions" and "apply it"?
18:20 bltmiller joined #salt
18:21 cyberviking joined #salt
18:22 sparksa ok, i mean trying to create a simple state file, with a pkgrepo state in it, and running"salt-ssh -i salt-test0002 state.apply network"
18:22 berserk joined #salt
18:22 sparksa # more states/network.sls
18:22 sparksa install network packages:
18:22 sparksa pkg.installed:
18:22 sparksa - pkgs:
18:22 sparksa - rsync
18:22 sparksa - lftp
18:22 sparksa - curl
18:22 sparksa (basically the tutorial)
18:22 AndreasLutro right, can you put the full output on gist.github.com or similar?
18:22 punkoivan joined #salt
18:23 sparksa if I remove the requiretty option by hand on target and remove the tty: saltfile option, will work
18:24 bltmiller ahoy! quick question. I'd like to set a variable in an sls file to data from my pillar. this syntax, though, generates an error for me: {% set foo = pillar['general']['bar'] %}
18:24 sparksa https://gist.github.com/anonymous/8f00d873d519210f92ab8468137dd74e
18:24 AndreasLutro bltmiller: you want to make sure that the pillar data is actually set
18:25 bltmiller AndreasLutro: 'tis, running salt-call pillar.items foo from command line gets me the varible
18:26 bltmiller rather, salt-call pillar.items bar
18:26 AndreasLutro sparksa: those are annoying... usually those happen when there's a prompt at some point in your salt stuff
18:26 AndreasLutro bltmiller: salt-call pillar.get general:bar
18:26 bltmiller aha
18:27 bltmiller so just a scope issue it seems
18:27 sparksa uses password auth not key file, that sort of prompt?
18:27 quix_ joined #salt
18:27 AndreasLutro sparksa: possibly, especially if use put sudo: true in your roster
18:27 sparksa or maybe a prompt from yum?
18:27 AndreasLutro or that, yes
18:27 AndreasLutro though
18:27 cberndt joined #salt
18:27 AndreasLutro salt should do all it can to prevent package programs from generating prompts
18:28 kevinquinnyo So in the reactor.conf, where you can specifiy event tags like: 'salt/minion/*/start', can the
18:28 iggy teatime: still fails... my fix still works
18:28 kevinquinnyo '*' be a tgt glob?
18:28 iggy teatime: add `  hard_timeout: None` to your vultr provider file
18:28 AndreasLutro sparksa: you can add `-l trace &> salt-ssh.log` to the end of your command to get all the log information you need and 100 times more
18:28 kevinquinnyo ohh nevermind, it says it very clearly i cant read today
18:29 teatime iggy: thx.  what does that do, anyway?
18:29 teatime you mentioned it prevents timeout from being set
18:30 sparksa sudo /shouldnt/ do a prompt, i provision the ssh account used with a NOPASSWD: ALL
18:33 iggy teatime: salt-cloud tries to set a timeout on the command. I'm not sure why the timeout isn't working, but it just seems to hang forever. Making that change takes off the timeout on the command and makes the code use a standard connection timeout
18:34 nZac joined #salt
18:34 iggy wait, that didn't actually fix the problem
18:35 baweaver joined #salt
18:36 teatime do you beleive the issue is specific to the vultr provider?  I could try to track it down.
18:36 iggy it didn't hang, but the minion still doesn't come up
18:36 iggy I spin up DO minions constantly, so definitely specific to vultr
18:37 iggy could also be specific to the "large disk" instances that vultr has
18:38 numkem joined #salt
18:38 teatime iggy: can you provide the commands you're running, provider config, etc.?  I will try to reproduce and track it down later.
18:39 iggy I'm not sure there's anything to track down
18:39 teatime oh?
18:39 teatime and implicit in that was, also try to fix.
18:40 west575 joined #salt
18:41 teatime I don't understand.  it's not doing the right thing, so...
18:41 lero joined #salt
18:43 iggy Well, I know the fix, I basically wanted the original author to weigh in to say whether it worked for him
18:43 iggy I guess I'll just send a PR and ping a couple people on it
18:43 protoz joined #salt
18:46 sjorge joined #salt
18:47 ajw0100 joined #salt
18:48 protoz_ joined #salt
18:49 protoz_ joined #salt
18:49 sparksa can't seem to get anything from the salt-ssh trace log, and replacing password auth with key auth didn't help.
18:51 AndreasLutro sparksa: if you can put the full output of -l trace on a gist I can take a look - but it might contain sensitive information so be a bit careful
18:52 AndreasLutro sparksa: what I usually do if that doesn't give away anything is ssh into the machine and run the exact same salt-call command as salt-ssh does but with -l debug
18:55 sparksa where do you find the "salt-call"?   all i see is the exec sudo /usr/bin/python2.6 -c 'import base64; exec(base64.b64decode( stuff
18:55 AndreasLutro look for SALT_ARGV
18:56 sparksa SALT_ARGV: ['/usr/bin/python2.6', '/tmp/.sys-ops_254381_salt/salt-call', '--local', '--metadata', '--out', 'json', '-l', 'quiet', '-c', '/tmp/.sys-ops_254381_salt', '--', 'test.opts_pkg']
18:56 sparksa SALT_ARGV: ['/usr/bin/python2.6', '/tmp/.sys-ops_254381_salt/salt-call', '--local', '--metadata', '--out', 'json', '-l', 'quiet', '-c', '/tmp/.sys-ops_254381_salt', '--', 'test.opts_pkg']
18:56 sparksa [root@salt salt]#
18:56 sparksa those are the only ones in there
18:56 AndreasLutro yeah so just try running one of those as whatever user salt-ssh is set up to run as
18:57 sparksa ok, think i got you
18:57 brotatochip joined #salt
18:57 alemeno22 joined #salt
18:58 AndreasLutro but remove the --metadata --out json and replace -l quiet with -l debuyg
18:58 AndreasLutro debug*
18:58 dendazen joined #salt
18:58 sparksa i got a traceback...
18:58 sparksa /usr/bin/python2.6 /tmp/.sys-ops_254381_salt/salt-call --local --metadata --out json -l quiet -c /tmp/.sys-ops_254381_salt -- test.opts_pkg
18:58 sparksa Traceback (most recent call last):
18:58 sparksa File "/tmp/.sys-ops_254381_salt/salt-call", line 2, in <module>
18:58 sparksa from salt.scripts import salt_call
18:58 sparksa ImportError: No module named salt.scripts
18:59 sparksa maybe the salt thinn client deployed bad...
18:59 AndreasLutro quite possible
19:00 AndreasLutro is python2.6 the correct version?
19:01 sparksa well... /usr/bin/python2.6 works...
19:01 sparksa right version for this?   dunno
19:01 AndreasLutro `python --version` shows what?
19:01 sparksa do i have to have something pre-installed before salt-ssh will work?
19:01 AndreasLutro it should just work
19:02 sparksa $ python
19:02 sparksa Python 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)
19:02 AndreasLutro right, everything seems ok then, I'm out of ideas
19:02 sparksa same as /usr/bin/python2.6
19:03 my50c is this a linux box ? what distro if so ? rpm -ia | grep salt or dpkg -l | grep salt  output ?
19:04 dmaiocchi joined #salt
19:05 sparksa linux VM, centos 6.7
19:05 my50c i have seen this before where python 2.6 and 2.7 was both installed but salt was install under 2.7 so you had to make sure to use the correct python
19:05 nZac joined #salt
19:05 AndreasLutro well since this is salt-ssh you shouldn't have anything installed system-wide
19:05 sparksa ok... so a) guess you have to be /in/ that /tmp dir for the python path to be right.  and b) have to sudo
19:05 sparksa now seem to have gotten
19:06 Tanta install Salt from the EPEL repos
19:06 sparksa [CRITICAL] Unable to import msgpack or msgpack_pure python modules
19:06 sparksa [DEBUG   ] LOGGING_NULL_HANDLER is already None, can't sync messages with it
19:06 sparksa [DEBUG   ] Reading configuration from /tmp/.sys-ops_254381_salt/minion
19:06 sparksa [WARNING ] Console logging already configured
19:06 sparksa [CRITICAL] Unable to import msgpack or msgpack_pure python modules
19:06 sparksa [WARNING ] Console logging already configured
19:06 Tanta then it will all just work
19:06 sparksa [DEBUG   ] Configuration file path: /tmp/.sys-ops_254381_salt/minion
19:06 sparksa [WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
19:06 sparksa [DEBUG   ] Reading configuration from /tmp/.sys-ops_254381_salt/minion
19:06 sparksa [INFO    ] Determining pillar cache
19:06 sparksa [DEBUG   ] LazyLoaded jinja.render
19:06 sparksa [DEBUG   ] LazyLoaded yaml.render
19:06 sparksa [DEBUG   ] LazyLoaded jinja.render
19:06 sparksa [DEBUG   ] LazyLoaded yaml.render
19:06 AndreasLutro oh jeez
19:06 sparksa [DEBUG   ] LazyLoaded test.opts_pkg
19:06 sparksa [DEBUG   ] LazyLoaded nested.output
19:06 sparksa hmm the saltstack repos aren't good?
19:06 honestly ABORT ABORT ABORT
19:06 teatime oh neat.. TIL about the timeout command.
19:07 mpanett__ joined #salt
19:09 sparksa just for data point, had this prob with the EPEL version as well
19:09 quix joined #salt
19:09 my50c looks like installation issue ... : centos 6.7 kinda 'old' not ?
19:09 my50c https://docs.saltstack.com/en/latest/topics/installation/rhel.html
19:11 sparksa centos 6.7 is not EOL as i recall
19:11 iggy doesn't mean it's well supported outside of redhat
19:12 sparksa maybe salt ssh doesn't well support centos 6 then?
19:13 my50c i haven't touch centos is a while :)
19:13 sparksa not sure however how it relates to the fact that if i remove the sudoers requiretty and the saltfile tty: options, it does work
19:13 my50c sec: you have sudo require ???
19:14 my50c make sure you sudo option is set to remember path and all other env settings!
19:14 my50c that coulkd be the issue
19:14 scoates joined #salt
19:16 my50c is centos 6.7 a must ?
19:17 AndreasLutro I still think salt-ssh should work out of the box
19:18 Sammichmaker joined #salt
19:18 sparksa i think so too.   but apparently it won't.
19:18 flowstate joined #salt
19:18 sparksa looks like centos6 does not include python-msgpack in the core, and you need to install on target from epel or from saltstack repo
19:18 AndreasLutro msgpack is not required
19:19 sparksa which makes the bootstrap harder, chicken and egg sitation, since the machine can't run salt-ssh to run the provision planned
19:20 sparksa and yes - i have to support centos 6
19:20 mpanetta_ joined #salt
19:21 my50c i can fireup a centos vm quick and see if im gettin getting the same issue .
19:21 my50c give me  30 mins or so
19:24 sparksa if msgpack is not required, why is it failing on it then
19:24 sparksa or at least logging it as critical
19:24 AndreasLutro shrug
19:25 AndreasLutro unless you get an actual msgpack importerror it's not a problem
19:25 AndreasLutro it'll just slow things down a bit
19:25 sparksa those are the only things i get from running it by hand anyway, above.   and the long grains dump
19:26 my50c tried what the url said? : rpm -Uvh epel-release-X-Y.rpm
19:27 my50c downloading centos it will take a while for me to try to reproduce/find a solution : ill post back once its rady
19:27 sparksa so the issue is am trying to salt-ssh an install on this just build node.    i'm trying to do stuff like that via a salt-ssh to bootstrap the thing
19:28 sparksa but can't since i need to sudo the run to do stuff like install repos
19:30 pid1 joined #salt
19:30 my50c can you add this line in your sudoers file ? : Defaults    env_keep    +=  "HOME PS1 PS2 PROMPT"
19:30 my50c and if require adjust the 'Defaults    secure_path' too
19:30 iggy a normal minion isn't an option?
19:31 flowstate joined #salt
19:31 iggy I mean salt-ssh isn't the most common use case for salt
19:31 iggy it wasn't designed with it in mind
19:32 AndreasLutro I use salt-ssh for bootstrapping the first salt master - minions after that is just a 5 line shell script
19:32 sparksa doesn't help adding that
19:33 sparksa ok, so is sounding like the idea to use salt-ssh to seed a minion here is just a non-starter idea, and i should just script a little bash script to fire off on the remote
19:34 flowstate joined #salt
19:34 sparksa was just hoping to use it to help bootstrap itself
19:35 sparksa i'm /trying/ to get to the minion state... but i need something to install the minion ion this remote
19:36 sparksa especially if i'll need to replace the sudoers file to get it to work, it works if i remove the requiretty option and forget the tty: salt-ssh option.    either way i have to recraft the server OS installs a bit
19:38 iggy try saltify? I'm not sure it uses salt-ssh completely
19:38 flowstate joined #salt
19:38 my50c are these adjusted images ? maybe you create a image that has the minimaal stuff install ? thayt is what i do in aws : a salt-call and all are set :) (there are could step in between, but once an instance is up it ready for the app to be installed)
19:38 drawsmcgraw joined #salt
19:40 flowstat_ joined #salt
19:42 sparksa these are images, they're pxe installed.   i'll either have to go do postinstall actions to either add epel repos and install minion during postinstall, or just remove requiretty from stock sudoers
19:42 sparksa either way going to have to retool
19:43 sparksa anyway, was hoping it saounded familiar, i'll go away and try to find a diff solutrion to this
19:44 mapu joined #salt
19:47 lempa joined #salt
19:47 Brew joined #salt
19:48 flowstate joined #salt
19:48 cliffstah joined #salt
19:48 hightekvagabond joined #salt
19:48 Gabemo joined #salt
19:48 chrismoos joined #salt
19:49 ewd84 joined #salt
19:49 liskl joined #salt
19:50 pmcnabb joined #salt
19:50 flowstat_ joined #salt
19:50 ewd84 Hello, any idea where can I look at source code of salt.states.aptpkg?
19:50 lero joined #salt
19:51 bltmiller joined #salt
19:51 flowstate joined #salt
19:52 feld joined #salt
19:52 feld joined #salt
19:52 dezet ewd84: https://github.com/saltstack/salt/blob/develop/salt/states/aptpkg.py
19:52 onlyanegg joined #salt
19:53 ewd84 thx!
19:53 kevinquinnyo local.cmd(tgt, 'state.highstate')   <-- any reason this wouldnt work in a runner?
19:53 kevinquinnyo or is there a better way to do that in a runner?
19:54 kevinquinnyo where local is an instance of salt.client.LocalClient()
19:54 subsignal joined #salt
19:55 pid1 joined #salt
19:57 om3 salt win repo issue, argh!
19:58 om3 anyone use salt win repo?
19:59 om3 when I generate the salt win repo on the master, it creates it fine.  but it creates it in win/repo/salt-winrepo
19:59 om3 it seems that salt looks for it in win/repo and not that path
19:59 om3 I cannot install any packages it says it's not found
19:59 om3 I even moved the package sls files to win/repo and still doesn't find it
20:00 om3 I did do pkg.refresh_db
20:00 om3 still can't find the package
20:00 baweaver joined #salt
20:01 om3 I tried salt-run winrepo.genrepo > repo.json
20:01 om3 as suggested by github issue
20:01 sfz- joined #salt
20:01 om3 but it errors with this -> [ERROR   ] Rendering exception occurred: Jinja variable 'dict object' has no attribute 'os'
20:02 om3 anyone with salt win repo use experience, please, greatly appreciated
20:05 om3 version used are server and on win client both 2015.8.8.2
20:05 baweaver joined #salt
20:06 om3 I also tried using the full name of the win repo package, but doesn't work either
20:07 om3 tried installing with high state as well as from cli on master - no go
20:12 brotatochip joined #salt
20:14 patrek joined #salt
20:15 gtmanfred kevinquinnyo: that is the way to do it
20:19 west575_ joined #salt
20:21 kevinquinnyo gtmanfred: thanks, yeah it actually worked, but i was silencing the errors in the highstate run so i thought it wasn't working
20:21 kevinquinnyo or i wasnt checking on it rather
20:22 baweaver joined #salt
20:23 teatime iggy: so what is the fix you had in mind?  sorry, doing several things at once.
20:24 west575 joined #salt
20:29 tpaul joined #salt
20:33 flowstate joined #salt
20:41 nubrocket joined #salt
20:41 squishypebble joined #salt
20:43 nubrocket Hello.  I am confused with some things re: salt.runners.jobs
20:44 nubrocket salt-run jobs.list_jobs search_metadata -- what...what is the metadata?
20:44 nubrocket and list_jobs_filter -- is 'filter_find_job' the only thing I can filter out?
20:44 nubrocket this is all from https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.jobs.html
20:54 baweaver joined #salt
20:58 om3 any reason why a winrepo.p file would have only one strange char that looks like a euro symbol and nothing else in it?
20:59 om3 I deleted it and did pkg.refresh_db only to get the same result
21:01 linjan joined #salt
21:07 nZac joined #salt
21:08 om3 anyone here ever use salt win repo?
21:11 spuder joined #salt
21:11 scoates joined #salt
21:14 gekitsuu joined #salt
21:17 ZiLi0n joined #salt
21:18 evidence joined #salt
21:18 cliffstah joined #salt
21:18 chrismoos joined #salt
21:18 Gabemo joined #salt
21:19 ZiLi0n Hello everyone, using salt-call is there any way to stop running states when there one state exits with error? Same as a fail-hard option but for salt-call
21:20 liskl joined #salt
21:20 pmcnabb joined #salt
21:23 feld joined #salt
21:23 feld joined #salt
21:25 druonysus joined #salt
21:26 hightekvagabond joined #salt
21:35 Edgan ZiLi0n: yeah, I want that too.
21:35 Edgan ZiLi0n: in my option, fail-hard should just work there, and I think should also be the default
21:36 mrueg joined #salt
21:37 ZiLi0n Edgan agreed, it should be the default indeed. I haven't find out how to pass failhard option to salt-call... other than modifying the minion file
21:37 Edgan ZiLi0n: In my experience it doesn't have any effect
21:39 ZiLi0n Edgan, there is a --hard-crash option for salt-call which does not have any effect. but fail-hard does, as soon as there is an error, the minion stops executing
21:39 Edgan ZiLi0n: I just saw hard-crash, and was curious
21:40 Edgan ZiLi0n: what version of salt?
21:40 dendazen joined #salt
21:40 flowstate joined #salt
21:40 ZiLi0n Edgan 2015.8.0
21:41 Edgan ZiLi0n: Maybe they fixed it. Past experience is that it didn't work with salt-call.
21:41 Edgan ZiLi0n: --retcode-passthrough  is another good option, and should be the default
21:44 cyborg-one joined #salt
21:48 druonysus joined #salt
21:50 west575_ joined #salt
21:51 VSpike_ joined #salt
21:51 brianfeister joined #salt
21:52 dreese joined #salt
21:53 mohae_ joined #salt
21:53 pmcg_ joined #salt
21:54 spuder_ joined #salt
21:54 borgstrom joined #salt
21:54 pfallenop joined #salt
21:54 subsignal joined #salt
21:56 tristianc joined #salt
21:59 Sacro joined #salt
21:59 aurynn joined #salt
22:00 SheetiS joined #salt
22:00 KyleG joined #salt
22:00 KyleG joined #salt
22:02 mpanetta_ joined #salt
22:02 ZiLi0n Edgan thanks, I didn't know about that one. can't find info about it, what is it for?
22:03 stooj joined #salt
22:03 Gareth joined #salt
22:03 renoirb joined #salt
22:04 Edgan ZiLi0n: if salt-call didn't actually get an exception, it will return 0, even if something failed
22:04 Edgan ZiLi0n: It passes through return codes from whatever failed. Which is good for things like jenkins, where the success or failure of the job is completely about return codes
22:05 Opti99 joined #salt
22:05 AbyssOne joined #salt
22:05 Opti99 Hello. Is salt['pillar.get'] and pillar.get the same command? If not, can somebody point me to what the difference is?
22:06 hemebond Opti99: Use salt['pillar.get']
22:07 gmoro joined #salt
22:07 Opti99 How do I insert a variable into salt['pillar.get']? for a known, but dyanamic pillar location?
22:08 hemebond You don't insert stuff into the Pillar.
22:08 hemebond It's static.
22:08 Opti99 Let me explain
22:08 Edgan Opti99: I think you mean salt['pillar.get'][foo]  not salt['pillar.get']['foo']
22:08 dendazen joined #salt
22:08 Opti99 Yes Edgan
22:09 Edgan Opti99: That is the trick
22:09 Opti99 So It is just the quotes messing me up then
22:09 Opti99 Let me give that a try
22:09 Edgan Opti99: I have a even better method if you are interested
22:09 Opti99 Sure, I am listening
22:10 akhter_1 joined #salt
22:11 Edgan Opti99: There are two types of pillar information. There are secrets, and there are non-secrets. Non-secrets are generally just value's like how many connections you should allow, a setting.
22:11 Edgan Opti99: So if you use a map.jinja, you can have defaults. Then you can use merges of pillars in set ways to merge both into a flat name space in your formula
22:13 Edgan Opti99: This method actually works for both types of pillar information, but there are corner cases where you still call pillars directly. But this method also gets almost everything but secrets out of the pillars by default.
22:14 Opti99 That make sense
22:16 pid1 joined #salt
22:18 squishypebble joined #salt
22:20 dfinn1 joined #salt
22:21 danemacmillan joined #salt
22:27 adelcast joined #salt
22:30 protoz joined #salt
22:34 Opti99 {% set myapp = 'mouse'}     pillar.configuration[myapp].get('remote_access')    This works. I am failing get using salt['pillar.get'] an putting myapp variable into the statement still.
22:34 bltmiller joined #salt
22:35 onlyanegg joined #salt
22:40 flowstate joined #salt
22:40 zenlot joined #salt
22:41 baweaver joined #salt
22:48 quix joined #salt
22:57 onlyanegg joined #salt
22:58 kevinquinnyo1 joined #salt
23:01 Opti99 Not sure it is the best way, but this worked for me salt['pillar.get]('configuration:' ~ myapp ~ ':remote_access')
23:05 Edgan Opti99: :)
23:12 sagerdearia joined #salt
23:14 KyleG joined #salt
23:14 KyleG joined #salt
23:15 forrest joined #salt
23:15 KyleG I've been patiently waiting for about 4 years for this.. https://github.com/saltstack/salt/issues/2707
23:15 saltstackbot [#2707]title: Recursive directory management doesn't preserve permissions | OS: Centos 6.3...
23:16 KyleG Anyone know if there's any progress or ETA on it, after 4 years I'm kinda like…blah. Is there hope?
23:16 forrest KyleG, Could have learned the code base and written it yourself at this point sadly ;P
23:16 KyleG yeah coulda shoulda
23:16 forrest I'm just messing with you
23:16 forrest I don't blame you
23:16 TheoSLC joined #salt
23:17 KyleG I just feel so dirty having to stick to using a tar archive
23:17 forrest Yeah
23:17 KyleG I want all mah configs in salt
23:18 subsignal joined #salt
23:22 onlyanegg joined #salt
23:23 edrocks joined #salt
23:26 baweaver joined #salt
23:27 KyleG Reading the archive.extract options, it says Main operators like -x, --extract, --get, -c and -f/--file should not be used here.
23:27 KyleG Anyone know why that is?
23:27 KyleG other than the docs say it in bold, lol
23:28 jfroot left #salt
23:29 KyleG nvm I'm reading the source code, I get it.
23:34 hightekvagabond joined #salt
23:39 flowstate joined #salt
23:40 josuebrunel joined #salt
23:42 Edgan 2016.* adds rsync as a state :)
23:43 Edgan https://docs.saltstack.com/en/develop/ref/states/all/salt.states.rsync.html
23:44 Cogent joined #salt
23:46 ajw0100 joined #salt
23:47 edrocks joined #salt
23:52 teatime oo nice, I love me some rsync.
23:52 onlyanegg joined #salt
23:54 cpowell joined #salt
23:55 Eugene Oooooooooooooooooooooooooh.

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