Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-11-11

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

All times shown according to UTC.

Time Nick Message
00:03 bltmiller joined #salt
00:05 XenophonF joined #salt
00:06 jhauser joined #salt
00:06 Harsh @whytewolf - please send ur resume to jharsh@sageitinc.net, will call u and discuss
00:07 xbglowx joined #salt
00:10 pipps joined #salt
00:26 bowhunter joined #salt
00:41 swills joined #salt
00:47 awiss joined #salt
00:49 bbbryson joined #salt
00:50 sarcasticadmin joined #salt
00:50 pcn Can salt-ssh be used with ssh-agent?
00:54 amontalban joined #salt
00:55 keimlink_ joined #salt
00:56 jas02 joined #salt
01:00 jas02 joined #salt
01:01 edrocks joined #salt
01:03 pipps joined #salt
01:03 John_Kang joined #salt
01:15 preludedrew joined #salt
01:23 pcn Found it: http://blog.siphos.be/2016/03/using-salt-ssh-with-agent-forwarding/
01:31 lordcirth Can you pull nodegroups into other nodegroups?
01:38 hemebond lordcirth: Yes, but only nodegroups defined earlier in the config.
01:38 lordcirth hemebond, ok, that's reasonable.  Thanks!
01:43 bluenemo dockerng.running states that I can give ip:hostport:containerport for - port:, but it fails with Failed to apply configuration for the following parameters: port_bindings on salt-minion 2016.3.4 (Boron)
01:44 hemebond bluenemo: You know the difference between ports and port_bindings?
01:44 bluenemo ah sorry, I meant port_bindings
01:45 hemebond What is your port_bindings setting?
01:45 hemebond What is your ports setting?
01:46 bluenemo i only have port_bindings: 0.0.0.0:1234:5678
01:46 matth Is it possible to call the option : "-P, --parallel " from the states cloud.profile ?
01:46 bluenemo (I want to publish port 5678 on the container to outside 1234)
01:46 hemebond Hmm, I don't have an IP in my port_bindings
01:46 bluenemo hm
01:46 bluenemo doc states you can
01:46 hemebond port_bindings: ['80:3000'], ports: ]
01:46 hemebond - 3000
01:47 bluenemo ip:hostPort:containerPort - Bind a specific IP and port on the host to a specific port within the container.
01:47 hemebond (was trying to reformat that line, oops)
01:47 bluenemo hm - why state ports again?
01:47 hemebond Have you defined ports?
01:47 hemebond So it exposes that port?
01:47 hemebond In my settings it exposes port 3000 and then binds to port 80 on the server.
01:47 bluenemo I thought I only have to specify port_bindings - I seem to have missunderstood that
01:48 bluenemo aah i see - I thought it does both. Thank you
01:48 hemebond Took me some trial and error to get it working.
01:51 bluenemo cool works thanks
01:56 lordcirth hemebond, to make a list of nodegroups, can I just use L@, or do I need something to specify nodegroup matching?
02:00 hemebond lordcirth: I think the prefix is N@
02:01 jas02 joined #salt
02:01 hemebond argh, all Google links seem to go to carbon documentation which doesn't exist.
02:01 lordcirth hemebond, still a comma-separated list?
02:01 hemebond https://docs.saltstack.com/en/latest/topics/targeting/nodegroups.html
02:02 hemebond Oh you're talking about the targeting in top.sls now?
02:03 lordcirth No, I want to make a nodegroup of nodegroups in /etc/salt/master.  Trying N@
02:03 hemebond N@group1 or N@group2
02:03 hemebond probably
02:06 lordcirth Yeah commas didn't work, but it looks like 'or' didn't either
02:07 lordcirth Is there a debug thing to print all minions in a nodegroup?
02:07 DA_ joined #salt
02:07 DA_ whytewolf
02:07 lordcirth oh just salt -N group1 test.ping
02:10 lordcirth It works!  Just had to rename master.d/nodegroups with .conf
02:11 raspado hi all, in the master config file, do you guys typically prefer the IP or the hostname for the master which the minions connect to?
02:12 hemebond raspado: I use a hostname/DNS
02:12 raspado kinda thinking that too just in case we need to flip the master, we can just update the IP
02:13 DA_ hey.. anyone looking for a devops saltstack Job ... vacancy is in salt lake city UT.
02:14 raspado sounds fun, id take it if i didnt get recently hired -_-
02:14 DA_ my bad luck
02:15 hemebond DA_: Have you posted in the mailing list?
02:15 hemebond There was someone in here recently looking for a job actually.
02:15 DA_ no i havent...
02:15 DA_ is it ? do you know who ?
02:15 hemebond I have logging disabled. Will see if I can find it in the IRC log archive.
02:16 DA_ thx man
02:16 raspado DA_: is it remote or office?
02:18 DA_ its not remote.. -_-
02:18 raspado k
02:19 fracklen joined #salt
02:20 DA_ i think Whytewolf was the one who responded earlier to me asking about the Job... but he seems to be gone
02:22 netcho joined #salt
02:23 hemebond DA_: It was bantone
02:23 DA_ thanks
02:23 DA_ will connect with him
02:24 hemebond https://irclog.perlgeek.de/salt/2016-11-03#i_13507876
02:27 DA_ thats helpful...
02:27 DA_ thanks
02:28 DA_ can you also suggest which mailing list i should use... i need 6 people
02:28 raspado what happened to https://docs.saltstack.com/en/carbon/ref/clouds/all/salt.cloud.clouds.nova.html
02:28 hemebond raspado: https://docs.saltstack.com/en/develop/ref/clouds/all/salt.cloud.clouds.nova.html
02:29 hemebond Something wrong with the documentation handling.
02:29 raspado ah k thx
02:36 systo joined #salt
02:41 catpiggest joined #salt
02:41 sebastian-w joined #salt
02:46 netcho joined #salt
02:57 amontalban joined #salt
03:01 akhter joined #salt
03:03 jas02 joined #salt
03:03 edrocks joined #salt
03:08 bastiand1 joined #salt
03:08 onlyanegg joined #salt
03:14 raspado when new files are added to master.d, does the salt master really need to be restarted?
03:20 hemebond raspado: I'm not sure it does.
03:22 chadhs joined #salt
03:25 mpanetta joined #salt
03:35 blu__ joined #salt
03:44 systo joined #salt
03:54 raspado so what does base: /srv/salt really mean?
03:55 hemebond The files for the base environment are in /srv/salt
03:55 raspado we have ours in /srv/salt/salt/{dev,qe,stage,prod}
03:55 hemebond Your... what?
03:55 hemebond /srv/salt/salt/ ?
03:56 raspado if i just specify /srv/salt/salt, will this means that by default, search will be recursively done in /srv/salt/salt ?
03:56 raspado yeah we have different folders for each environment
03:56 hemebond /srv/salt/salt/ will become the root of the base environment
03:56 hemebond i.e., salt://
03:56 hemebond But your environment directories are under your base environment?
03:56 raspado yeah
03:57 raspado let me show ya
03:57 raspado http://pastebin.com/PTBUvHba
03:57 raspado not sure why I need base in our case
04:00 hemebond My current setup http://pastebin.com/DLG5A9PB
04:00 evle joined #salt
04:00 hemebond (not sure why the paste broke the indentation slightly.
04:00 hemebond )
04:02 awiss joined #salt
04:10 Vaelatern Would I be able to use pillar data from within a pillar? Would jinja substitution allow that?
04:10 hemebond Vaelatern: Better to assume no
04:10 hemebond *Best to assume
04:10 Vaelatern Hm
04:11 theblazehen joined #salt
04:12 Vaelatern I'm playing around with putting short file contents in the pillar, but the file contents changing per-host
04:13 Vaelatern I guess I'd need a new sls for each host in that case, does that sound right?
04:13 hemebond There is a new thing... pillar_tree or something.
04:13 Vaelatern s:sls:sls file:
04:13 hemebond A new sls for each file? Don't know. Sounds cumbersome.
04:14 Vaelatern sls file for each host
04:14 hemebond Depends what you're doing. Maybe.
04:14 Vaelatern Basic configuration of things like gateways
04:14 hemebond https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.file_tree.html
04:14 Vaelatern Thank you
04:15 hemebond If it's different per minion then, yeah, probably.
04:17 raspado hemebond: i see so base basically is a global inheritence ?
04:17 hemebond raspado: In my setup, yes.
04:18 hemebond It's the fallback for all custom environments.
04:18 iggy environments are the devil
04:18 hemebond lol
04:19 iggy admit it, you expected no less from me
04:19 hemebond I should expect it by now ☺
04:25 orionx joined #salt
04:41 fracklen joined #salt
04:44 netcho joined #salt
04:44 informant1 joined #salt
04:45 __number5__ Vaelatern: we use a python module as ext_pillar to provide dynamic/external data pillars
04:46 Vaelatern __number5__: So basically a different pillar providing the pillar with data?
04:46 __number5__ Vaelatern: ext_pillar will have minion_id as input, so you can provide per-host pillar based on that
04:46 Vaelatern Basically I would like to set file contents in a pillar, but the file (network card configuration) changes per host
04:46 __number5__ Vaelatern: yes, and you can still have the default file tree pillar as the sametime
04:47 Vaelatern So part of the files would depend on per-host data
04:47 Vaelatern But the state itself could be generalized to all of my hosts, so it'd be annoying to target the pillar differnelty on more than hardware type
04:48 __number5__ btw, ext_pillar can use all existing pillar data *and* grains
04:51 __number5__ Vaelatern: here is an example https://github.com/bbinet/pillarstack/blob/master/stack.py#L15
04:53 iggy you have to set a setting to have ext_pillar before file pillars... let us know if that works (never tried it, genuinely interested)
04:54 raspado how can I set the minions environment using salt-call ?
04:55 raspado i basically want to get rid of the environment so I can test this top.sls merging that happens
04:56 jalaziz joined #salt
04:57 iggy you can't
04:57 iggy it's a config option only
04:58 iggy hmm, maybe with `--args-stdin`
04:59 amontalban joined #salt
04:59 iggy well, it's a config option or set via the top file, but that didn't sound like what you were doing at first glance
05:01 raspado ahh ok
05:02 raspado so for git pillar, does it need its own separate git repo
05:02 raspado we have one repo which has pillar and state files
05:03 raspado we were thinkin that we can just have a salt.git repo and in the repo, we would have a pillar folder and a states folder
05:03 raspado but that may not work
05:03 Ni3mm4nd joined #salt
05:04 jas02 joined #salt
05:07 jimklo joined #salt
05:14 orionx joined #salt
05:20 impi joined #salt
05:20 matth is it possible to get the info return by salt 'fr*' cloud.get_instance myinstance     individually ?  ( like for the pillar or grains)
05:26 raspado how can I exclude files from gitfs? like .gitignore?
05:30 raspado i guess its probably not necessary
05:31 raspado should git pillar and git fs be two separate repos?
05:32 schemanic_ joined #salt
05:32 schemanic_ Good evening saltstack
05:32 schemanic_ Is anyone online tonight?
05:37 awiss joined #salt
05:42 DEger joined #salt
05:43 Vaelatern Yes
05:46 DEger_ joined #salt
05:55 raspado ok so how do I know if gitfs is actually pulling the repo?
05:56 raspado [INFO    ] Wrote new gitfs remote map to /var/cache/salt/master/gitfs/remote_map.txt
05:56 raspado doesnt tell me much though
05:57 DEger joined #salt
06:02 ninjada_ joined #salt
06:03 DarkKnightCZ joined #salt
06:04 fracklen joined #salt
06:10 raspado anyone up to help debug a small issue? :)
06:17 raspado figured it out nm
06:20 ninjada joined #salt
06:32 rdas joined #salt
06:36 writteno1 joined #salt
06:45 netcho joined #salt
07:00 amontalban joined #salt
07:05 sh123124213 joined #salt
07:06 edrocks joined #salt
07:07 jas02 joined #salt
07:11 felskrone joined #salt
07:14 Miouge joined #salt
07:17 fracklen joined #salt
07:17 DEger joined #salt
07:25 yuhlw______ joined #salt
07:27 ProT-0-TypE can I access pillars from a custom grain?
07:37 DEger joined #salt
07:52 haam3r joined #salt
07:54 DarkKnightCZ Hi, if i issue salt 'some-specific-minion' test.function args, is it sent to all minions, or just to the specific one?
07:55 bocaneri joined #salt
08:06 fracklen joined #salt
08:07 iggy ProT-0-TypE: pillars are rendered after grains
08:08 iggy DarkKnightCZ: if you find out, let us know
08:09 schemanic joined #salt
08:10 jas02 joined #salt
08:10 samodid joined #salt
08:12 jimklo_ joined #salt
08:20 narfology joined #salt
08:26 ProT-0-TypE thanks iggy
08:35 Electron^- joined #salt
08:38 JohnnyRun joined #salt
08:39 samodid joined #salt
08:39 fracklen joined #salt
08:43 dario_ joined #salt
08:44 jhauser joined #salt
08:45 netcho joined #salt
08:46 sjoerd_ joined #salt
08:47 sjoerd_ Good morning! Or midnight, or..
08:48 fracklen joined #salt
08:48 sjoerd_ Say, can anyone tell me what the difference in jinja is between {% and {%-
08:49 sjoerd_ I can't find much about {%- but I see it in formulas...
08:54 Miouge joined #salt
08:57 geomacy joined #salt
09:01 mikecmpbll joined #salt
09:02 krymzon joined #salt
09:04 Trauma joined #salt
09:05 BigBear joined #salt
09:07 netcho joined #salt
09:11 jas02 joined #salt
09:15 onlyanegg joined #salt
09:16 ivanjaros joined #salt
09:17 Miouge joined #salt
09:25 keimlink joined #salt
09:32 Rumbles joined #salt
09:35 babilen sjoerd_: Whitespace control - http://jinja.pocoo.org/docs/dev/templates/#whitespace-control
09:36 jeddi joined #salt
09:38 cyborg-one joined #salt
09:38 sjoerd_ Cheers
09:42 DanyC joined #salt
09:44 swills joined #salt
10:08 yuhlw______ joined #salt
10:08 yuhlw______ joined #salt
10:09 edrocks joined #salt
10:10 peters-tx joined #salt
10:11 hlub what happens if a function called via publish.publish raises an exception?
10:12 jas02 joined #salt
10:16 hlub I am wondering is there any real reasons to return errors as a string instead of raising exceptions. I've seen many salt functions to return strings that contain either an arbitrary error or some valid data. Then detection of success is missing and this appears to users as very odd error messages.
10:31 onlyanegg joined #salt
10:34 mjimeneznet joined #salt
10:46 amcorreia joined #salt
10:53 Reverend onlyif is the opposite of unless rite?
10:54 catpig joined #salt
10:55 sjoerd_ @Reverend sure sounds like it
10:56 netcho joined #salt
10:58 haam3r joined #salt
11:11 aphor joined #salt
11:14 jas02 joined #salt
11:18 akhter joined #salt
11:19 Reverend sjoerd_ :) yeah... i think it just works on the basis that onlyif = 0 and unless != 0 on exitcodes or some shit. it seems to be working now though :S
11:19 * Reverend shrugs
11:27 babilen Reverend: "not true" = "false" :)
11:27 babilen So we don't really need both
11:28 Reverend both what?
11:28 Reverend if you mean onlyif vs. unless
11:29 sjoerd_ Technically yes, but it looks nicer if you have both availabel
11:29 Reverend noooooooooo
11:29 Reverend no
11:29 Reverend no
11:29 DammitJim joined #salt
11:29 Reverend gime a sec to pastbin you something
11:30 babilen sjoerd_: Sure, I much prefer having both, but they are not strictly needed
11:30 Reverend well, in theory you could just put that into your cmd.run
11:30 sjoerd_ babilen: agreed
11:30 Reverend but it'll run the command every time regardless.
11:30 babilen Which command?
11:30 Reverend - unless: 'cat /proc/mounts |grep "/mnt/data1"'
11:31 babilen useless cat
11:31 Reverend i know
11:31 Reverend makes it easier for people to see what it's doing though. Don't ask.
11:31 Reverend anyway
11:31 babilen Why does nobody think of the cats?
11:31 Reverend my point is, that doesn't work with onlyif
11:32 Reverend i actually have an alias on my local server that uses kittens instead of cat. just because i like kittens more.
11:32 babilen Why wouldn't it work with onlyif?
11:32 sjoerd_ it would work with onlyif when you invert the exit of your gres using a '-v' flag
11:32 sjoerd_ of your grep*
11:33 Reverend no. because the grep will then return everything other than /mnt/data1, which will return regardless.
11:34 Reverend the cmd needs to run only when /mnt/data1 DOESN'T appear in the list
11:34 Reverend >_<
11:35 Reverend grep returns 0 if it prints -anything- and 1 if it odens;t.
11:36 sjoerd_ anywho, I would suggest using 'mountpoint' instead of digging through proc
11:36 Reverend mountpoint checks if something is mounted on that dir rite?
11:37 sjoerd_ afaik
11:37 Reverend lemme test exit codes. sec.
11:38 Reverend same story. 1 if it's not mounted.
11:38 Reverend will still need unless >_<
11:42 sjoerd_ I guess...
11:43 aphor Sounds to me like "unless" makes sense, although I don't have any more context than the last 30 messages.
11:44 babilen It sure makes sense
11:45 Rumbles joined #salt
11:45 sjoerd_ Yup, but I like having both unless and onlyif
11:45 aphor test $( mount|grep 'on \/mnt\/data1'|wc -l ) -lt 1
11:46 babilen There is no question that having both is good
11:46 sjoerd_ @aphor: ;)
11:46 sjoerd_ invert all the things
11:46 babilen There is simply no need to have both if you look at it logically
11:47 babilen As one is simply the inverse of the other
11:47 aphor not for the truth table output...
11:47 babilen Unfortunately one cannot easily express ¬ foo
11:48 babilen Ah .. true, aphor
11:48 aphor That is a core principle of Pythonic style: literate programming means your code should read like poetry.
11:49 babilen https://www.python.org/dev/peps/pep-0020/ ftw
11:49 aphor The primary goal should be to express a solution in a way that others can "get it"
11:49 babilen Absolutely
11:51 aphor .. which IMO occasionally requires a contortion, in my experience to express some irony or twist of conventionality.
11:53 aphor I guess in this case, something needs to run if we can't find some expected fs mount.
12:15 jas02 joined #salt
12:22 lattenkiste[m] left #salt
12:24 ozux joined #salt
12:30 sjorge joined #salt
12:30 sjorge joined #salt
12:32 onlyanegg joined #salt
12:40 amontalban joined #salt
12:41 fredvd joined #salt
12:55 DammitJim joined #salt
13:00 SaltyVagrant_ joined #salt
13:01 fracklen joined #salt
13:03 lorengordon joined #salt
13:06 debian112 joined #salt
13:16 mTeK What would keep my freebsd minions from not returning and how do I go about finding out why there not. My linux minions return just fine.
13:16 debian112 joined #salt
13:16 jas02 joined #salt
13:18 lordcirth mTeK, try salt-call on the minion, for a start
13:19 lordcirth with -l debug
13:19 mTeK Very to newish to salt so let me do some googleing
13:20 lordcirth mTeK, continue to google, but basically 'salt-call state.apply -l debug'
13:20 Rumbles joined #salt
13:22 Rumbles joined #salt
13:24 netcho if i install minion and add it's key to master manualy... if i want to change minion id do i ihave to delete pkis also?
13:25 netcho for example, i would like to have minion installed with specific config. but service stopped and removed from master. After that i would liek to update hostname and start minion. Will it generate new keys then and try to connect to master with it?
13:26 filippos joined #salt
13:27 netcho and if i have reactor that autoaccepts keys with new-hostname prefix in /minion/new-hostname*/start it should work?
13:29 mTeK lordcirth:  No matching salt environment for environment 'dmaint'
13:29 mTeK I'm not using that for my freebsd minions
13:30 mTeK Oh silly me
13:31 mTeK Found it in my top file with a glob.
13:31 mTeK Need to change to gains with os type
13:36 edrocks joined #salt
13:36 krymzon_ joined #salt
13:38 LostSoul joined #salt
13:40 lordcirth mTeK, you mean grains?
13:43 mTeK yes
13:43 mTeK I think
13:46 mTeK lordcirth:  This is what my top file looks like http://pastebin.com/DpGVPKVG
13:48 mdpolaris joined #salt
13:49 mTeK I had dmaint globbed with '*dmaint*' and the freebsd servers where like that in my name but not anything to do with me I think.
13:50 fannet joined #salt
13:51 mdpolaris has anyone played with foreman_salt?
13:52 DarkKnightCZ joined #salt
13:52 sjoerd_ when I look at the formula to make a formula, here: https://github.com/saltstack-formulas/template-formula/blob/master/template/defaults.yaml
13:52 sjoerd_ how would I make template.pkg contain a list of packages I need?
13:56 babilen sjoerd_: template: pkg: - pkg1 - pkg2 - pkg3
13:56 babilen (+ linebreaks)
13:57 babilen mdpolaris: Be the first! (and ask in #theforeman)
13:58 akhter joined #salt
13:59 sjoerd_ babilen: I tried that, but I can't get it to work :|
13:59 sjoerd_ here's what I've got atm http://pastebin.com/kTtdNc0Q
13:59 mdpolaris Thanks. I am checking in with #theforeman as well.
14:00 babilen mdpolaris: It typically also helps to ask your actual question. I am sure that some people played with foreman_salt before. In fact I know that people have, but I don't think that you are really after that information.
14:01 babilen Unless you are and your question has now been answered
14:01 Nahual joined #salt
14:05 kojiro joined #salt
14:11 DarkKnightCZ joined #salt
14:11 gtmanfred morning
14:12 ninjada joined #salt
14:12 tmilam could someone please tell me if this is a correct use of 'onlyif'?
14:12 tmilam http://pastebin.com/arUEvh5D
14:12 gtmanfred yeah
14:12 tmilam thank you
14:13 gtmanfred as long as subscription status returns a non zero exit code if it fails
14:13 tmilam yes, i verified that it does
14:13 gtmanfred you could also add a check_cmd: and run subscription-status there to to report that it did correctly authenticate
14:13 gtmanfred too to*
14:13 tmilam thanks i'll look into check_cmd
14:13 gtmanfred s/authenticate/subscribe
14:17 sjoerd_ Morning, gtmanfred. Would you mind having a peek at my pastebin here http://pastebin.com/kTtdNc0Q
14:17 Renich joined #salt
14:17 sjoerd_ all I seem to be getting is "Invalidly formatted 'pkgs' parameter. See minion log."
14:17 jas02 joined #salt
14:18 gtmanfred do - pkgs: {{postgres.pkg_server}}
14:18 sjoerd_ and in the minion log: "Invalid input: [['postgresql94', 'postgresql94-libs']]"
14:18 gtmanfred instead of adding it on a newline
14:18 gtmanfred because when you put it on a newline with a - in front of it, it becomes a list inside a list
14:18 gtmanfred pg-server-packages:
14:18 gtmanfred pkg.installed:
14:18 gtmanfred - pkgs: {{ postgres.pkg_server }}
14:19 sjoerd_ Let me give that a go
14:21 sjoerd_ Yes! Thanks a bunch :)
14:22 amontalban joined #salt
14:24 gtmanfred np
14:25 mdpolaris sjoerd_ thanks, i was having trouble getting existing hosts to report in to foreman, i also thought state.apply executed without states was the same as state.highstate, but turns out they aren’t
14:27 scoates joined #salt
14:29 Deliant joined #salt
14:32 promorphus joined #salt
14:32 jimklo joined #salt
14:33 nicksloan joined #salt
14:33 onlyanegg joined #salt
14:37 racooper joined #salt
14:41 DarkKnightCZ joined #salt
14:41 hlub_ joined #salt
14:42 ninjada joined #salt
14:43 tapoxi joined #salt
14:45 fracklen joined #salt
14:45 mdpolaris the larger task is to add a UI to salt. I was going to try SaltPad next, but i know it is considered alpha still. Has anyone used SaltPad and do you like it?
14:47 pfc joined #salt
14:50 cscf mdpolaris, looks interesting. I'm not sure it's really needed but it would be nice.
14:50 akhter joined #salt
14:51 mdpolaris yeah, i am getting pushback in my effort to migrate to Salt from puppet and one of the arguments is that “Well i have puppet dashboard”
14:52 mdpolaris i don’t need it myself either, but there is definitely some value to visualizing reports
14:52 mdpolaris but that can be done separately using the returners backend
14:52 fracklen joined #salt
14:54 tmilam i'm getting "validation failed: name has already been taken" when i do a subscription-manager register, however, i don't see the host under content hosts in foreman
14:54 tmilam does this have something to do with the database?
14:54 sjorge joined #salt
14:54 sjorge joined #salt
14:58 DanyC joined #salt
14:58 DanyC left #salt
15:00 tmilam they seem to be stuck in candlepin
15:01 nZac joined #salt
15:02 cscf mdpolaris, may I ask the main reasons you're migrating?
15:03 bluenemo joined #salt
15:04 ivanjaros joined #salt
15:06 mdpolaris our current puppet deployment is not very sophisticated right now so in general the CM system needs an overhaul, plus we are on 3.x, which is EOL this year. One way or the other we need a major project to redo the CM system. I am more familiar with python, which makes salt more appealing. The performance and scalability are key factors as well. I had very little experience with puppet or salt when i started looking at things and S
15:06 mdpolaris was much quicker for me to ramp up on.
15:08 mdpolaris the salt community is awesome of course. I also want to take advantage of the event driven automation capabilites, plus the orchestration features
15:08 cscf Makes sense
15:09 gtmanfred :+1:
15:09 bowhunter joined #salt
15:10 mdpolaris from what i read, the orchestration features are only available in puppet enterprise, but i don’t know if there is a community workaround. but i know for sure salt open includes all these features
15:12 mdpolaris it feels like a tighter package as well, again not a puppet expect, but hiera, mcollective, etc were all add-ons, while i think hiera is not built-in, i believe mcollective is still an add-on. The similar functionality is all included in the main salt package.
15:13 mdpolaris *not a puppet expert that is
15:15 Amreesh joined #salt
15:15 Amreesh Hi Friends, Looking for Salt Stack candidates..
15:16 Amreesh Anybody interested please forward your resume to amreesh.verma@pyramidci.com
15:18 saltminehelp joined #salt
15:18 saltminehelp Hey guys is there anyway to query salt mine for a  local host ?
15:18 saltminehelp Hey guys is there anyway to query salt mine for a  localhost ?
15:19 jas02 joined #salt
15:20 babilen saltminehelp: What does that mean exactly?
15:20 cscf saltminehelp, what do you mean by a localhost?
15:22 saltminehelp so I need to mine the salt information for docker but only grab the containers running on the machine which is having the state applied to I can configure nginx proxies to the containers
15:22 Miouge joined #salt
15:24 anotherzero joined #salt
15:24 saltminehelp This is an example of what ive got currently
15:24 saltminehelp but it grabs info for all docker containers
15:24 saltminehelp https://gist.github.com/anonymous/2a70d6aedcac22ba284da9f4804bb641
15:24 saltminehelp regardless of machine
15:25 gtmanfred why are you using the mine if you want to get it only for the local machine?
15:25 saltminehelp I thought the docker info was only available in mine
15:26 gtmanfred you could just call it with {{salt['whatever the mine function is']()}}
15:26 gtmanfred but you have to check mine_functions to see what the minions are running to return that
15:26 gtmanfred saltminehelp:can you gist `salt-call config.get mine_functions` on that minion?
15:28 gtmanfred oh interesting
15:28 akhter joined #salt
15:28 gtmanfred get_docker is an actual mine function
15:28 saltminehelp yea
15:28 gtmanfred yeah, you would need to do something extra to use the localhost
15:29 gtmanfred you would need to look in https://github.com/saltstack/salt/blob/develop/salt/modules/mine.py#L359 it is doing a docker.ps
15:29 gtmanfred you could pass a cidr that has the ip address of the local server with a /32
15:30 saltminehelp how would i do that
15:31 akhter joined #salt
15:32 gtmanfred {% set image_installs = salt['mine.get_docker'](interfaces="eth0", cidr="%s/32"|format(salt['network.interface_ip']('eth0')) %}
15:34 saltminehelp can i replace the cidr with the grain to query IP address
15:34 gtmanfred sure, you could use the grain ip address lookup
15:34 jimklo joined #salt
15:35 gtmanfred {% set image_installs = salt['mine.get_docker'](interfaces="eth0", cidr="%s/32"|format(salt['grains.get']('ip4_interfaces:eth0:0')) %}
15:35 saltminehelp exactly like that or do i need to change anyhing
15:36 sarcasticadmin joined #salt
15:36 gtmanfred that would do it
15:36 hasues joined #salt
15:36 gtmanfred should look up only images that are attached to the eth0 of the server that the state is run on
15:39 saltminehelp Thanks :P your a hero :D just need to figure out this syntax error and im good to go :D
15:39 gtmanfred :)
15:39 gtmanfred i am going to go get more coffee
15:40 gtmanfred and then play with this get_docker thing
15:40 saltminehelp ahh callback error
15:40 saltminehelp :D
15:41 saltminehelp may be my fault though where would you put the closing ) for the ( leading the interface
15:43 saltminehelp put it just before the pipe now getting unicode errors :(
15:44 sh123124213 joined #salt
15:47 hasues left #salt
15:48 keltim joined #salt
15:49 preludedrew joined #salt
15:51 gtmanfred ahh, it is misisng one closing ) at the very end
15:51 gtmanfred before %}
15:52 gtmanfred {% set image_installs = salt['mine.get_docker'](interfaces="eth0", cidr="%s/32"|format(salt['grains.get']('ip4_interfaces:eth0:0'))) %}
15:52 keltim_ joined #salt
15:54 keltim_ is there a way to get file.blockreplace to indent? I need to use it for yaml ...
15:55 keltim_ using 2016.3.2
15:57 gtmanfred it looks like you should be able to set template to jinja on blockreplace, so somehow hopefully you could pass |indent() function from jinja
15:58 gtmanfred that is annoying that the examples for block replace are actually examples for file.managed
15:58 keltim_ but if indenting it in the sls manually doesn't accomplish it, how would using jinja help since it would be doing the same thing?
15:58 gtmanfred template is for templating the stuff you are going to insert into the file
15:58 gtmanfred not templating in the sls file
15:59 gtmanfred so, blockreplace takes a file as input, which could contain all the stuff that you want to add to the yaml file
15:59 keltim_ but with blockreplace the content is in the sls file
15:59 gtmanfred not necessarily
15:59 gtmanfred it takes a source argument
15:59 keltim_ i tried with source and got nothing
16:00 keltim_ let me verify that though thanks
16:00 gtmanfred yeah like i said, i wish that the documents were actually showing how to use blockreplace and not file.managed
16:00 keltim_ yeah the docs are really bad there
16:01 keltim_ they really need a tech writer in general to go over all this auto generated shit to make sure it's sensible
16:01 gtmanfred we do
16:02 gtmanfred we also really need to do another docsprint
16:03 cscf I am hoping to make a small docs pull request this weekend.
16:04 gtmanfred keltim_: i am also not sure that blockreplace will work well if you are indenting in a yaml file, because block replace requires the start and end markers http://ix.io/1Emo
16:04 gtmanfred but that uses source:
16:05 gtmanfred keltim_: here are my states using source http://ix.io/1Emp
16:05 gtmanfred and you could just indent the source file as much as you want for when it gets inserted
16:10 keltim_ gtmanfred, I get "TypeError: coercing to Unicode: need string or buffer, bool found" when trying to use source:// with a file (containing a yaml snippet)
16:10 keltim_ not sure how to interpret that
16:10 gtmanfred that i don't know... but if you check my example that is working :/
16:11 raspado can gitpillar and gitfs live in the same git repo?
16:11 gtmanfred yes
16:11 gtmanfred raspado: https://github.com/gtmanfred/blog-sls
16:11 keltim_ I'm not sure what would be better than blockreplace, it seems like the right thing, the markers are just comments
16:11 gtmanfred raspado: https://github.com/gtmanfred/blog-sls/blob/master/minion.d/fileserver.conf
16:12 gtmanfred as long as the markers are just comments, and yaml doesn't render them, then you are good
16:12 gtmanfred umm, yeah i don't know why source would end with that error :/ sorry
16:12 keltim_ gtmanfred, I get a 500 on that link ...
16:13 raspado thanks gtmanfred
16:13 gtmanfred oh, interesting
16:13 Pulp joined #salt
16:13 gtmanfred keltim_: http://sprunge.us/MJPR
16:17 keltim_ oh. I can't use source with this, it's a file that many other sls will also be editing
16:17 DEger_ joined #salt
16:18 gtmanfred you could have multiple sls with that...? it isn't the whole file that is managed from source: salt:// it is only the one block of text that is managed from the source file
16:19 gtmanfred keltim_: this one includes the file that is being managed too http://sprunge.us/WKib
16:20 gtmanfred the this: \n what was already in there
16:20 megamaced joined #salt
16:20 keltim_ I'm trying exactly that, though, and it's producing that error I posted
16:21 gtmanfred can you post your exact state?
16:21 keltim_ sure hold on
16:22 jas02 joined #salt
16:24 orionx joined #salt
16:27 keltim_ gtmanfred, http://dpaste.com/03ZDYXH
16:28 keltim_ oh damnit
16:28 keltim_ i'm pushing out a non-existent file
16:29 gtmanfred :) heh that would do it
16:29 keltim_ thanks working and indenting now!
16:29 gtmanfred nice
16:30 cyborg-one joined #salt
16:30 DEger joined #salt
16:30 gtmanfred is dd-agent just datadog looking into process and stuff for sshd -D ?
16:30 gtmanfred or does datadog start the sshd -D process too instead of the service unit/init script so that it can trace it too?
16:31 DanyC joined #salt
16:34 Aleks3Y joined #salt
16:35 orionx joined #salt
16:38 jimklo joined #salt
16:40 keltim_ it just looks for that string
16:41 jespada joined #salt
16:42 gtmanfred cool
16:42 gtmanfred I have a datadog shirt from openstack summit for mitaka, but i haven't tried it
16:44 ninjada joined #salt
16:46 onlyanegg joined #salt
16:47 raspado gtmanfred: for gitpillar and gitfs we will be using different branches for environments, like prod,stage,qe branches
16:47 raspado in each branch, im thinking of adding two folders similar to what you got, a pillar and states folder
16:48 raspado think that would be an issue where i can use one git repo still for both gitfs and gitpillar?
16:48 raspado also, not sure how I can tell salt that in git, the pillar folder is for pillar data and the states folder is for salt states
16:49 gtmanfred you could still use one repo
16:50 gtmanfred set the root: option in gitfs and git_pillar
16:52 saltminehelp_ joined #salt
16:52 raspado mmk
16:52 saltminehelp_ I have tried the suggested config line:
16:52 saltminehelp_ {% set image_installs = salt['mine.get_docker'](interfaces="eth0", cidr="%s/32"|format(salt['grains.get']('ip4_interfaces:eth0:0'))) %}
16:53 saltminehelp_ but am getting this error:
16:53 saltminehelp_ https://gist.github.com/anonymous/4e3af74f764cf506d4dff8d78862e680
16:54 gtmanfred ugh, unicode + py2k...
17:00 Miouge joined #salt
17:00 megamaced joined #salt
17:00 akhter joined #salt
17:02 nZac_ joined #salt
17:02 rqn joined #salt
17:03 SaltyVagrant__ joined #salt
17:05 Trauma joined #salt
17:05 debian112 joined #salt
17:05 raspado i changed the gitfs repo to another repo, is there anything I need to do to clear the master cache?
17:06 raspado getting an error "pygit2 does not support detecting stale refs for authenticated remotes"
17:06 mavhq joined #salt
17:06 Miouge joined #salt
17:14 mpanetta joined #salt
17:18 akhter joined #salt
17:21 Edgan joined #salt
17:22 jas02 joined #salt
17:24 gtmanfred salt-run fileserver.clear_cache backend=git
17:24 gtmanfred raspado: ^^ https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.fileserver.html
17:26 mikecmpbll joined #salt
17:27 raspado nice thx gtmanfred
17:28 Miouge joined #salt
17:28 mavhq joined #salt
17:37 onlyanegg I'm getting this jinja error: "Rendering SLS 'common:download.ame' failed: Jinja variable the inline if-expression on line 2 evaluated to false and no else section was defined."
17:37 akhter joined #salt
17:38 onlyanegg {% set branch = pillar['bamboo']['branches']['ame'][pillar.deploy.services.ame.branch] if pillar.deploy.services.ame.branch is defined %}
17:38 gtmanfred you have to say what to set it to afterwards
17:38 gtmanfred {% set branch = pillar['bamboo']['branches']['ame'][pillar.deploy.services.ame.branch] if pillar.deploy.services.ame.branch is defined else 'defaultbranch' %}
17:38 onlyanegg I don't want to set it if that doesn't exist
17:39 gtmanfred then you can't use that syntax
17:39 onlyanegg seems to me it should be like {% if condition %}{% set variable %}{% endif %}
17:39 onlyanegg oh
17:39 gtmanfred yes, you could do that
17:40 gtmanfred but you can't use the other syntax without an else statement
17:40 gtmanfred because it has to assign something to branch
17:40 onlyanegg hmmm, ok. Is that a python thing or a jinja thing?
17:40 gtmanfred it is python too
17:41 gtmanfred >>> x = 1 if True
17:41 gtmanfred File "<stdin>", line 1
17:41 gtmanfred x = 1 if True
17:41 gtmanfred ^
17:41 gtmanfred SyntaxError: invalid syntax
17:41 gtmanfred and
17:41 gtmanfred >>> x = 1 if False else 2
17:41 gtmanfred >>> x
17:41 gtmanfred 2
17:43 raspado if i wanted to override anything from gitfs, do I still need a top file in the directory path where im setting salt states for file_roots
17:44 onlyanegg ok, thx gtmanfred
17:44 gtmanfred raspado: you do not
17:44 raspado oh okay nice
17:44 hypdotspec joined #salt
17:44 gtmanfred just need the one file, so that it is found first
17:44 gtmanfred but it will fall back to using the top.sls from gitfs
17:45 raspado i have a folder in this case, like system/init.sls
17:45 gtmanfred yup, just make /srv/salt/system/init.sls
17:45 raspado so i just need to plop the system folder in my file_roots path?
17:45 raspado cool
17:45 raspado thx gtmanfred
17:45 gtmanfred https://docs.saltstack.com/en/latest/ref/states/top.html
17:45 gtmanfred raspado: also check out https://docs.saltstack.com/en/latest/ref/configuration/minion.html#std:conf_minion-top_file_merging_strategy
17:45 raspado shweettt
17:48 codeape joined #salt
17:53 pipps joined #salt
17:56 tercenya joined #salt
17:57 pipps joined #salt
18:01 akhter joined #salt
18:06 Miouge joined #salt
18:06 samodid joined #salt
18:08 raspado not sure what the heck is going on but if i remove the top.sls file from file_roots, it doesnt get the gitfs top.sls in the minion get "   Comment: No Top file or external nodes data matches found. "
18:10 gtmanfred what is your file_merge_stategy set to?
18:10 raspado i dont have it set
18:10 gtmanfred TOP_FILE_MERGING_STRATEGY
18:10 swills joined #salt
18:10 gtmanfred hrm, odd, cause it should work if it can see the gitfs one
18:10 swills joined #salt
18:11 raspado gtmanfred: is there a command I can run to see what the merging strategy is defaulting to?
18:11 gtmanfred it defaults to merge
18:11 gtmanfred but you could run python -c "import salt.config; print salt.config.client_config('/etc/salt/master').get('top_file_merging_strategy')"
18:15 edrocks joined #salt
18:23 jas02 joined #salt
18:26 Flying_Panda joined #salt
18:27 Edgan I am not a fan of top merging.
18:27 Edgan It makes feature branches in the repositories dangerous.
18:28 raspado gtmanfred:  http://pastebin.com/NwU7itN2
18:29 raspado in my master log I see gitfs received 265 objects for remote 'git@git-sr.cooldomain.net:devops/salt.git'
18:29 raspado is my config not right?
18:29 Edgan raspado: https://paste.fedoraproject.org/478033/14788889/  I put this in my /etc/salt/master to disable top merging.
18:29 gtmanfred raspado: check /var/cache/salt/master/gitfs
18:30 gtmanfred and make sure the repos are there
18:30 bowhunter joined #salt
18:30 fannet joined #salt
18:30 raspado Edgan: yeah was kinda thinking that but still not too savvy on git stuff to see if thats the approach we want to go with (yet)
18:30 Edgan raspado: Not, salt for your states/formulas is not a wise name. If you ever have to checkout the salt(python) code from github, that repo is named salt.
18:31 raspado should name it states huh?
18:31 gtmanfred salt-states
18:31 Edgan raspado: I use salt-formulas
18:31 gtmanfred is what I use, or sls
18:31 gtmanfred blog-sls
18:31 gtmanfred ¯\(°_o)/¯
18:31 gtmanfred i am going to go eat lunch
18:31 Edgan raspado: Everything I write is in the formula style
18:32 Bob joined #salt
18:33 pipps joined #salt
18:35 fracklen joined #salt
18:39 XenophonF raspado: I've named my primary state repo "salt-states": https://github.com/irtnog/salt-states
18:39 XenophonF my private pillar repo is "salt-pillars"
18:40 XenophonF branches == environments == DTAP phase names
18:40 Edgan XenophonF: Never need feature branches?
18:40 XenophonF other people organize them differently according to their need
18:40 sh123124213 joined #salt
18:40 raspado XenophonF: ah k, i think were going to use one git repo, inside the repo will be a pillar and states folder, hoping to use the same git repo for gitpillar and gitfs
18:41 raspado then create multiple env branches
18:41 XenophonF raspado: I would keep them separate if only so that you don't accidentally expose secrets to minions that shouldn't see them, but YMMV
18:41 Edgan XenophonF: Thanks for sharing. I like merging defaults.yaml into map.jinja. Which with salt-ssh is especially useful, because then I only have to file_extraref one file per formula, not two.
18:42 raspado XenophonF: the minions would be based on environment though
18:42 raspado does gitpillar/gitfs pull all the branches?
18:42 XenophonF raspado: yes
18:42 raspado oh that sucks
18:42 XenophonF Edgan: interesting - I don't use salt-ssh, so I haven't had that issue
18:43 XenophonF raspado: i use environments with states but not with pillar data
18:43 ivanjaros joined #salt
18:44 XenophonF i'd like to be able to do the equivalent of "state.apply ... saltenv=... pillars=... pillarenv=..."
18:44 XenophonF but as that's not currently possible, i keep pillar data in one branch and revert commits when necessary
18:44 XenophonF it's not as clean a process as i'd like
18:44 ivanjaros3916 joined #salt
18:46 ninjada joined #salt
18:46 iggy environments are the devil!
18:46 iggy going to get the bot to start saying that for me
18:46 Edgan XenophonF: https://storage.cygnusx-1.org/formula.txt  Example of my style. I also like to break out types(pillars, users, pkgs, files, services) into their own sls files to more obviously control order.
18:48 Flying_Panda xeno I use one salt state to deploy projects and have an updating pillar file base don the project being deployed
18:49 Edgan Flying_Panda: example?
18:52 DanyC joined #salt
18:55 Edgan XenophonF: https://github.com/irtnog/salt-states/blob/production/hostname/init.sls   I have a like method for setting the hostname, but even on systemd systems I haven't found the need to do, "hostnamectl set-hostname {{ fqdn }} && systemctl restart systemd-hostnamed".
18:56 Edgan XenophonF: I just do hostname {{ fqdn }}  . Benefit of your method?
18:58 Miouge joined #salt
18:58 Sketch you mean cmd.run hostname?  that just sets the hostname dynamically, it doesn't affect the system permanently
18:59 SaucyElf joined #salt
18:59 Edgan Sketch: I do more than that
18:59 SaucyElf_ joined #salt
18:59 Edgan Sketch: I also write /etc/hostname
19:00 sh123124213 joined #salt
19:00 Sketch yeah, that is more permanent
19:00 Sketch hostnamectl is the "systemd" way to do it, though
19:00 Edgan Sketch: https://paste.fedoraproject.org/478040/89084814/
19:01 * Sketch isn't sure what else, if anything hostnamectl actually does
19:01 Edgan Sketch: ok, so another way. I still have some trusty systems, so a non-systemd way is good. Though I am working on phasing out trusty fairly fast.
19:03 edrocks joined #salt
19:04 Flying_Panda Edgan at the start of the deployment i do an git archive to pull app.sls from gitlab from there it deploys to docker and writes nginx.vhost files
19:06 Flying_Panda some slight string manipulation of the app.sls to remove the 0 byte binary charcters and metadata gitlab adds
19:06 Flying_Panda then apply the state
19:06 fracklen_ joined #salt
19:11 tercenya joined #salt
19:11 mohae joined #salt
19:11 Edgan Flying_Panda: I meant actual code of "updating pillar file base don the project being deployed"
19:12 Flying_Panda oh The update is done via CI from jenkins/git based on project
19:12 Flying_Panda using bash
19:12 Edgan Flying_Panda: ah, sounds like what I do
19:12 Flying_Panda couldnt for the life of me figure out a proper salt way
19:13 Flying_Panda kept getting why would you want to do that answers :D
19:13 Edgan Flying_Panda: https://paste.fedoraproject.org/478041/88916151/
19:13 Flying_Panda as a side note anyone seen anything like this?   UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 1195: ordinal not in range(128)
19:14 Flying_Panda https://gist.github.com/DrunkenAngel/6de501b72e86fcb0557915c72a249085
19:14 Flying_Panda seems to be being caused by the format in line 3
19:14 nicksloan joined #salt
19:15 Edgan Flying_Panda: It is a bad double quote
19:15 Rubin ugh all the jinja vim syntax files assume you are editing html files marked with jinja
19:15 Edgan Flying_Panda: you probably cut and pasted from somewhere and didn't get " but the unicode alternative version
19:15 XenophonF Edgan: the hostname-setting stuff was written for RHEL/CentOS EC2 instances
19:15 XenophonF I don't have my notes handy, but from what I can recall, that's the documented method for changing the system's hostname.
19:15 Edgan XenophonF: I have trusty(14.04) and xenial(16.04) Ubuntu EC2 instances.
19:16 Edgan Flying_Panda: I see this every so often cut and pasting from blogs
19:16 XenophonF I don't.
19:17 Flying_Panda ill try replacing all the " with single quotes
19:17 Flying_Panda same error
19:17 XenophonF Rubin: salt-mode in emacs isn't completely horrible, if you want to give that a try
19:18 Flying_Panda theres a salt editor for VIM provided by salt
19:18 Flying_Panda ill grab link 1 mo
19:18 Rubin i have that installed
19:18 Rubin but this is a jinja file not a salt file
19:18 Flying_Panda the one installed by pathogen ?
19:18 Flying_Panda seems to do basic jinja syntax fo rme
19:18 Rubin it does.. but its broken with complex situations
19:18 Rubin for example a < in the file throws it off
19:19 Rubin even in a {% raw %} block
19:19 Flying_Panda ahh i see
19:19 Rubin because it assumse its html
19:19 Edgan Flying_Panda: I normally use vim on the command line, but switching to Atom. It has so many nice features.
19:19 nZac joined #salt
19:19 Rubin wish i knew how to do syntax files, i dont think it would be too hard
19:19 Flying_Panda tried pycharm ? as an ide might help with syntax checking long complex jinja
19:20 iggy the salt extension for atom isn't bad
19:20 Rubin im not going to change my editor to get a file to highlight right :o
19:20 iggy come on... live a little
19:21 Edgan atom is good at yaml, jinja, and python with the right plugins
19:21 Rubin if i cant move with hjkl keys, i'm not interested
19:21 Edgan vim can pretty much do everything Atom can, but Atom is easier to setup for plugins
19:22 freelock[m] ha, the vim extension for atom isn't bad
19:22 Rubin oh wait, this .vim file has a way to disable the html part
19:22 Rubin " .vimrc variable to disable html highlighting
19:22 Rubin if !exists('g:jinja_syntax_html')
19:22 raspado so i made a commit to remove a change in git
19:22 * freelock[m] didn't know there was a salt extension for atom
19:22 raspado but gitfs is still caching the old change
19:23 Edgan raspado: gitfs takes 60 seconds to update
19:23 raspado its been like 5 minutes
19:23 raspado heh
19:24 iggy you sure it's not just that you only changed the file in 1 branch and the original is still in the other branche(es)
19:24 Rubin raspado, its really worth it to set up a git hook to push out the change instantly when you push it
19:25 raspado i made my commit to the prod branch
19:25 Rubin it isn't hard
19:25 Flying_Panda git CI in new version of git :D
19:25 jas02 joined #salt
19:25 DEger joined #salt
19:25 raspado its the only branch i have atm
19:25 iggy you don't have a base branch?
19:25 iggy (or master branch as it were)
19:26 sh123124213 joined #salt
19:26 raspado no, is it needed? we dont use base for anything, everything is environment specific
19:26 sh123124213 joined #salt
19:26 iggy the environments merge no matter if you have a base branch or not
19:27 raspado if we do not define the environment in the minion right?
19:27 iggy what does your master config look like (gitfs wise)?
19:27 iggy I think it merges even if environment is set
19:28 iggy but then, this is one of the prime reasons I don't use environments
19:29 raspado iggy: http://pastebin.com/zizCPsc6
19:29 raspado if you see file_roots base: /srv/salt/states... basically in this folder is all the environment folders
19:30 raspado but looking at how its written, i cant see how base would even work if theres no top.sls file in /srv/salt/states/
19:30 jimklo joined #salt
19:31 iggy top files get merged across environments
19:32 raspado hmm that would be werid because we dont see that happen in our env if it were, we'd have alot of broken stuff right now :)
19:32 raspado but that only happens if the minion does not have an environment specifically defined right?
19:32 iggy but you only have a little broken stuff
19:33 raspado when we provision hosts through salt-cloud , the map file adds the environment to the minion
19:33 pppingme joined #salt
19:33 iggy I feel like you should probably get help from someone who uses environments
19:33 sh123124213 joined #salt
19:34 XenophonF raspado: take a look at my salt-states repo if you want to see an example using environments
19:34 XenophonF https://github.com/irtnog/salt-states and https://github.com/irtnog/salt-pillar-example
19:34 raspado cool thx XenophonF
19:34 Ni3mm4nd joined #salt
19:34 XenophonF note though that it might not match how you're doing it
19:34 gtmanfred iggy: i wanna replace cloud-init with salt...
19:34 XenophonF e.g., i assign roles and enviroments via pillar
19:35 XenophonF and key off the minion ID
19:35 gtmanfred https://github.com/saltstack/salt/pull/37649
19:35 saltstackbot [#37649][OPEN] Add grains for the cloud metadata server | What does this PR do?...
19:35 iggy gtmanfred: replace? we just use cloud-init to install salt
19:35 XenophonF what iggy said
19:36 gtmanfred but what about startup_states: cloud-init, and it could do everything that cloud-init does if it is already installed on the base images
19:37 iggy we don't salt everything, so that wouldn't really work for us
19:37 iggy but I could see how it would appeal to some
19:37 gtmanfred cool
19:39 gtmanfred does cloud-init run on windows yet?
19:39 iggy yes
19:40 gtmanfred ok
19:42 iggy well, sort of I guess.... https://cloudbase.it/cloudbase-init/
19:43 gtmanfred i remember canonical working on it, but i also remember them getting pissy and stoping developing for it
19:43 sjoerd_ Does anyone have an opinion on design for me? I have an eclictic collection of machines and services I want to bring under saltstack. Muliple departments working on sets of servers/services and all that.
19:44 sjoerd_ I was thinking of implementing formulas per sub-part of services and then letting them mix and match as needed
19:44 iggy I've got a good idea of what doesn't work...
19:45 * iggy hopes nobody from work is here
19:45 gtmanfred heh
19:45 sjoerd_ :)
19:46 samodid joined #salt
19:46 akhter joined #salt
19:46 sjoerd_ At the moment with my cfengine setup I've got multiple policies describing for example apache for each department, but it sucks badly when they start drifting apart. Which they inevitably do
19:48 sjoerd_ But let's have it Iggy
19:51 Kadu joined #salt
19:52 Sandman_ joined #salt
19:53 Sandman_ Hey - trying to apply a network interface change through Salt, but the change seems to bounce the interface long enough that my minion loses connection to the master. Any advice on how to deal with this?
19:55 mibr0 joined #salt
19:55 tercenya joined #salt
19:56 fracklen joined #salt
19:57 sjoerd_ run it forking into the background with a sleep before executing it?
19:57 Flying_Panda set a longer salt timeout ?
19:58 nicksloan joined #salt
19:59 fracklen joined #salt
20:00 Sandman_ @sjoerd_ that's my best idea so far. @Flying_Panda can you do that from within a .sls file?
20:01 codeape joined #salt
20:02 Flying_Panda do you have a example of the state your calling ?
20:02 Sandman_ basically it's doing a cmd.run of "ethtool -G" to set the ring buffer on the interface
20:03 sjoerd_ what OS are you having this problem on anyway? Good chance I will run into it as well sooner or later
20:03 Sandman_ Centos 7
20:03 Rebus_ joined #salt
20:03 Sandman_ seems that ethtool -G takes longer to execute on Centos 7
20:03 sjoerd_ yup, ditto. haven't gotten to doing network yet tho
20:03 Flying_Panda can you not do cmd.run: -name: echo 500 timeout:900
20:03 fxhp joined #salt
20:03 Flying_Panda can you not do cmd.run: -name: echo 500 -timeout:900
20:04 Flying_Panda https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html
20:04 Sandman_ i tried to do something like cmd.run:  -name: (sleep 10; ethtool -G) &
20:04 Flying_Panda timeout
20:04 Flying_Panda If the command has not terminated after timeout seconds, send the subprocess sigterm, and if sigterm is ignored, follow up with sigkill
20:04 Sandman_ the problem is that when Salt returns you get a minion not connected alert instead of status
20:05 Sandman_ i probably can't tell people to change the timeout on highstate for just the node that needs this, because they probably will forget
20:05 akhter joined #salt
20:05 Sandman_ and i don't think people will want me to change the default
20:05 Sandman_ (in /etc/salt/master)
20:06 Flying_Panda no you just change it for that single cmd.run
20:06 Sandman_ oh
20:06 Flying_Panda cmd.run:
20:06 Sandman_ the -timeout is under the -name
20:06 Flying_Panda - name: blah
20:06 Sandman_ okay i'll try that
20:06 Flying_Panda - timeout
20:06 Flying_Panda - timeout: 300
20:06 Sandman_ i don't think that'll work either though
20:06 Sandman_ that's a timeout for the command...which completes
20:07 Sandman_ it just completes after the master declared the minion gone, and the minion doesn't reconnect when it comes back up
20:07 Sandman_ to be clear, everything i'm trying to do works, you just don't get results from Salt, which people want
20:08 Flying_Panda yea your right it dont check back in after the 200
20:09 Sandman_ so setting the "salt timeout" would work, but i don't think our operators would remember or even like that
20:09 Sandman_ i'd be fine with a cmd.something that executes a command and doesn't wait for a return code...
20:10 gtmanfred Sandman_: use an at job?
20:10 sjoerd_ old sk00l
20:10 gtmanfred yar
20:10 Sandman_ yeah i did actually see that
20:10 Sandman_ and went, whoa, that's ancient
20:11 Sandman_ but sure why not
20:11 gtmanfred then let is execute once salt returns
20:11 gtmanfred it still exists for a reason :P
20:11 Sandman_ nope. no "at" on my system
20:11 Sandman_ and i'm not allowed to install any new packages
20:11 gtmanfred aww, shucks
20:12 Flying_Panda can you not do an && sleep 200
20:12 Sandman_ salt waits for it to finish
20:12 gtmanfred that won't help the master stop waiting
20:12 gtmanfred Flying_Panda: you have to do the timeout portion on the master side, not the minion
20:12 gtmanfred the master is the one that is saying the minion didn't return
20:12 sjoerd_ just scp at into your homedir /sneak
20:12 gtmanfred heh
20:13 Sandman_ yeah
20:13 gtmanfred Sandman_: do as salt schedule
20:13 Rebus_ joined #salt
20:14 gtmanfred do a schedule.present, set once: <date> at 5 minutes in the future
20:14 Sandman_ doc page for schedule is 404?
20:14 gtmanfred https://docs.saltstack.com/en/latest/ref/states/all/salt.states.schedule.html#salt.states.schedule.present
20:14 Flying_Panda yea salt schedule would work as a fire and forget but would you still get output from the schdule ?
20:14 gtmanfred no it isn't the carbon page is... because google cached a temporary docs page from us
20:14 Sandman_ oh that may work
20:14 Sandman_ will try - one sec
20:14 gtmanfred Flying_Panda: you would, it would be in the jobs dict later
20:14 gtmanfred but he would at least get all the other data
20:14 Flying_Panda ooooo thats cool
20:15 Sandman_ yeah this specific thing we would probably make operators verify on the system no matter what anyway
20:15 Sandman_ the other cmd.runs and such we'd still get
20:15 Sandman_ however...my last run just worked and i don't understand why
20:15 Flying_Panda came backup before the timeout ?
20:15 gtmanfred ¯\(°_o)/¯
20:16 Sandman_ probably
20:16 Sandman_ the schedule is probably still safest
20:16 Flying_Panda yea
20:16 Sandman_ the time it spends down seems to be variable
20:16 Flying_Panda and if you get the logs later can always push them to kibana or somthing
20:16 Flying_Panda and flag read if the output is bad
20:16 Flying_Panda *red
20:17 Sandman_ ...we're not quite that advanced with our salt
20:17 Sandman_ but that is something to think about
20:17 gtmanfred `Put it on my "one day" list`
20:17 Sandman_ "Create a user story which will be prioritized..."
20:17 amontalb1n joined #salt
20:17 gtmanfred i want a label in github for saltstack that is just "one day" as in ... one day this would be nice to have
20:18 Flying_Panda the ill do it 'tommrow' is it tomorrow yet nope thats still tomrrow
20:19 Flying_Panda just like my memo on learn how to spell :P
20:19 gtmanfred lol
20:20 sjoerd_ That spelling memo is next week for me
20:20 Flying_Panda gt was it you helping me earlier ( my irc name was saltminehelp )
20:22 gtmanfred yes
20:23 Flying_Panda yea didn't manage to get anywhere with it but thanks for your help the unicode error completely stumped me and a python dev this side
20:23 gtmanfred no problem
20:23 gtmanfred yeah, i don't know what was going on there
20:23 Flying_Panda ended up raising a gitlab issue
20:23 gtmanfred cool
20:23 Flying_Panda *github
20:24 Flying_Panda seems to be a few of the errors going around the error points to " as the bad character but I stripped that out of the string i was passing salt and it still hates it
20:24 Flying_Panda shame really was the last line of my app deployment config :P
20:25 Flying_Panda would of loved to hang that one up today
20:26 jas02 joined #salt
20:27 gtmanfred we probably won't get to traiging that bug report until monday
20:27 Flying_Panda ahh you work at salt then ??
20:27 gtmanfred yeah, i do triage of issues in the mornings
20:28 Flying_Panda oh awesome only just started using salt about a month ago so more likely somthing i am doing wrong but cant for the life of me see it
20:32 fracklen joined #salt
20:32 Sandman_ joined #salt
20:33 Rumbles joined #salt
20:33 mikea joined #salt
20:34 Rebus_ joined #salt
20:39 oida joined #salt
20:44 edrocks joined #salt
20:47 ninjada joined #salt
20:49 fracklen joined #salt
20:52 Edgan sjoerd_: on apache. The way I do that which is a hybrid solution is I have a formula for the service, and then I add the .d configuration file in the other service that will be adding to the configuration and extend the apache service.
20:53 Edgan sjoerd_: The problem with apache and nginx is their configuration can be crazy complex. So making an all encompassing formula that covers all usage cases is a ton of work, and would need constant maintenance and refactoring.
20:53 sjoerd_ Yes agreed, but those are just the tip of the iceberg for me
20:56 sjoerd_ But when I make a formula for, say, apache and then change it I might cause breakage for other depts that are using it directly
20:56 Edgan sjoerd_: yes, this is where unit testing comes in
20:56 sjoerd_ But I suppose I'll just implement and trust that my hindsight is 20/20
20:57 Edgan sjoerd_: The alternative is you end up with apache_foo, apache_bar, apache_foo_plus_1, etc. Having to tweak them all individually.
20:57 sjoerd_ yes but how to test if that one formula suplies 5 projects
20:58 sjoerd_ or just write a kickass formula and trust everyone can get buy on just the pillar
20:58 sjoerd_ get by*
20:58 Edgan sjoerd_: There are multiple strategies, but one would be to test it at the "function level", and make sure it works. The thing about unit testing is you have coverage, and it is almost never 100%.
21:00 sjoerd_ Fair point, and any testing is better then what I've got now
21:01 Edgan sjoerd_: My poor mans testing pre-commit, is to use salt-ssh against a EC2 instance.
21:01 fracklen joined #salt
21:01 sjoerd_ We've got a pretty decent stack here, I was just thinking local vagrant or something before hitting dev
21:02 Edgan sjoerd_: Some people use Docker, but unless it has systemd inside, it has not service management, which all my formulas have.
21:02 Edgan sjoerd_: I have used vagrant, but I find vagrant for salt work to be a pain in the ass. It also doesn't scale that well when testing a large cluster of something.
21:02 pipps joined #salt
21:02 Edgan sjoerd_: Running a salt-master in vagrant really sucks.
21:05 sjoerd_ Any point to building some openstack boxes
21:05 Edgan sjoerd_: if you use openstack, yes
21:06 sjoerd_ we don't, but it's as good an excuse as anything
21:06 sjoerd_ got vmware cluster atm, but it's $$
21:06 Edgan sjoerd_: We are effectively AWS only. We have some legacy stuff in the office, but slowly killing it off.
21:07 Flying_Panda We are an esxi house and scale in and out of AWS as needed. Always disagreed in hosting full time in the cloud.
21:07 sjoerd_ Do not trust the cloud, they might snoop our data (my colleagues)
21:07 sjoerd_ shrug
21:07 Flying_Panda oh im more of an is it on 24/7 then inhouse if its on for a few hours to run a model or somthing AWS
21:09 Flying_Panda always found AWS really $$ for 24/7 always on enviroments
21:09 sjoerd_ Hum, dunno. Since inhouse we need surplus capacity anyway in case a colo fails - might as well use that spare capacity to test
21:09 scoates joined #salt
21:10 Edgan Flying_Panda: I like a hybrid solution. Expensive stuff in a datacenter next to AWS, and dynamic stuff in AWS. But the most I have ever heard a employer say is, sounds interesting.
21:10 Flying_Panda ahh im Lucky I took this job as a 50/50 windows linux ended up working 100% in linux devops
21:11 Flying_Panda so built all the scalable infrastructure and just go over to the tech team heads look at this!! there all geeks so think its cool and pushed to prod instantly
21:11 Eugene My 2c: AWS is expensive if you're comparing primitives(EC2 vs a Dedi), and cheap if you view the whole stack(including Ops engineers that can be fired) at the right scale, etc.... lots of variables, and it doesn't work for a lot of people
21:11 Eugene One or two salaries buys a *lot* of hardware ;-)
21:11 Edgan Flying_Panda: yeah, AWS bills can get crazy. But people have gone from picking cheap and good to picking good and fast these days. When the options are cheap, fast, good, pick two.
21:12 haam3r joined #salt
21:12 Eugene I'm a big fan of the 'serve HTML from S3 and an API endpoint from Lambda or an autoscaling instance' pattern
21:12 Eugene But obviously applications differ
21:12 Edgan Eugene: AWS bills can easily turn into 20k-100k a month, which pays a lot of salary.
21:13 sjoerd_ but really, how much is it to plonk a couple openstack boxes in a rack somewhere
21:13 Edgan Eugene: Lambda is Not cheap if you get past a certain scale.
21:13 sjoerd_ compared to AWS bills
21:13 Eugene Yup, which is why its important to have somebody who knows AWS if you're using it.
21:13 Flying_Panda for example here Jenkins runs models ( sports analytics company) on 2 build nodes in the server room if jobs are waiting it scales into aws for more 48 core nodes and then teriminates then when they have been idel for 10 minutes
21:13 Eugene All of the large cloud-hosting bills that I've helped customers with has boiled down to the basic maxim that the cloud isn't the same as a Colo, so don't buy/use it the same
21:14 Edgan sjoerd_: Everyone I have ever heard that investigated OpenStack has said too complex, and run away screaming. This is even coming from Ops people. My experience with RackSpace's Cloud(Openstack-ish), is that it is crap.
21:14 * sjoerd_ = ops
21:15 sjoerd_ but so far we just payed for vmware
21:15 sjoerd_ might check my runnign away status soon enough though
21:15 Flying_Panda Openstack is a management layer not a hypervisor layer
21:15 Edgan sjoerd_: I found Azure to be ok, but lacking. I haven't used Google's.
21:15 Flying_Panda so youd still probbly be running vmware
21:15 Edgan sjoerd_: VMware could have done a lot better had they kept the licensing cheaper.
21:16 viq joined #salt
21:16 sjoerd_ Yes, they're not cheap
21:16 Edgan sjoerd_: They do their math like we saved you from having to buy 10x the hardware for isolation, so lets charge you 5x.
21:17 Flying_Panda lol
21:17 sjoerd_ which was true, like 5+ years ago
21:17 Flying_Panda but thats just classic sales people logic
21:17 Edgan sjoerd_: and 5 years ago is when AWS really started taking off
21:18 sjoerd_ yup
21:18 Edgan Flying_Panda: Then some upstart like Docker comes along, and is going to help eat VMware's lunch.
21:19 Flying_Panda Well what do you expect ? Whales need to eat alot :P
21:20 Flying_Panda Have started using docker alot in the last 3-6 months and I do love it. Its so simple but a concept people still have a alot of issues with
21:21 sjoerd_ Aren't there still serious security issues with docker, or am I behind the times with that info...
21:22 Edgan Flying_Panda: My issue with it is I like to have one way of doing things. I can have that with salt. With Docker, I can only do so much in Docker, and then I have to do the rest with salt. The rub comes when services in Docker need to interop with services in Salt.
21:22 Flying_Panda Sorted alot of them out containers have there own network stack and namespace isolation
21:22 Edgan sjoerd_: Only if you don't control which containers get put on the same host together.
21:23 Edgan Flying_Panda: It is also such a moving target. Do I spend my time tracking Docker changes, or app changes.
21:24 Flying_Panda What are you changing in docker ?
21:24 Edgan Flying_Panda: I mean them adding new features, etc.
21:24 Edgan Flying_Panda: It is a moving target
21:25 Edgan Flying_Panda: But when I have more free time, I will probably go with kubernetes.
21:25 Flying_Panda quick read of there blog occasionally keeps you up to date I mean im lucky as I dont need to worry about our inhouse apps thats a different department
21:25 Flying_Panda Can i deploy them ... yes ? job done
21:25 Flying_Panda docker containers also make nice testers for salt scripts
21:25 Flying_Panda if you use them more as a machine than a container
21:26 Edgan Flying_Panda: People keep saying they do it, but most docker images don't have service management. All my formulas have service management.
21:26 jas02 joined #salt
21:26 gtmanfred kubernetes is going to win
21:27 gtmanfred https://thehftguy.wordpress.com/2016/11/01/docker-in-production-an-history-of-failure/
21:28 Flying_Panda your blog?
21:28 gtmanfred no
21:28 Edgan gtmanfred: yeah, that is one of two posts like that going around recently
21:28 gtmanfred mine is at http://blog.gtmanfred.com
21:28 gtmanfred also, this was announced at susecon this week https://www.suse.com/communities/blog/susecon-2016-git-cloud-suses-vision-agile-software-development-deployment/
21:28 Edgan Flying_Panda: How do you do service management in Docker? Special Docker image with systemd in it?
21:28 sjoerd_ hmmm, intereesting...  I'll be sure to look at kubernetes.
21:29 gtmanfred Edgan: i have seen people doing it by using supervisord as the EXEC in docker
21:29 gtmanfred was less than ideal IMO
21:29 gtmanfred but it would work
21:29 Edgan gtmanfred: supervisord, barf
21:29 gtmanfred yes
21:29 gtmanfred i agree :)
21:29 Edgan gtmanfred: I am glad to see monit/supervisord/etc all die now that we have systemd.
21:30 gtmanfred the problem is that systemd requires cgroups to be mounted in the container
21:30 gtmanfred which supervisord does not
21:30 gtmanfred either way, i like to view my containers as the service, instead of multiservice containers
21:30 Flying_Panda for testing states ? yes there not so much containers as lightweight VMs (systemd and dbus ect) just saves having to spin up a VM  but in prod ? no we only use docker for the single process and the dockerfile ect is managed by salt
21:30 Edgan gtmanfred: yeah, which is why I know systemd in Docker is possible, but haven't chased it
21:31 gtmanfred if you haven't seen https://docs.saltstack.com/en/develop/ref/modules/all/salt.modules.dockerng.html#salt.modules.dockerng.sls_build , it will be in carbon
21:31 gtmanfred building dockercontainers with salt states instead of dockerfiles
21:31 Edgan gtmanfred: I like the idea of LXD better. Sadly it requires switching to Ubuntu to use. I use Fedora. I did even switch to Ubuntu, and then just didn't take the time to use it.
21:32 Edgan gtmanfred: Does it properly manage layering, or do you end up with a single layer?
21:32 gtmanfred single layer
21:32 Edgan gtmanfred: yeah, for most people that is a deal breaker
21:32 Flying_Panda That is awesome so can just apply a state to a container
21:32 Flying_Panda <3
21:32 gtmanfred it is similar to how ansible-container works
21:32 pipps99 joined #salt
21:32 gtmanfred but where ansible container downloads ansible from the internet, and then puts it in the container, and deletes ansible at the end
21:33 Edgan gtmanfred: People already complain about docker images being too big. One layer isn't going to help.
21:33 gtmanfred salt drops in salt-thin, which is the same thin tarball that is used with salt=ssh
21:33 pipps_ joined #salt
21:33 gtmanfred s/=/-
21:33 Flying_Panda is there an salt-dockerfile which gives the list of packages to utilize the dockerng state
21:33 Edgan gtmanfred: Dockerfile(bash like) is another reason I haven't been excited by Docker. Why do I want to go back go bash like configuration management when I know Salt?
21:33 gtmanfred yeah
21:34 gtmanfred Flying_Panda: there is no dockerfile
21:34 gtmanfred you don't use docekrfiles anymore, it ships over the salt-thin from the minion that is running the sls_build
21:34 gtmanfred the salt-thin is made on the fly
21:34 Flying_Panda but still have the limitation of one process running with salt exits ?
21:34 gtmanfred and then since it is a self contained tarball, it just deletes the tarball at the end of the highstae
21:34 gtmanfred salt doesn't run in the container
21:34 gtmanfred it is just for building images
21:35 Flying_Panda going to need to have a play next week to get my head round that one :D
21:37 johnkeates joined #salt
21:38 gtmanfred it is magic
21:39 Edgan gtmanfred: You think it is really worth giving up on multiple layers to use Salt instead of Dockerfile?
21:39 gtmanfred I do
21:40 gtmanfred specifically the way you said it, we can use configuration management in building instead of BASH/dockerfile
21:41 sjoerd_ Later folks, I'm out for the weekend
21:41 gtmanfred have a good one o/
21:43 gtmanfred glad it is friday
21:48 Flying_Panda gtmanfred your the first person ive seen who also gives the wave :P
21:48 ninjada joined #salt
21:48 gtmanfred :)
21:48 Flying_Panda o7
21:48 gtmanfred salute
21:49 Flying_Panda eve ?
21:49 Flying_Panda :p
21:49 swills joined #salt
21:50 swills joined #salt
21:50 gtmanfred eve the game?
21:51 Flying_Panda yea only other place ive seen the o/ and o7
21:51 gtmanfred ahh, nope, something i picked up a long time ago when I decided to be nicer on the internet
21:51 gtmanfred used to be a jerk op in #archlinux
21:51 gtmanfred :P
21:51 MTecknology gtmanfred: I was trying to figure out why you were an op in this channel. Then I realized I'm about to ask a question in the wrong channel.
21:51 MTecknology time for bed!
21:52 gtmanfred i don't like the @ hat
21:53 Flying_Panda oo channels playing with you :P
21:53 gtmanfred _    _
21:53 gtmanfred / \__/ \_____
21:53 gtmanfred /  /  \  \    `\
21:53 gtmanfred )  \''/  (     |\
21:53 gtmanfred `\__)/__/'_\  / `
21:53 gtmanfred //_|_|~|_|_|
21:53 gtmanfred ^""'"' ""'"'
21:53 Flying_Panda upset him
21:54 MTecknology is that a panda?
21:55 gtmanfred no, it is a tiny elephant
21:55 johnkeates or is it a large mouse
21:55 gtmanfred http://sprunge.us/cfKg
21:56 gtmanfred there is the large elephant
21:56 Flying_Panda '. \
21:56 Flying_Panda '- \
21:56 Flying_Panda / /_         .---.
21:56 Flying_Panda / | \\,.\/--.//    )
21:56 Flying_Panda |  \//        )/  /
21:56 Flying_Panda \  ' ^ ^    /    )____.----..  6
21:56 Flying_Panda '.____.    .___/            \._)
21:56 Flying_Panda was kicked by gtmanfred: gt...fo. ♥, gtmf
21:56 MTecknology I recently wrote a script that has a module with a secret option --panda, the help text is "Save the panda bears" and it only displays ascii art. It'll display up to 9 different images, three of them are the animaniacs
21:57 gtmanfred https://github.com/gtmanfred/hammercloud/blob/master/hammercloud/shell/__init__.py#L16
21:57 gtmanfred i wrote that one time, with a --with-spam flag
21:57 gtmanfred because when i was at rackspace we used to have to run mchk --with-spam to rebuild the qmail mail database
21:57 Flying_Panda joined #salt
21:58 MTecknology lemme grab mine
21:58 gtmanfred it prints out an ascii can of spam
21:58 Flying_Panda ahh
21:58 Flying_Panda about to say quick was to quick to actual be you
21:58 Flying_Panda * the kick
21:58 gtmanfred :)
21:58 MTecknology This is mine - http://dpaste.com/1ZMK7HN
21:59 gtmanfred nice, always have to have the easter eggs
21:59 gtmanfred i removed --with-spam from the argparse too
21:59 gtmanfred https://github.com/gtmanfred/hammercloud/blob/master/hammercloud/parser.py#L13
21:59 MTecknology I left it in because nobody would have noticed otherwise
22:00 MTecknology heh
22:00 Flying_Panda ahh cheers
22:00 gtmanfred so, i used to have people help me with that, but i rewrote the entire thing right before I left
22:00 gtmanfred so that it could be pluggable
22:00 gtmanfred because i wanted to keep the core code, but leave the plugin stuff with rackspace
22:01 MTecknology that's exactly what I did with this one
22:01 gtmanfred all my expect examples were in it https://github.com/gtmanfred/hammercloud/blob/master/hammercloud/shell/expect.py
22:01 Flying_Panda Right 10pm off to breaking speed limits on motorbike to get home see ya monday o/
22:01 gtmanfred peace o/
22:02 gtmanfred as well as my interactive paramiko stuff is in there too https://github.com/gtmanfred/hammercloud/blob/master/hammercloud/shell/pshell.py
22:02 MTecknology my images were pretty large without zlib
22:02 gtmanfred my favorite thing was multiplexing a list of servers, which is why hammercloud.shell.__main__ exists :P
22:11 raspado Cannot access current working directory. Exiting!
22:11 raspado getting error "Cannot access current working directory. Exiting!" when I run salt-run fileserver.dir_list roots
22:11 raspado in my filesystem.conf the file_roots look ok, anyone seen this before?
22:12 raspado ooo
22:12 raspado think i know why nm
22:14 MTecknology gtmanfred: I'm kinda surprised you left Hormel there and didn't make it your name or something
22:18 ninjada joined #salt
22:22 armguy joined #salt
22:31 fannet joined #salt
22:33 thedukeness joined #salt
22:34 scoates joined #salt
22:37 thedukeness how can I access an execution module in Jinja in the orchestration runner?  I need to get a grain from a minion but I can't use the mine because the minion is a member of a syndic of this master.  I have salt.saltutil.runner('mine.get') working but it says salt.saltutil.function('grains.get') is not found
22:37 thedukeness more specifically it says Jinja variable 'salt.utils.odict.OrderedDict object' has no attribute 'function'
22:40 teclator joined #salt
22:40 Renich joined #salt
22:44 jhauser joined #salt
22:48 Edgan thedukeness: Are you running the highstate from a second tier master or the top of the syndic?
22:48 thedukeness yes..  I'm at the root in   root->branch->leaf and I want a grain from leaf
22:49 Edgan thedukeness: what version of salt?
22:49 Edgan thedukeness: https://github.com/saltstack/salt/issues/21732
22:49 saltstackbot [#21732][MERGED] Syndic and the Mine | I've recently started trying to get a hierarchical salt system set up with Syndic, and it all seems to work as expected, except for the mine. It seems that each syndic master has an isolated mine, which serves its minions independently. This is a problem for me for a couple of reasons:...
22:51 thedukeness brb my font is all crazy for some reason
22:51 mariusv joined #salt
22:51 mariusv joined #salt
22:52 nicksloan joined #salt
22:53 thedukeness ah better now.  Ok yeah I guess the mine doesn't work that way.  I was looking to use Consul in the future but I think this case I can fix if I can just access using grains.get.  I can grab the grain fine that way from the command line on the root master, I just can't figure out how to do it in Jinja within the orchestration state
22:53 raspado if salt has issues talking to the git repo, would that blow away the cache ?
22:53 thedukeness I think I found the command now: salt.saltutil.cmd  but I still haven't got the syntax right
22:58 thedukeness nope, salt.saltutil.cmd runs a salt command from a different master..
23:00 jas02 joined #salt
23:03 swills joined #salt
23:10 orionx_ joined #salt
23:11 mikecmpbll joined #salt
23:25 greyeax_ joined #salt
23:30 thedukeness I gave up and had cmd.run execute grains.get and output to a file which I cat'd later..yuck
23:31 Flying_Panda joined #salt
23:38 swills joined #salt
23:43 kbaikov joined #salt
23:44 nethershaw joined #salt
23:49 tuxx joined #salt
23:50 fannet joined #salt
23:51 akhter joined #salt
23:53 erewok joined #salt
23:53 erewok hi, all
23:53 erewok I'm having a heck of a time today trying to solve a problem
23:53 erewok it's pretty much the same problem this person has:
23:53 erewok https://groups.google.com/forum/#!topic/salt-users/5xU28aVq0Is
23:53 erewok I wrote a custom state
23:53 erewok but I need a 3rd-party library available to my custom state
23:54 erewok which means it needs to be loaded before the process kicks off that runs highstate
23:54 erewok here are the things I tried:
23:54 erewok 1. dynamically installing and importing in my module.
23:54 erewok 2. using a custom bootstrap script to install the thing (this is with salt cloud)
23:54 erewok 3. using a startup_state in salt-cloud
23:54 erewok that last one actually throws an exception.
23:54 erewok any suggestions?
23:54 keltim_ is putting dots in the declaration ID's a bad idea? will it break anything?

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