Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-05-06

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

All times shown according to UTC.

Time Nick Message
00:02 bemehow_ joined #salt
00:05 arthabaska joined #salt
00:11 mrj joined #salt
00:15 bl4sphemy joined #salt
00:25 zz_cro joined #salt
00:27 taion809 joined #salt
00:27 meteorfox joined #salt
00:28 jslatts joined #salt
00:32 crop joined #salt
00:33 seme joined #salt
00:40 conan_the_destro joined #salt
00:40 uestra joined #salt
00:42 arcleo joined #salt
00:42 wiqd_ joined #salt
00:42 simonmcc joined #salt
00:43 __number5__ joined #salt
00:47 Joseph_ joined #salt
00:48 Joseph_ I am running a standalone minion and whenever i run a salt-call it takes over 30 seconds to complete. I see the following message in the logs. [salt.crypt][WARNING ] SaltClientError:
00:49 Joseph_ I am pretty sure the latency is occurring whenever that event is logged but the saltclienterror is empty so it doesn't give me a lot of points to start debugging
00:50 [diecast] joined #salt
00:51 jcockhren concerning the new archive state: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.archive.html#module-salt.states.archive
00:52 jcockhren it says one can use the same syntax as file.managed. Does this also mean it can download from s3?
00:52 manfred Joseph_: there was a problem that it was trying to connect to the event bus even when called with salt-call and no master setup, that sounds like what you are seeing
00:53 manfred jcockhren: it should be able to
00:53 manfred jcockhren: since s3:// is just a fileserver backend
00:54 Joseph__ joined #salt
00:54 Joseph__ yes you are right i think
00:54 Joseph__ when i run the daemon in debug mode i see this [ERROR   ] This master address: 'salt' was previously resolvable but now fails to resolve! The previously resolved ip addr will continue to be used [WARNING ] SaltClientError:
00:54 jcockhren hmm. I got an 'unknown url type: s3' error
00:54 manfred Joseph__: yup, looks like it
00:54 Joseph__ however i specifically set file_client: local
00:55 Joseph__ in the /etc/salt/minion
00:55 manfred jcockhren: salt --versions-report ?
00:55 jcockhren I also tried the https url, however it wouln't use the provided aws creds
00:55 Joseph__ so it shouldn't look at the master then right?
00:55 toastedpenguin joined #salt
00:55 manfred Joseph__: it shouldn't but it does, there was a bug, i think it was just recently fixed in develop, or it is still in the issues list
00:56 Joseph__ aahhh
00:56 Joseph__ is there a workaround? :)
00:56 jcockhren manfred: https://gist.github.com/jcockhren/4e9671de6efdcbe4973b
00:56 manfred Joseph__: that is what I was looking for
00:57 Joseph__ well i could always a salt master on the same node
00:57 Joseph__ lol
00:57 Joseph__ set up
00:58 manfred jcockhren: so, the way it would work would be to put s3:// in your file_roots and pulling from that as far as I am aware
00:59 manfred Joseph__: if you call it straight with salt-call --local, instead of just having it in the config file does it work?
01:01 Shish joined #salt
01:03 Joseph__ nope hangs either way
01:07 deares joined #salt
01:11 schmutz joined #salt
01:12 n0arch joined #salt
01:13 delkins joined #salt
01:17 quickdry21 joined #salt
01:18 Joseph__ hmmm running salt master and salt minion on the same node and executing "sallt" command has better performance
01:18 Joseph__ but its still pretty slow it completes in 10 seconds instead of 30 seconds for salt-call
01:19 dccc joined #salt
01:20 sroegner joined #salt
01:23 mgw joined #salt
01:23 Joseph__ seems hung on this [TRACE   ] Added external_ip.external_ip to grain [TRACE   ] Added opts.opts to grain
01:24 mgarfias i'm still unclear about how different environments work.  How to i run as a "dev" env and also get states from a "base" env?
01:24 Joseph__ each environment is simply a "directory" from salt's point of view
01:25 Joseph__ have you defined the file_roots /etc/salt/master
01:25 mgarfias yep, have two there
01:25 mgarfias base/dev, different paths
01:25 Joseph__ right
01:25 Joseph__ and have you defined a top.sls?
01:26 mgarfias in roots/base/top.sls
01:26 mgarfias with a base and a dev section
01:27 ksk joined #salt
01:27 Joseph__ so the top.sls defines what state modules and in what order the states will be enforced in that environment
01:27 macker joined #salt
01:28 Joseph__ to determine what nodes fall in an environment you need a matching expression
01:28 erjohnso joined #salt
01:28 mgarfias right
01:28 Joseph__ for example if you use '*' then all nodes will be in that environment
01:28 Joseph__ and then beneath that you list the state modules to be used
01:28 mgarfias ok
01:29 Joseph__ so is your question on how to share sls files between environments?
01:29 mgarfias yeah, thats a better way to put it
01:30 mgarfias like, my mysql state should be in multiple envs.
01:30 mgarfias so i assumed i'd put it in the base tree, and reference it from the other envs in the topfile
01:30 TOoSmOotH joined #salt
01:30 Joseph__ yea sorta
01:31 Joseph__ i can't remember the sytnax though
01:31 Joseph__ i am trying to find it
01:32 bl4sphemy joined #salt
01:33 WarheadsSE joined #salt
01:33 WarheadsSE manfred: punt
01:37 Joseph__ found it !! http://docs.saltstack.com/en/latest/ref/states/include.html
01:37 Joseph__ use an include
01:38 Joseph__ so say you have two SLS: firewall.sls and network.sls
01:38 mgarfias cool, thanks
01:39 Joseph__ firewall is in dev and network is in base
01:39 Joseph__ network can include firewall with: include: dev.firewall
01:39 Joseph__ etc
01:39 mgarfias and i see what i did wrong
01:39 mgarfias i was trying - base: <whatever>
01:39 mgarfias not include:  - base: whatever
01:40 Joseph__ yep
01:41 zz_cro joined #salt
01:43 uestra joined #salt
01:45 crop joined #salt
01:46 mgarfias anyway, thanks!
01:51 Joseph__ wlecome
01:56 Teknix joined #salt
01:57 NullWagon joined #salt
01:58 dccc joined #salt
02:03 fragamus joined #salt
02:06 kdorf joined #salt
02:11 crane joined #salt
02:12 uestra joined #salt
02:17 NullWagon joined #salt
02:18 uestra joined #salt
02:23 ravibhure joined #salt
02:39 faldridge joined #salt
02:41 lex joined #salt
02:41 __number5__ Is there any official stance on which AWS python library Salt is going to use in the long run?
02:42 Teknix joined #salt
02:42 __number5__ salt-cloud seems to use libcloud but I'm seeing boto based states merging inot develop branch
02:43 __number5__ personally I would like to see more boto ones
02:44 uestra joined #salt
02:46 bemehow joined #salt
02:46 manfred __number5__: boto is in develop
02:46 manfred __number5__: https://github.com/saltstack/salt/blob/develop/salt/cloud/clouds/botocore_aws.py
02:46 manfred __number5__: just like there is now a nova driver for openstack as well
02:47 bemehow__ joined #salt
02:47 manfred __number5__: and apache-libcloud is no longer a hard dependency for salt
02:49 bemeho___ joined #salt
02:52 bhosmer joined #salt
02:57 bemehow joined #salt
02:59 Nexpro joined #salt
03:04 mateoconfeugo joined #salt
03:06 Comradephate joined #salt
03:11 possibilities joined #salt
03:28 Ryan_Lane joined #salt
03:32 smcquay joined #salt
03:46 uestra joined #salt
03:50 catpiggest joined #salt
03:54 Nexpro joined #salt
04:03 ckao joined #salt
04:03 twinshadow joined #salt
04:03 faldridge joined #salt
04:33 jalbretsen joined #salt
04:44 kermit joined #salt
04:51 gammalget joined #salt
04:52 possibilities joined #salt
04:56 mateoconfeugo joined #salt
05:03 zain_ joined #salt
05:09 war2 joined #salt
05:19 jdog joined #salt
05:24 tr_h joined #salt
05:24 dccc joined #salt
05:29 ravibhure joined #salt
05:31 mgw joined #salt
05:33 picker joined #salt
05:34 gildegoma joined #salt
05:38 schmutz joined #salt
05:43 druonysus joined #salt
05:43 druonysus joined #salt
05:45 DaveQB joined #salt
05:46 druonysus joined #salt
05:46 druonysus joined #salt
05:48 uestra joined #salt
05:48 druonysus joined #salt
05:48 druonysus joined #salt
05:49 gildegoma joined #salt
05:55 errr joined #salt
06:06 arthabaska joined #salt
06:07 schmutz joined #salt
06:09 MK_FG joined #salt
06:09 briner joined #salt
06:14 ajw0100 joined #salt
06:18 TyrfingMjolnir joined #salt
06:22 micko joined #salt
06:27 cofeineSunshine joined #salt
06:27 cofeineSunshine hi
06:32 TyrfingMjolnir joined #salt
06:32 ChaosPsyke joined #salt
06:36 TyrfingMjolnir joined #salt
06:40 sgviking joined #salt
06:41 slav0nic joined #salt
06:41 slav0nic joined #salt
06:49 uestra joined #salt
06:52 CeBe joined #salt
07:02 epcim joined #salt
07:09 harobed joined #salt
07:10 ml_1 joined #salt
07:14 Kenzor joined #salt
07:15 sverrest joined #salt
07:19 smaboshe joined #salt
07:22 xmj moin
07:22 xmj how does one automatically bump some variable based on changes to a file (any, for that matter) ?
07:23 * xmj trying to wrap his mind around saltification of BIND zone files and their monotonically incremental serial
07:23 siciliansun joined #salt
07:24 it_dude joined #salt
07:26 mr_chris joined #salt
07:27 it_dude_ joined #salt
07:27 bezaban for bind you could possibly use epoch time as the serial?
07:27 bezaban does solve the question in general though
07:27 bezaban doesn't*
07:29 n8n joined #salt
07:30 tharkun joined #salt
07:30 mateoconfeugo joined #salt
07:33 malinoff joined #salt
07:41 Etch joined #salt
07:46 modafinil_ joined #salt
07:49 uestra joined #salt
07:56 mike25ro left #salt
07:59 che-arne joined #salt
08:17 bhosmer joined #salt
08:23 topochan joined #salt
08:35 epcim joined #salt
08:38 gildegoma joined #salt
08:38 ninkotech_ joined #salt
08:49 bill joined #salt
08:50 uestra joined #salt
08:50 Guest69054 I just started using salt and everything was working well until a job hung unexpectedly. I can't figure out how to clear the job and so I can' sync my server anymore.  I tried restarting the master and minion, issuing the kill_job command, and clearing the cache to no avail.
08:52 ravibhure joined #salt
08:55 dRiN joined #salt
08:57 AirOnSkin joined #salt
08:58 igmar joined #salt
08:59 AirOnSkin Hey guys. I'm trying out salt and fail quite at the beginning. I've two hosts, a master and a minion. Both are in the same network. I've configured the master on the salt minion and opened incoming ports 4045 & 4046 on the master. I've restarted both daemons. My problem now is, that the master doesn't see any minions
09:00 AirOnSkin salt-key -L doesn't display anything as well
09:00 mgw joined #salt
09:01 igmar is the name 'salt' resolvable by DNS ?
09:02 AirOnSkin nope, the salt masters dns name isn't salt. but i've configured the alternative name in /etc/salt/minion
09:03 AirOnSkin and that name is resolvable. also i've read, that the minion will fail to start if resolving the masters dns name fails... but it starts just fine
09:03 artificialexit joined #salt
09:03 igmar IPv6 issue ?
09:03 AirOnSkin ipv6 is disabled
09:03 AirOnSkin on both hosts
09:03 xmj bezaban: eh, that'd be one way. for the time being we're using the (apparently customary) strftime('%Y%m%d%H%m')
09:03 xmj (so we don't have to bump YYMMDD##'s ## part)
09:04 igmar AirOnSkin> What does the logs say ?
09:04 igmar You might want to run it in debug mode
09:04 bitmand AirOnSkin: default ports is 4505 and 4506 ( not 4045/4046 )
09:05 uestra joined #salt
09:05 Guest69054 Hi - how do you get rid of a job that has hung?
09:06 AirOnSkin igmar: on the minion: [salt.crypt                               ][WARNING ] SaltReqTimeoutError: Waited 60 seconds
09:06 AirOnSkin bitmand: oh... oO
09:08 AirOnSkin igmar: I'll try that
09:09 AirOnSkin Ah, now it works :)
09:10 AirOnSkin It really was the firewall rules -.-
09:10 babilen Guest69054: Is it still reported by "salt-run jobs.active" ?
09:10 Guest69054 Yes it is
09:10 bitmand AirOnSkin: :)
09:11 babilen Guest69054: And neither term_job nor kill_job stops it?
09:12 Guest69054 babilen:  term_job and kill_job give a stack trace and an OverflowError: long too big to convert
09:12 AnswerGuy I tried asking this couple of questions a couple days ago, but didn't see a response ... and if one was posted over the weekend, it's scrolled off my 10K lines of GNU screen buffering ...
09:12 AnswerGuy My first question is this: I have at least three "rogue" systems somewhere in my networks which are trying to register Salt keys with hostnames that don't match anything in DNS nor in any of our asset tracking systems.
09:12 babilen Guest69054: Mind pasting that? Which version of salt do you have running on the master and minion?
09:12 AnswerGuy Is there a way to get the saltmaster to log the source IP address from which a given Salt-key submission is coming?
09:12 AnswerGuy ... and ...
09:13 AnswerGuy Also I'm building a Nagios passive check around salt '*' cmd.run cmd='date +%s' ... (though actually from within a Python script calling the salt.client.LocalClient()) ... is there a way to skip the remote fork()/exec() of a shell and date commands?  Just query the minions and have them return the results of int(time.time())?
09:13 babilen Guest69054: I will probably not be able to take you much further and would have to recommend to file a bug or wait for some salt upstream devs to wake up, but maybe we can find something.
09:13 AnswerGuy (BTW: nice to see some activity in this channel this morning).
09:14 Guest69054 https://gist.github.com/bunkat/5ad73d7e9176725a712a
09:14 babilen Europe!
09:14 Guest69054 I just installed salt today, so whatever the current stable version is
09:14 babilen How'd you install it?
09:14 Guest69054 using the bootstrap script
09:15 babilen Guest69054: That just screams bug and I haven't seen that before. Let us check if that issue has been filed already
09:16 babilen Guest69054: Anything special about your master or minion? Which operating system do they run and on what kind of architecture?
09:16 babilen https://github.com/saltstack/salt/issues/12185 looks relevant
09:17 Guest69054 ubuntu 14.04 on the minion, 13.10 on the master. both 64 bit
09:18 babilen yeah, looks like you ran into the issue above. reading it now
09:18 babilen "Yes, the temporary fix is to double quote your jid"
09:18 babilen https://github.com/saltstack/salt/issues/12185#issuecomment-41851525
09:19 Guest69054 so double quoting gets rid of the overflow problem, but the job still isn't going away
09:19 babilen heh
09:19 babilen progress!
09:19 Guest69054 I just tried both term_job and kill_job with the double quotes.  got no real output to speak of, and active jobs still lists it
09:22 giantlock joined #salt
09:24 CaptTofu joined #salt
09:25 smaboshe joined #salt
09:27 uestra joined #salt
09:35 babilen Guest69054: Sorry, I don't know ... :-/
09:36 Guest69054 no worries, appreciate the help fixing the crash at least.  I'll stop by later when more people are around.  have a great day!
09:45 freelock_ joined #salt
09:45 EvaSDK_ joined #salt
09:45 sashka_ua joined #salt
09:46 bdf_ joined #salt
09:49 Cidano joined #salt
09:49 faulkner- joined #salt
09:51 ahammond joined #salt
09:57 monokrome joined #salt
09:57 Linuturk joined #salt
10:01 uestra joined #salt
10:12 viq engblom: are you maybe able to easily check on freebsd as well that file.recurse thing?
10:25 zz_cro joined #salt
10:25 artificialexit joined #salt
10:40 jakubek any idea why separately states files are working when I'm executing them salt 'host*' state.sls test and salt 'host*' state.sls test2 but salt 'host*' state.sls test,test2 is not working
10:41 jakubek it's printing error about variables from pillar file
10:41 babilen jakubek: "not working" ? What happens? Are they hanging out on the couch drinking G&T ?
10:41 babilen Could you paste those errors?
10:41 jakubek babilen: " SaltRenderError: Jinja variable 'dict' object has no attribute 'if'; line 10"
10:42 jakubek but this attribute is available from pillar.get
10:42 babilen jakubek: Could you paste the entire error along with the code in question? Does it work if you run highstate?
10:43 jakubek babilen: highstate is not working for me (im using test=True as default for minion) it think its a bug
10:43 jakubek after state.highstate test=false is not working
10:43 jakubek babilen: sec, ill prepare file
10:44 babilen I am not entirely sure I understood what you are trying to say. Could you paste the commands + output to, say, http://paste.debian.net and include applicable SLS or configuration files too?
10:45 jakubek babilen: http://pastebin.com/iTFuDnpz
10:45 babilen argh, pastebin.com
10:47 babilen jakubek: Could you add your ha.cf jinja file to the paste? (and do us all a favour and refrain from using pastebin.com, it is a horrible pastebin service full of social integration nonsense, captchas, ads, ...)
10:48 viq babilen: I recommend adblock, requestpolicy and noscript for your firefox ;)
10:48 _mel_ joined #salt
10:48 viq just as a side note ;)
10:48 uestra joined #salt
10:49 jakubek babilen: http://paste.debian.net/97740/
10:52 jakubek i have no idea why its working when im running it alone without any other state files in the same call
10:57 jakubek babilen: babilen http://paste.debian.net/hidden/3e021180/
10:58 jakubek this is output when im executing common,hb and after that only hb
10:58 bhosmer joined #salt
10:58 jakubek and what if funny that hb,common is working but common,hb not;-)
10:58 jakubek any idea?
11:02 babilen viq: Sure, I'm running that but that still doesn't take care of the odd captcha here and there. I also don't think that the IRC community should support that website.
11:02 mgw joined #salt
11:03 Kraln joined #salt
11:03 viq babilen: true
11:04 babilen jakubek: Okay, And you are sure that you have "if" defined? Is it listed in "pillar.items" for that minion?
11:05 babilen jakubek: I typically code a bit more defensively in that I don't use pillar['ha_nodes']['ha1']['if'] but pillar.get -- http://docs.saltstack.com/en/latest/topics/pillar/#pillar-get-function so that you can define safe defaults if values are not defined in the pillar
11:06 babilen jakubek: Same for line 299
11:10 babilen jakubek: Apart from that you should investigate why those values are not in the pillar for that particular minion. pillar.items comes in handy for that and you have to take a look at your pillar configuration (e.g. top file, ...)
11:10 mike25ro joined #salt
11:11 artificialexit joined #salt
11:12 diegows joined #salt
11:14 babilen Running "salt '*' pkg.upgrade" is incredibly satisfying :)
11:17 babilen jakubek: If you want/need help with that paste your pillar top.sls and conf/hb/ha.cf file along with the output of, say, "salt '*' pillar.items" (adjust target to match minion in question please)
11:19 bitmand babilen: extremely satisfying!
11:19 sdlarsen joined #salt
11:19 babilen indeed
11:21 zizzler joined #salt
11:22 sroegner joined #salt
11:24 zizzler is this possible with salt? when i deploy new code to a server, i would like to temporarily disable it from nginx load balancer. then deploy code. then reenable it in loadbalancer.
11:24 zizzler how would you do that?
11:24 viq zizzler: sounds like orchestrate stuff, or reactor
11:25 bezaban xmj: ah right, that'll have more or less the same effect
11:25 xmj bezaban: true, and it's more humanreadable.
11:25 gammalget joined #salt
11:26 jakubek babilen: but it's strange that alone this state file is working (so if its working there is no problem with pillar, am I right?)
11:29 jakubek babilen: and why -> salt 'i-jakub*' state.sls hb,common test=False is working and salt 'i-jakub*' state.sls common,hb test=False not?
11:30 jakubek it should work in both cases
11:30 jrdx joined #salt
11:31 jrdx joined #salt
11:33 to_json joined #salt
11:44 ccase joined #salt
11:46 millz0r joined #salt
11:48 jrdx joined #salt
11:48 viq Can you chain commands in salt? "all machines that have a kernel upgrade available, upgrade packages, and then reboot"
11:49 harobed__ joined #salt
11:49 picker joined #salt
11:49 renoirb joined #salt
11:49 bashcoder joined #salt
11:50 pjs joined #salt
11:51 ahammond joined #salt
11:57 siciliansun left #salt
12:03 ghartz viq, with a state and cmd.script ?
12:03 ghartz you can also do the same with cmd.run: name | <your commands\newline ...\newline>
12:06 viq ghartz: I was thinking somehow from salt cli, using modules
12:08 ghartz viq, dont think a module fit: http://docs.saltstack.com/en/latest/ref/modules/all/
12:08 ghartz oops
12:08 ghartz http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cmdmod.html#module-salt.modules.cmdmod
12:09 ghartz looks this is what you need
12:10 uestra joined #salt
12:16 bastion1704 joined #salt
12:16 engblom viq: Nope, I do not have any FreeBSD install ready
12:16 bmonty_ joined #salt
12:18 uestra_ joined #salt
12:18 Guest87689 joined #salt
12:19 babilen joined #salt
12:19 Etch joined #salt
12:20 viq ghartz: I would like to somehow tie this in with http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.aptpkg.html#salt.modules.aptpkg.upgrade_available
12:24 viq Is there a way to have output include only the machines that returned true on that?
12:28 sroegner_ joined #salt
12:28 lilmatt joined #salt
12:30 ktenney joined #salt
12:30 renoirb joined #salt
12:30 picker joined #salt
12:31 Guest87689 joined #salt
12:32 jslatts joined #salt
12:32 seme joined #salt
12:34 uestra joined #salt
12:36 slav0nic_ joined #salt
12:37 Ahlee Targeting by the content of a text file on the minion.  Theories?  I'd prefer not to move the contents of that file into a pillar (or ext_pillar) since it's dynamically generated
12:37 Ahlee but, i would like to be able to target based off it
12:37 viq Ahlee: module? custom grain?
12:37 Ahlee viq: how do you target by module though?
12:38 viq I guess actually custom grain makes most sense
12:38 Ahlee and the value is too dynamic for grains
12:38 Ahlee it can change forty to fifty times a day
12:38 viq Ahlee: IIRC 2014.1 now has support for refreshing grains
12:38 Ahlee i guess i can set up a daemon to watch the file with inotify updates, and then broker salt-call on the minion
12:38 Ahlee to update hte grain
12:39 Ahlee viq: yeah, 0.17.5 has rudamentary support, and it only refuses to update an existing grain occasionally
12:40 Ahlee i guess i'll go that route
12:40 Ahlee i do'nt like yet another daemon proceess being required
12:40 Ahlee but, can't have everything in life
12:40 viq What is it again that's stopping you from moving to 2014.1 ?
12:41 Ahlee The time involved in revisiting all the minions
12:41 viq revisiting?
12:41 Ahlee scheduling the update, then going back through and cleaning up all the failed states
12:41 viq ah
12:41 Ahlee aye, atd will fail to start, or the minion will install but not start
12:42 Ahlee or the script to restart won't catch the secondary/tertiary minions spawned to run states, so then there's issues
12:42 Ahlee plus I'm wiating on the enterprise version
12:42 Ahlee we don't like updating
12:42 Ahlee we like running sfotware for years at a time
12:43 viq http://salt.readthedocs.org/en/latest/topics/releases/2014.1.0.html#grains-caching
12:44 Ahlee joy, another time to keep straight
12:44 viq I think this is what addresses you "it changes many times per day" issue
12:45 Ahlee that does remind me i need to drop the loop_interval back
12:45 Ahlee viq: yeah
12:46 ange hi
12:47 ange anyone using a private git repo (bitbucket) to host pillars ? not sure about the syntax
12:48 Superted joined #salt
12:48 viq ange: using private inernal git repo for pillars if that counts
12:48 babilen ange: It's normal git syntax
12:48 picker joined #salt
12:48 viq babilen: ish, you need to use / instead of : to separate host and path
12:48 Superted Hey Guys, Girls... Anyone know how often the Redhat EPEL repo's get new salt versions?
12:49 babilen viq: Ah, yes. Good catch!
12:49 ange - git: master git+ssh://git@bitbucket.org:user/repo.git ?
12:49 viq babilen: I've been there, and I recently helped someone who had that exact issue, so I remember ;)
12:50 viq ange: ish, you need to use / instead of : to separate host and path
12:50 zooz joined #salt
12:50 babilen viq: But then I typically have my pillars directly on the masters that are serving them as I don't like it when people clone those repositories (as they contain sensible data) so I am probably not the best person to comment on this.
12:50 Ahlee Superted: EPEL updates a few days after releases.  I know terminalmage just released a new version a few days ago, and it was in epel-testing yesterday
12:50 ange "'git fetch' returned exit status 128: fatal: unable to connect to git@bitbucket.org:" "Name or service unknown"
12:50 babilen *sensitive :)
12:51 viq babilen: on the other hand I took opposite approach at work: you _have_ to put stuff in git for salt to be able to see it - removes the issue of untracked changes
12:51 viq ange: ish, you need to use / instead of : to separate host and path
12:51 ange same error
12:51 Ahlee we wrote a state that clones git to disk, and blows that away every hour
12:52 Superted Thanks Ahlee, will keep an eye out for it filering through to the main repo
12:52 babilen viq: No, absolutely - I just want people to work on pillars in a single location as I don't like the idea that admins are running around with all private keys to servers, personal user data and whatnot on their notebooks.
12:52 ange so, just to be clear on the use of Pillars by salt : the master is the one gathering them and sending the relevant bits to the minion ?
12:52 viq ange: even if you have - git: master git+ssh://git@bitbucket.org/user/repo.git ?
12:52 Ahlee ange: correct.
12:52 ange viq: that's what I had previously
12:52 Ahlee the master creates the pillar dictionary, and sends thtat dict down to the minions
12:53 ange Ahlee: ok thanks
12:53 Comradephate joined #salt
12:53 viq ange: you pasted git+ssh://git@bitbucket.org:user/repo.git and not git+ssh://git@bitbucket.org/user/repo.git
12:53 babilen ange: Yes, exactly. That allows the master the handle private data for minions and ensures that no minion has access to data it shouldn't have access to.
12:53 ange viq: as an example following previous suggestion
12:54 ange probably misread it
12:54 viq babilen: what makes it a bit harder is that we currently have 2+ salt masters, which I feel it's more convenient to have same data on both
12:54 viq ange: to clarify: you need bitbucket.org/user and not bitbucket.org:user
12:54 ange yes
12:55 ange what about the first part ? git+ssh://user@.... ?
12:55 jforest joined #salt
12:55 viq ange: and what error are you getting?
12:55 viq ange: let me look on mine, but it looks fine
12:55 Leech joined #salt
12:55 babilen viq: Sure - It would be too hard to push data between boxes, have multiple remotes and whatnot. I just wanted to bring the whole "this is sensitive data, it doesn't leave this box" idea home.
12:55 babilen wouldn't *sigh*
12:56 ange https://gist.github.com/mcansky/1118c8627b8993115cb2
12:56 Luke_ joined #salt
12:56 ange babilen: good point
12:57 smkelly joined #salt
12:57 viq ange: is your master able to resolve bitbucket.org ?
12:58 ange viq: yes
12:58 ange but it looks like it's looking for git@bitbucket.org
12:59 MTecknology joined #salt
12:59 viq which is confusing, because this is what I have http://pbot.rmdir.de/qcRfPyxGoXyxWhxf2-DnAg
12:59 rojem joined #salt
13:04 Ahlee Today is going to be a long day.
13:04 Ahlee >>> len(status.get('down'))
13:04 Ahlee 612
13:05 ange viq: indeed
13:05 ange so, solved the thing by cloning by hand the repo on the server
13:05 ange thanks
13:07 viq Ahlee: that's a nice farm you have there...
13:07 Ahlee Trade ya.
13:08 Ahlee I need to figure out how to send sc commands over WMI from a linux host
13:08 Ahlee so i can restart the windows minions without having to jump to a windows host
13:09 Ahlee anyway, those hosts ain't coming back up on their own
13:09 Ahlee bbl
13:09 think-free__ joined #salt
13:11 viq sc? wmi?
13:13 Ahlee viq: don't know exactly, it's what the windows admins told me to look into when i asked them how to restart a processon windows remotely
13:13 Ahlee i'm lost when it comes to windows, i can barely log in :)
13:14 bram_ joined #salt
13:15 resmike joined #salt
13:15 bram_ hey guys... simple question, I need to copy the content of a directory from one place to another (both on the minion) AND change the ownership of the files... how do I do that?
13:15 igmar use rsync ?
13:16 racooper joined #salt
13:16 igmar requires minions running with root privs in your case
13:16 viq Ahlee: can't you install salt minions on windows?
13:17 Ahlee viq: aye, but chicken and egg, how do you restart the minion?
13:17 jakubek babilen: have you checked last pastes? ;-)
13:17 igmar or minionfs
13:17 viq Ahlee: http://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.win_service.html ?
13:18 Ahlee viq: right, but salt isn't responding
13:18 Ahlee for whatever reason
13:18 Ahlee host is up, i can rdp in
13:18 viq Ahlee: set up http://rundeck.org/ with "restart minion" job?
13:18 viq which has http://rundeck.org/plugins/2013/01/01/winrm-executor.html
13:19 Ahlee so for now i have a python script running on a windows hosts that uses wmi
13:19 Ahlee i'd prefer to decomm that windows host, and fire it off from linux
13:19 Ahlee but, i  can't figure out the WMI query through wmi-client-wrapper
13:20 Ahlee i'll take a peek at rundeck
13:21 elfixit joined #salt
13:22 viq Ahlee: rundeck requires a bit of setup, but would allow you to have a panel with a button that would cause it to ssh/WinRM into machines and do whatever, eg restart salt-minion processes on them
13:22 Ahlee yeah, interesting.
13:23 Ahlee rundeck looks like what we wanted when we rolled out salt, heh.
13:23 Ahlee oh well
13:23 viq rundeck can also use salt for the remote execution part ;)
13:23 viq http://rundeck.org/plugins/2013/07/26/salt-step.html
13:25 Ahlee yeah
13:25 Ahlee figured as much
13:25 Ahlee thanks
13:27 viq They do a bit different things, but yeah, rundeck is nice
13:28 viq At my previous job we set up rundeck to give devs ability to restart services, and to do deployments
13:29 jaimed joined #salt
13:29 joehh MTecknology: do you use debian or ubuntu? - debian 2014.1.4 uploaded now
13:29 Comradephate joined #salt
13:29 MTecknology joehh: :D ({)
13:29 MTecknology debian
13:30 joehh thought so :)
13:31 * MTecknology is excited!
13:31 viq joehh: yeah, just noticed as I'm upgrading some machines here ;)
13:31 jalaziz joined #salt
13:31 happytux joined #salt
13:32 Networkn3rd joined #salt
13:32 MTecknology Must not be into unstable yet. I'm lazy and don't like adding repos
13:33 viq MTecknology: I was just using the bootstrap script to install packages, addred repos for me. Also, what do you have salt for? ;)
13:33 joehh no, been accepted, but I'm guessing it is still building
13:33 MTecknology that doesn't usually take too long
13:34 MTecknology viq: true- I said lazy. I wasn't really joking that much.
13:34 zirpubolci joined #salt
13:35 tessellare joined #salt
13:35 kaptk2 joined #salt
13:35 harobed joined #salt
13:36 vejdmn joined #salt
13:37 viq :P
13:38 ange anyone recently had to do some changes with bundle or rbenv related states ?
13:38 Shenril joined #salt
13:40 sfello joined #salt
13:40 sfello hello!
13:40 sfello How does one list the 'env' that one is using… I'm trying salt-call state.sls blah test=True but it complains about a base env not having blah in it...
13:42 renoirb_ joined #salt
13:42 quickdry21_ joined #salt
13:43 war2 joined #salt
13:44 war3 joined #salt
13:46 faldridge joined #salt
13:47 ipmb joined #salt
13:48 Ahlee environment is set in the minion config file
13:48 stevednd In one of my state files, I'm using git.latest to clone a git repo of a user's vim directory, then I have a file.directory state which tries to set the user/group/mode recursively to the given user. The changes seem to be made just fine, but salt says it failed, and has the comment "Failed to change user to steve; Failed to change group to steve; ...4 more times"
13:50 faldridge joined #salt
13:52 tyler-baker joined #salt
13:54 sfello Ahlee: thanks, will have a look
13:55 sfello Ahlee: if it says "null", presumably I can just use that as the name?!
13:55 sfello hm no, it key-errors.
14:00 GradysGhost joined #salt
14:00 repl1cant joined #salt
14:03 zain_ joined #salt
14:04 racooper I see epel has finally caught up with latest release :)
14:04 funzo joined #salt
14:05 Ahlee sfello: salt-call state.sls blah env=null fails?  Does the master have a fileroots def for null?
14:05 Ahlee null is an odd name for an environment
14:05 Ahlee but, since it's not None i would assume it's valid
14:05 sfello :-/
14:05 sfello yeah, i'm not totally clued up on salt tbh
14:05 sfello there are so many things
14:05 jaycedars joined #salt
14:06 Ahlee indeed.
14:06 Ahlee on your master, there should be a file_roots definition
14:06 Ahlee those file_roots definitions map to environments, base being the default
14:07 sfello in the master file it's just whatever the default is (i.e. is commented out)
14:07 sfello this was installed using salt-cloud
14:07 SEJeff_work joined #salt
14:07 sfello not sure if that makes a diff
14:07 Ahlee oh.  I'm sorry, I have no experience with salt-cloud
14:08 sfello hm, fair doos. well I guess since all my stuff is in /srv/salt and that is called 'base' in the commented out bit, it should find it
14:08 sfello maybe i'm giving 'blah' wrong? should it be like states.something.blah
14:09 sfello or states.something.blah-foo in this case since the state name is hyphenated
14:09 ange anyone with a working example of http://docs.saltstack.com/en/latest/ref/states/all/salt.states.ssh_auth.html ? Not sure how to use pillars there
14:10 saltygmo joined #salt
14:10 ange http://intothesaltmine.org/blog/html/2012/12/08/managing_authorized_keys_with_salt.html does give a good idea, but I'd like to avoid putting public keys in the public states repository
14:11 saltygmo think I got disconnected....I need help, new to salt. In a state file how can I tell it to delete a directory before recreating it?
14:12 artificialexit joined #salt
14:16 war2 joined #salt
14:16 Networkn3rd joined #salt
14:17 Ahlee saltygmo: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.missing
14:18 Ahlee er
14:18 Ahlee nevermind
14:18 Ahlee that doesn't do what you want
14:18 mgw1 joined #salt
14:21 obimod pillar init.sls files can't read pillar data, right?
14:21 Ahlee saltygmo: honstly i'd do cmd.run 'rm -f /path/to/directory/' then put a - requires on the cmd.run to recreate
14:22 bhosmer joined #salt
14:23 XenophonF joined #salt
14:23 XenophonF hey all just wanted to report that i came up with a way to edit /etc/passwd and friends to add the NIS map import lines
14:24 saltygmo Thanks XenophonF
14:24 saltygmo I mean...Ahlee
14:24 xmj great, do you execute pwd_mkdb after passwd has been edited?
14:24 XenophonF i pushed the edit commands (basically, running vipw/ed) to a managed script, and then set up a cmd.watch dependency on /etc/pam.d/system
14:25 xmj ugh
14:25 xmj XenophonF: you could've achieved the same thing with a simple append and triggered pwd_mkdb run :-)
14:26 XenophonF well, on FreeBSD at least vipw does locking and other stuff for you
14:26 martoss joined #salt
14:26 XenophonF like, it copies master.passwd to a temp file before making the edits, and so on
14:26 xmj heh true
14:26 danielbachhuber joined #salt
14:27 bhosmer joined #salt
14:28 XenophonF oh and get this: on FreeBSD, you import NIS users with "+:*:::whatever" but on Linux, you have to use "+:x:::whatever", because "*" in the password field means the account's disabled, while "x" means use external authentication (Kerberos in my case)
14:30 xmj lol
14:30 xmj POSIX <3
14:30 XenophonF i know right?
14:31 smaboshe left #salt
14:31 XenophonF LinuxPAM and glibc give the worst error messages too - all you get is "authentication failed" in the logs, with no indication why
14:31 XenophonF drove me crazy
14:31 XenophonF i'm better now :)
14:32 XenophonF hopefully this helps someone googling the chat transcripts
14:33 XenophonF and just for posterity's sake, I followed the example of "/usr/local/bin/postinstall.sh" in http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html
14:33 uestra joined #salt
14:34 che-arne joined #salt
14:35 veselin joined #salt
14:35 ange joined #salt
14:35 mikkn joined #salt
14:36 delkins joined #salt
14:37 alunduil joined #salt
14:37 gildegoma joined #salt
14:39 ede joined #salt
14:39 anuvrat joined #salt
14:41 Etch joined #salt
14:42 vbabiy joined #salt
14:47 Guest87689 joined #salt
14:49 viq ange: https://github.com/viq/cm-lab-salt/tree/master/salt/roots has example of users and ssh keys in pillars
14:52 mrj joined #salt
14:55 zain__ joined #salt
14:57 robawt joined #salt
14:57 sroegner joined #salt
14:58 mateoconfeugo joined #salt
15:02 drags joined #salt
15:04 jergerber joined #salt
15:04 mgw joined #salt
15:05 saguilar joined #salt
15:05 eykd joined #salt
15:06 anuvrat joined #salt
15:07 sfello joined #salt
15:08 eykd So, I’m using the users formula from https://github.com/saltstack-formulas/users-formula, which relies on user accounts being defined in the `users` namespace of the pillar. Is there a way to build up the `users` namespace from multiple pillar files, say using something like the salt state `extend` syntax?
15:09 jakubek guys coul you please check my .sls file i think i found some bug or so (https://github.com/jakubek/salttest/tree/master/salt), i have problem with salt 'i-jakub*' state.sls common,hb
15:09 jakubek but when im trying hb alone or common is working fine, even hb,common is working properly. could you tell me what im doing wrong?
15:10 jakubek babilen: maybe now You will find something
15:12 war2 joined #salt
15:13 NullWagon joined #salt
15:14 veselin left #salt
15:17 Networkn3rd joined #salt
15:17 rlarkin joined #salt
15:19 thedodd joined #salt
15:19 it_dude joined #salt
15:20 saltygmo in sly state file, using the file.directory, is there a way to create subdirectories under same statement?
15:20 saltygmo as /tmp/{foo,bar} to create two subdirectories?
15:21 viq saltygmo: - names: - /tmp/foo - /tmp/bar
15:21 viq saltygmo: like so http://pbot.rmdir.de/WRTXurprkXbOJjulwm-ATQ
15:22 saltygmo ah
15:22 saltygmo I like
15:22 saltygmo thanks
15:22 bram_ joined #salt
15:23 sroegner joined #salt
15:23 wendall911 joined #salt
15:24 tharkun joined #salt
15:24 war2 joined #salt
15:25 happytux joined #salt
15:25 conan_the_destro joined #salt
15:27 mgw joined #salt
15:27 mikeslattery joined #salt
15:28 TK joined #salt
15:28 TK left #salt
15:28 ThunderK joined #salt
15:33 ThunderK left #salt
15:40 gq45uaethdj26jw6 joined #salt
15:46 BrendanGilmore joined #salt
15:46 mateoconfeugo joined #salt
15:49 tligda joined #salt
15:49 smcquay joined #salt
15:50 micko joined #salt
15:52 war2 joined #salt
15:54 jalbretsen joined #salt
15:54 sfello joined #salt
15:55 ajolo joined #salt
15:56 ajw0100 joined #salt
15:57 bemehow joined #salt
15:58 zain_ joined #salt
15:59 sdlarsen joined #salt
15:59 gildegoma joined #salt
16:01 saurabhs joined #salt
16:01 troyready joined #salt
16:06 meteorfox joined #salt
16:06 KyleG joined #salt
16:06 KyleG joined #salt
16:07 rojem joined #salt
16:10 bl4sphemy joined #salt
16:13 hardwire joined #salt
16:17 mgw joined #salt
16:19 veselin joined #salt
16:19 Gareth morning morning
16:20 hardwire joined #salt
16:21 veselin Hello all, how could I negate a regexp in jinja? E.g. {% if salt['grains.get']('id') !=~ salt['pillar.get']('myhost:myid') %}
16:21 veselin Returns:  unexpected '~'
16:22 RandalSchwartz you could just use "else"
16:22 RandalSchwartz if it matches, do nothing, else do this
16:23 forrest joined #salt
16:23 RandalSchwartz I bet eventually if it matches you'll want to do something anyway :)
16:23 joehillen joined #salt
16:25 veselin RandalSchwartz: thank you, I'm more interested in the correct regex operators
16:25 bhosmer joined #salt
16:30 quickdry21 joined #salt
16:30 joehoyle joined #salt
16:30 schimmy joined #salt
16:30 robawt joined #salt
16:33 schimmy1 joined #salt
16:33 AdamSewell joined #salt
16:33 AdamSewell joined #salt
16:34 mikeslattery if not a =~ b
16:36 Kenzor joined #salt
16:39 resmike joined #salt
16:40 veselin mikeslattery: thank you, 'failed: Jinja syntax error: expected token 'end of statement block', got '=''   as soon as I replace '==' with '=~'
16:40 possibilities joined #salt
16:43 zain__ joined #salt
16:43 zain_ joined #salt
16:44 ajolo joined #salt
16:45 war2 joined #salt
16:45 mikeslattery got my langs confused:
16:45 mikeslattery import re
16:45 mikeslattery if not re.match(regex, string)
16:46 mikeslattery that's python.  not sure if that works in jinja
16:47 RandalSchwartz Hmm.  Apparently Jinja2 eliminated the regex match. :)
16:47 bemehow_ joined #salt
16:47 RandalSchwartz seeing people asking about that in the googles
16:47 pydanny joined #salt
16:47 RandalSchwartz ... http://stackoverflow.com/questions/12791216/how-do-i-use-regular-expressions-in-jinja2
16:48 timoguin yea you can't use pattern matching in conditionals.
16:48 timoguin the match module can do it: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.match.html
16:48 RandalSchwartz oooh.  pcre.  *almost* perl *almost* compatible regex. :)
16:49 RandalSchwartz Perl still has PCRE beat though. :)
16:49 miqui joined #salt
16:49 mikeslattery I don't know how to extend jinja with Salt, yet, but this might be helpful:  https://groups.google.com/forum/#!topic/pocoo-libs/3yZl8vHJ9fI
16:49 seanz joined #salt
16:49 ghartz_ joined #salt
16:50 war2 joined #salt
16:50 mpanetta joined #salt
16:51 vejdmn joined #salt
16:56 druonysus joined #salt
16:56 druonysus joined #salt
16:58 joehoyle_ joined #salt
16:59 bhosmer joined #salt
17:06 ml_1 joined #salt
17:06 viq Don't know whom I was talking with about halite not working on centos, but looks like I finally figured out what it needs to work.
17:07 ange viq: ok thanks
17:08 seanz left #salt
17:09 mrj joined #salt
17:09 jgarr joined #salt
17:09 jgarr left #salt
17:09 eykd So, I’m using the users formula from https://github.com/saltstack-formulas/users-formula, which relies on user accounts being defined in the `users` namespace of the pillar. Is there a way to build up the `users` namespace from multiple pillar files, say using something like the salt state `extend` syntax?
17:10 eykd Or do subsequent pillars simply always overwrite already-defined namespaces?
17:10 alainv anyone from salt at monitorama PDX?
17:11 jgarr joined #salt
17:11 anuvrat joined #salt
17:12 renoirb joined #salt
17:12 philipsd6 eykd: I *think* so. I haven't used users-formula so far, but I have a set of pillar files that all have the same top level key, and last I checked, it was being merged the way I expected.
17:13 chutzpah joined #salt
17:13 eykd philipsd6: OK, so no `extend` or anything needed? Just define away? :)
17:13 philipsd6 although in the past I noticed that it didn't merge them. Not sure if that behavior changed (I use the latest dev branch for my testing)
17:13 philipsd6 eykd: yeah, I didn't use extend (I don't think that's supported in pillar)
17:14 eykd I don’t think so either, based on my testing so far.
17:15 eykd The pillar docs aren’t clear, but I assumed that it was doing a `dict.update()` in the background, rather than some sort of merge.
17:17 nadley__ joined #salt
17:17 ChrisC1 joined #salt
17:19 bemehow joined #salt
17:19 philipsd6 eykd: best thing to do, is test it -- just create a couple pillar files with same top level key, pointing to different sub-maps. Set your top.sls to apply both to a test server, then display the pillar items for that minion.
17:20 eykd Why test when it’s so much easier to ask on IRC? ;) Yeah, that’s probably a good idea.
17:20 NullWagon joined #salt
17:20 philipsd6 my pillar files had something like this: database:\n  somedb:\n  <stuff about somedb>
17:21 philipsd6 as long as the 'somedb' part is unique, then I think it'll merge them all under the 'database' key.
17:21 ashb hashes are merged, other values are replaced
17:21 ashb i think
17:21 ashb merged = takes the value defined in the last file parsed
17:21 ashb I think anyway
17:22 eykd ashb: Yeah, that’s what I’m seeing now that I’m actually testing it.
17:22 eykd Thanks.
17:22 viq eykd: new transport, salt-irc ;)
17:22 jeffasinger joined #salt
17:22 jcockhren viq: where?!?!
17:22 jeffasinger Hey, for cron jobs with salt, is there a way to specify seconds?
17:22 eykd viq: Forget raete!
17:23 ashb jeffasinger: is there for normal crontab files?
17:23 jcockhren viq: totally, thought you meant it was something that you wrote.
17:23 viq jcockhren: I'd need to know how to program first ;)
17:24 kermit1 joined #salt
17:24 viq salt over IRC over TOR, hmmm... ;)
17:24 jeffasinger ashb: good point, don't know what I was thinking
17:25 jcockhren viq: I looked into contributing tor nodes controlled by salt
17:25 jcockhren some time back.
17:25 pydanny joined #salt
17:25 viq jcockhren: well, I do have a tor node, and it's running salt-minion, does that count?
17:25 theo-slc joined #salt
17:26 theo-slc joined #salt
17:26 Ryan_Lane joined #salt
17:26 jcockhren viq: well, the angle I was going was to have the salt-cloud be able to randomly place the minions across known regions
17:26 viq ooh, sounds fun
17:27 jcockhren I had to stop to give salt-cloud time to be merged into the main codebase
17:27 veselin left #salt
17:28 theo-slc Greeting... (newbie here).  Question: When targeting in my top.sls, can I target for multiple grains?
17:28 viq theo-slc: probably, though I think you may need the compound matcher for that
17:28 bhosmer joined #salt
17:28 jcockhren there a few missing 'features' of salt that still needs to be ironed out so stuff like this can be possible. for example: https://github.com/saltstack/salt/issues/11669 and https://github.com/saltstack/salt/issues/12511
17:28 jcockhren viq: ^
17:29 travisfischer joined #salt
17:29 Ryan_Lane !targeting-compound | theo-slc
17:29 wm-bot4 theo-slc: http://docs.saltstack.com/en/latest/topics/targeting/compound.html#targeting-compound
17:29 jcockhren Ryan_Lane: whoa.
17:29 Ryan_Lane jcockhren: ;)
17:30 Ryan_Lane @info
17:30 wm-bot4 http://bots.wmflabs.org/~wm-bot/dump/%23salt.htm
17:30 Ryan_Lane ^^ shows keys and statistics
17:30 Ryan_Lane you can interact with the bot in #salt-bot without spamming the channel
17:30 jcockhren that's nice!
17:30 Ryan_Lane !help
17:30 wm-bot4 I'm a documentation bot. See this URL for my commands: http://meta.wikimedia.org/wiki/WM-Bot
17:30 theo-slc thanks.  is compound matching common?  Should I try to avoid it by making my grains as specific as possible?
17:30 Ryan_Lane theo-slc: it's common
17:31 theo-slc Okay.  I will use generic grains and use compound matching. :)
17:32 viq lol, I'm the second most active user on that list :P
17:32 Ryan_Lane I set the bot up about a week ago ;)
17:33 viq Ryan_Lane: why do you have some dates from a month ahead? ;P
17:33 viq And some from march? :P
17:33 Ryan_Lane american date format
17:34 Ryan_Lane (I didn't write the bot)
17:34 viq I know, just teasing ;)
17:34 theo-slc Also, I just found that tabs are NOT allowed in my sls files.  What editor are you using to edit these sls files to avoid syntax problems?
17:35 viq theo-slc: vim with http://vim.spf13.com/ and https://github.com/saltstack/salt-vim
17:35 Ryan_Lane atom also has a salt syntax plugin
17:38 uestra joined #salt
17:40 ChaosPsyke joined #salt
17:40 timoguin theo-slc: I use vim and ':set expandtab' so my tabs are converted to spaces
17:41 timoguin which is also covered by the salt-vim settings viq linked
17:42 deares joined #salt
17:43 opapo joined #salt
17:45 viq yeah, my combo is a pretty heavy-weight solution, but gives a quite nice editor
17:45 kermit joined #salt
17:47 veselin joined #salt
17:48 veselin Hi All, I'm getting ' Package 'rabbitmq-server' not found (possible matches: rabbitmq-server)' with pkg.install and 'enablerepo'. The package is definitely available in that repo.
17:49 resmike joined #salt
17:49 timoguin veselin: does it work if you run the state again?
17:49 veselin timoguin: it works if I actually enable the repo in yum.conf
17:50 veselin timoguin: but not via 'enablerepo: epel' in the state
17:50 timoguin hmm, not sure. i'm in debian-land.
17:50 n8n joined #salt
17:51 timoguin i've seen issues with adding custom repos and installing a package from the repo in the same SLS because the package repo isn't refreshed between them
17:51 schmutz joined #salt
17:51 timoguin thought it might be somehting similar
17:52 pssblts joined #salt
17:52 n8n joined #salt
17:53 NullWagon joined #salt
17:54 tligda veselin: try adding refresh=True to the pkg.install state.
17:56 n8n joined #salt
17:57 veselin tligda: good idea, but still can't find he pkg
17:59 joehoyle joined #salt
18:00 tligda veselin: Maybe try doing the yum command with the enablerepo at the command line and see if that works properly? (But make sure it's not enabled in the yum.conf or yum.repos.d
18:00 tligda )
18:00 veselin tligda: was about to say that it works via yum.conf or via cli —enablerepo
18:01 tligda veselin: If you can pastebin the state, that might help.
18:01 veselin tligda: so it's as if the states enablerepo does not function
18:01 tligda veselin: Right.
18:01 tligda veselin: I'm doing work with CentOS, so I might be able to help if you can pastebin the state.
18:02 veselin tligda: sure, http://goo.gl/KHXxv6
18:03 GoKage joined #salt
18:03 nrgaway Anyone know of a runit service provider module available anywhere to manage the running states?  Or will I have to write one?
18:03 repl1cant joined #salt
18:03 tligda veselin: Does it make a difference if you move the "- installed" above the "-name: rabbitmq-server".
18:04 resmike joined #salt
18:05 alainv The Dash docset link on the docs homepage doesn't seem to work and I couldn't find an alternative. Anyone have a correct link?
18:05 veselin tligda: negative
18:06 ahammond ah, /usr/lib/node_modules is where everything ended up. ok, this is starting to make some sense.
18:06 manfred nrgaway: i am not aware of one
18:08 GoKage left #salt
18:08 tligda veselin: Perhaps it's an indentation issue? I'm not sure how picky YAML is in this situation. I noticed in the paste, the "pkg:" line is only indented one space, not two.
18:09 nrgaway manfred, thanks.  I just started using salt a month ago (well... still configuring away).  Most my time I spent building a custom renderer to allow python code in yaml instead of using jinja2 since I prefer to be able to have inline python and indented yaml.  Guess I will write the runnit module too
18:09 veselin tligda: let me check
18:09 troyready joined #salt
18:09 manfred nrgaway: i look forward to seeing it, i used runit on an openvz server for a minute before I migrated off of openvz cause I wanted to use systemd, runit wasn't the worst thing ever :P
18:10 nrgaway Its for docker containers, so maybe I will start off with systemd just so I can get something going :)
18:11 veselin tligda: didn't help
18:11 ahammond could I please get an example of how to run a node.js application installed by npm?
18:11 jeremyBass1 joined #salt
18:11 nrgaway already got 200 hours of coding into the custom renderer
18:12 tligda veselin: I'm setting up a test for it to see if I can reproduce.
18:12 veselin tligda: much appreciated
18:13 veselin tligda: I'm testing on Amazon Linux which has Epel installed but disabled by default.
18:13 ahammond cd /usr/lib; npm start doorman   runs and exits silently
18:14 bemehow_ joined #salt
18:14 ahammond no error messages... but it's not forking anything into the background either.
18:14 bemehow__ joined #salt
18:14 war2 joined #salt
18:15 bemehow_ joined #salt
18:19 resmike joined #salt
18:22 AviMarcus joined #salt
18:23 AviMarcus every time I do a pkg install on ubuntu, it always does an apt-get update... even if it's just "install" and not latest, and it's already installed. That not supposed to be, correct..?
18:23 honestly mostly.
18:24 honestly EWRONGCHAN
18:25 bhosmer joined #salt
18:26 anuvrat joined #salt
18:26 bemehow joined #salt
18:26 pydanny joined #salt
18:27 manfred AviMarcus: add a refresh=False to have it not do that iirc
18:28 manfred actually
18:28 manfred it should default to that https://github.com/saltstack/salt/blob/develop/salt/modules/aptpkg.py#L295
18:28 AviMarcus shouldn't that be the default, unless I'm adding a repo or something?
18:28 timoguin are you running highstate?
18:28 AviMarcus nope, state.sls
18:28 AviMarcus salt-minion 0.17.5
18:28 AviMarcus on --local
18:28 manfred oh
18:28 manfred no idea for 0.17.5
18:28 AviMarcus doing tests with docker... docker is pretty cool
18:29 timoguin i think this behavior might have been changes in 2014.1
18:29 AviMarcus mmm .17.5 is old?
18:29 manfred AviMarcus: yes
18:29 fragamus joined #salt
18:29 timoguin a highstate still does a refresh at the beginning though....
18:29 timoguin which should be configurable if it isn't
18:30 manfred https://github.com/saltstack/salt/blob/0.17/salt/modules/apt.py#L367 still doesn't do it in the pkg.install module
18:30 AviMarcus I'm installing via the ppa: RUN echo deb http://ppa.launchpad.net/saltstack/salt/ubuntu `lsb_release -sc` main | sudo tee /etc/apt/sources.list.d/saltstack.list
18:31 AviMarcus at least, I think I am... I mess up the install to be using an old version somehow?
18:31 manfred AviMarcus: doesn't look like there was pkg.installed state for apt in .17
18:31 manfred AviMarcus: what distro and version are you on?
18:31 AviMarcus docker for latest ubuntu LTS, trusty, 14.04
18:32 manfred how the hell did you get 0.17.5
18:32 manfred 14.04 should have 2014.1.3 at least by now iirc, and will have .4 soon
18:32 AviMarcus I need the ppa still?
18:32 AviMarcus I added: http://ppa.launchpad.net/saltstack/salt/ubuntu trusty
18:33 timoguin 2014.1.3 is the newest in the PPA for trusty
18:33 manfred yeah, 2014.1.3 is in there
18:33 AviMarcus so.. uh, weird.
18:33 manfred yeah
18:33 AviMarcus Version: 2014.1.3+ds-2trusty2
18:33 AviMarcus in here http://ppa.launchpad.net/saltstack/salt/ubuntu/dists/trusty/main/binary-amd64/Packages
18:33 manfred ¯\(°_o)/¯
18:34 AviMarcus Oh, wait, this is an older docker setup, lemme check, might have installed salt differently... !
18:34 manfred kk
18:34 resmike joined #salt
18:36 AviMarcus yeah musta installed it differently
18:36 AviMarcus maybe that's the version in the official repos
18:36 manfred that, is possible
18:37 AviMarcus $ docker run --rm -it ubuntu:trusty
18:37 AviMarcus # apt-cache show salt-minion | grep Version => Version: 0.17.5+ds-1
18:37 AviMarcus so it ships with .17.5
18:37 AviMarcus hmph, that's probably quite enough for basic dev testing
18:38 XenophonF left #salt
18:39 kermit joined #salt
18:40 joehoyle joined #salt
18:41 tligda AviMarcus: I have the same thing on my trusty machine. If you do 'salt-minion —version' you see it's the latest.
18:41 tligda AviMarcus: I think the version numbers are weird in the repository.
18:41 AviMarcus tligda, no, salt-minion --version showed .17.5
18:42 GradysGhost joined #salt
18:42 AviMarcus I had to add the deb and update and install again and then I get: salt-minion 2014.1.3
18:42 it_dude joined #salt
18:43 AviMarcus hmm only a difference of 30mb in the docker images, I'll keep the latest updated one
18:43 tligda veselin: When I try it on my CentOS 6.2 machine, it works for me.
18:43 tligda veselin: I disabled epel and used your state and it worked.
18:46 veselin tligda: thank you, I'll keep testing
18:46 tligda AviMarcus: When I use the docker trusty image, my Dockerfile just says, "RUN     apt-get -y install salt-minion" and I get "salt-minion 2014.1.0-5790-gc9fd8f4 (Hydrogen)"
18:47 AviMarcus tligda, ubuntu:trusty ?
18:47 AviMarcus maybe I have an old image... do you know how to refresh the upstream images in docker?
18:48 tligda AviMarcus: I'm actually using "ubuntu:14.04" but I believe they are identical.
18:48 resmike joined #salt
18:48 AviMarcus ubuntu                 14.04               99ec81b80c55        12 days ago         266 MB
18:48 joehoyle_ joined #salt
18:49 tligda AviMarcus: Yum, same checksum, date and size.
18:49 babilen jakubek: The paste is gone apparently (get a 404)
18:49 tligda AviMarcus: Not "Yum", "Yup".
18:49 AviMarcus tligda, you JUST did install salt-minion?
18:50 tligda AviMarcus: Yes.
18:52 tligda AviMarcus: Here is the Dockerfile: http://pastebin.com/0S9iZwHE
18:53 joehoyle joined #salt
18:53 arthabaska joined #salt
18:53 tligda AviMarcus: When I build it and run it, I get the behavior I described.
18:55 AviMarcus I should set up an apt-cacher locally...
18:56 AviMarcus salt-minion 0.17.5
18:57 AviMarcus docker run -it --rm ubuntu:trusty /bin/bash --> root@35235c558480:/#  apt-get -y install salt-minion --> # salt-minion --version    --> salt-minion 0.17.5
18:57 AviMarcus dunno tligda
18:57 stephas joined #salt
18:58 AviMarcus I did an apt-get update and did a cache show and still same thing
18:59 tligda AviMarcus: dunno either. sorry.
19:02 joehoyle joined #salt
19:04 Networkn3rd joined #salt
19:04 arthabaska joined #salt
19:05 uestra joined #salt
19:08 chrisjones joined #salt
19:11 arthabaska joined #salt
19:13 rojem joined #salt
19:16 uestra joined #salt
19:19 vxitch joined #salt
19:19 joehoyle joined #salt
19:19 vxitch sometimes the rendered output from running state.highstate doesn't show, especially if i run it against more than one minion. how can i retrieve this output after the job has finished running?
19:19 mgw joined #salt
19:20 timoguin vxitch: salt-run jobs.list_jobs
19:20 timoguin followed by jobs.lookup_jid JID
19:20 vxitch doing that returns nothing for all my minions, what gives?
19:21 timoguin it also helps to pass a long timeout at the CLI when initially running the job
19:21 nrgaway I use the salt bootstrap with docker to give me access to develop; then I use git to update when I need to
19:21 vxitch ah nvm, i think i used the wrong jid
19:21 vxitch timoguin: excellent thank you, that worked once i used the correct jid i wanted info on
19:21 vxitch left #salt
19:22 nrgaway AviMarcus,  ^^^^
19:22 arthabaska joined #salt
19:22 AviMarcus nrgaway, I saw that, I was trying to make the lightest weight image I could, without a ton of deps
19:22 AviMarcus not sure I succeeded, ubuntu:trusty is 380mb
19:23 seme joined #salt
19:23 Networkn3rd joined #salt
19:23 nrgaway AviMarcus, ya, its heavy; what about debian?
19:23 AviMarcus nrgaway, I don't really need to update salt -- I'm just in general trying to mirror for local dev
19:23 AviMarcus nrgaway, I forgot until this afternoon I was planning that :P I do have wheezy image downloaded
19:24 troyready joined #salt
19:24 nrgaway AviMarcus, I ahd it installed in both debian and ubuntu dockers; but I use the salt bootstrap
19:25 CeBe joined #salt
19:25 nrgaway AviMarcus, if you go that route let me know cause I have way so it wont fail to install on both systems
19:25 AviMarcus ?
19:26 vxitch joined #salt
19:26 vxitch how can i check if a grain exists from an sls?
19:26 nrgaway salt bootstrap dont normally load on to a docker yet; it will fail
19:26 vxitch i have the following line, but the template throws an error if a minion doesn't have the grain set
19:26 nrgaway unless you set some things up first
19:26 vxitch {% if grains['mysql_sock'] %}
19:27 timoguin vxitch: use grains.get instead. it won't fail, and you can offer a default value if the grain isn't set
19:28 AviMarcus nrgaway, but not bare debian install? isn't bootstrap supposed to handle all prereq?
19:28 vxitch ah ok, thank you. where can i find the documentation for that? ive been searching on docs.saltstack.com to no avail
19:28 meteorfox joined #salt
19:28 nrgaway AviMarcus, yes it will just not for a docker
19:29 AviMarcus figured out what's missing?
19:29 teskew joined #salt
19:29 nrgaway when installing on a docker; it will install, but fail on testing if it is enabled and running; so docker build fails, so ya have to work around taht
19:30 vxitch left #salt
19:30 obimod the minion config file in my TEMP_CONFIG_DIR for salt_bootstrap.sh isn't replacing the default minion config after being bootstrapped : (
19:31 nrgaway AviMarcus, nothing is missing per se; just saltbootstrap expects init to be present and it uses runlevel to check if salt is enabled.  On a debian docker your runlevel will be unknown instead of 2 so the install program fails
19:31 AviMarcus ah
19:32 obimod no idea why... line 3954 in the bootstrap_salt.sh looks like it is supposed to do the trick
19:32 mnaser is there some sort of saltstack "standards" document to follow when writing salt sates?
19:32 nrgaway ubuntu also has problems, but I have work-arounds for both
19:32 AviMarcus nrgaway, you filed bugs/pull reqs?
19:32 AviMarcus nrgaway, currently trying http://pastebin.com/MNmSxuNb but it's hanging on downloading packages
19:33 nrgaway AviMarcus, yes; its only with salt bootloader; not the ppa.  My response was they do not support dockers so I doubt I will see the fixes anytime soon
19:33 arthabaska joined #salt
19:33 AviMarcus that sounds silly, there's a trusted docker repo and stuff
19:33 nrgaway I did give them a PR to fix debian problem though
19:33 kickerdog joined #salt
19:34 kickerdog Good afternoon peeps
19:34 kickerdog My salt-cloud took dump http://pastebin.com/s6Chck4A
19:34 kickerdog anyone know what would cause that?
19:35 jnials joined #salt
19:35 nrgaway AviMarcus, I will have a salt docker available in a few weeks as it will be part of the DockerNAS project I am working on
19:35 meteorfox joined #salt
19:36 AviMarcus heh for salt-minion: 0 upgraded, 79 newly installed, 0 to remove and 0 not upgraded.
19:36 AviMarcus Need to get 39.1 MB of archives.
19:36 AviMarcus After this operation, 112 MB of additional disk space will be used.
19:36 AviMarcus (sorry for multi-line)
19:36 AviMarcus Successfully built 0adb99ef6bc4
19:37 AviMarcus 286.8 MB instead of 380mb of ubuntu trusty
19:38 AviMarcus soo nrgaway feel free to use that
19:38 nrgaway that still small IMO :)  I build for NAS devices with tonnes of storage so never too concerned about size; except when loading on USB boot  drive
19:40 AviMarcus eh nrgaway you were talking about init complaining?
19:40 AviMarcus you saw the note on the top here: https://index.docker.io/u/saltstack/debian-7-minimal/
19:40 AviMarcus ... # Keep upstart from complaining
19:41 NullWagon joined #salt
19:41 nrgaway I have all those work-arounds.  its only problems with salt-bootloader I have
19:41 kballou joined #salt
19:41 nrgaway I created a relay script to handle any errors, so if there is a error, it ignores them
19:42 martoss joined #salt
19:43 joehoyle joined #salt
19:43 martoss left #salt
19:46 joehoyle_ joined #salt
19:48 vejdmn joined #salt
19:48 nrgaway AviMarcus, here is a copy of the relay.sh for salt-bootstrap; it works on debian 7 and ubuntu 14.04: https://gist.github.com/nrgaway/277e225bac5e9a6a37b9
19:49 meteorfox joined #salt
19:49 AviMarcus thx... good night folks
19:53 TyrfingMjolnir joined #salt
19:54 Kenzor joined #salt
19:57 arthabaska joined #salt
20:00 smcquay joined #salt
20:01 andrej What's best practice for machines living in a DMZ?  People here have raised the valid question about the feasibility of letting a machine in the DMZ talk to the master on the internal network on 4505, and wondering what kind of attack vector that would offer (if any) ...
20:02 bemehow_ joined #salt
20:03 arthabaska joined #salt
20:03 to_json joined #salt
20:03 ashb 4505 is master out only isn't it?
20:04 ashb 4506 is peer to peer
20:04 ashb (They are seperated I think anyway)
20:04 ashb though I guess if it can connect on 4505 its hypotehtically possible to impersonate the master
20:06 theo-slc can I specify a grain within the sls for a minion instead of the minion configuration?
20:06 harobed joined #salt
20:09 bemehow joined #salt
20:10 mgw joined #salt
20:13 andrej ashb - I may have the wrong end of the stick, but the way *I* understand it the minions call home to the master, not the master out to the minions
20:13 andrej theo-slc : can you rephrase that? I don't understand your question ...
20:14 theo-slc I want to specify some grains in /srv/salt/server.sls on the master instead of specifying them in /etc/salt/minion on the minion.
20:16 theo-slc From what I can see the only way to do this would be to manage the /etc/salt/grains file.
20:16 conan_the_destro joined #salt
20:17 ashb andrej: you could be right - I've not looked in detail so my understanding is hazy
20:17 theo-slc I'm worried there might be conflicts in salt if /etc/salt/grains is managed.
20:18 theo-slc ashb : you are right. the minions make a async connection to the master.
20:22 nadley__ joined #salt
20:27 theo-slc I'm going to file.managed  /etc/salt/grains.  Let me know if you think I'm crazy.
20:27 schmutz joined #salt
20:27 joehoyle joined #salt
20:28 ashb theo-slc: you're crazy ;)
20:28 ashb theo-slc: just a general comment
20:29 theo-slc ha
20:29 ashb depends on what you want to do but you could also do `salt 'my-machine*' grains.setval foo var
20:29 ashb `
20:30 frasergraham joined #salt
20:31 Kenzor joined #salt
20:31 theo-slc it worked.  I'm now managing /etc/salt/grains on the minions from the master.
20:33 zain_ joined #salt
20:35 XenophonF joined #salt
20:35 NullWagon joined #salt
20:36 XenophonF How would I do something like a file.blockreplace if the file doesn't already exist?
20:37 XenophonF I don't want to use file.managed because I need the local admin to be able to add their own settings to the file.
20:37 XenophonF file.blockreplace throws an error if the file doesn't already exist. :(
20:38 terminalmage XenophonF: what kind of error?
20:38 terminalmage is there a traceback?
20:39 ashb XenophonF: file.managed doesn't assert anything about the contents ifyou dont specify source or contents I don't thin
20:39 ashb k
20:39 jnials joined #salt
20:42 eykd XenophonF: What about file.touch?
20:42 XenophonF well i tried something like:
20:43 druonysus joined #salt
20:43 druonysus joined #salt
20:43 XenophonF /etc/periodic.conf:
20:43 XenophonF file:
20:43 XenophonF - touch
20:43 XenophonF - blockreplace: ...
20:43 XenophonF the touch ran, but the blockreplace didn't
20:43 XenophonF but maybe i was doing it wrong
20:43 cro_ joined #salt
20:44 eykd XenophonF: are you using append_if_not_found?
20:44 XenophonF yes
20:45 eykd OK, I’m out of ideas. :)
20:45 XenophonF if the file doesn't exist, file.blockreplace returns a False result with the comment "file not found" :(
20:45 XenophonF thanks anyway eykd :)
20:45 saurabhs joined #salt
20:46 bastion1704 how can I specify region with salt-cloud ?   availability_zone: eu-west-1b is not enough
20:47 eykd XenophonF: OK, two more ideas, reverse the order of the touch and the blockreplace, or do separate state definitions, with the blockreplace requiring the touch.
20:47 eykd And now I’m out of ideas. :)
20:47 victorpoluceno joined #salt
20:47 Networkn3rd joined #salt
20:48 goodwill whiteinge: no beer for you
20:49 XenophonF OK I'll try that eykd thanks :)
20:49 manfred goodwill: why so cruel?
20:49 goodwill manfred: oh whiteinge knows why
20:50 goodwill manfred: he has been bad
20:50 n8n joined #salt
20:50 meteorfox joined #salt
20:51 XenophonF oh here's an idea
20:51 XenophonF i could call salt['cmd.run
20:51 manfred why?
20:52 XenophonF i could call salt['cmd.run'] from a jinja2 template
20:52 manfred don't do that
20:52 manfred XenophonF: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html
20:52 manfred so
20:52 manfred you need to have them in seperate blocks
20:52 manfred touch:
20:52 manfred file.touch:
20:52 manfred - name: /etc/periodic.conf
20:53 manfred
20:53 manfred /etc/periodic.conf:
20:53 manfred file.blockreplace: ...
20:53 XenophonF ah gotcha
20:53 manfred - require:
20:53 manfred - file: touch
20:53 manfred you can't combine them the way you were trying to
20:54 saltygmo joined #salt
20:54 manfred http://ix.io/c8i
20:54 saltygmo when test.ping a minion that is not available there is no response. Is there a way to indicate that the ping failed
20:55 XenophonF gotcha thanks manfred
20:56 victorpoluceno Hey, I'm getting this message from a minion configured to use sqlite as returner: "The return failed for job 20140506205546255719 'sqlite.returner'"
20:56 victorpoluceno but there is no exception
20:56 victorpoluceno how can I debug that?
20:58 mrj joined #salt
20:59 XenophonF manfred: putting the file.touch and file.blockreplace in separate states worked perfectly
20:59 XenophonF thanks
20:59 manfred np :)
21:00 dmick joined #salt
21:01 dmick hi all.  we're using Saltstack for a deployment across distros
21:01 Kenzor joined #salt
21:01 dmick and I've been running into problems with salt-bootstrap.sh and RHEL 6.5; don't see issues open for specifically those, so wonder if I'm doing something wrong
21:02 zirpubolci joined #salt
21:02 dmick 1) the script seems to assume the subscription is using RHN rather than RHSM (unconditional call to rhn-channel, which I think is wrong)
21:03 fragamus joined #salt
21:20 ilbot3 joined #salt
21:20 Topic for #salt is now Welcome to #salt | 2014.1.3 is the latest | SaltStack trainings coming up in SLC/NYC/London: http://www.saltstack.com/training | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
21:21 Vye full exception is here: http://git.io/hj_0HQ
21:24 asmaps is there somewhere more extensive doc about salt + kvm virtualization besides the "Salt as a cloud controller" quickstart? Actually I'm looking for docs about preseeding images ( e.g. with keys) before creating the vm. There is a hint about libguestfs, but no doc how to use it with salt :-(
21:27 faldridg_ joined #salt
21:31 conan_the_destro joined #salt
21:31 saurabhs joined #salt
21:39 vindvio joined #salt
21:40 jcsp joined #salt
21:41 faldridge joined #salt
21:42 XenophonF joined #salt
21:44 cewood joined #salt
21:46 junster joined #salt
21:46 bemehow joined #salt
21:48 bemehow_ joined #salt
21:49 joehoyle joined #salt
21:49 kermit joined #salt
21:51 war2 joined #salt
21:52 bemehow joined #salt
21:52 toastedpenguin1 joined #salt
21:54 ange hey, how to only generate config files if one item is included in a grain or pillar array ?
21:55 bhosmer joined #salt
21:55 ange I thought https://gist.github.com/mcansky/7a43ddd4aca120bb17a1 would do it but all files get generated
21:56 dmick ange: what do you mean by "generate config files"?
21:56 jslatts ange: you have to wrap the whole file.managed state in the if statement
21:57 dmick (or else use -%} to close the template)
21:57 ange jslatts: uh
21:57 to_json joined #salt
21:58 ange jslatts: (updated gist) like the nginx one for example ?
21:59 ange and I can drop the watch: section too ?
21:59 jslatts ange: well, watch is doing something different
21:59 jslatts ange: so yes, that second example will remove the file state if that pillar doesn't exist
21:59 RandalSchwartz I would also template the whole thing
21:59 jslatts ange: but if you want the service to restart, you need the watch
21:59 jslatts ange: or you could rewrite using "watch_in"
21:59 RandalSchwartz just have one item... they're all mostly identical anyway
22:00 anuvrat joined #salt
22:00 ange RandalSchwartz: true
22:00 dmick I think your proximal problem is blank lines introduced as a result of the templates
22:00 RandalSchwartz like /etc/monit/conf.d/{{ pillar['role'] }}.monitrc
22:00 RandalSchwartz or something like that
22:00 dmick but you can work around that problem by templating the whole stanza as suggested.  you can also use the strip-whitespace trick
22:00 dmick or that
22:00 n8n_ joined #salt
22:01 millz0r joined #salt
22:01 mgw joined #salt
22:02 n8n__ joined #salt
22:02 jrdx joined #salt
22:03 ange ok thanks
22:05 * Heartsbane blames whiteinge.
22:13 ange can you do a or in a jinja template ?
22:13 ange {{ pillar['some_ip'] or grains['fqdn_ip4'][0] }}
22:15 vbabiy_ joined #salt
22:16 ange {{ salt['pillar.get']('pkgs:apache', grains['fqdn_ipv4'][0]) }} ?
22:16 babilen ange: Sure, use pillar.get -- http://docs.saltstack.com/en/latest/topics/pillar/#pillar-get-function
22:16 babilen ange: exactly
22:16 arthabaska joined #salt
22:16 ange uh neat
22:16 ange thanks
22:22 pixelgremlins joined #salt
22:24 Etch joined #salt
22:25 pixelgremlins hey.. anyone going to the hackathon tomorrow? Wondering if there's room for people w/ less experience with Salt--I'd definitely like to learn more about it.
22:27 timoguin where's there a hackathon?
22:28 NullWagon joined #salt
22:29 possibilities joined #salt
22:32 obimod everywhere idea harvesters lurk
22:32 sroegner joined #salt
22:36 ange I keep having this brain trauma everytime someone talk about hackathon, as the term is associated with openbsd style weekends of code in my mind
22:39 obimod on the road to burnout, those are
22:39 DaveQB joined #salt
22:39 obimod hair turns white and then leaves, saying 'eff that'
22:40 obimod but, for the good of the whole i suppose
22:41 obimod i think i owe anyone who has hacked like that on openbsd a beer
22:42 ange netbsd, linux and other projects have followed the same habits I believe
22:42 alunduil joined #salt
22:43 NullWagon joined #salt
22:45 obimod i think i owe a lot of beers
22:45 asmaps left #salt
22:48 ange obimod: I have stopped looking for reasons to offer beers around
22:48 victorpoluceno joined #salt
22:49 ange or rather s/reasons/excuses/
22:56 Luke_ joined #salt
22:58 jgarr joined #salt
22:59 XenophonF left #salt
22:59 jgarr I'm working on my works new salt infrastructure, I'm curious how people push state trees from a git server -> salt master. Does everyone just use post commit hooks?
23:00 jgarr trying to figure out the best way to deploy devel branch to devel salt master and master branch to prod master
23:00 jgarr fyi, I'm using atlassian stash for my git server
23:00 jgarr suggestions?
23:02 jab416171 jgarr, ours is pretty low tech (just a cron that git pulls a branch)
23:02 jgarr jab416171: that is what I considered
23:02 pixelgremlins timoguin: Salt Stack hackathon at OpenWest in Orem, Utah
23:02 jgarr but then you have to wait for cron (or just set repeat frequent enough)
23:02 jab416171 yeah
23:03 jgarr jab416171: is there a reason you did that instead of hooks? and is there a way in the git pull to specify a branch?
23:03 jab416171 and then if you want to highstate manually, you run a script that git pulls instead of just salt-call
23:03 bhosmer joined #salt
23:03 pixelgremlins I'm not devops, I've managed some linode servers, and done linux stuff, but would like to get more familiar w/ devops and automation, type stuff... is why I was asking if novices were welcome at the hackathon.
23:04 jab416171 jgarr, my guess is the implementor wasn't familiar with git hooks
23:05 jab416171 but yes, if you're just pushing your changes from your local box you have to wait until the cron runs for it to highstate
23:05 timoguin jgarr: the fileserver backend polls every minute as well
23:05 jgarr jab416171: your cron jobs run as root? I'm debating setting up a salt user just for git pulls
23:06 jgarr timoguin: isn't the fileserver just for minion <-> master sync?
23:06 jab416171 yes, the cron calls the highstate script (which makes sure git is up to date before running) as root
23:07 jgarr jab416171: outside of cron, is there a way internal to salt to schedule highstate runs? I'm still new to salt
23:07 jab416171 jgarr, I'm not sure (I'm relatively new to salt as well)
23:07 timoguin jgarr: well, mainly. the git backend will pull every minute to refresh the files/states that are available to the minions.
23:08 jab416171 jgarr, you could use git-fs
23:08 jgarr timoguin: but that's only if you're using gitfs right? I didn't have plans to implement that ATM
23:09 timoguin ah, that's what i thought you were asking
23:09 jgarr timoguin: looks neat, but just need to get something simple in place for now
23:10 jgarr cron or hooks seems like an easier solution. Especially when a lot of the team isn't familiar with git
23:10 jab416171 cron would be the easiest
23:10 jslatts joined #salt
23:11 jgarr jab416171: got an example somewhere of your cron script?
23:11 stevednd I have a file.directory state which tries to set the user/group/mode recursively to the given user. The changes are made except to symlinked files, and salt says it failed, and has the comment "Failed to change user to steve; Failed to change group to steve; ...4 more times" I have follow_symlinks: True, but it's clearly not working
23:13 arthabaska joined #salt
23:19 xt joined #salt
23:21 NullWagon joined #salt
23:21 joehh nrgaway: can you send me a link to the debian pr, also anything on ubuntu would be handy too
23:25 nrgaway joehh, here is the PR https://github.com/saltstack/salt-bootstrap/pull/367.  With this you can set an ENV RUNLEVEL 2 and it will install.  Or you can set a softlink to fool the installer : RUN ln -s /etc/rc2.d /etc/rc.d
23:26 joehh ok - so issue is on bootstrap side rather than packages
23:26 nrgaway joehh, here is a link to a shell file I use that will ignore all errors when installing.  Usually it always installs fine, but just fails when it is confirming its installed or enabled
23:26 joehh anything we need to alter with the packages?
23:28 frasergr_ joined #salt
23:28 nrgaway I get errors with dmidecode even though its installed; think it can;t read some memory; not sure if another package needs to be running.  I also install these packages:  -p python-libcloud -p dmidecode -p procps -p pciutils
23:29 nrgaway some of them may already be in the bootloader; have not checked in a few weeks since most were added for me
23:29 nrgaway joehh, ^^^^^^^
23:29 joehh see it - is the link the link to relay.sh above?
23:30 nrgaway yes, the gist url contains a simple shell file that can be used to install anything that may give errors.  I use it when I know the file installs fine and just fails verification
23:31 elfixit joined #salt
23:31 nrgaway I also added a SIGHUP trap since another application (runit I think) failed to install if process id could not take an HUP
23:33 nrgaway I will be working over the next month setting up a docker salt master/server for DockerNAS, so all the dockers will be managed by a single master docker and all configureations will be available via a GUI
23:33 arthabaska joined #salt
23:34 nrgaway I only bootstrap since I need development version and need all dependancies set up.  I think reget with git via a state file
23:37 nrgaway If I get some time I can submit anyther profile for docker+ubuntu and docker+debian so they do not conflict with bare metal machines
23:37 victorpoluceno joined #salt
23:38 mrj joined #salt
23:38 nrgaway I gotta finish yamlscript and a runit service provider module first though
23:41 meteorfo_ joined #salt
23:44 NullWagon joined #salt
23:50 mgw joined #salt
23:54 mateoconfeugo joined #salt
23:55 schmutz_ joined #salt
23:56 schmutz__ joined #salt

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