Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-09-10

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

All times shown according to UTC.

Time Nick Message
00:11 oz_akan_ joined #salt
00:13 Katafalkas joined #salt
00:14 krissaxton joined #salt
00:42 berto- joined #salt
00:43 sgviking joined #salt
00:45 m_george|away joined #salt
00:50 copelco joined #salt
00:52 cmthornton joined #salt
00:54 Gwayne joined #salt
00:56 m_george left #salt
01:02 robertkeizer joined #salt
01:06 BW^- joined #salt
01:08 dstanek joined #salt
01:08 ggherdov joined #salt
01:11 brianhicks joined #salt
01:12 mohae joined #salt
01:12 mannyt joined #salt
01:14 krissaxton joined #salt
01:15 oz_akan_ joined #salt
01:21 CheKoLyN joined #salt
01:28 liuyq joined #salt
01:30 liuyq joined #salt
01:31 mwillhite joined #salt
01:42 mannyt joined #salt
01:46 mmilano left #salt
01:47 jcock joined #salt
01:47 jcock Now that salty-vagrant is now a vagrant native plugin, where do we submit our PRs?
01:48 dstanek joined #salt
01:49 UtahDave akoumjian: do PRs still go to github.com/saltstack/salty-vagrant   ?
01:49 lineman60 joined #salt
01:54 jcock While that's in the queue, let me get some advice on something salt-cloud+salt related.
01:55 jcock In issue: https://github.com/saltstack/salt-cloud/issues/770
01:56 UtahDave sure
01:57 mannyt joined #salt
01:57 jcock I wanted to see if writing a salt-cloud runner should wait until the merge is complete
01:58 jcock my over all vision would be to use the salt-api to control salt-cloud
01:58 UtahDave Hm.  Well, discussions today seemed to indicate that the merge will be bumped to the next release.
01:58 UtahDave yeah, that's our vision, too
01:59 deepakmd_oc joined #salt
01:59 UtahDave jcock: have you looked at this module?  https://github.com/saltstack/salt/blob/develop/salt/modules/saltcloudmod.py
02:00 jcock UtahDave: no. I haven't
02:00 jcock hmm
02:01 UtahDave Does that do enough of what you want to do until the next release?
02:01 jcock no
02:02 jcock but it looks similar to what I though I was going to attempt to implement
02:02 vipul joined #salt
02:02 jcock I want to pass actions to salt-cloud
02:03 dstanek_ joined #salt
02:03 jcock I don't mind helping out on that respect
02:03 jcock I was just going to submit whatever to salt-contrib
02:04 UtahDave that's cool.  I think you could go ahead and commit what you wanted straight to that module in the main salt repo.
02:05 sixninetynine joined #salt
02:08 jcock word.
02:08 jcock I'm looking through salt-testing now
02:08 UtahDave cool.
02:09 jcock I have a vagrant setup in the works
02:09 jcock https://github.com/jcockhren/salt-contrib-vagrant
02:10 jcock I'll re work it to hack on the core (name will change).
02:11 jcock being about to provision with salt is quite handy ;)
02:11 robawt hello
02:11 * robawt highfives UtahDave
02:12 UtahDave jcock: awesome!
02:12 UtahDave robawt: ^5
02:12 robawt oooh smooth operator UtahDave
02:13 UtahDave lol
02:13 UtahDave how's socal, robawt?
02:13 robawt it's nice
02:13 robawt a bit under the weather today so i can't really enjoy it
02:13 robawt sad too, it finally cooled off a bit
02:14 UtahDave my wife's sister and family just spent the last week down in Santa Monica.
02:14 UtahDave they had lots of awesome pictures
02:15 krissaxton joined #salt
02:15 robawt oooh cool!
02:15 robawt they enjoyed the beautiful beaches I hope
02:15 robawt and the super weirdo performers about
02:15 UtahDave yeah, they rented a little condo just off the beach.
02:16 robawt you should've came with them
02:16 robawt we have internet ;)
02:16 robawt fill you full of food and make you tell us your secrets
02:16 robawt and beer if the secrets are any good
02:16 Gwayne joined #salt
02:16 Gwayne joined #salt
02:17 UtahDave :)  seriously. I'd totally love to do that.  Hmm.
02:19 xl1 joined #salt
02:21 robawt Scale 12x CFP just hit, is SaltStack revisiting us i 2014 UtahDave?
02:21 racooper joined #salt
02:21 UtahDave Oh, heck yea!!
02:22 malinoff joined #salt
02:22 UtahDave We'll be there in force!
02:22 Gareth +1
02:23 robawt hey speak of the devil Gareth
02:23 UtahDave Gareth: we had a great time there last year. Plus there were a lot of great presentations.
02:23 robawt nice FOSS weekly Gareth
02:23 Gareth robawt: thanks :)
02:23 robawt and free Salt Training ... cough cough UtahDave
02:24 robawt this year I won't be running across the hotel from the jenkins talk again.
02:24 UtahDave :) I thought we had a pretty good turnout to the training.  Do you think we should offer to do the same format this year, robawt?
02:24 Gareth UtahDave: thanks :) Was glad to see Salt there again and that we avoided that moment of confusion re: the Salt booth :)
02:25 robawt UtahDave: i liked it, but I'd like to see an intermediate/adv salt course offered,  maybe a day 2 thing?
02:25 UtahDave :)  yeah.
02:25 Gareth robawt: btw where did you see an announcement about the CFP?  afaik, we haven't opened it up yet....soon though.
02:25 robawt Gareth: i could swear it was on twitter, but the twittersphere isn't always 100%
02:26 robawt i don't think anyone would believe me anyway, should be safe
02:27 Gareth no worries.  we've been discussing things internally, especially the CFP...just making sure someone didn't pull the trigger early.
02:27 robawt Gareth: a little searching i found what i had read https://twitter.com/lcafiero/status/376926677428752384
02:27 superflit joined #salt
02:27 mwillhite joined #salt
02:27 robawt i demand a free coffee mug when I go to scale for my detective work Gareth
02:27 robawt :P
02:28 Gareth Ahh..
02:28 ghena1986 joined #salt
02:28 ghena1986 left #salt
02:28 Gareth Find me. remind me.  and I'll grab one for you :)
02:28 Lue_4911 joined #salt
02:29 robawt Gareth: naaaah I'll just keep an eye out at registration instead
02:29 robawt you have enough going on
02:29 robawt but I will bug UtahDave for a tshirt again
02:30 UtahDave lol.  We got black tshirts in and cool clear SaltStack sticker!!
02:30 UtahDave s/sticker/stickers
02:30 robawt oooh fancy
02:30 robawt i will rock them with pride
02:30 robawt still waiting for highlighter yellow
02:31 robawt i should make my own just to see the look on your face
02:31 Gareth highlighter yellow for a tshirt?
02:31 robawt Gareth: yeah, incase I get lost
02:32 UtahDave robawt: should we stencil your mom's phone number on the back of the collar for you?   :)
02:32 Gareth I remember one year at OSCON, one of the parties...you had to get a really loud, really bright, neon pink shirt to get into it.  The next day walkin to the conferene, all the homeless people had new pink neon tshirts :)
02:32 UtahDave lol
02:32 robawt UtahDave: let's not get her involved.  Instead I'll put "please return to python/postgres/saltstack booth.  do not feed after midnight
02:33 robawt lol Gareth
02:34 ingwaem joined #salt
02:35 ingwaem Greetings everyone. got a little problem with cmd.run that I was hoping someone could give me a hand on. Currently I'm trying to run a command but it HAS to run as a different user to root. Root is what the minion runs from at the moment. Looking at the params of cmd.run I can define a user, however doesn't seem to be taking as that user.
02:38 robawt ingwaem: http://docs.saltstack.com/ref/states/all/salt.states.cmd.html#salt.states.cmd.run
02:38 UtahDave ingwaem: yeah, looks like "user" is a valid option: http://docs.saltstack.com/ref/states/all/salt.states.cmd.html#salt.states.cmd.run
02:38 robawt looks like user=foobar works
02:39 UtahDave READ IT TWICE, ingwaem!!!!!!!!
02:39 UtahDave lol
02:39 robawt haha
02:39 robawt is this love/hate fueled doc now?
02:39 UtahDave speaking of Scale. That's where I first met ingwaem in person, too!  Are you going this year?
02:40 ingwaem I had read twice UtahDave :) but if I touch a file while running the command doesn't seem to run as that user. Does salt have to get started as the user? And if so how can run some commands as root, and others as the user
02:40 ingwaem Yes, UtahDave I will be attending this year again. Link me when tickets are available and I'll join Ya's
02:40 UtahDave no, the salt-minion should run as root
02:41 UtahDave ingwaem: cool!  It will be great to see you there again.
02:41 UtahDave ingwaem: can you pastebin what you've tried that hasn't worked correctly?
02:41 ingwaem sure
02:41 StDiluted joined #salt
02:42 robawt silly question: is there a way to tell salt to do one action before all others in 16.x or is that a 17.x feature?
02:43 robawt i want to add a proxy to the machine before doing a full highstate
02:44 UtahDave - order: 1
02:44 ingwaem UtahDave: http://pastebin.com/FfJi3ffu I changed the actual user to myuser. When you do an ls -l in that DIR, the file is created but user is root. Doesn't seem to execute as the defined user
02:45 UtahDave ah, you're using the execution module.  Let me double check that
02:45 robawt UtahDave: TY sir
02:45 ingwaem Some commands have to be ran as this user, but most others root is fine
02:48 smw joined #salt
02:49 UtahDave ingwaem: http://pastebin.com/BhSjHUP6
02:49 UtahDave it's  runas   not   user
02:49 UtahDave which is kind of odd.
02:49 malinoff Hi all :)
02:49 ingwaem Oh, I'll try that thanks :)
02:49 robawt UtahDave: where did you find that?  vs using user?
02:49 UtahDave http://docs.saltstack.com/ref/modules/all/salt.modules.cmdmod.html#salt.modules.cmdmod.run
02:50 UtahDave the cmdmod execution module docs
02:50 robawt vs cmd.run
02:50 robawt got it
02:50 UtahDave well, it's still cmd.run
02:50 ingwaem Whooooo hoooo! UtahDave! You're the man! man
02:50 UtahDave but on the cli you're actually executing the cmd execution module
02:51 UtahDave in an sls file you're executing the cmd state.
02:51 UtahDave unfortunately   one is apparently using runas and the other user
02:51 ingwaem trying on my automated executor now :)
02:51 robawt ah ok
02:52 * ingwaem does a a crazy wiggling jumping dance all over the room shouting "yes! yes! yes! Whoop!"
02:52 robawt #salt is a happy channel, ingwaem proved it
02:53 ingwaem I try to dig as much as possible before jumping into the channel but when I do I always get the responses needed to move on with my work :) always a happy channel from what I've experienced robawt :)
02:54 UtahDave :)  bam!!
02:54 oz_akan_ joined #salt
02:56 vbabiy How can I say I want >= in this version definition? https://gist.github.com/vbabiy/6504413
02:56 vbabiy if I just add >= to the front of the version
02:56 vbabiy it says it can't find the package
02:58 UtahDave vbabiy: which OS?
02:58 vbabiy ubuntu
02:58 faldridge joined #salt
02:59 UtahDave - nodejs: '>=0.10.18-1chl1~precise1'
03:01 vbabiy @UtahDave I added the output to that gist, it still fails
03:02 UtahDave Try this:    - nodejs: '>=0.10.18'
03:03 vbabiy still failed, but I did add more output
03:03 UtahDave vbabiy: what did you get?
03:03 vbabiy bottom of the fist
03:04 vbabiy s/fist/gist
03:05 UtahDave does npm depend on nodejs?
03:05 vbabiy yeah
03:05 UtahDave then you probably need to split those out into their own ID declarations so that npm can depend on nodejs.
03:06 UtahDave YOu might try this first      - nodejs: '>=0.10.18-1
03:06 UtahDave - nodejs: '>=0.10.18-1'
03:07 vbabiy this fixed it: https://gist.github.com/vbabiy/6504413#file-z-final-result-yml
03:08 vbabiy thanks @UtahDave
03:09 vbabiy maybe not...
03:11 vbabiy >= didn't work when I use the full version '0.10.18-1chl1~precise1' it works fine
03:12 pdayton joined #salt
03:13 robawt salty-vagrant is the only way I can test salt states without going nuts
03:14 vbabiy robawt same
03:15 robawt i don't think akoumjian ever has to buy beer at cons
03:15 robawt not after salty-vagrant atleast
03:15 krissaxton joined #salt
03:16 vbabiy It is a great tools just for learning salt
03:17 vbabiy is there a way to know if a highstate is running for the fist time on a minion? I would like to be able to do a dist-upgrade only on bootstrapping a machine
03:21 malinoff joined #salt
03:29 mohae joined #salt
03:32 chutzpah joined #salt
03:50 middleman_ joined #salt
03:58 bhosmer joined #salt
04:05 oz_akan_ joined #salt
04:07 robawt does cmd have cwd?
04:08 malinoff Yes
04:09 robawt i believe i have run into user error then
04:15 malinoff Can you pastebin your state?
04:16 krissaxton joined #salt
04:16 pdayton joined #salt
04:16 robawt malinoff: luckily i figured out my syntax error
04:17 robawt now i'm uncovering the joys of requiring a directory
04:17 robawt i thought require: - file: bleh did it but it doesn't appear to be happening
04:17 forrest joined #salt
04:18 malinoff 'bleh' should be an id of other state describes that file
04:18 pdayton1 joined #salt
04:19 robawt ahhh
04:19 robawt so can i call require: bleh
04:19 robawt or do i need to specify what bleh is?
04:20 forrest you need to specify
04:20 forrest - require: - file: bleh
04:20 forrest obviously with proper indentation
04:22 robawt highstating now
04:24 mmilano joined #salt
04:26 jacksontj joined #salt
04:29 jacksontj_ joined #salt
04:39 vbabiy Is there a way to have file.symlink have a require on a file?
04:40 HumanCell joined #salt
04:41 malinoff vbabiy: Sure, why not
04:41 robawt vbabiy: doing it now, just require: -file: bleh
04:41 shinylasers joined #salt
04:41 robawt also, saltstates hurt extra hard when they fail due to a typo
04:42 forrest don't forget - require :P
04:42 robawt why isn't that on the offical tshirt forrest?
04:43 forrest I don't know, the t-shirt I got from pycon says 'get salted'
04:43 vbabiy i have something like: https://gist.github.com/vbabiy/6505075
04:43 forrest what does yours say?
04:43 robawt forrest: same thing
04:43 forrest mine doesn't say requires on it I don't think
04:43 robawt "don't forget: -require"
04:43 robawt great tshirt idea
04:44 forrest You should pitch it to Marc :P
04:44 robertkeizer joined #salt
04:44 forrest vbabiy, that looks good to me, is it not working?
04:45 sparc_ joined #salt
04:46 vbabiy forrest https://gist.github.com/vbabiy/6505075, when I run that the first time it fails but second run works
04:46 vbabiy and I get service couldn't get all the requirements.
04:46 vbabiy and the symlink it not there
04:46 vbabiy but the file is in place
04:46 forrest ok
04:47 forrest so you're treating this like it's version 0.17
04:47 robawt holy moly
04:47 robawt my state rocks now
04:47 forrest think about it like this, your file.absent, and file.managed, and file.symlink can run whenever.
04:47 forrest so if they can run whenever, they can run before nginx is installed.
04:47 forrest let me edit your gist real quick hang on
04:47 vbabiy forrest thanks
04:48 Ryan_Lane joined #salt
04:48 forrest yea np, it's one of the fun things of config management :P
04:48 vbabiy also not sure why you say I am treating it like 0.17. Not sure what that means
04:48 forrest I will show you, let me finish the gist
04:48 forrest it is easier to explain that way
04:48 vbabiy awesome, thanks
04:50 forrest https://gist.github.com/gravyboat/6505111
04:50 forrest ok
04:50 forrest pull that up and we can go through why yours works on the second run, but not the first run
04:51 forrest I added an extra requires in there on accident, but it's fine.
04:51 vbabiy okay one second
04:51 forrest There I fixed it, just refresh
04:51 forrest yea no rush
04:52 malinoff I'd rather use require_in option in nginx state
04:53 vbabiy I think I understand now, I have had a real hard time wrapping my head around when to use require and exactly how it works
04:53 forrest does my example versus your example explain why yours requires two runs?
04:53 forrest if it's not clear we can go through it real quick, and I can almost promise it will click
04:53 vbabiy I would love to go through it
04:54 forrest ok cool, so lets start with the fact that as of now, salt doesn't run things in order.
04:54 forrest so it could install nginx first, or it could try to remove your /etc/nginx/sites-enabled/default first
04:54 forrest that's how you had your state set up
04:54 vbabiy Yeah
04:55 forrest when we add that requires for the /etc/nginx/sites-enabled/default (on mine at line 15) we require that salt install nginx FIRST before it tries to run that file.absent
04:55 forrest without that requires, it can run in any order, and it's going to fail because it runs before nginx installs, so the whole /etc/nginx/ dir doesn't exist
04:55 forrest so on the second run it finished because on the first run, that installation was successful.
04:56 vbabiy yeap
04:56 forrest The way you have it set up will work in 0.17, because they're reworking salt so things run in the order it is written
04:56 vbabiy ah, that will reduce the number of requires :D
04:56 forrest so it's ok the file.symlink doesn't require nginx in my example, because it requires /etc/nginx/sites-available/blah, which requires nginx
04:56 vbabiy Yeah
04:56 forrest yep exactly, it just makes more 'sense' when you're going through
04:57 forrest Does that help clear it up?
04:57 vbabiy yeah
04:57 vbabiy a ton
04:57 forrest I know requires are annoying, lol
04:57 robawt i like requires
04:57 robawt it keeps me honest
04:57 vbabiy is there a way to see the dep tree from your states?
04:57 forrest I like them, but I don't like that it's confusing to figure them out at first
04:57 forrest uhh I don't know vbabiy
04:57 robawt agreed forrest
04:58 forrest the only reason I'm used to them is from writing so much puppet code
04:59 vbabiy forrest thanks for that, with what you just taught me I fixed another bug :D
05:00 forrest Yea NP, I always enjoy explaining how require/requires in puppet work because it really confused me at first, and when it clicks you're just going 'oh man I totally get this now!'
05:01 forrest robawt, I will probably still use requires in 0.17, I'm just to used to having them for everything.
05:01 forrest *too
05:01 robawt ditto forrest
05:01 malinoff forrest: Where did you find information about ordering in 0.17?
05:02 forrest malinoff, http://docs.saltstack.com/ref/states/ordering.html#state-auto-ordering
05:02 malinoff Thanks
05:02 forrest np
05:03 malinoff Thank God requires will override this feature
05:04 forrest Yea that would be a bummer if it suddenly broke all your states because of how you wrote them
05:04 malinoff As i see, requires combined with OverState is one of the most awesome things in salt
05:04 forrest I'll be interested to see whether it's on a state by state basis that the requires overwrites things, or only if it finds ar equires
05:07 forrest Yea overstate is a very cool feature
05:08 forrest I'd like to see an example at some point of a pretty complex overstate, still wrapping my head around it coming from puppet land
05:09 forrest https://github.com/terminalmage/djangocon2013-sls/blob/master/overstate.example is a good example though
05:10 malinoff Yes, this example shows almost everything with overstate
05:10 forrest ye
05:10 forrest *p
05:16 krissaxton joined #salt
05:24 robawt ok i'm flustered
05:24 robawt it works, if you run it twice
05:24 robawt it complains about a missing directory that i create
05:24 robawt https://gist.github.com/bmess/3bddc37c56e18bae8961
05:27 forrest it's complaining about the /usr/java dir robawt?
05:27 robawt yes forrest
05:27 robawt and i thought i had a require trail long enough
05:27 robawt so it'll fail the other parts of the state but create the dir, then i run it again and it'll finish
05:27 robawt slightly frustrating
05:29 forrest I think your indenting is messed up
05:29 forrest and you're missing - require
05:29 forrest and using require
05:29 forrest instead
05:30 robawt forrest: if this weeks you get a beer at next con you and i attend
05:30 forrest lol
05:30 middleman_ joined #salt
05:31 forrest you made sure to tab in the items under the require: right?
05:31 robawt yessir
05:31 robawt 2 spaces
05:31 forrest cool
05:32 matanya joined #salt
05:32 matanya joined #salt
05:33 all_the_fisch joined #salt
05:38 robawt forrest: you're the man
05:38 forrest cool
05:38 sssslang is there a way to get file types on master from minion? I want to check if file is symlink.
05:39 forrest robawt, I modified your state as well to cut down on the number of requires
05:39 forrest yhttps://gist.github.com/gravyboat/6505383
05:39 forrest err: https://gist.github.com/gravyboat/6505383
05:39 robawt ah ok
05:39 forrest sssslang, how about salt 'host' file.check_file_meta /path/to/file ?
05:40 forrest you don't have to do that, just a note
05:40 robawt so you chained them in order
05:40 forrest you already chained them
05:40 forrest I just removed the requirement of java-home from most of them
05:40 robawt yeah but this is cleaner than a laundry list of requires
05:40 forrest Just depends how you want to do it, sometimes the more verbose version is nice so you aren't looking at 30 items
05:42 chutzpah joined #salt
05:42 robawt gotta get some sleep, thanks again forrest
05:42 forrest yea np, don't forget to print up that t-shirt :P
05:42 robawt heh
05:42 linjan joined #salt
05:45 forrest sssslang did that work?
05:46 forrest I couldn't find another module that specifically checks for symlinks
05:46 sssslang forrest: I'm reading the source.
05:46 forrest ok cool
05:49 chuffpdx joined #salt
05:57 NV is there a way to set the primary group of a user with the salt user states?
05:57 NV ie, by name
05:58 Jahkeup joined #salt
05:58 forrest NV, could you maybe define the primary group inside of groups, and then the extras in optional_groups: http://docs.saltstack.com/ref/states/all/salt.states.user.html#salt.states.user.present
05:58 forrest optional I imagine is just for groups so that the state won't fail
05:58 forrest but I haven't looked at the code for it so I'm not sure
05:59 forrest Just as a question, what scenario do you have where that is required, as opposed to just joining the user to multiple groups?
05:59 sssslang forrest: it doesn't seem to work. just file content will returned by master, neither file type or mode.
06:00 NV setting up a sftp server, users shouldn't be in any groups except the common 'sftp' group
06:00 NV want to prevent per-user groups being created
06:00 forrest sssslang, that's a bummer, maybe put in a feature request for that.
06:01 forrest Hmm, I wonder if you set their gid to the valufe of the sftp group, it would work...
06:01 forrest *value
06:03 sssslang forrest: I think this is a basic feature. If it not exists, there must be some reason. Maybe something wrong with the way I'm using salt.
06:03 NV mhmm, that's my current thought, downside is it addes magic numbers, but i guess it's not so bad if i'm also creating the group in the salt config so it's nice and visible...
06:03 forrest it could be sssslang, I just don't see a 'check for symlinks' documented anywhere.
06:03 forrest NV, yea an understandable concern.
06:04 FluxD Hi all, I was wondering if there is an IRC interface to run commands on machines and return results if applicable?
06:05 NV FluxD: that sounds like a _TERRIBLE_ idea
06:05 xmj NV: why? all viruses work that way
06:05 FluxD NV, it will be in a private channel with few trusted people
06:05 NV :)
06:05 balltongu joined #salt
06:05 xmj it's brilliant. remote control of a machine via irc, what could go wrong
06:05 NV FluxD: IRC isn't designed for security
06:06 mjulian joined #salt
06:06 mjulian joined #salt
06:06 forrest it could be ok if it was an internally hosted IRC
06:06 NV what's wrong with using say a shared screen session on a server somewhere for using salt?
06:06 FluxD NV, I am trying to avoid giving full root access and allow just some specific access
06:06 xmj forrest: no, that's bad style. can't hide your tcp connections as good as when using an open irc server!
06:06 NV forrest: eh even then I'd argue it's still terrible - you're reducing it down to ip-auth at a best case, nick auth at worst
06:06 forrest lol
06:06 xmj forrest: think like a troyan writer, for once :0
06:06 daBrado- joined #salt
06:06 NV FluxD: use sudo then
06:06 forrest fair enough
06:07 [vaelen] joined #salt
06:07 forrest I was talking about inside a completely closed network xmj
06:07 d10n joined #salt
06:08 cce joined #salt
06:08 xmj oh, i got that
06:08 forrest ok
06:08 retr0h joined #salt
06:08 retr0h joined #salt
06:08 xmj forrest: hiding your irc connections is easier if you use public servers, though ;)
06:08 sssslang joined #salt
06:08 echos joined #salt
06:09 forrest regarding your question though FluxD, check out https://github.com/github/hubot or http://willie.dftba.net/ , thought I don't think a salt plugin exists
06:10 FluxD forrest, thanks
06:10 xmj i wonder if salt could be used in a troyan setting
06:10 forrest yea np FluxD, here's a really cool talk on hubot
06:10 forrest http://www.youtube.com/watch?v=NST3u-GjjFw
06:10 forrest other than the fact you know, ruby
06:10 xmj basically, running salt minions on acquired zombies. would be good! control the troyan process by service.running :)
06:10 NV FluxD: you still haven't explained your actual usecase though and why screen and/or sudo wouldn't suffice?
06:11 NV cause it _REALLY_ is a terrible idea
06:11 NV like, I can't stress how terrible it is
06:11 FluxD NV, basically trying to setup remote execution to run certain bash scripts on multiple machines
06:11 NV you might as well switch to using telnet instead of ssh
06:11 FluxD and return output if possible
06:12 jhujhiti joined #salt
06:12 NV so you don't really want salt invocation from IRC
06:12 forrest security be damned! ChatOPS!
06:12 NV you really want a bot that sits in an IRC channel and runs one or two fixed specific salt commands, and outputs the results to IRC?
06:12 forrest maybe he wants to support some devs or something
06:12 NV not say being able to specify salt commands directly
06:12 xmj chatops, sounds brilliant
06:13 jfalco joined #salt
06:13 FluxD NV, I guess I said it the wrong way but yea
06:13 forrest that youtube link talks about it at github xmj
06:13 xmj can we please get O'Reilly to push that as Next Big Thing?
06:13 NV just like say "!pushupdate webprod1"
06:13 FluxD NV, Yes
06:13 NV or "!updateall"
06:13 forrest that's a fair use case, you don't want your developers or something to have access to salt since you'd need to run the command as root
06:13 NV in which case my suggestion would be run an eggdrop or something, then write a tcl script to execute specific salt commands (using sudo if need be)
06:14 NV but don't let users specify the commands, etc over irc for obvious reasons
06:14 FluxD oh I def dont want an eggdrop, I hate it with a passion
06:14 NV limit what can be done so that nothing that could be done could compromise the security of your systems
06:14 NV (ie, forcing updates is fine, who cares if an attacker does that really :P)
06:15 NV FluxD: find another irc bot that's scriptable then
06:15 bkonkle joined #salt
06:15 NV heck, even irssi with some perl scripts could work i imagine
06:17 krissaxton joined #salt
06:22 sssslang forrest: I find both getting file mode and file type from master is in feature request.
06:22 forrest awesome
06:23 forrest maybe there is some technical reason for not being able to do it
06:23 forrest what's the issue #?
06:24 sssslang forrest: file mode: 6747, file type: 5645.
06:24 forrest cool
06:26 sssslang saidly, #6747 not in 0.17's milestone.
06:26 forrest hah yea 0.17 already has a ton on the plate
06:27 sssslang so I need another way to manage a directory before these feature implemented.
06:29 goki joined #salt
06:30 Katafalkas joined #salt
06:30 Furao joined #salt
06:31 NV hrm, what sort of conditionals can i use in jinja?
06:31 forrest http://jinja.pocoo.org/docs/templates/#list-of-control-structures
06:31 NV creating users and doing all sorts of things based upon some pillar data - but just for sanities sake i'd like to put a check in to prevent it from munging users like root, etc
06:31 ml_1 joined #salt
06:33 octarine joined #salt
06:33 krissaxton joined #salt
06:42 EugeneKay joined #salt
06:53 NV err, how do i target a host with grains or pillar (looking at the code it appears to be the same code that does the matching) -- salt -I 'roles:vmware' test.ping doesn't appear to work
06:53 NV pillar.items returns roles as being an array containing vmware (and a few other things)
06:53 balboah_ joined #salt
06:54 NV http://pastie.org/8313040 for example
06:54 unicoletti_ joined #salt
07:01 NV ah i can use 'roles:*vmware*' but then 'roles:*vm*' would also match
07:01 NV how can one match a full entry only?
07:05 emocakes joined #salt
07:05 bijay joined #salt
07:13 sfello joined #salt
07:15 NV nevermind - forgot refresh_pillar
07:16 gildegoma joined #salt
07:16 isomorphic joined #salt
07:18 vaxholm joined #salt
07:23 az87c joined #salt
07:30 krissaxton joined #salt
07:31 ximing joined #salt
07:32 carlos joined #salt
07:33 davidone joined #salt
07:36 davidone joined #salt
07:36 sssslang NV: roles:vmware can match a list item.
07:39 vaxholm joined #salt
07:42 emocakes joined #salt
07:44 NV yeah, i had forgotten refresh_pillar so it didn't work
07:48 ronc joined #salt
07:49 backjlack joined #salt
08:02 gamingrobot joined #salt
08:02 rachbelaid joined #salt
08:04 scooby2 joined #salt
08:04 fxhp joined #salt
08:05 akio joined #salt
08:05 mordred joined #salt
08:05 pjs joined #salt
08:06 tomviner joined #salt
08:12 carlos joined #salt
08:14 Ryan_Lane joined #salt
08:18 daito joined #salt
08:20 TheCodeAssassin joined #salt
08:29 Nexpro1 joined #salt
08:36 xl1 joined #salt
08:40 ml_1 left #salt
08:40 ml_1 joined #salt
08:43 emocakes joined #salt
09:06 bejer_ joined #salt
09:12 ccase_ joined #salt
09:14 bitmand_ joined #salt
09:18 ggherdov joined #salt
09:18 vaxholm joined #salt
09:19 unicoletti_ joined #salt
09:21 Ryan_Lane joined #salt
09:21 FluxD joined #salt
09:21 svx_ joined #salt
09:21 nliadm joined #salt
09:21 rmt joined #salt
09:21 crashmag joined #salt
09:21 Gareth joined #salt
09:21 intchanter joined #salt
09:21 Nazca joined #salt
09:21 jwon joined #salt
09:21 MTecknology joined #salt
09:21 gadams joined #salt
09:21 ezraw_away joined #salt
09:21 dgarstang joined #salt
09:21 smw joined #salt
09:21 sparc joined #salt
09:21 chuffpdx joined #salt
09:21 balltongu joined #salt
09:21 mjulian joined #salt
09:21 [vaelen] joined #salt
09:21 echos joined #salt
09:21 Furao joined #salt
09:21 Guest75753 joined #salt
09:21 carlos joined #salt
09:21 renoirb joined #salt
09:21 Katafalk_ joined #salt
09:21 ronc_ joined #salt
09:21 emocakes joined #salt
09:21 ml_1 joined #salt
09:21 Nexpro1 joined #salt
09:21 TheCodeAssassin joined #salt
09:21 mordred joined #salt
09:21 akio joined #salt
09:21 fxhp joined #salt
09:21 scooby2 joined #salt
09:21 rachbelaid joined #salt
09:21 gamingrobot joined #salt
09:21 backjlack joined #salt
09:21 davidone joined #salt
09:21 ximing joined #salt
09:21 az87c joined #salt
09:21 isomorphic joined #salt
09:21 sfello joined #salt
09:21 balboah_ joined #salt
09:21 EugeneKay joined #salt
09:21 goki joined #salt
09:21 bkonkle joined #salt
09:21 jfalco joined #salt
09:21 sssslang joined #salt
09:21 retr0h joined #salt
09:21 cce joined #salt
09:21 d10n joined #salt
09:21 Jahkeup joined #salt
09:21 chutzpah joined #salt
09:21 all_the_fisch joined #salt
09:21 middleman_ joined #salt
09:21 HumanCell joined #salt
09:21 mohae joined #salt
09:21 malinoff joined #salt
09:21 Gwayne joined #salt
09:21 vipul joined #salt
09:21 jcock joined #salt
09:21 liuyq joined #salt
09:21 cmthornton joined #salt
09:21 berto- joined #salt
09:21 alekibango joined #salt
09:21 redbeard2 joined #salt
09:21 yo61 joined #salt
09:21 kermit joined #salt
09:21 dork joined #salt
09:21 kspath joined #salt
09:21 Viaken_ joined #salt
09:21 cjh joined #salt
09:21 badluck joined #salt
09:21 Koma joined #salt
09:21 ckao joined #salt
09:21 xinkeT joined #salt
09:21 LucasCozy joined #salt
09:21 __number5__ joined #salt
09:21 tomeff joined #salt
09:21 monokrome joined #salt
09:21 s0undt3ch joined #salt
09:21 NV joined #salt
09:21 felskrone joined #salt
09:21 arapaho joined #salt
09:21 akitada joined #salt
09:21 blast_hardcheese joined #salt
09:21 ahammond joined #salt
09:21 mortis joined #salt
09:21 zz_dane joined #salt
09:21 JoAkKiNeN joined #salt
09:21 hellome joined #salt
09:21 countdigi joined #salt
09:21 yano joined #salt
09:21 craig joined #salt
09:21 JimShoe joined #salt
09:21 joehh joined #salt
09:21 mackstick joined #salt
09:21 darrend_ joined #salt
09:21 jefferai joined #salt
09:21 bdf joined #salt
09:21 honestly joined #salt
09:21 Psi-Jack joined #salt
09:21 jY joined #salt
09:21 zach joined #salt
09:21 crazysim joined #salt
09:21 neilf joined #salt
09:21 Daviey joined #salt
09:21 Valdo joined #salt
09:21 cowmix joined #salt
09:21 Ahlee joined #salt
09:21 Boohbah joined #salt
09:21 jcristau joined #salt
09:21 djinni`_ joined #salt
09:21 marcinkuzminski joined #salt
09:21 nkuttler joined #salt
09:21 clone1018 joined #salt
09:21 dave_den joined #salt
09:21 \ask joined #salt
09:21 mattikus joined #salt
09:21 Vivek joined #salt
09:21 melinath joined #salt
09:21 eculver joined #salt
09:21 cyp joined #salt
09:21 msil joined #salt
09:21 brutasse joined #salt
09:21 hotbox joined #salt
09:21 cwarner joined #salt
09:21 spacedentist joined #salt
09:21 s00pcan joined #salt
09:21 Niichan joined #salt
09:21 austin987 joined #salt
09:21 tempspace joined #salt
09:21 benspaulding joined #salt
09:21 Sypher joined #salt
09:21 soukihei joined #salt
09:21 SpX joined #salt
09:21 DerekRBN1 joined #salt
09:21 xt joined #salt
09:21 tru_tru joined #salt
09:21 kevinbrolly joined #salt
09:21 anuvrat joined #salt
09:21 jxqz joined #salt
09:21 joonas joined #salt
09:21 kamal_ joined #salt
09:21 opapo joined #salt
09:21 deedubs joined #salt
09:21 y0j joined #salt
09:21 APLU joined #salt
09:21 pcarrier joined #salt
09:21 oc joined #salt
09:21 jheise joined #salt
09:21 txmoose joined #salt
09:21 luminous joined #salt
09:21 carmony joined #salt
09:21 codysoyland joined #salt
09:21 djn joined #salt
09:21 jbub joined #salt
09:21 Martinez joined #salt
09:21 jeffrubic joined #salt
09:21 JesseC joined #salt
09:21 eightyeight joined #salt
09:21 _chjohnstwork joined #salt
09:21 rockey joined #salt
09:21 yota joined #salt
09:21 kallek joined #salt
09:21 EnTeQuAk joined #salt
09:21 xmj joined #salt
09:21 whyzgeek joined #salt
09:21 Striki joined #salt
09:21 ktenney joined #salt
09:21 Bosse joined #salt
09:21 keeeh joined #salt
09:21 andrewclegg_ joined #salt
09:21 dcolish joined #salt
09:21 godog joined #salt
09:21 welby joined #salt
09:21 MK_FG joined #salt
09:21 puppet joined #salt
09:21 etw joined #salt
09:21 Rorgo joined #salt
09:21 shennyg joined #salt
09:21 jphall_ joined #salt
09:21 stefw` joined #salt
09:21 cbloss joined #salt
09:21 Zethrok_ joined #salt
09:21 axiom joined #salt
09:21 jeblair joined #salt
09:21 pmcg_ joined #salt
09:21 terminalmage joined #salt
09:21 hughsaunders joined #salt
09:21 bwq joined #salt
09:21 Anb_ joined #salt
09:21 carxwol joined #salt
09:21 mfournier joined #salt
09:21 scalability-junk joined #salt
09:21 mnemonikk joined #salt
09:21 fivethreeo joined #salt
09:21 cetex joined #salt
09:21 andyshinn` joined #salt
09:21 andrew_seattle joined #salt
09:21 Micromus_ joined #salt
09:21 morganfainberg joined #salt
09:21 g3cko joined #salt
09:21 Kraln joined #salt
09:21 scofflaw_ joined #salt
09:21 Kyle joined #salt
09:21 jinnko joined #salt
09:21 kvbik joined #salt
09:21 benturner joined #salt
09:21 jpaetzel joined #salt
09:21 letterj joined #salt
09:21 ahale joined #salt
09:21 yml joined #salt
09:21 qybl joined #salt
09:21 ange joined #salt
09:21 akoumjian joined #salt
09:21 setient joined #salt
09:21 mirko joined #salt
09:21 madduck joined #salt
09:21 Jarus joined #salt
09:21 viq joined #salt
09:21 canci joined #salt
09:21 jpcw joined #salt
09:21 namtab joined #salt
09:21 xenoxaos joined #salt
09:21 swa joined #salt
09:21 robinsmidsrod joined #salt
09:21 bashcoder joined #salt
09:21 twinshadow joined #salt
09:21 kchr joined #salt
09:21 jtrucks joined #salt
09:21 Corey joined #salt
09:21 drags joined #salt
09:21 davromaniak joined #salt
09:21 lahwran joined #salt
09:21 [ilin] joined #salt
09:21 ze- joined #salt
09:21 sinh joined #salt
09:21 tethra joined #salt
09:21 jgelens joined #salt
09:21 jrgifford joined #salt
09:21 iMil joined #salt
09:21 evax joined #salt
09:21 gaoyang joined #salt
09:21 spoktor joined #salt
09:21 durnik joined #salt
09:21 keekz joined #salt
09:21 alexandrel joined #salt
09:21 lyddonb_ joined #salt
09:21 dh joined #salt
09:21 twiedenbein joined #salt
09:21 beardo__ joined #salt
09:21 ClausA joined #salt
09:21 insatsu joined #salt
09:21 tonthon joined #salt
09:21 johnsocp joined #salt
09:21 seb` joined #salt
09:21 errr joined #salt
09:21 chrism joined #salt
09:21 kula joined #salt
09:21 mollerstrand joined #salt
09:21 heckman joined #salt
09:21 bawnzai joined #salt
09:21 tamentis joined #salt
09:21 emilisto joined #salt
09:21 doki_pen joined #salt
09:21 paraglade joined #salt
09:21 ede joined #salt
09:21 gwar9999 joined #salt
09:21 minaguib joined #salt
09:21 ioni joined #salt
09:21 rizumu joined #salt
09:21 Odd_Bloke joined #salt
09:21 sashka_ua joined #salt
09:21 pygmael joined #salt
09:21 Ixan joined #salt
09:21 svx joined #salt
09:21 pnl joined #salt
09:21 ggherdov joined #salt
09:21 fredvd joined #salt
09:26 s0undt3ch joined #salt
09:32 faldridge joined #salt
09:35 s0undt3ch joined #salt
09:38 efixit joined #salt
09:49 Ryan_Lane joined #salt
09:51 pdayton joined #salt
09:55 pdayton joined #salt
09:59 bhosmer joined #salt
10:10 Furao joined #salt
10:13 bemehow joined #salt
10:16 fredvd joined #salt
10:18 zooz joined #salt
10:20 Ryan_Lane joined #salt
10:23 lemao joined #salt
10:50 Ryan_Lane joined #salt
11:01 ggoZ joined #salt
11:10 tuxIO joined #salt
11:12 emocakes joined #salt
11:16 jpcw_ joined #salt
11:17 oz_akan_ joined #salt
11:21 bhosmer joined #salt
11:28 copelco joined #salt
11:31 Furao joined #salt
11:37 jpcw joined #salt
11:38 LLckfan joined #salt
11:39 emocakes joined #salt
11:42 felixhummel joined #salt
11:46 faldridge joined #salt
11:49 fredvd joined #salt
11:59 LordOfLA joined #salt
12:00 baccenfutter joined #salt
12:02 baccenfutter hi. I am following http://docs.saltstack.com/topics/tutorials/pillar.html and receive an error when compiling /srv/salt/users/init.sls - obviously pillar.get('users', {}) is not a dict and thus has not items() method, but why does the tutorial state it that way?
12:02 matanya joined #salt
12:03 baccenfutter stacktrace: https://gist.github.com/anonymous/e12a7366e6180c952387
12:04 mwillhite joined #salt
12:13 scott_w joined #salt
12:14 jslatts joined #salt
12:19 middleman_ joined #salt
12:23 copelco joined #salt
12:26 krissaxton joined #salt
12:27 baccenfutter got it...
12:27 Gifflen joined #salt
12:30 fredvd joined #salt
12:30 LLckfan I have a fiend ho waas without power for three days and even though thier power is back on she thinks her under arms smell. Is there anything that someone would have in a house that she can use to get rid of the smell?
12:33 balboah_ salt?
12:38 krissaxton joined #salt
12:40 * honestly rolls eyes
12:41 badluck joined #salt
12:41 xmj soap
12:44 badluck Hi. I saw int the documentaion we can do something like this in a sls. "{% for file in salt['cmd.run'](ls /opt/to_remove) %}" This will execute a "ls" command on the minion. But, it is possible to call the "ls" command on the master? Exemple, I would like copy some file in a folder (all *.dll) from de master to minion. If I change chane the example, it won't work because I will get the list of DLL on the minion not on the master.
12:45 krissaxton left #salt
12:46 brianhicks joined #salt
12:47 EugeneKay Ah, this troll.
12:54 bemehow joined #salt
12:57 honestly badluck: states are rendered on the minion; the master's filesystem simply isn't there other than via salt://
12:58 honestly the best you can do is create a script that does the ls'ing and generates sls from that on the master, this is something you can do via salt
12:59 badluck ok, thanks, I will continue to read.
12:59 honestly if you need to have something like the grains, then do it via salt, otherwise, salt won't be of much use at all and you're better of writing that script in plain python
12:59 honestly better off*
13:00 badluck thanks
13:04 vaxholm joined #salt
13:04 anteaya joined #salt
13:05 tuxIO joined #salt
13:10 olaf38 joined #salt
13:11 ede joined #salt
13:11 Furao joined #salt
13:11 zloidemon Hello, who's understand greek language?
13:12 nkuttler greek people?
13:13 xmj google translate
13:13 nkuttler zloidemon: /msg alis list *-gr
13:13 zloidemon I need found contacts from one greek web site
13:13 zloidemon It's painful for me
13:15 mannyt joined #salt
13:15 zloidemon nkuttler: Thank you. I've just connected
13:15 terminalmage badluck: you can use the mine to get this list of files from the minion
13:16 terminalmage badluck: however, there's a bug with the mine that I just fixed last week and so it might not work the way you need it to until 0.16.4 is released in the next day or so
13:16 juicer2 joined #salt
13:16 SEJeff_work Can I get the cliff notes on what the mine is best used for?
13:17 badluck the "mine"? I didn't find this in the documentation yet
13:17 SEJeff_work http://docs.saltstack.com/topics/mine/index.html
13:17 redbeard2 joined #salt
13:17 badluck thanks, I will check this and see if I can use it (and wait for the fix). thanks
13:18 terminalmage SEJeff_work: it's a way for the minions to store data on the master, and make that data available to other minions. For my djangocon tutorial I used it to store the network interface info, so that the DB server would know which IPs to grant the DB user access from
13:19 SEJeff_work Sounds much nicer than some hacks with the peer interface
13:19 wolfpackmars2 joined #salt
13:19 terminalmage yeah
13:19 terminalmage it allowed for a single-command multi-server deployment
13:19 terminalmage via overstate
13:19 sfello joined #salt
13:19 SEJeff_work very cool
13:20 SEJeff_work terminalmage, That should be added to the tutorial if it isn't already
13:20 terminalmage yeah. 1. first store the interface info, 2. set up the db server, 3. set up the app servers and load the database, 4. PROFIT!
13:21 terminalmage SEJeff_work: I plan to, it's a good example of Salt's superiority
13:21 terminalmage SEJeff_work: I also submitted a talk for pycon where I'm going to take the djangocon demo and make it webserver and DB-agnostic
13:21 SEJeff_work Very nice!
13:22 terminalmage so you can just set in pillar if you want apache or nginx, mysql or postgres
13:22 SEJeff_work Can I suggest pimping mozilla circus / chaussette instead of gunicorn?
13:22 SEJeff_work Because I think they are better
13:22 SEJeff_work and bonus points that circus uses the snot out of zmq
13:22 multani joined #salt
13:23 Kholloway joined #salt
13:23 terminalmage not familiar with those
13:23 terminalmage they for using wsgi with nginx?
13:24 SEJeff_work Yes
13:24 emocakes joined #salt
13:24 SEJeff_work circus is (imo) the best process supervisor that exists
13:24 SEJeff_work hands down
13:24 SEJeff_work chaussette is a very nice wsgi server that works with circus
13:24 terminalmage yeah we have a number of people using it.
13:24 ipmb joined #salt
13:24 terminalmage I see it in a lot of SLS examples
13:25 SEJeff_work So (for instance), say you want to do a live reload of a django or flask app using circus / chaussette
13:25 SEJeff_work circus actually holds onto the socket and passes the socket to chaussette via a file descriptor
13:25 SEJeff_work xinetd style
13:25 SEJeff_work what does this mean to you?
13:25 SEJeff_work it means you can do: circusctl stop awesome_app
13:25 multani Is there any special recommandations to upgrade a minion using Salt itself? (I'm using the Debian packages from http://debian.saltstack.com/ )
13:26 ggoZ oi, is there an event or something of that kind, that is emitted when the mine is updated?
13:26 SEJeff_work You'll see (in ps) the worker stop, then update the code and start the worker. If any http connections were made during the downtime, circus holds onto the connection and keeps it alive. When chaussette comes back up, it passes the request through
13:26 SEJeff_work 0 downtime upgrades essentially
13:26 multani I tried running "salt '*' pkg.install salt-minion",but everything just stop working in the middle of the upgrade process :[
13:26 SEJeff_work left #salt
13:26 SEJeff_work joined #salt
13:26 terminalmage multani: how many nodes? if all of them are trying to download
13:27 multani terminalmage: a dozen
13:27 terminalmage multani: I did this once with a few hundred nodes and set off a bunch of cacti alerts
13:27 terminalmage haha
13:27 multani terminalmage: eh
13:28 terminalmage multani: ok, I only really did this with centos...  I think debian/ubuntu do stupid things with services
13:28 multani terminalmage: I imagine the upgrade process stops the minion before upgrading the code, which in turn stops the package manager from finishing the upgrade
13:28 terminalmage multani: yeah I think there's an open issue for this
13:28 mannyt joined #salt
13:28 multani terminalmage: I'll have a look on github
13:28 ggoZ terminalmage: now you do salt -b 10 ? ;)
13:30 terminalmage https://github.com/saltstack/salt/issues/5721
13:30 terminalmage multani: ^^^
13:30 terminalmage ggoZ: that particular instance was before the batch system existed
13:30 terminalmage haha
13:31 ggoZ ohh
13:32 multani joehh: did you have any feedback on this problem? I've just tried to upgrade from 0.16.3 to 0.16.4 and had to "dpkg --configure -a && apt-get -f install & service salt-minion restart" by hand on each nodes :[
13:32 multani terminalmage: oh, thanks!
13:32 ggoZ btw, where do I find events list that the events system may emit?
13:32 bhosmer_ joined #salt
13:33 joehh multani: I had just seen your question and was testing myself
13:33 joehh multani: I'll get back to you in a few minutes
13:33 multani joehh: cool, thanks!
13:34 m_george|away joined #salt
13:34 terminalmage ggoZ: I am not sure. I haven't used it at all. I do know that with 0.17.0 and later you'll be able to use arbitrary event names and you won't be limited to a 20-character event tag name
13:34 terminalmage ggoZ: we just added some event system docs like yesterday
13:34 terminalmage lemme check if they were published
13:34 joehh multani: how did you do the upgrade? I'm about to try pkg.upgrade
13:34 ggoZ oh wow
13:35 racooper joined #salt
13:36 terminalmage ggoZ: they were not published, I'm forcing a publish now, the updated docs should be available at http://docs.saltstack.com/topics/event/index.html in a min or two
13:36 alunduil joined #salt
13:37 bhosmer_ joined #salt
13:37 ggoZ terminalmage: sweet!
13:37 toastedpenguin joined #salt
13:38 toastedpenguin left #salt
13:38 terminalmage yup
13:38 terminalmage ggoZ: done
13:39 multani joehh: I tried "pkg.install salt-minion" and "cmd.run 'apt-get install salt-minion'"
13:39 kenbolton joined #salt
13:39 multani (I didn't use pkg.upgrade, since there are some packages that I didn't wanted to get updated yet)
13:39 terminalmage ggoZ: no info on listing events, I'm not sure this is possible because they can be tagged as whatever
13:40 terminalmage multani: can you still communicate with the minions?
13:40 terminalmage multani: does a test.ping work?
13:40 multani terminalmage: no I couldn't, there were stopped
13:40 multani *they were
13:41 terminalmage hmm
13:41 micah_chatt joined #salt
13:42 terminalmage multani: can you go to one of the minions and see if your minion config file is still there, or if it was renamed/backed up by the upgrade?
13:42 tyler-baker joined #salt
13:42 terminalmage there was an issue a while back with package upgrades that result in config file conflicts, but I thought that was resolved a while ago
13:43 terminalmage basically, the package installation blocks on input as it asks you what to do with the file (overwrite, back up, keep old, etc)
13:43 terminalmage but I thought we resolved thisd
13:43 ggoZ terminalmage: I was wondering how to catch an event of the built-in facility, say a `minion.update` has been called - is there a pipe somewhere that I could tap into and act on the event?
13:43 terminalmage *this
13:44 copelco i have a question about the state hierarchy with multiple servers. say i have two servers: web and database. the web server will create the necessary tables, but the database server needs to create the database first. how can I make one depend on the other when they're referencing different servers?
13:44 terminalmage ggoZ: well the docs say that you can just listen on the socket
13:44 oz_akan_ joined #salt
13:44 terminalmage but I don't know if that is 0.17.0+
13:45 terminalmage ggoZ: might want to ask on the mailinglist
13:45 m_george left #salt
13:45 joehh terminalmage, multani: it is as you suspected, the minion is being killed off part way through which stops the service and kills the upgrade
13:45 terminalmage copelco: use an OverState for the initial deployment. I showed an example of exactly this at DjangoCon last week. https://github.com/terminalmage/djangocon2013-sls
13:46 terminalmage copelco: OverState lets you do the initial stuff in stages
13:46 ggoZ terminalmage: k, thank you :)
13:46 terminalmage then once everything is set up, you can maintain the setup using highstate
13:46 copelco terminalmage: great, i'll check it out. i was at djangcon last week too :)
13:47 terminalmage copelco: yeah? cool. I wasn't able to make it for the rest of the days, I was just there for the tutorial on Monday
13:47 joehh I suspect this is partly due to a init.d script clean up, which made it a bit more aggressive about stopping the (all) minions
13:47 terminalmage ggoZ: np
13:47 joehh minion processess, not all minion hosts
13:47 copelco terminalmage: ah cool. i was just there from Tuesday on.
13:48 terminalmage copelco: yeah I was considering coming by for the rest of it but there was too much to do
13:48 oz_akan_ joined #salt
13:48 toastedpenguin joined #salt
13:50 cron0 joined #salt
13:50 joehh terminalmage: the blocking for input does not occur
13:50 joehh terminalmage: how is this handled on centos?
13:50 pipegrep joined #salt
13:50 joehh Does it use the init.d script from pkg/rpm/salt-minion?
13:51 multani joehh: I'll post a detail on what's happenning soon
13:51 imaginarysteve joined #salt
13:51 joehh multani: thanks
13:53 joehh multani: have you still got your hosts to upgrade, or are you holding off until we can get a fix
13:53 terminalmage joehh: centos doesn't pull the same crap
13:53 multani joehh: I still have some hosts to upgrade
13:53 curtisz joined #salt
13:54 multani joehh: (actually, 17 to go)
13:54 terminalmage joehh: just saves the new file as /path/to/conf/file.rpmnew
13:55 pdayton joined #salt
13:55 joehh terminalmage: not that bit - that seems ok, the init script issue - killing the minion and child processes before they can finish the upgrade
13:57 kaptk2 joined #salt
13:57 scalability-junk unrelated to salt, but anyway: how do you all name your hostnames? program name or usage? master.salt.services.* vs master.configuration.services.*? and how would you name subdomains to webportals? halite.* or interface.salt.*?
13:59 terminalmage joehh: yeah, I never had a problem with this on centos to be honest. but my last job was all centos so this could be an ongoing issue with debian-based systems
13:59 scalability-junk I would probably go the usage rule as it seems more confinient to have webserver.* instead of apache.* and more useful to visit interface.config.* instead of halite.config.* etc...
13:59 terminalmage joehh: I would need to test more
14:00 terminalmage but I'm working on high-severity issues this week in preparation for the 0.17.0 RC
14:00 zooz joined #salt
14:00 terminalmage scalability-junk: at most of my jobs, the naming has been location-based
14:01 terminalmage one place did that through subdomains
14:01 sfello_ joined #salt
14:01 terminalmage another did it through a cryptic naming scheme in the hostname
14:01 scalability-junk terminalmage: but no node names? I would do the location stuff after the webserver for example: webserver.rack1.rz2.dns.net
14:02 terminalmage like, cplXXX01 for chicago production linux, XXX for the type of server and, then a number
14:02 terminalmage followed by the rest of the domain
14:02 joehh terminalmage: no worries - I've got an initial quick fix then I'll have a think about the best solution
14:03 nu7hatch joined #salt
14:03 terminalmage scalability-junk: yeah, I like that idea, but we didn't do that :)
14:03 scalability-junk terminalmage: alright so you would like to do that if it would be allowed?
14:04 terminalmage well it's a moot point as I no longer work there
14:04 scalability-junk alright usage based without cryptic stuff it is :P
14:04 scalability-junk ^^
14:04 multani joehh: it's an output of "inotail /var/log/dpkg.log /var/log/salt/minion" and "inotifywait -m -r /etc/salt/" during a pkg.upgrade : http://pastebin.com/Wr6P9h5s
14:04 multani (and it stopped right there)
14:05 multani the minion's log level was debug
14:06 multani joehh: I can give a try if you have a fix, if you want
14:07 ldlework joined #salt
14:08 ldlework Hi. I'm having problems installing the Salt minion into a Docker container running Ubuntu Raring
14:08 ldlework I believe it has something to do with its dependency on python-... uh
14:08 ldlework darn it, I don't remember. ignore this.
14:11 Gifflen joined #salt
14:14 jh3141 joined #salt
14:14 chrisgilmerproj joined #salt
14:16 jh3141 multani: JOEHh here, internet dropped out here, trying to reconnect...
14:16 mgw joined #salt
14:16 robertkeizer joined #salt
14:17 multani jh3141: ok!
14:17 multani jh3141: I was telling: joehh: it's an output of "inotail /var/log/dpkg.log /var/log/salt/minion" and "inotifywait -m -r /etc/salt/" during a pkg.upgrade : http://pastebin.com/Wr6P9h5s
14:17 multani jh3141: (and it stopped right there)
14:17 multani jh3141:  I can give a try if you have a fix, if you want
14:19 kermit joined #salt
14:20 mattinator joined #salt
14:21 jh3141 Easiest solution i have come up with so far is to replace the init script
14:21 jh3141 With one that does not kill off all of the minion processes
14:23 jh3141 If you still have a minion from 0.16.2 or earlier
14:23 multani jh3141: do you have a repository where I can see the patch?
14:23 multani jh3141: I have a dozen with 0.16.3
14:23 jh3141 Yes, but difficult to type on phone
14:23 multani jh3141: oh ok :D
14:24 jbunting joined #salt
14:26 lineman60 joined #salt
14:26 joehh_ joined #salt
14:26 TheCodeAssassin joined #salt
14:27 joehh_ multani: mostly back!
14:27 multani joehh_: yey!
14:28 KennethWilke joined #salt
14:29 mgw joined #salt
14:30 joehh_ if you use the init script from http://sources.debian.net/src/salt/0.15.1-1~bpo70%2B1/debian/salt-minion.init
14:30 joehh_ ie put that over the top of /etc/init.d/salt-minion, then I believe it should work
14:31 joehh_ you'll also need to do that when you upgrade from 0.16.4-1 until I get a 0.16.4-2 out asap
14:31 joehh_ the downside of the old init script is that if there are any minions that get stuck, they don't get stopped when you try to stop the minion
14:33 bemehow joined #salt
14:33 joehh_ multani: this is the patch that has caused the problem: http://goo.gl/wXKCxZ
14:33 jalbretsen joined #salt
14:35 multani joehh_:  is that somehow related to https://github.com/saltstack/salt/issues/5721?
14:35 aptiko joined #salt
14:36 aptiko I'm confident I'm not the first one to notice that the Salt documentation is, ehr, suboptimal. I wonder whether there are any plans to improve it.
14:36 joehh_ I think so - the init script update was not in response to that, but similar issues
14:36 krissaxton joined #salt
14:37 abe_music joined #salt
14:37 scalability-junk terminalmage: would one want the hostnames to be unique and use them as reverse dns entries too?
14:38 multani scalability-junk: that's what we do here
14:38 scalability-junk multani: may I ask for your naming convention?
14:39 joehh_ multani: how feasible is it to try using file.managed or similar to replace /etc/init.d/salt-minion with the older/unpatched version?
14:39 multani scalability-junk: nothing fancy, we just use subdomains of our main domain name, where the subdomain part is related to the application running on the machine
14:39 middleman_ joined #salt
14:39 multani joehh_: on my setup ?
14:39 joehh_ yes
14:39 multani joehh_: hum, I would say more than doable
14:40 scalability-junk multani: ok for example halite.your-domain.net for example, but that doesn't seem unique and wouldn't really be a great hostname
14:40 sgviking joined #salt
14:40 aptiko I'm somewhat confused with the terminology. I'm creating a component that will be a salt state that will install a Django application. (In Puppet this would be a "module".) Do I want to create a "formula"?
14:40 scalability-junk I imagined something more like web/db.prod/test/dev.in.rack.rz.hoster.your-domain.net
14:41 scalability-junk but adding the projectname into that would be great I think
14:41 multani scalability-junk: we don't have so much machine at the moment, so that's what we are using. We have more generic things though, like monitoring.example.com
14:42 scalability-junk ok
14:42 multani scalability-junk: how many nodes are you talking about?
14:42 ggoZ joined #salt
14:42 joehh joined #salt
14:42 scalability-junk multani: 40-50 perhaps, but I like naming conventions :)
14:44 multani scalability-junk: each of our machines have fairly well defined purposes, and most are VM that just run this particular service, so that's why we went for this convention
14:44 nu7hatch joined #salt
14:45 scalability-junk multani: yeah but what happens when you run icinga and nagios for example that would both be monitoring and 2 machines ;)
14:46 ml_11 joined #salt
14:46 StDiluted joined #salt
14:46 multani scalability-junk: we put them all on monitoring then :p
14:47 scalability-junk for reverse dns, but hostnaming too?
14:47 multani joehh_: that seems to work, although pkg.upgrade returns nothing
14:47 joehh_ multani: does grains.saltversion return the right thing afterwards?
14:48 EugeneKay joined #salt
14:48 multani joehh_: it does
14:48 joehh_ good to hear
14:48 multani just have to deal with some pesky Lenny machines now :|
14:48 joehh_ pkg.upgrade returned when I tested it - it could be a timing thing, i provided a -t arg to my salt call
14:49 joehh_ I know the feeling with the lenny ones...
14:50 joehh_ multani: sorry about this issue - hopefully the fix is not too painful. You will need it (or similar) from 0.16.4-1 to 0.16.4-2 too.
14:50 joehh_ I might also see if the upgrade can be detached from the minion process in someway - maybe run it through cron or at
14:50 multani joehh_: I'm probably going to deploy the init script over the current one, restart all my minions and try to upgrade again
14:51 joehh_ sounds good
14:51 LLckfan I have a fiend ho waas without power for three days and even though thier power is back on she thinks her under arms smell. Is there anything that someone would have in a house that she can use to get rid of the smell?
14:51 scalability-junk anyone else wanna share their naming convention for hostnames and perhaps dns entries?
14:52 multani aww, I'm glad that my 550 characters cmd.run command does the upgrade on Lenny for me
14:52 UtahDave joined #salt
14:53 joehh multani: have you got it running on lenny?
14:53 joehh it=salt
14:53 bemehow joined #salt
14:53 multani joehh: don't ask
14:53 [diecast] joined #salt
14:53 multani please
14:54 joehh ok....
14:54 jslatts joined #salt
14:54 scalability-junk UtahDave: hostname naming convention? master.salt.saltstack.in.rack.rz.hoster ?
14:54 teskew joined #salt
14:54 unicoletti_ left #salt
14:54 multani joehh: but yeah, I have Python 2.7 compiled in /opt + a Git clone of github.com/saltstack/salt + a few patches around
14:55 joehh sounds workable - just
14:56 multani joehh: I have quite a few hacks to make it not so different from Squeeze or Wheezy when ran through Salt
14:57 opapo joined #salt
14:58 multani joehh: let me know if you are interested
14:59 Lue_4911 joined #salt
14:59 UtahDave scalability-junk: whatever works in your environment.
15:00 lineman60__ joined #salt
15:00 scalability-junk UtahDave: yeah but I like to have some already working examples :)
15:00 Donckers joined #salt
15:01 Donckers joined #salt
15:02 mwillhite joined #salt
15:07 whit joined #salt
15:09 aptiko Is there any difference between a formula and a state module, except that the latter is written in Python?
15:09 ckao joined #salt
15:10 Kraln joined #salt
15:11 UtahDave aptiko: a formula is a yaml file that uses state modules
15:11 multani aptiko: AFAIU, a formula (as in http://docs.saltstack.com/topics/conventions/formulas.html) is just a set of declaration that you include to pre-configure things, using state modules
15:12 aptiko UtahDave: Can I pass parameters to a formula, like a can pass to a state module? Or does it need to take the configuration from the pillar?
15:12 UtahDave aptiko: yes, most states take various arguments.
15:13 UtahDave aptiko: here's an example of the pkg.installed state and its various arguments
15:14 aptiko UtahDave: I know states take arguments; what I don't know is if formulas take arguments.
15:15 aptiko UtaDave: I took a look at https://github.com/saltstack-formulas/ but couldn't find an example of a formula taking arguments.
15:15 ldlework Is there anyway to have a minion use an environment variable for locating the master?
15:15 UtahDave aptiko: here's an example: https://github.com/saltstack-formulas/users-formula/blob/master/users/init.sls#L17
15:16 UtahDave ldlework: yeah, I think you can.
15:17 ldlework UtahDave: I can't find it. salt-minion -h doesn't give me any hints.
15:17 forrest joined #salt
15:18 aptiko UtahDave: Ah! So the "pillar" is the configuration passed to a state? Hard to understand from the docs.
15:18 joehh multani: thanks, will do - luckily we are now getting rid of our lenny machines
15:18 joehh mostly inspired by salt not "working" on them
15:19 mgw joined #salt
15:19 UtahDave aptiko: ok, so you don't have to use pillar data to pass in the configuration. You can just hard code it in.
15:20 krissaxton1 joined #salt
15:20 baniir joined #salt
15:20 UtahDave aptiko: Look here for an example without using pillar: http://docs.saltstack.com/topics/tutorials/walkthrough.html#the-first-sls-formula
15:21 ldlework UtahDave: is is possible the minion doesn't support it?
15:21 UtahDave aptiko: Pillar is a data store on the master that you can use in conjunction with jinja templating to populate the arguments dynamically.
15:21 UtahDave ldlework: I haven't used it. Let me check
15:22 UtahDave ldlework: Hm. Looks like the minion might not be able to be configured like that. But that's an awesome feature.
15:23 UtahDave Would you mind opening an issue on that?
15:23 ldlework UtahDave: I can't figure out how to bootstrap salt minions! ahhhhh
15:23 opapo joined #salt
15:23 ldlework Hehe okay.
15:23 UtahDave ldlework: have you tried Salt Cloud?
15:24 ldlework UtahDave: I'm trying to get Minions inside of Docker containers to bootup and discover their master
15:24 ldlework Docker doesn't really have much in the way of rendering templated configuration files
15:24 ldlework Salt does but that's putting the chicken before the egg
15:24 ldlework I'm stumped
15:25 UtahDave ldlework: can you set your dns to point    'salt' to the ip of your master?
15:26 ldlework UtahDave: this is an option I hadn't considered
15:27 UtahDave by default the minions are set to look for that hostname for it's master
15:28 ldlework I guess its time to refresh my DNS skills..
15:28 jbunting joined #salt
15:30 UtahDave ldlework: I'm not super familiar with docker yet, but can you hardcode the master's ip in the minion config?
15:31 ldlework UtahDave: I don't want to hard-code the master's IP. I might move.
15:31 ldlework It*
15:31 ldlework I want to pass the master ip into the environment, via variable, and have the minion use that.
15:31 ldlework I may consider just having a bootstrap script, that looks for that variable then manipulates /etc/hosts...
15:31 deepakmd_oc joined #salt
15:31 ldlework but bleh
15:33 terminalmage scalability-junk: sorry, went to the gym
15:33 scalability-junk terminalmage: no worries
15:34 terminalmage we did use reverse DNS pretty extensively at my last job
15:34 terminalmage but we didn't have subdomains for host type, site, etc.
15:34 forrest subdomains are bad mm'kay?
15:34 scalability-junk My approach right now is for dns: ra##s##-in-$rz-at-$hoster.domain.tld
15:34 terminalmage just had a single internal and single external domain and did all the naming in the hostname
15:34 forrest ok that's a better plan scalability
15:34 scalability-junk Then for the actual services/subdomains: usage.domain.tld -> monitoring.domain.tld
15:35 forrest asdf.xyz.domain.com is a terrible plan
15:35 scalability-junk and I'm still not sure about hostnames...
15:35 forrest but then virtualization tools won't pick it up
15:35 forrest vmware chops at the dot scalability-junk
15:35 forrest not sure about other virtualization tools
15:35 scalability-junk you mean for subdomains?
15:36 forrest yea, we have stuff like web1.asdf.domain.com, and web2.asdf.domain.com, and those just show up as web1 and web2, so there are hundreds of those :\
15:36 baniir joined #salt
15:36 scalability-junk ah ok. yeah I would use dns with one subdomain level and a bit more cryptic and use hostnames like:
15:38 scalability-junk web/multi/db/cache/master/$service.salt/$programm.saltstack/$project.$environment.in.$rz.at.$hoster ... any suggestions?
15:38 forrest lol
15:39 scalability-junk saltmaster would look like: master.salt.saltstack.prod.in.ns.at.rackspace for example
15:39 forrest that's the hostname??
15:39 UtahDave ldlework: I'm doing a little code diving and it looks like you might be able to set an environment variable for the config file location.
15:39 forrest I feel pity for whoever has to troubleshoot those machines
15:39 scalability-junk forrest: that's the idea for now
15:40 forrest what happens when you have to ssh into that box?
15:40 scalability-junk forrest: hehe why? what would you use as hostnames
15:40 scalability-junk forrest: then you use the dns not the hostname...
15:40 forrest I don't have a better proposal
15:40 forrest just a long hostname
15:41 scalability-junk terminalmage: any opinion?
15:41 forrest but if you have thousands of boxes, then it makes sense from a future proofing standpoint
15:41 scalability-junk not just that, but it makes sense for matching vms via hostnames in salt I figure
15:41 terminalmage sorry, was in another channel
15:41 isomorphic joined #salt
15:41 scalability-junk if you want to match on rz for example '*.in.ns.*'
15:42 terminalmage those hostnames look horrendous
15:42 terminalmage lol
15:42 scalability-junk that's why I wanna discuss my ideas :P
15:42 aptiko UtahDave: I still can't find an example of a formula accepting arguments. https://github.com/saltstack-formulas/users-formula/blob/master/users/init.sls gets all its data from the pillar.
15:42 terminalmage scalability-junk: we put things like production and site in the hostname itself rather than subdomains
15:43 terminalmage site might be tricky, but we'd have "pl" in the hostname for "production linux"
15:43 terminalmage and "tl" for testing linux
15:43 UtahDave aptiko: did you look at the last link I gave you?
15:43 scalability-junk can you give me a full example?
15:43 terminalmage "ds" for development solaris
15:43 * forrest gasps
15:43 terminalmage scalability-junk: I did earlier, it was something like cplXXX01.domain.tld
15:44 terminalmage chicago production linux
15:44 terminalmage I wasn't the biggest fan of that, but it is concise
15:44 scalability-junk terminalmage: ah sorry, but your hostname is your dns at the same time right?
15:44 joehh multani: looks like salt 'testminion01' at.at 'now + 1 minute' "apt-get install -y salt-minion"
15:44 scalability-junk I would separate that in dns and hostname
15:44 terminalmage scalability-junk: huh?
15:44 joehh works quite well
15:44 chrisgilmerproj joined #salt
15:45 scalability-junk local hostname (for matching and identifying a box) and dns naming for ssh etc.
15:45 aptiko UtahDave: "The First SLS Formula"? I did; it creates vim.sls, which doesn't have any parameters.
15:45 aptiko UtahDave: Or, if you mean users-formula, yes, that's exactly the one I repeated above.
15:45 scalability-junk ra##s##-in-$rz-at-$hoster.domain.tld vs master.salt.saltstack.prod.in.ns.at.rackspace
15:45 ldlework UtahDave: that still doesn't help greatly since Docker doesn't have templating
15:46 terminalmage scalability-junk: I still don't follow
15:46 terminalmage of course the hostname and the DNS name are the same
15:46 terminalmage why wouldn't they be?
15:46 krissaxton joined #salt
15:46 scalability-junk terminalmage: cause hostname could be used internally to better match and identify services and external dns shouldn't provide these informations.
15:47 UtahDave aptiko: if you look down below you'll see /etc/vimrc:\n  file.managed:
15:47 scalability-junk in salt doing '*master.salt*' for example instead of '*cplXXX01*'
15:47 chrisgilmerproj left #salt
15:47 UtahDave aptiko: mode, user and group are parameters sent into the file.managed state module
15:47 terminalmage scalability-junk: I guess this assumes that the boxes are all available on the internet
15:48 UtahDave aptiko: if you want dynamic data then you would jinja to insert pillar data like this:    - user: {{ pillar['username'] }}
15:48 scalability-junk terminalmage: doesn't have to. you could use ssh internally too and use the dns there too to access a box.
15:49 multani joehh: I'm going to try your at.at trick :)
15:49 forrest aptiko are you just trying to set local variables in the sls?
15:50 kenbolton joined #salt
15:52 multani joehh: that's hacky but ... oww, I like that <@o_o@>
15:52 ipmb joined #salt
15:53 FL1SK joined #salt
15:53 forrest if so aptiko, check out: http://docs.saltstack.com/ref/renderers/all/salt.renderers.jinja.html
15:54 troyready joined #salt
15:56 micah_chatt joined #salt
15:57 multani aptiko: you can't "pass" parameters to a Formulat, there are just declaration of packages to be installed, or things to be configured on the system
15:57 multani aptiko: but you can give them parameters through Salt's pillar, it seems that's how there are supposed to be configured
15:58 joehh multani: yeah - it seems to work quite well
15:59 aptiko UtahDave, forrest, multani: Let's use an example. The users formula creates users. Could it be possible to use the users formula in an sls file by writing something like this: http://dpaste.com/1373944/ ? Or is the only way to do that to make "user" a state module written in Python?
16:00 krissaxton joined #salt
16:00 HumanCell joined #salt
16:01 multani aptiko: that's perfectly fine
16:01 forrest I assume sudouser is defined somewhere?
16:01 multani aptiko:  sudouser apart
16:01 KyleG joined #salt
16:01 KyleG joined #salt
16:02 UtahDave aptiko: yeah, that works. Except I don't think sudouser is a valid argument to the user.present function
16:02 forrest It isn't I just double checked.
16:02 aptiko Damn, from these responses I understand there already exists a "user" state module. Bad example.
16:02 forrest you want your own module?
16:03 HumanCell UtahDave: is there a local Utah Salt User Group?  Or any events/presentations to collaborate on learning SaltStack?
16:03 HumanCell I noticed a local DevOps group starting up ...
16:05 jalbretsen UtahDave:  Is it a bug, or is it a feature time
16:05 scalability-junk terminalmage: now I get your point of dns being equal to hostname as you would want to use it for connections to db server etc. for example.
16:06 jalbretsen I have two sls files set up, one for logrotate, and one for samhain.  I don't need the logrotate file if I don't have samhain installed, so in the samhain formula, I have this:
16:06 jalbretsen {% from 'core/logrotate/init.sls' import logrotatefile with context %}
16:06 jalbretsen {{ logrotatefile("samhain") }}
16:07 forrest why don't you just import logrotate?
16:07 forrest oh the file itself, gotcha
16:07 jalbretsen I import the macro
16:07 jalbretsen so I can reference it, took me some time to figure out how jinja likes to do that
16:08 jalbretsen but wait, your comment made me think of something....
16:08 opapo joined #salt
16:08 UtahDave HumanCell: I don't know of a Salt specific user group.  Utah Python has had several Salt based meetings.  Do you have details of this local DevOps group? I'm sure we'd love to support it.
16:09 HumanCell I found them here:  http://www.meetup.com/DevOpsUT/  Meeting on the 18th ...
16:09 HumanCell ... hey, no speakers lned up yet!  :-)
16:09 aptiko UtahDave, forrest, multani: Sorry, bad example. Here's a new one: http://dpaste.com/1373960/ If I want to create "apachevirtualhost", does this have to be a state module written in Python? Or could it be a formula?
16:11 multani aptiko: this has to be a module written in Python, I believe
16:11 jalbretsen forrest / UtahDave:  the error I was getting was I was importing the macro, but the sls file itself has some requirements within that macro, so if I include it the errors went away.
16:12 forrest ahh ok jalbretsen
16:12 faldridge joined #salt
16:12 UtahDave aptiko: so you're wanting to create a custom module?
16:12 UtahDave thanks, HumanCell
16:12 forrest he's just asking if what he wanted to do would require a custom module
16:12 jalbretsen UtahDave:  So not a bug or a feature, a jalbretsen is stupid
16:12 aptiko UtahDave: I don't know what I want, I'm trying to find out.
16:13 forrest aptiko, I don't see why you'd manage it that way instad of just via a file.managed for the vhost
16:13 aptiko forrest: Yes, this is just a stupid example.
16:13 forrest I know
16:14 forrest but Id' agree with multani, requires a custom module. I don't think that state files are going to support that sort of logic, but I could be wrong. Never seen it done.
16:14 multani I had started to write something along this way, to enable/disable Apache modules on Debian
16:14 aptiko forrest: Maybe I could have more complicated logic inside apachevirtualhost, which required abstraction. So, if I understand your responses, I would either create a custom module in Python, or create a formula, but in that case I wouldn't use it like this; instead, I'd pass it parameters through the pillar.
16:14 multani so you could write something like: "rewrite: apachemod.enabled"
16:15 multani I never finished it though :[
16:15 pdayton left #salt
16:17 spmurrayzzz joined #salt
16:19 spmurrayzzz hey all, has anyone here experienced a Salt install (via yum/rpm) that didn't add the binary to /usr/bin and didnt add the related salt-master service?
16:20 aptiko UtahDave, forrest, multani: My actual problem is https://github.com/openmeteo/salt-enhydris/; I want to create a salt component that will help install and configure enhydris, which is some kind of server software. I've mostly written the installation part, but now I need to write the configuration part, which must be parameterized. What is the common way of doing it? Formula?
16:21 Furao joined #salt
16:21 multani aptiko: what do you need to configure?
16:21 aptiko UtahDave, forrest, multani: The configuration includes many things, such as configuring nginx and gunicorn.
16:21 cbloss is it possible to parse config files inside a git repo, but without using gitfs? I am trying to figure out the proper way to deploy websites that are hosted on git using salt
16:22 aptiko multani: hostname, database server, memcached server, etc. etc.
16:22 aptiko multani: I mean I need to tell enhydris which is the database server, which is the memcached server, and so on.
16:24 aptiko multani: I'll try a formula configured through the pillar.
16:25 multani aptiko: well, I would say you don't have to write a custom Python module for this
16:25 multani aptiko: try to put in the pillars all the things that you need to get configured, and then, try to pull them from your existing states
16:25 bastion2202 joined #salt
16:26 aptiko multani (and the others): Thanks for the help. It's so confusing. I feel almost as confused as when I was learning Puppet.
16:27 aptiko multani: Can I use the pillar in masterless minion?
16:27 multani aptiko: I have no idea, I never used a masterless minion, but I can't see why you wouldn't be able to
16:27 devinus joined #salt
16:28 danielbachhuber joined #salt
16:29 jacob_s joined #salt
16:30 Gareth aptiko: from what I've read so far, you can use pillar in a masterless env.  You need to tell the local salt what the pillar root is, iirc.
16:30 Gareth aptiko: there are examples of doing this in the wiki docs.
16:34 smw joined #salt
16:37 ldlework What might be happening if the Minion doesn't complain that it cannot connect to the master, says its waiting for acceptance, but the master never shows anything under salt-key -L ?
16:39 ldlework nevermind!
16:39 KyleG left #salt
16:41 Furao joined #salt
16:42 * scalability-junk is totally confused how to name his servers (hostname, dns etc.)
16:42 ldlework Hmm, how about if the master has accepted the key, but running salt '*' test.ping returns nothing
16:43 ldlework I have the minion running -l all and nothing is logged when I invoke this command from the master
16:45 canci joined #salt
16:45 multani ldlework: what are the logs on the minion telling you?
16:48 ldlework multani: when I invoke a command on the master, the minion log says absolutely nothing
16:49 ldlework like it makes the key transaction, the minion even loads the master's key, etc
16:49 ldlework Loaded minion key: /etc/salt/pki/minion/minion.pem
16:49 ldlework but this is the last log message
16:49 ldlework multani: is it possible that the master is confused as to how to reach the minion?
16:50 multani ldlework: might be?
16:50 ml_1 joined #salt
16:50 ml_11 joined #salt
16:50 multani but the minion is supposed to connect to the master and commands sent through this connection
16:50 ldlework is the connection persistent or do they connect periodically?
16:52 multani it's persistent
16:52 multani ldlework: is your firewall correctly set up?
16:53 ldlework multani: I'm running all of this in docker containers
16:53 UtahDave ldlework: have you opened your firewall on your master?
16:53 ldlework So that's why I'm asking how the connections are done
16:53 UtahDave ldlework: the minions reach out to the master
16:53 ldlework UtahDave: that seems to work since the minion's key is registered, etc
16:53 ldlework But the Master can't send jobs to the minion
16:53 farra joined #salt
16:55 berto- joined #salt
16:56 ldlework master_port
16:56 ldlework Default: 4506
16:56 ldlework however in the master config
16:56 UtahDave joined #salt
16:56 ldlework publish_port
16:56 ldlework Default: 4505
16:56 ldlework If I have changed the "publish_port" for the master
16:56 Niichan UtahDave: https://gist.github.com/Niichan/3a48cc84818f99ed2a96
16:56 ldlework Do I need to tell the minion about that?
16:56 UtahDave ldlework: yep
16:57 ldlework UtahDave: there doesn't seem to a config option for that
16:57 ldlework only "master_port"
16:57 Ryan_Lane joined #salt
16:57 ldlework UtahDave: you see, my master is in a container so its standard ports are forwarded through non-standard random ports
16:58 ldlework I have figured out how to bootstrap "master_port" for the minion
16:58 ldlework but not sure what the name of the other port is called
16:58 ldlework doesn't seem to be one listed in the docs
17:00 ldlework UtahDave: Any idea?
17:00 ldlework ah ret_port
17:00 ldlework nice
17:01 ldlework wait no
17:01 ldlework that's on the master config
17:01 ldlework ARGH
17:02 jbunting joined #salt
17:02 ldlework I don't think you can set both ports on the minion
17:02 ldlework silly
17:03 ldlework probably because the master tells the minion what port to use
17:03 ldlework but this makes the communication impossible if there is network routing taking place that the master is aware of
17:04 ldlework I guess I'll see if I can get the ports to not be redirected
17:05 matanya joined #salt
17:05 Heartmender joined #salt
17:07 redondos joined #salt
17:12 tomviner joined #salt
17:13 TheCodeAssassin joined #salt
17:16 pierre1 joined #salt
17:16 pdayton joined #salt
17:17 mohae joined #salt
17:18 pcarrier joined #salt
17:19 ldlework Yay that fixed it
17:24 pcarrier joined #salt
17:28 bastion2202 joined #salt
17:28 spmurrayzzz yum reports that salt has the dependencies `initscripts` and `chkconfig` but the install doesnt fail if those deps are missing -- can salt-master install without those packages?
17:29 krissaxton joined #salt
17:30 Ryan_Lane joined #salt
17:37 scalability-junk mhh am I wrong or shouldn't the hostname at least the local one be as descriptive as possible so that salt master can be more easily and more descriptive be matched?
17:39 kenbolton joined #salt
17:44 kenbolton joined #salt
17:48 jaequery joined #salt
17:48 forrest spmurrayzzz, I imagine the chkconfig and initscript requirements are just for the init service. I'm looking at the init script now, and it just starts and stops the service, so you could probably get away without those, but I feel pity for whatever system you're running that doesn't have initscripts and chkconfig :\
17:58 kenbolton joined #salt
17:59 SunSparc joined #salt
18:01 alexandrel wow, gitfs is absolutely f**ing amazing.
18:01 alexandrel <3 salt
18:02 UtahDave :)
18:02 xmj *cough* single point of failure *cough*
18:03 cbloss I'm trying to figure out how to use git with salt and not having much luck. does anyone know of any good tutorials/examples ?
18:03 alexandrel cbloss: didn't find any, mabye I should write one.
18:04 xmj https://salt.readthedocs.org/en/latest/topics/tutorials/gitfs.html ?
18:05 alexandrel cbloss: I think the key to success is understanding that top.sls are concatenated, and master is your base.
18:05 cbloss I am trying to deploy websites via salt + git. I dont
18:05 cbloss think gitfs is what I want to use
18:05 cbloss unless I am understanding something wrong?
18:05 UtahDave cbloss: sure, you could use gitfs.
18:06 alexandrel xmj: if I supply multiple remotes, it would effectively eliminate the single point of failure, no?
18:06 UtahDave cbloss: say you have your website code in git. use gitfs to make the code available to the git master and it pushes it out to your webservers
18:06 auser joined #salt
18:07 xmj alexandrel: when the repos are on multiple servers, sure.
18:07 UtahDave xmj: Salt will continue to use its latest git cache if the git repo goes down
18:07 alexandrel xmj: absolutely.
18:08 cbloss UtahDave: okay I'll give that a shot and see what I come up with. thanks
18:08 xmj i personally don't think production configurations belong on gh --especially when combined with a system that automatically pulls them.
18:08 UtahDave xmj: it doesn't have to be a github repo
18:08 xmj however that's just me. :)
18:08 alexandrel my production configs won't be in the "cloud" for sure.
18:09 alexandrel 100% internal.
18:09 alexandrel so it's not just you...
18:10 bhosmer joined #salt
18:10 redondos joined #salt
18:17 forrest cbloss, if you want a real world example, check out: https://github.com/terminalmage/djangocon2013-sls
18:18 terminalmage I've gotten so many mentions in #salt over the last week....
18:18 terminalmage :P
18:18 forrest oh nevermind you're using gitfs, not a set of files via git
18:18 forrest sorry
18:18 forrest that's all me terminalmage :P
18:18 forrest because it's a good example
18:18 terminalmage :D
18:19 juanlittledevil joined #salt
18:20 juanlittledevil hi guys, I've got a quick question for you. Is there an easy way to know which minions arent responding or timing out? seems that the default is that if it doesn't ping it simply returns no output when running highstate.
18:20 UtahDave joined #salt
18:21 terminalmage juanlittledevil: the manage runner will tell you which do not respond
18:21 terminalmage salt-run manage.down
18:22 juanlittledevil terminalmage: cool I'll give that a try. thanks!
18:22 terminalmage http://docs.saltstack.com/ref/runners/all/salt.runners.manage.html#salt.runners.manage.down
18:22 terminalmage juanlittledevil: np, check that link ^^^ there are more examples of that runner there
18:22 terminalmage I mean, other manage runners
18:22 terminalmage runners differ from salt execution modules because they are run from the master
18:23 terminalmage via salt-run rather than salt
18:23 terminalmage so, no need to target hosts
18:23 terminalmage just salt-run manage.down
18:23 juanlittledevil yup this sounds like it's just what I was looking for! thanks
18:23 terminalmage cool. np.
18:25 Katafalkas joined #salt
18:28 whit joined #salt
18:30 zach hello folks. Is there a way to choose an incrementing number with jinja? I'm wanting to set the same UID/GID across all machines for a list of users
18:31 JaredR joined #salt
18:37 forrest zach, can you expand on your question? Do you want to set the same UID/GID, or do you want the number to increment?
18:38 forrest or you want different users to have the same UID/GID on different boxes?
18:39 terminalmage zach: at my old job we assigned user information in one massive pillar
18:39 GradysGhost joined #salt
18:39 p3rror joined #salt
18:39 terminalmage so the uid/gid was specified using jinja like {{ pillar['users'][username]['uid'] }}
18:40 mgw Has anyone seen this with 0.16.3 (in the minion log): https://gist.github.com/mgwilliams/333c9343f8521e1fc29f/raw/c512d05d26a65644d121474a9f0214c92073baad/gistfile1.txt
18:40 mgw KeyError: 'config.option'
18:41 MefA joined #salt
18:41 GradysGhost Hey saltketeers, I have a question. I have a salt master and minion (0.13.3), but I keep getting '"npm.install" is not available'
18:41 terminalmage mgw: no. are there tracebacks in the minion log?
18:41 GradysGhost npm is installed (compiled from source) and in root's PATH
18:42 terminalmage if the config module had a traceback when it was loaded, that would keep if from being loaded
18:42 forrest 0.13.3?
18:42 forrest GradysGhost, can you show us your state?
18:42 GradysGhost No state. Just running salt from bash
18:42 quantumsummers|c joined #salt
18:42 quantumsummers|c joined #salt
18:42 mgw terminalimage: just that
18:42 Jahkeup_ joined #salt
18:43 GradysGhost No mention in minion log of npm anything
18:43 mgw shouldn't config.optional always be available in the __salt__ dict?
18:44 mgw s/optional/option
18:44 terminalmage GradysGhost: it's not in 0.13.3
18:44 zach forrest: the latter, terminalmage good thinking!
18:45 terminalmage GradysGhost: http://dpaste.com/1374165/
18:45 zach terminalmage: Do you have an example of what you did?
18:45 terminalmage zach: unfortunately not, I don't work there anymore
18:45 terminalmage heh
18:45 druonysus joined #salt
18:46 terminalmage GradysGhost: that backtick'ed git one-liner grabs the commit id of the first commit for the npm module
18:46 MefA Quick question I'm having trouble including an sls file and then requiring that sls file.  In my example say the file system is /srv/salt/a/b and I have an file to include in /srv/srv/salt/a/b/dependencies.sls  I tried just including a.b.dependencies and using a -require:  -sls: a.b.dependencies but it gives me an error saying the following requisities are not found...what am I doing wrong
18:48 forrest can we see your state MefA?
18:48 juanlittledevil zach: this is what I do with my state for users: http://pastebin.com/jtH6HV17
18:48 juanlittledevil I'm able to manage all of them via pillar.
18:49 GradysGhost terminalmage: I'm running 0.16.3, though, which it says the npm module is available in.
18:49 * GradysGhost puts his minion in debug mode
18:50 GradysGhost Sorry, I'm new to salt, cut me some slack for not having done this already
18:50 MefA nclude:   - a.b.dependencies  bho:   pkg.installed:     - pkgs: keystone     - require:       - sls: a.b.dependencies
18:50 UtahDave no problem, GradysGhost. We're here to help
18:50 MefA sorry bad cut
18:51 terminalmage GradysGhost: sorry, you did say 0.13.3
18:51 forrest when you do an include, can you declare a requires for the sls as well?
18:51 GradysGhost Sorry, terminalmage, I must've typo'd. My bad
18:51 terminalmage GradysGhost: no prob
18:51 forrest that seems like it would screw things up
18:51 forrest probably wrong though
18:52 GradysGhost Interestingly, npm.list now runs the right commands on the minion, but it's returning an empty set. I'll dig into this a bit from the npm/node angle.
18:52 forrest ok no the docs say that should work MefA
18:52 terminalmage GradysGhost: if you don't want to modify the minion config file, a good way to run in debug mode is to stop the service, su to root (using "su -"), then run: salt-minion -l debug
18:52 terminalmage that'll run the minion in the foreground
18:52 MefA include: - a.b.dependencies
18:52 MefA bho:
18:53 MefA pkg.installed:
18:53 GradysGhost That's exactly what I just didn, and I'm looking through the output
18:53 MefA -pkgs: keystone
18:53 MefA -require:
18:53 GradysGhost Interestingly, the commands seem to work more or less correctly when minion is in debug mode.
18:53 forrest can you just paste it into pastebin or gist MefA?
18:53 MefA yep
18:53 forrest thanks
18:54 Katafalkas joined #salt
18:54 nu7hatch joined #salt
18:55 MefA http://pastebin.com/EFkt0apv
18:56 forrest you're on salt 0.16.3 right MefA?
18:57 MefA yes
18:57 krissaxton joined #salt
18:57 terminalmage can you require entire SLS files?
18:57 Jahkeup joined #salt
18:57 forrest http://docs.saltstack.com/ref/states/requisites.html#require-an-entire-sls-file
18:58 forrest yep
18:58 terminalmage I remember that feature being requested but I'm not sure that it was implemented
18:58 terminalmage ok
18:58 forrest I couldn't remember either
18:58 terminalmage good to know
18:58 terminalmage heh
18:58 mgw terminalimage: the 'config' module is not loading for some reason, trying to trace it…. salt '*' config.option id returns '"config.option" is not available."' for that minion
18:58 forrest I wonder if it has to do with the way the directory structure is set up or something
18:58 forrest MefA, can you try to move both of those up one level?
18:58 forrest if it's not too much work
18:58 terminalmage if the config module is not loading, that would explain it. most common reason for not loading is a traceback
18:59 pakdel joined #salt
18:59 forrest so it just becomes a.dependencies
18:59 MefA that is why I was asking.  I'm not sure how smart it can be with the levels.  I will try but at least it doesn't sound like something obvious.
18:59 terminalmage mgw: there is no __virtual__ function there to deny it
18:59 forrest sounds good MefA, I'll be back in a bit, I look forward to hearing what the results of that test are
19:00 Jahkeup_ joined #salt
19:00 terminalmage mgw: see any ImportError tracebacks in the minion log?
19:00 mgw I noticed the absense of __virtual__, so I'm puzzled. No, no import tracebacks
19:00 GradysGhost hrm... If I start salt-minion directly (`# salt-minion`) with or without `-l debug`, npm.list works fine. If I start it with -d, it works fine. If I start it via the startup script (`service salt-minion start`), I get `"npm.list" is not available`
19:01 mgw terminalimage: and I can import salt.modules.config from a python shell
19:01 GradysGhost I checked the startup script, and it looks like it's using the only instance of salt on the server.
19:01 GradysGhost No special arguments being passed in, best I can tell.
19:01 terminalmage mgw: so I'm guessing it doesn't show up when you do: salt minion-id sys.list_modules | grep config
19:02 mgw terminalimage: no,, it doesn't
19:02 terminalmage yeah, then it's not loading... but that really doesn't make any sense, heh
19:02 terminalmage it doesn't have any big requirements
19:02 mgw btw, the 'minion' is an lxc container, but that really shouldn't matter
19:03 matanya joined #salt
19:03 mwillhite joined #salt
19:03 terminalmage mgw: really the only thing that I've seen impact loading modules is a traceback in the minion log
19:04 mgw ok, it must be something weird with my lxc
19:04 terminalmage mgw: how are you running the minion?
19:04 mgw upstart
19:04 GradysGhost The module is also absent from a sys.list_modules run on that minion, but only when the service is started from the service script.
19:04 terminalmage mgw: ok, so not in the foreground
19:04 mgw i'll try that
19:05 devinus joined #salt
19:05 terminalmage mgw: nah, the reason I was wondering was because I've seen weird environment-related behavior when I ran from the foreground using sudo instead of su'ing to root
19:06 terminalmage because I didn't have root's env
19:06 Damoun joined #salt
19:06 mwillhite joined #salt
19:06 mgw terminalimage: full debug reveals a tb
19:07 terminalmage GradysGhost: I'm guessing this is PATH related
19:07 mgw [DEBUG   ] Failed to import module config, this is most likely NOT a problem:
19:07 GradysGhost Okay, I'll look into that. You think npm is not in the right path?
19:07 GradysGhost er, $PATH
19:07 mgw https://gist.github.com/mgwilliams/a54f31b858172ee66ae7
19:07 terminalmage GradysGhost: yeah, the npm binary is looked for in the PATH
19:07 terminalmage and if it's not there, then the module will not be loaded
19:08 terminalmage GradysGhost: are you running as root?
19:08 GradysGhost And that's the PATH of the user running the salt-minion process, yes?
19:08 terminalmage running the minion as root that is
19:08 sparc joined #salt
19:08 terminalmage mgw: which version of salt are you running?
19:08 GradysGhost The salt-minion process should be run as root. When I'm testing on the CLI it is. Perhaps the startup script is launching as a different user or is... i dunno... ignoring .bashrc or something.
19:08 terminalmage because that is definitely an issue
19:09 terminalmage GradysGhost: perhaps. some platforms put npm in /opt I think
19:09 terminalmage which is probably not going to be in your PATH by default
19:09 GradysGhost My npm is compiled from source, and is in /usr/local/bin/
19:09 GradysGhost Which is in root's $PATH
19:09 terminalmage ok
19:09 terminalmage well that's odd
19:10 GradysGhost http://pastebin.com/MUBfGUcT
19:10 mgw terminalimage: 0.16.3. but syspaths.py was only added on Aug 23…. somehow I have the wrong version of config.py?
19:10 juanlittledevil I'm aving an issue with my minions where they seem to think there is a highstate still running. I've tried restarted the minions, and the master and I sitll have the same issues any ideas?
19:10 terminalmage mgw: did you perhaps copy config.py to _modules and sync it?
19:10 juanlittledevil I think this happened because someone ^C a highstate.
19:10 terminalmage I've done that to test bugfixes before without redeploying salt
19:10 MefA sorry was delayed same thing happens one level up..i've pasted http://pastebin.com/x2zrqM90
19:11 mgw terminalimage: yeah, I don't think I did an explicit sync, but maybe so
19:11 terminalmage mgw: yeah, syncs are performed on highstate
19:11 mgw ok, that explains it… sorry!
19:11 terminalmage mgw: so is there a copy in your _modules?
19:12 terminalmage yeah?
19:12 mgw yes
19:12 terminalmage cool.... so yeah, I wouldn't have thought of that so quickly if I hadn't done that myself on a number of occasions
19:12 terminalmage hahahaha
19:12 zach juanlittledevil: thanks
19:15 forrest joined #salt
19:16 pakdel Got a question about grains module
19:16 mgw terminalimage: thanks!
19:16 mgw On to the next issue :-)
19:16 pakdel I have added a directory to module_dirs on the minion
19:16 jbunting joined #salt
19:17 forrest MefA, any luck?
19:17 juanlittledevil zach: no prob. Here is a sample pillar: http://pastebin.com/3QUpRYw0
19:17 pakdel and created a test.py file in the grains directory under it
19:18 juanlittledevil is it safe for me to remove anything from /var/cache/salt/master or /var/cache/salt/minion?
19:18 juanlittledevil I'm unable to run highstate on my minions at the moment because they all seem to think there is a running job
19:18 pakdel but it seems that instead of adding it's functions to the functions that already exist in grains, it is overwriting them!
19:19 lineman61 joined #salt
19:20 terminalmage mgw: no prob
19:21 GradysGhost Where does salt-minion look for modules by default.
19:21 GradysGhost Read: where would the packaged modules be stored?
19:23 pakdel modules are in /usr/lib/python2.6/site-packages/salt/
19:23 pakdel actually the problem is I am getting:
19:23 pakdel "grains.ls" is not available.
19:24 Lue_4911_ joined #salt
19:24 lineman60__ joined #salt
19:25 GradysGhost terminalmage: Looks like this might be a $PATH issue after all. The npm module runs salt.utils.which('npm'), which I'm assuming is just executing the bash 'which' command.
19:25 zach juanlittledevil: mind if I PM you?
19:25 GradysGhost If that fails, the module doesn't load.
19:25 juanlittledevil sure
19:26 terminalmage GradysGhost: not quite, it's more pythonic
19:27 GradysGhost Could there be some other environment variable affecting the results of this function?
19:27 terminalmage GradysGhost: https://github.com/saltstack/salt/blob/develop/salt/utils/__init__.py#L259-L282
19:27 whit joined #salt
19:28 GradysGhost Dude, this is so weird. Even running this code in a Python interactive terminal, I get success.
19:28 GradysGhost Everything works just fine... right up until I try to control the minion with the service script.
19:29 terminalmage GradysGhost: you could try backing up that file, and dropping in a log line
19:29 terminalmage inside that function
19:29 GradysGhost Good idea
19:30 terminalmage log.info('PATH is {0}'.format(search_path))
19:30 redondos joined #salt
19:30 terminalmage right below the line where search_path is assigned
19:30 terminalmage then you'll be able to see what salt thinks PATH is
19:31 terminalmage if it's the same as the default_path line above there, then salt is not finding a PATH environment variable
19:32 terminalmage and /usr/local/bin is not in the default path
19:32 terminalmage so that could very well be the issue
19:32 GradysGhost $PATH, according to os.environ.get('PATH') is /sbin:/usr/sbin:/bin:/usr/bin
19:33 GradysGhost so... that's the issue.
19:33 terminalmage well there you go
19:33 terminalmage what platform are you on?
19:33 GradysGhost CentOS 6.4
19:33 terminalmage ok
19:33 GradysGhost salt-minion 0.16.3
19:33 GradysGhost I've got a correct path exported in root's .bashrc
19:33 terminalmage so, starting via upstart?
19:33 GradysGhost via service
19:33 terminalmage or init script
19:33 GradysGhost init script
19:33 terminalmage yeah but service is a wrapper
19:33 GradysGhost right
19:34 GradysGhost for an init script that doesn't seem to do anything with that variable. My thinking was that if I throw a correct PATH in root's .bashrc it should be generated correctly when the process is launched, but I guess I'll try to hardcode that PATH into the init script itself.
19:34 alekibango joined #salt
19:35 whit_ joined #salt
19:36 GradysGhost Jeez
19:36 GradysGhost fixed it
19:36 terminalmage GradysGhost: is the root .bashrc sourcing /etc/bashrc
19:36 terminalmage ?
19:36 SpX joined #salt
19:36 GradysGhost Probably.
19:37 terminalmage ok, that should make PATH play nice
19:37 terminalmage one would think
19:37 GradysGhost Yes, it is.
19:37 terminalmage well WTF then
19:37 GradysGhost This is hacky as hell, but here's my solution:
19:37 GradysGhost /etc/init.d/salt-minion:57 reads PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/root/bin daemon --check $SERVICE $PROCESS -d $CONFIG_    ARGS
19:38 GradysGhost manually pass a correct PATH into the process itself
19:38 GradysGhost So, this is probably just relegated to my system, but thanks for all the help and guidance, folks.
19:38 kermit joined #salt
19:38 terminalmage no prob
19:38 terminalmage GradysGhost: can you try something else?
19:38 GradysGhost Now I can go play with a monit config and bug those guys ;)
19:38 GradysGhost sure
19:39 terminalmage I'd like to get to the bottom of this if possible
19:39 GradysGhost fosho
19:39 terminalmage so, revert any changes you made to the init scrip
19:39 terminalmage script
19:39 GradysGhost done
19:39 terminalmage and then su to root using "su -"
19:39 GradysGhost I'm actually SSH'd into the server directly as root
19:39 terminalmage and THEN run service salt-minion restart
19:39 terminalmage oh
19:39 terminalmage well hmm
19:40 terminalmage say it with me... PermitRootLogin no
19:40 terminalmage :D
19:40 GradysGhost hahah, yes, i know
19:40 GradysGhost it's a dev box
19:40 terminalmage haha I'm just bustin your balls
19:40 alekibango joined #salt
19:40 GradysGhost I can try repeating the test via sudo if you prefer.
19:40 GradysGhost Just to see if anything changes.
19:40 terminalmage I was thinking that maybe running 'service' as non-root via sudo might have been making it act weird
19:41 terminalmage nah if run as root with root's env, it should work fine
19:41 sfello joined #salt
19:41 GradysGhost I'm wondering if service plays with your envvars for some reason.
19:41 terminalmage which makes me think that /sbin/service is messing with the path
19:41 GradysGhost /greatminds yadda
19:42 GradysGhost One way to test that, though.
19:42 GradysGhost Throw an echo into the init script
19:42 terminalmage yeah or better yet
19:42 terminalmage just run /etc/init.d/salt-minion restart
19:42 GradysGhost hah
19:42 GradysGhost /sbin:/usr/sbin:/bin:/usr/bin
19:42 terminalmage bypass /sbin/service
19:42 terminalmage dafuq
19:43 GradysGhost same
19:43 GradysGhost yep
19:43 terminalmage and if you echo $PATH from the CLI?
19:43 GradysGhost /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/root/bin
19:43 * terminalmage goes and pours a drink
19:43 GradysGhost No prior reference to $PATH
19:43 GradysGhost in that script
19:43 * GradysGhost checks /etc/init.d/functions
19:44 GradysGhost bingo!
19:44 GradysGhost /etc/rc.d/init.d/functions:13
19:44 GradysGhost PATH="/sbin:/usr/sbin:/bin:/usr/bin"
19:45 GradysGhost The functions script gets sourced by virtually every init script on a Cent box.
19:45 terminalmage HA
19:45 terminalmage bastards
19:45 GradysGhost That's fuckin stupid
19:45 terminalmage it is
19:45 GradysGhost I may inquire about that in the Centos forums...
19:46 GradysGhost Well, again, thanks for the help. Glad we tracked that down, and I'm sure you're glad it'
19:46 GradysGhost s not your problem.
19:46 terminalmage GradysGhost: yeah, that's one for the FAQ
19:47 Jahkeup joined #salt
19:49 terminalmage GradysGhost: how did you install npm again?
19:49 terminalmage is that from system packages?
19:49 terminalmage or did you build your own
19:51 qba73 joined #salt
19:52 GradysGhost Sorry, stepped away for a bit.
19:52 GradysGhost I installed node by downloading the source and compiling it.
19:52 GradysGhost Nothing special, standard ./configure && make && make install
19:53 GradysGhost npm compiles as a part of the node source
19:53 GradysGhost And since I didn't use a custom --prefix, it installed to /usr/local/bin
19:53 terminalmage got it
19:53 terminalmage good to know, I'm putting this in the FAQ
19:53 * GradysGhost is still testing.
19:54 GradysGhost dafuq
19:54 GradysGhost owait
19:55 GradysGhost ok, yeah
19:55 GradysGhost it's fine
19:55 GradysGhost had a brief lack of caffeination
19:56 terminalmage hehe
19:56 terminalmage gotta watch that
19:56 terminalmage always have caffeine handy
19:56 GradysGhost among other things
19:57 Gifflen_ joined #salt
20:00 Ahlee i set up a new salt master/minion, just two minions on the master (the minion running on same node as master and one other server).  a time salt '*' test.ping takes 14 seconds to return. salt-run manage.down returns no down nodes that it could be waiting on. Thoughts?
20:00 GradysGhost What's a regular ping look like?
20:00 GradysGhost Fast, I presume?
20:00 bemehow joined #salt
20:01 sparc joined #salt
20:01 Ahlee Yes
20:01 Ahlee less than a milli
20:01 mapu joined #salt
20:01 Ahlee no routes in between, same vlan though different switches
20:02 Ahlee no stale DNS entries, resolvers returning normally
20:03 Ahlee guess i'll build another set up and see if i can reproduce. If so, I'll open a ticket, if not, well, random things are random
20:04 sparc joined #salt
20:06 jpcw_ joined #salt
20:06 GradysGhost I wish I could help more. I was mostly piping up to get the basic outta the way. I'm pretty much a salt newb myself.
20:07 druonysuse joined #salt
20:07 craig reactor question: i see the "data" struct is available in the sls file
20:08 craig is that same data available in a runner that is called by the sls file
20:08 craig i want to grab ALL events (for testing) and then decide which ones i really want to do something with
20:09 craig whiteinge: yt? have a salt api Q (re: "logging")
20:09 nocturn joined #salt
20:09 craig brb
20:10 efixit joined #salt
20:13 whiteinge craig: shoot (when you get back)
20:23 MefA forrest, did you see this....no luck  http://pastebin.com/x2zrqM90
20:23 forrest that's weird
20:23 forrest oh wait
20:24 forrest what's with the placement of - pkgs: ntp?
20:24 mwillhite joined #salt
20:25 gmcwhistler joined #salt
20:25 MefA hold on ...let me look I may have screwed up
20:27 MefA forrest I think that's ok.  I'm trying to install the package ntp I just made up a label for the tag...do you think its a problem?
20:28 nfx1 joined #salt
20:28 forrest I don't know, just noticed it.
20:28 forrest can you try to chop that off and see if it goes through?
20:30 MefA i did no change....
20:30 druonysus joined #salt
20:32 gmcwhistler joined #salt
20:35 bemehow joined #salt
20:36 forrest weird
20:36 forrest yea I've got no clue then, only thing I can think at this point is something is messed up elsewhere.
20:36 Ryan_Lane joined #salt
20:36 Psi-Jack_ joined #salt
20:39 forrest you didn't recently upgrade the version of salt on your machine did you MefA?
20:39 forrest and not restart the services?
20:41 sfello joined #salt
20:41 juanlittledevil joined #salt
20:45 MefA no I'm playing with it a little I think one of the issues maybe the include file I include actually includes other files (so it's recursive).  I just did a very simple example and it worked.  Also I changed the pkgs format to put install and -name on their own line this seems to work.
20:45 MefA Obviously I'm screwing something up here and/or the include of a file that does an include is problematic....
20:46 forrest did you already run it with the debug option?
20:46 forrest Maybe that will trace back better
20:46 craig whiteinge: back
20:47 craig i need to emit metrics for certain situations
20:47 craig eg. auth fails; send a message
20:47 MefA I have to play with it do you know if recursive includes should be supported?
20:47 craig disallowed cmd; send a diff message
20:47 craig etv
20:47 craig etc
20:48 craig was looking at using the reactor system
20:48 whiteinge sounds reasonable
20:49 whiteinge the event system has been undergoing some cleanup over the last ~two weeks
20:49 whiteinge adding events to new things, cleaning up events on existing things, etc
20:50 whiteinge i don't know the current state of that cleanup
20:51 whiteinge and i don't know if any events are fired for auth steps
20:51 craig ya, that's what i was afraid of
20:51 craig who is the best person to ask?
20:51 craig also, any thoughts on other options?
20:52 craig i COULD write stuff directly into the cherrypy stuff
20:52 craig but that seems UBER invasive :)
20:52 whiteinge craig: will you send a message to the mailing list? i'll direct the guy who's working on that to the thread. his name is sam
20:52 craig perfect
20:52 craig thanks!
20:52 craig super stoked about the reactor stuff btw :)
20:52 whiteinge you could also modify cherrypy. that would work but, like you say, invasive :)
20:52 craig that shit is cool :)
20:53 craig ya, i MAY have to make a bunch of customizations for the short term
20:53 craig and then start pulling them out later
20:53 craig there is a bit of a time crunch... (MAJOR understatement :< )
20:54 forrest MefA, I don't see why they wouldn't be
20:55 MefA ok I'm going to play with this
21:01 GradysGhost the git module has the function config_set: http://docs.saltstack.com/ref/modules/all/salt.modules.git.html#salt.modules.git.config_set
21:01 GradysGhost But no apparent correlary to the --global option to the 'git config' command
21:02 GradysGhost Is that by design?
21:03 jpeach joined #salt
21:04 kenbolton joined #salt
21:04 faulkner joined #salt
21:04 echos joined #salt
21:04 jpeach is there a way to override the ninja templates that are used for built-in states?
21:04 robertkeizer joined #salt
21:05 jpeach ie. I would like to add PERSISTENT_DHCLIENT so rh_ip/network.jinja
21:06 terminalmage GradysGhost: http://docs.saltstack.com/faq.html#module-x-isn-t-available-even-though-the-shell-command-it-uses-is-installed-why
21:07 GradysGhost Very cool, terminalmage! Glad I could help.
21:08 terminalmage GradysGhost: we're in feature freeze for 0.17.0, but I discussed this with one of the other devs and we have a plan for how to fix this moving forward
21:08 GradysGhost A fix for the PATH issue, or for the git module issue?
21:08 terminalmage basically, we'll utilize /etc/defaults/salt or /etc/sysconfig/salt, etc.
21:08 terminalmage GradysGhost: for the PATH issue
21:08 GradysGhost ok, makes sense
21:08 GradysGhost And the git issue is really a non-issue, more like a niggling detail.
21:09 GradysGhost Probably best that multi-user servers don't have globally set git config options.
21:09 GradysGhost I'm having another problem, though. Maybe it's just a noob error?
21:09 terminalmage anyway, we'll basically source that file and use it so that users can either override or append to PATH
21:09 terminalmage and then we'll use the values from that file to modify PATH in the initscript/upstart conf/systemd unit file/etc.
21:09 bemehow joined #salt
21:10 GradysGhost Here's my top.sls: http://pastebin.com/HvFrTTE6
21:10 Jahkeup joined #salt
21:10 GradysGhost Then I run `salt myMinionId state.hightstate`
21:10 GradysGhost And I get this on the minion: http://pastebin.com/xavpXnRT
21:11 terminalmage GradysGhost: open an issue to add a "global" argument
21:11 GradysGhost ok
21:11 terminalmage GradysGhost: did you configure a dev environment?
21:12 GradysGhost Maybe I missed that step? I didn't realize it took more than defining it in top.sls
21:12 terminalmage if you're using file_roots and don't have a 'dev' environment, then salt doesn't know where to look for SLS files
21:12 alunduil joined #salt
21:12 GradysGhost ok, I'm not using file_roots
21:13 GradysGhost The online guide is really vague about where that stuff goes.
21:13 GradysGhost Is it also in the top.sls file?
21:13 forrest the file_roots go into the config file GradysGhost
21:14 terminalmage GradysGhost: what are you using?
21:15 terminalmage it's pretty prominent there in the walkthrough/states tutorial
21:17 GradysGhost Reading this documentation: http://docs.saltstack.com/ref/states/top.html
21:17 matanya joined #salt
21:18 terminalmage GradysGhost: it's right there under environments
21:18 terminalmage follow the link to "file_roots"
21:18 GradysGhost There are code snippets without labels all over the place, and evidently, code snippets from top.sls and the master config file are intermingled throughout the document. I was not understanding that the file_roots section belonged in a particular file.
21:18 terminalmage well, if you follow that link, you are taken to the page that describes configuration parameters for the master config file
21:19 GradysGhost ok, will read
21:19 terminalmage but, this could probably be made more explicit
21:19 GradysGhost btw, https://github.com/saltstack/salt/issues/7156
21:19 GradysGhost Need any more detail than that?
21:21 terminalmage nah that's sufficient
21:21 terminalmage I'll discuss whether this should be considered a bug or a feature
21:21 terminalmage with the other devs
21:22 GradysGhost Okay. If nobody else is asking for it, I'd say it's a pretty low priority issue.
21:22 Ryan_Lane1 joined #salt
21:24 Ryan_Lane joined #salt
21:24 GradysGhost ok, I got that enviornment thing figured out. user error.
21:24 GradysGhost The learning process, ladies and gents.
21:25 terminalmage :)
21:25 terminalmage GradysGhost: expect the --global support in 0.18.0, we're on feature freeze right now
21:25 GradysGhost Thanks, man!
21:25 terminalmage np
21:27 forrest woo feature freeze, 0.17 should be soon then
21:28 terminalmage forrest: RC expected within a week or so
21:28 forrest awesome
21:33 whit joined #salt
21:39 tuxIO joined #salt
21:47 Ryan_Lane1 joined #salt
21:49 Ryan_Lane joined #salt
21:52 kenbolton joined #salt
21:58 bhosmer joined #salt
22:00 druonysuse joined #salt
22:00 druonysuse joined #salt
22:01 kermit joined #salt
22:02 druonysus joined #salt
22:05 derelm joined #salt
22:05 bemehow joined #salt
22:09 jslatts joined #salt
22:13 Ryan_Lane joined #salt
22:19 whyzgeek joined #salt
22:20 kenbolton joined #salt
22:29 aantony joined #salt
22:30 druonysus joined #salt
22:32 backjlack joined #salt
22:33 KennethWilke joined #salt
22:37 krissaxton joined #salt
22:38 aantony Is there a secret to running the tests?  "No module named salttesting"
22:40 karlgrz joined #salt
22:41 yano joined #salt
22:41 auser joined #salt
22:41 avienu joined #salt
22:41 karlgrz hey all, should pkgrepo work from ubuntu 13.04 repos right now? Or should I build from git?
22:41 goki joined #salt
22:42 oz_akan_ joined #salt
22:43 karlgrz basically, this is what I'm trying to do:
22:43 g4rlic joined #salt
22:43 karlgrz http://pastebin.com/Zdx3KnA5
22:44 karlgrz and I'm seeing this:
22:44 karlgrz http://pastebin.com/Hc1rwjLi
22:48 karlgrz Hey all, please disregard. My problem was solved using salt-bootstrap instead of apt-get install salt-minion
22:50 copelco joined #salt
22:54 redbeard2 joined #salt
22:55 Ryan_Lane joined #salt
22:56 berto- joined #salt
22:58 Jahkeup joined #salt
23:03 kenbolton joined #salt
23:04 emocakes joined #salt
23:06 bemehow joined #salt
23:16 middleman_ joined #salt
23:18 imaginarysteve joined #salt
23:20 bhosmer joined #salt
23:20 druonysus joined #salt
23:23 Ryan_Lane joined #salt
23:24 kenbolton joined #salt
23:26 Ryan_Lane joined #salt
23:26 kenbolton joined #salt
23:32 honestly hey terminalmage
23:36 baniir joined #salt
23:36 terminalmage honestly: sup
23:36 honestly check this out: https://github.com/duk3luk3/nfs-user-formula
23:37 terminalmage ahh nice
23:38 whit joined #salt
23:38 honestly needs a package name switcher and to set all the user properties the user-formula sets
23:39 honestly and maybe a detection for when username = groupname so it creates a user homedir instead of a group homedir
23:39 honestly and I should document that it defaults to creating group homedirs
23:40 terminalmage yeah, at my last job we had a yaml file with the correct user information, which would be passed a hostname somehow to return the user pillar data for a given host
23:40 jefferai joined #salt
23:40 terminalmage and that data would be in pillar for that host
23:41 terminalmage I didn't write it, but it worked well enough
23:41 Jarus joined #salt
23:41 honestly yeah this is intended for the same sort of purpose
23:41 honestly it's for university, to create user accounts for students
23:41 terminalmage oh nice
23:41 terminalmage which?
23:42 honestly need to add removal of users too, but that isn't needed until in half a year :P
23:42 honestly I'm at Technische Universität München
23:42 honestly third semester of master's program in computer science, got my bachelor's here too
23:42 terminalmage nice. cool to see salt used at schools
23:42 honestly this is for a specific course
23:42 krissaxton joined #salt
23:42 terminalmage so, our user states would iterate over the pillar data using jinja
23:43 terminalmage for user removal, there would be user.absent states for all users that were in the YAML file but not assigned to that particular host
23:43 honestly ah
23:43 terminalmage so, that's something to keep in mind
23:43 honestly well, this whole thing will be coupled to a gitlab
23:44 honestly don't know how exactly to couple them yet
23:44 honestly I should check whether gitlab 6 is release yet...
23:44 honestly it is!
23:45 honestly but they didn't merge my PR
23:46 efixit joined #salt
23:49 druonysuse joined #salt
23:51 honestly oh well.
23:52 Jarus joined #salt
23:52 terminalmage heh
23:55 HumanCell joined #salt
23:58 jbunting joined #salt

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