Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-12-11

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

All times shown according to UTC.

Time Nick Message
00:00 devops joined #salt
00:01 sdm24 https://github.com/SS-archive has some simple formulas. They can't be configured as much, and there are fewer, but if you need something done basically, it works
00:04 fyb3r left #salt
00:08 hightekvagabond joined #salt
00:11 murrdoc basepi:  hey
00:16 keimlink_ joined #salt
00:25 subsignal joined #salt
00:29 quasiben joined #salt
00:29 whytewolf huh, thats interesting. lspci is hanging indefinatly ... sigterm and sigkill won't kill it
00:33 zmalone joined #salt
00:35 snuggie joined #salt
00:38 ggoZ joined #salt
00:41 keepguessing joined #salt
00:41 whytewolf apperently a loaded kernel module was causing havok.
00:51 flowstat_ joined #salt
00:54 snuggie joined #salt
01:05 burp_ joined #salt
01:08 bbbryson joined #salt
01:09 JDiPierro joined #salt
01:13 iggy anybody ever seen an error when using salt-ssh like so: Permission denied for host <hostname>, do you want to deploy the salt-ssh key
01:13 iggy but I can ssh directly with no problems
01:17 Edgan iggy: I use agent forwarding
01:17 Edgan iggy: I helped add support for it to salt-ssh a while back
01:18 Edgan iggy: https://github.com/saltstack/salt/issues/22618
01:18 saltstackbot [#22618]title: salt-ssh doesn't allow use of agent forwarding | I want to run salt-ssh on a remote host, and not have to keep the keys on that host. So I want to use ssh agent forwarding, which with just ssh it will just work. Instead of just working salt-ssh explicitly expects the priv setting to be set. My workaround was to comment out the if statement that tries to use priv. A better solution would either to add an explicit agent forwarding option to s
01:19 iggy I'm not using agent forwarding
01:19 jhujhiti a bunch of my minions seem to have died and are connected but won't return anything... restarting master/minion doesn't help, no errors in logs. where do i start debugging this?
01:19 Edgan iggy: But it seems like you should be. If you don't want to have to copy the key
01:21 Edgan jhujhiti: my first guess is it is the master, and trying a different master might be insightful. Looking at what you might have just changed on the master, or maybe someone else changed it.
01:21 iggy Edgan: umm, I already have keys deployed
01:22 jhujhiti literally nothing has changed
01:22 Edgan iggy: as the same user you are logging in as?
01:22 jhujhiti i left it for a few weeks, came back and did a ping and half of the minions weren't responding
01:22 iggy Edgan: yes
01:22 Edgan jhujhiti: did salt get upgraded? did some dependency of salt get upgraded?
01:22 jhujhiti i've also tried upgrading from 2015.5.5 to 2015.8.3, no change
01:22 iggy jhujhiti: try a couple more test.pings
01:22 AdamSewell joined #salt
01:22 jhujhiti done dozens
01:22 Edgan iggy: .ssh/id_rsa?
01:22 iggy Edgan: yes
01:22 jhujhiti it's really strange
01:22 Edgan iggy: no, .ssh/config?
01:23 Edgan iggy: no odd /etc/ssh/ssh_config?
01:23 iggy no (nor anything weird in /etc/ssh/ssh_config... checked)
01:24 Edgan iggy: The only thing I can think of is that salt ssh is explicitly setting a option on the command line that is disabling the use of keys
01:24 hackel joined #salt
01:24 Edgan iggy: But I can tell you, per the issue above, you can easily get ssh agent forwarding working
01:25 iggy Permission denied (publickey,password).
01:25 Edgan iggy: or you distributed the wrong key, because the third server's authorized_keys has a different public key
01:25 iggy I can ssh from salt master to the host fine
01:25 iggy there is no 3rd host involved
01:26 Edgan iggy: You have to explicitly enable the ssh-agent forwarding support
01:26 Edgan iggy: Where are you running salt-ssh from?
01:26 iggy the master
01:26 Edgan iggy: ok, so master -> minion -> master?
01:26 iggy master -> "minion"
01:26 iggy that's all
01:27 Edgan iggy: oh, so this is just basic salt-ssh
01:27 iggy yes
01:27 Edgan iggy: ok, what is the username on the master?
01:27 falenn joined #salt
01:28 iggy root
01:28 Edgan iggy: username on the minions?
01:28 iggy a common one...
01:28 Edgan haha
01:29 iggy I can ssh directly from master to "minion" fine
01:29 Edgan but with salt ssh, no?
01:29 iggy True
01:30 Edgan iggy: master file contents?
01:30 iggy nothing specific to salt-ssh
01:30 Edgan ah, that may be it
01:30 iggy (this is normally a master/minion setup, I'm just playing around with salt-ssh)
01:37 baweaver joined #salt
01:38 JDiPierro joined #salt
01:41 hackel I'm having troubel with a pkgrepo.managed state.  Using the ppa: option, it adds the repo successfully, but doesn't retrieve the key.  I've even tried specifying the key manually.  This is on a clean Ubuntu 14.04 instance.  Any clue what might be going on?
01:43 iggy hackel: paste the state?
01:43 Kevin0517 joined #salt
01:43 shaggy_surfer joined #salt
01:44 debian112 joined #salt
01:46 hackel iggy: Found the error, it might be Ubuntu related?  Looks like it doesn't support UTF characters or something.  https://gist.github.com/hackel/a3a11bc2da6fc00a435f
01:47 b18 joined #salt
01:48 iggy lol, well, python2 doesn't very well either
01:48 iggy so you're better off avoiding it
01:50 flowstat_ joined #salt
01:51 hackel add-apt-repository is using Python 3.4.  I don't get this error on either of my other two boxes I'm managing with salt, but I set them up with an earlier version.
01:51 abednarik joined #salt
01:52 hackel If I run the exact same command manually, it works just fine.
01:57 hackel Aha, nevermind, it's a known bug, #23543.
01:59 JDiPierro joined #salt
02:01 JDiPierro joined #salt
02:04 debian112 joined #salt
02:12 PeterO joined #salt
02:14 obear34 joined #salt
02:14 obear34 left #salt
02:15 ITChap joined #salt
02:15 AdamSewell joined #salt
02:17 AdamSewell joined #salt
02:23 malinoff joined #salt
02:25 quasiben joined #salt
02:27 baweaver joined #salt
02:34 davetoo joined #salt
02:38 hightekvagabond joined #salt
02:41 PeterO *sigh* I'm having issues with service.running. It's trying to execute my service using upstart. I found a doc about providers and have set `provider: service` but it's still trying to execute the service using upstart, any ideas how to get it to execute a simple `service my-service start`?
02:45 otter768 joined #salt
02:50 saltnoob joined #salt
02:51 saltnoob can i get a grains from a minion and pass it to another minion when im on a salt runner?
02:51 saltnoob i mean during orchestrate
02:52 flowstat_ joined #salt
02:52 bhosmer joined #salt
02:54 AdamSewell joined #salt
02:57 favadi joined #salt
02:57 avenda joined #salt
03:00 AdamSewell joined #salt
03:04 notnotpeter joined #salt
03:06 AdamSewell joined #salt
03:11 writtenoff joined #salt
03:11 bhosmer joined #salt
03:13 bhosmer joined #salt
03:18 AdamSewell joined #salt
03:25 AdamSewell joined #salt
03:26 falenn joined #salt
03:38 bhosmer joined #salt
03:39 burp_ joined #salt
03:39 lompik joined #salt
03:41 jimklo_ joined #salt
03:45 linjan joined #salt
03:50 flowstat_ joined #salt
03:53 msx joined #salt
03:54 akhter joined #salt
03:55 racooper joined #salt
04:00 beardedeagle joined #salt
04:01 quasiben joined #salt
04:09 brianfeister joined #salt
04:23 ageorgop joined #salt
04:23 antpa joined #salt
04:25 iggy you can use runner mine calls in the orchestrate sls files (should be able to anyway)
04:27 danlsgiga joined #salt
04:27 PeterO_ joined #salt
04:27 danlsgiga Hey folks... Is the bootstrap script still using the 2015.7 release?
04:28 danlsgiga And a quiz here: what deployment method you prefer? Bootstrap, repo or pip?
04:29 antpa joined #salt
04:32 flowstat_ joined #salt
04:33 beardedeagle Well I use salt-cloud so bootstrap I am pulling 2015.8 with it
04:36 antpa joined #salt
04:38 tehsu is there anyway to see why when i call a test.ping at one of my servers it may be sending it to other servers as well? -l debug doesn't show much
04:42 danlsgiga 2015.8.3 already?
04:43 danlsgiga beardedeagle are you able to pass any parameters to the script to stick with a specific version?
04:44 danlsgiga Don't want to have new nodes pulling new versions just because it's the latest release in the repo
04:45 danlsgiga joined #salt
04:46 beardedeagle @danlsgiga: never had to, though looking at stable in the script : valid: 1.6, 1.7, 2014.1, 2014.7, 2015.5, 2015.8, latest
04:48 danlsgiga Hum... Interesting... 2015.8.3 was released and is in the yum repo already
04:49 danlsgiga beardedeagle also, is there any way to upgrade the installed version if needed?
04:49 beardedeagle @danlsgiga: upgrade via salt?
04:49 solidsnack joined #salt
04:50 antpa joined #salt
04:51 beardedeagle @danlsgiga: https://docs.saltstack.com/en/latest/faq.html#what-is-the-best-way-to-restart-a-salt-daemon-using-salt
04:51 beardedeagle or https://github.com/saltstack/salt/issues/7997 sheds some additional light
04:51 saltstackbot [#7997]title: Proper way to upgrade salt-minions / salt-master packages without losing minion connectivity | We ran through the right way of doing this in salt training with Seth but I think I'm still missing something. I'm not sure if this is a bug or if I've missed something. I tried to run through the upgrade the master first / use salt to upgrade the minion service steps to upgrade from v.17 to v.17.1 of salt and ended up with losing access to most of
05:04 beardedeagle hopefully that helps
05:05 lemur joined #salt
05:06 antpa joined #salt
05:20 racooper joined #salt
05:21 malinoff joined #salt
05:33 falenn joined #salt
05:33 colegatron joined #salt
05:37 clintberry joined #salt
05:41 rotbeard joined #salt
05:42 kshlm joined #salt
05:45 danlsgiga Thanks
05:50 kkk2k joined #salt
05:50 solidsnack joined #salt
05:51 flowstat_ joined #salt
05:56 akhter joined #salt
06:04 calvinh joined #salt
06:07 zmalone joined #salt
06:07 nidr0x joined #salt
06:08 nidr0x joined #salt
06:09 favadi joined #salt
06:10 Eureka70_ joined #salt
06:14 favadi joined #salt
06:19 baweaver_ joined #salt
06:21 fyb3r joined #salt
06:21 fyb3r Had to bite the bullet and post another issue: https://github.com/saltstack/salt/issues/29616
06:21 saltstackbot [#29616]title: Executing LocalClient inside a custom Runner causes 2 threads to be left open upon return | Ive been testing this for a while and for some reason it seems 2 of the 4 spawned threads close when the runner module is completed....
06:21 fyb3r turns out it is a internal issue lol
06:26 kshlm joined #salt
06:27 munhitsu_ joined #salt
06:27 brianfeister joined #salt
06:27 simonmcc joined #salt
06:27 ashb joined #salt
06:30 linjan joined #salt
06:33 flowstat_ joined #salt
06:34 felskrone joined #salt
06:35 fyb3r fml i think i just realized how im supposed to actually do it
06:37 tristianc joined #salt
06:38 solidsnack joined #salt
06:40 antpa joined #salt
06:42 auzty joined #salt
06:42 hemangini joined #salt
06:43 tristianc joined #salt
06:43 fyb3r left #salt
06:43 Joren joined #salt
06:44 illern joined #salt
06:47 otter768 joined #salt
06:49 flowstat_ joined #salt
06:50 lemur joined #salt
06:53 bhosmer joined #salt
06:56 baweaver_ joined #salt
06:59 hojgaard joined #salt
07:00 brianfeister joined #salt
07:02 brianfei_ joined #salt
07:04 brianfeister joined #salt
07:04 antpa joined #salt
07:06 brianfeister joined #salt
07:07 brianfei_ joined #salt
07:09 brianfeister joined #salt
07:11 brianfeister joined #salt
07:13 brianfei_ joined #salt
07:13 lemur joined #salt
07:15 brianfeister joined #salt
07:16 acsir joined #salt
07:16 acsir joined #salt
07:16 brianfei_ joined #salt
07:16 baweaver_ joined #salt
07:18 brianfeister joined #salt
07:19 illern joined #salt
07:20 brianfeister joined #salt
07:20 hightekvagabond joined #salt
07:22 brianfeister joined #salt
07:23 ageorgop joined #salt
07:24 brianfeister joined #salt
07:25 antpa joined #salt
07:25 brianfeister joined #salt
07:27 brianfeister joined #salt
07:29 brianfei_ joined #salt
07:30 MeltedLux joined #salt
07:31 brianfeister joined #salt
07:31 tristianc joined #salt
07:33 brianfei_ joined #salt
07:34 KermitTheFragger joined #salt
07:35 brianfeister joined #salt
07:36 brianfei_ joined #salt
07:38 brianfeister joined #salt
07:40 brianfeister joined #salt
07:40 mattiasr joined #salt
07:41 ramteid joined #salt
07:42 Bryson joined #salt
07:42 brianfeister joined #salt
07:43 antpa joined #salt
07:44 brianfeister joined #salt
07:45 brianfei_ joined #salt
07:47 brianfeister joined #salt
07:49 brianfeister joined #salt
07:49 mattiasr joined #salt
07:50 cyborg-one joined #salt
07:50 flowstat_ joined #salt
07:51 brianfeister joined #salt
07:51 cberndt joined #salt
07:52 antpa joined #salt
07:53 brianfeister joined #salt
07:53 evle joined #salt
07:54 brianfeister joined #salt
07:56 brianfeister joined #salt
07:58 brianfei_ joined #salt
07:59 keimlink joined #salt
08:00 brianfeister joined #salt
08:02 brianfeister joined #salt
08:04 brianfei_ joined #salt
08:05 brianfeister joined #salt
08:07 catpig joined #salt
08:07 brianfeister joined #salt
08:08 elsmo joined #salt
08:09 brianfeister joined #salt
08:11 brianfei_ joined #salt
08:13 brianfeister joined #salt
08:14 brianfeister joined #salt
08:16 jamesp9 joined #salt
08:16 brianfeister joined #salt
08:18 brianfei_ joined #salt
08:18 illern joined #salt
08:19 sjorge joined #salt
08:19 sjorge joined #salt
08:20 brianfeister joined #salt
08:21 om joined #salt
08:22 brianfeister joined #salt
08:23 anmolb joined #salt
08:23 illern joined #salt
08:24 brianfeister joined #salt
08:25 brianfeister joined #salt
08:27 brianfei_ joined #salt
08:29 brianfeister joined #salt
08:29 slav0nic joined #salt
08:31 brianfei_ joined #salt
08:32 brianfeister joined #salt
08:34 crazyphil joined #salt
08:34 brianfeister joined #salt
08:35 ageorgop joined #salt
08:36 brianfeister joined #salt
08:38 brianfei_ joined #salt
08:39 brianfeister joined #salt
08:40 bhosmer joined #salt
08:42 kshlm joined #salt
08:43 acsir joined #salt
08:45 eseyman joined #salt
08:48 otter768 joined #salt
08:49 Rumbles joined #salt
08:51 flowstat_ joined #salt
09:00 illern joined #salt
09:01 GreatSnoopy joined #salt
09:13 asco1aro joined #salt
09:19 blacktoko joined #salt
09:19 larsfronius joined #salt
09:22 zerthimon joined #salt
09:23 sfxandy joined #salt
09:32 keimlink joined #salt
09:32 flowstat_ joined #salt
09:35 Grokzen joined #salt
09:36 s_kunk joined #salt
09:36 s_kunk joined #salt
09:37 slav0nic joined #salt
09:38 N-Mi_ joined #salt
09:40 Couch joined #salt
09:41 Couch I received some pretty negative feedback on salt publish commands, but I don't know enough to counter them. Anyone able to lend me a hand ?
09:41 AlberTUX joined #salt
09:41 Couch https://gist.github.com/anonymous/f317f1435fcc3708d87f
09:47 elsmo joined #salt
09:49 flowstat_ joined #salt
09:52 lemur joined #salt
09:55 job what is badmi
09:55 job badmin
09:55 larsfronius joined #salt
09:57 Couch a simple rpc over http server
09:57 Couch you won't find it online
09:58 Couch I'd like to know if those points about salt are correct
09:58 hemebond I thought publish was deprecated now with the introduction of Salt Mine.
09:59 chiui joined #salt
09:59 illern joined #salt
10:00 larsfron_ joined #salt
10:02 Couch I don't think there's any overlapping functionality there ?
10:02 Couch is there ?
10:03 hemebond Is publish the thing where minions broadcasted their details to other minions?
10:06 antpa joined #salt
10:06 Couch I'm talking about https://docs.saltstack.com/en/latest/ref/peer.html
10:07 ericof joined #salt
10:10 hemebond I think that's what I'm thinking of. I think you can use this instead in some cases https://docs.saltstack.com/en/latest/topics/mine/
10:10 hemebond "Mines are designed to replace slow peer publishing calls when Minions need data from other Minions."
10:10 hemebond So I guess it depends on what you're doing with the peer communication.
10:10 babilen +1 for mine
10:12 Couch orchestrating commands
10:13 Couch is it possible to call commands peer-to-peer using mine ?
10:13 hemebond I don't think so. But isn't orchestration normally done from the master?
10:13 babilen What are you actually trying to do?
10:14 Couch so, there's a requirement here to send peer-to-peer commands
10:14 Couch but we refuse to use salt for those because of the points mentioned in the gist
10:15 babilen Okay, fair enough
10:15 babilen That still doesn't allow us to help you as we don't know what you are trying to achieve still
10:16 babilen Salt doesn't really allow you to run p2p commands between minions in a nice way
10:16 aqua^c joined #salt
10:17 Couch consider me salt ignorant, I was looking for counterpoints to try and prevent establishing yet another service. I'm hoping salt can cover the needs
10:17 babilen "the needs" ?
10:17 Couch babilen, there's a requirement here to send peer-to-peer commands
10:17 babilen why?
10:17 cyteen joined #salt
10:18 babilen What kind of commands?
10:18 Couch it doesn't need to be peer-to-peer directly. More specifically get minions to call commands on other minions
10:19 Couch babilen, anything.. the only required return is succes or failure
10:19 babilen You could use the reactor for that and have minions send specific events to the master in which you specify the target and command(s) you want minions to run.
10:20 babilen "need data from other minions" hints at yet another requirement though: the need to return data to the minion that executed the command in the first place
10:20 babilen But then .. it's hard to do this without a concrete problem
10:20 Couch babilen, yes, the commands can be part of an orchestration
10:22 babilen And orchestration doesn't cut it? https://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html#orchestrate-runner
10:22 babilen Why do the minions themselve have to call commands?
10:22 babilen +s
10:25 Couch honestly, I don't know ... I really want them to *not* want any of this, I already don't agree. But it's easier to counter by matching their supposed needs then actual needs
10:25 babilen Are you talking about the needs of other people here?
10:26 Couch yup
10:26 babilen Salt is very much about telling your minions what to do, not about *them* telling other members of the "swarm" what to do.
10:26 Couch we already have salt, but we have another team refusing to use it, and because of it are writing their own.
10:27 babilen Well, it is really hard to help you .. obviously salt isn't the optimal tool for what you are trying to achieve. That doesn't mean that you can't solve the *actual* problem with salt, just that the paradigm you had in mind doesn't translate nicely to salt.
10:27 babilen "another team refusing to use it, and because of it are writing their own" -- what could possibly go wrong?
10:28 Couch my thoughts exactly
10:28 babilen I'd argue that you have more of a social problem than a technical one
10:28 _JZ_ joined #salt
10:28 Couch the discussion is technical however, and needs to be countered that way
10:29 Couch anyway, thanks for thinking with me
10:29 babilen I mean without further information: My feeling is that you can get pretty far with orchestration, minions sending special events (for coordination) and setting "stages" in grains (or encoding the stages in the events)
10:29 babilen That would, however, mean that the minions don't speak to each other, but simply tell the master "Okay, I'm done with task FOO, what do you want me to do now?"
10:29 babilen (essentially)
10:30 babilen The master would then decide to send appropriate commands to other minions and, in the end, you achieved your goal.
10:31 Couch that sounds appropriate
10:31 Couch but I think events and reactors were also already evaluated to that end. Orchestration not so
10:32 babilen Yes, but it is a paradigm shift. If your esteemed colleagues insist on p2p communication and on thinking of your boxes as a somewhat self-organising swarm of automonous agents, then salt is not the right tool.
10:32 job is there a way to assign grains through pillars?
10:32 babilen You might want to think about events and reactors as finite state machines in that the events could encode the "edges" and specify the next "state" to run ...
10:33 babilen job: Why on earth would you want that? Just use the pillars directly!
10:33 Couch there lies the problem ...
10:33 job i'd like to configure on the master a property for a group of salt minions 'munin_node', and then on the 'munin_master' generate a configuration file which contains the FQDN of all the minions for which there was this property 'munin_node'
10:33 babilen job: Why do you need a grain for that?
10:34 job maybe I don't, but I like to use a glob to match which machines are a munin_node
10:34 babilen It doesn't really make sense to save that information on the minion (in a distributed way) if you have it available in pillars already
10:34 babilen https://docs.saltstack.com/en/latest/topics/targeting/compound.html you can target on pillars directly: J@pdata:^(foo|bar)$ or I@pdata:foobar
10:35 babilen But to answer your question: You could generate grains.present states with your pillar data: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.grains.html#salt.states.grains.present
10:35 babilen But I really don't see what that buys you
10:36 permalac joined #salt
10:37 hemebond babilen: I think job wants to auto-populate the Munin server config.
10:37 job yes
10:38 hemebond I've been trying to think of a non-grains way to do that for Shinken.
10:38 babilen mine ?
10:38 job so minions '*.ring.nlnog.net' i want to be 'munin_node', the fact that they are 'munin_node' means that a state called 'munin_node' should be executed to install 'munin-node' and a standard /etc/munin/munin-node.conf file
10:38 job that is the easy part
10:38 hemebond I don't like having the minion tell the master what's what. Yeah mine is a possibility.
10:38 job now on the 'munin_master' i'd like to generate /etc/munin/munin.conf which contains a list of all FQDN's of the minions on which the 'munin_node' state was executed
10:38 hemebond Oh, you can get a list of minions...
10:39 hemebond So you might be able to use the same targeting.
10:40 hemebond Of course, if you need the FQDN (and that isn't your minion ID already) then you will need to use Mine.
10:40 job the fqdn is the minion id
10:41 hemebond Then you might be able to skip a step.
10:41 elsmo joined #salt
10:41 baweaver joined #salt
10:41 hemebond You could use node groups. That would remove the need to duplicate the targeting rule.
10:42 hemebond Oh, nodegroups are a master config parameter. yuck.
10:42 job yuck
10:42 job in deed
10:42 job i don't want to touch /etc/salt/* files
10:44 hemebond Chuck the targeting rule into a Jinja variable and import that wherever required.
10:48 giantlock joined #salt
10:49 otter768 joined #salt
10:50 thalleralexander joined #salt
10:59 babilen job: I'd simply target by "'*.ring.nlnog.net'" in the top file and then use the mine to generate dynamic bits of the munin config
10:59 antpa joined #salt
10:59 job the pillar top file or the state top file?
10:59 babilen I was referring to the state top file here (in order to "state called 'munin_node' should be executed"
10:59 babilen )
11:00 babilen You can, naturally, target by that in the pillar config too (to get suitable munin config to the minions, for example)
11:01 job so how do you get a list of all the minions on which a state has been executed?
11:01 job (to generate the master side)
11:03 babilen https://github.com/saltstack/salt/blob/develop/salt/modules/mine.py#L235 documents how to get mine data in the pillar
11:04 babilen job: You tell minions to execute a state, simply use the same target expression in your mine.get
11:06 babilen You could, naturally, also set a grain "include in munin config" and target that in your mine.get
11:07 job but by targetting the same expression, imho that is a double declaration
11:08 job i want to target once 'these are munin hosts', and then recycle that in multiple places
11:08 job because today I want *.ring.nlnog.net as munin hosts,tomorrow maybe also *.derp.com, I'd have to add the *.derp.com in two locations
11:11 babilen Then set a grain "include in monitoring" as part of your munin state, but *do not* target the state based on that grain
11:11 babilen You can then target that grain in your mine.get
11:11 babilen (as suggested earlier)
11:12 job gotcha
11:12 yomilk joined #salt
11:14 antpa joined #salt
11:17 babilen job: Another, more dynamic, approach would be to define the "include in munin monitoring" bit in your pillar too and match on that. That way you can change that pretty easily on the master without the need to "roll out" new grains
11:17 babilen The problem with that is that you might miss minions
11:22 avenda joined #salt
11:23 babilen (but then you might overgenerate with the other if you no longer want to include a specific minion, but didn't remove the grain)
11:27 Dev0n joined #salt
11:32 job this is my munin/node.sls file https://p.6core.net/p/vSONff8ChTflNzpDyK22yM6S
11:32 job but when i 'state.highstate' it throws this error https://p.6core.net/p/9tDfDaYlslNGEIo5qMw1I8dC
11:33 m0nteZ joined #salt
11:33 colegatron joined #salt
11:33 m0nteZ hello there, one question if someone is here...
11:37 m0nteZ when doing salt-call from minion in the first step reading configuration i have multiple entries when (-l debug) for Reading configuration from minion from /etc/salt/minion, it is like is reading it three time and is slowing down the sync because minions are connected with gsm to the master. How many times does your read of configuration happends ?
11:40 hemebond job: (haven't checked docs) I thought it was "names" not "pkgs". Maybe different here.
11:40 thalleralexander joined #salt
11:41 job thanks leev
11:41 job hemebond, pkgs: seems to work
11:41 job this is the end result https://github.com/NLNOG/ring-salt/blob/master/munin/node.sls
11:42 hemebond hmm. Then should the require pkg specify the package name or the state name?
11:42 hemebond oh
11:42 hemebond There you go.
11:44 job so i defined munin_node_pkgs in munin/node.sls, if i want to depend on the same set of pkgs in a state in munin/master.sls, can i do "require.pkg: munin.node.munin_node_pkgs" ?
11:44 hemebond You just need the state name.
11:44 job this is a scoping question
11:45 job ah, flat namespace?
11:45 hemebond Yeah.
11:46 malinoff_ joined #salt
11:48 rubenb joined #salt
11:52 shiriru joined #salt
12:00 sillysausage joined #salt
12:00 sillysausage so, I was reading this https://anders.unix.se/2015/12/10/screenshots-from-developers--2002-vs.-2015/
12:01 sillysausage and decided hey that's a good idea, I should use some sort of provisioning system, to provision my arch machine, and debian VMs on my server
12:01 sillysausage with my various dotfiles, such as .vim, i3, zsh etc, those small sorts of things
12:01 sillysausage i then read http://www.infoworld.com/article/2609482/data-center/data-center-review-puppet-vs-chef-vs-ansible-vs-salt.html
12:01 sillysausage and settled on either ansible or salt
12:02 sillysausage as those were both python based, (i dislike ruby) and they seemed much more suitable for small-scale kind of personal use
12:02 sillysausage http://ryandlane.com/blog/2014/08/04/moving-away-from-puppet-saltstack-or-ansible/ i read this and i'm leaning towards salt for this now
12:02 sillysausage would it be suitable for what I am trying to do?
12:03 sillysausage the main thing i want to avoid is having large overhead, so ideally over existing stuff like SSH, without a master control server
12:03 sillysausage would be nice
12:03 sillysausage i get the idea ansible works quite well like this, salt can as well but often isn't.
12:03 babilen "often isn't" ?
12:03 sillysausage they said there the ansible documentation is better, but the salt community is more friendly :)
12:04 sillysausage Salt assumes you’re running in master/minion mode and uses absolute paths for its states, modules, etc.. Unless you’re using the default locations, which are poorly documented for masterless mode, it’s necessary to create a configuration file.
12:04 sillysausage i assume in the documentation, i got he feeling salt is more aimed at large scale deployments
12:04 sillysausage of many hundreds or thousands of machines
12:04 sillysausage i'dbe using it on maybe 2 or 3
12:04 babilen Both are great systems and I would recommend to simply give them a try. You won't regret adopting either. I like salt and the power it gives you, but ansible is perfectly usable for what you are trying to achieve there too.
12:05 sillysausage yeah i got that feeling
12:05 babilen You can easily do what you want with salt-ssh
12:05 sillysausage that either would probably do what i wanted
12:06 babilen ansible seems to be more approachable though, but I'm happy that we went with salt as it allowed us to grow our deployment to include more and more things. My impression was/is that ansible would not have been with us all the way.
12:06 evle joined #salt
12:06 sillysausage yeah that's the feeling i got
12:06 sillysausage ansible was easier to start with, better documentation, simpler
12:06 sillysausage but they were adverse to certain problems, in regard to their bug tracker
12:07 babilen I would recommend to solve the "Create a user and deploy a cusomisable .i3 config" in both systems
12:07 babilen salt is great and we try to help people, but in the end you will be a lot happier regardless which system you adopt.
12:07 sillysausage indeed
12:08 sillysausage the thing they said that was good about salt was the introspection
12:08 sillysausage where as with ansible they said that wasn't possible
12:08 sillysausage i saw that in two places
12:09 sillysausage actually
12:09 sillysausage https://www.scriptrock.com/articles/ansible-vs-salt
12:09 babilen Make up your own mind. You read good blog posts, but in the end it is up to you to pick the tool you like best. I'm happy that I picked salt here over ansible, but that doesn't mean that the same reasoning holds true for you.
12:09 sillysausage yeah :P
12:09 sillysausage i was wondering how "good" the blog posts were, i think i'll try with salt first
12:10 sillysausage for salt they said "No GUI yet (currently under development)"
12:10 sillysausage which isn't really an issue for me as i don't need that
12:10 babilen I haven't read the last one, but ryan's post is pretty spot on (if a bit dated)
12:10 babilen Do you know Python?
12:10 sillysausage yes
12:11 mortis whats the deal with the scheduler now? i try to schedule stuff, but it isnt being triggered. Isnt schedule.present enough? need to have enabled set or something?
12:12 babilen Okay, one thing I *love* about salt is that it makes it fairly easy to extend functionality or adapt it to your liking. If you aren't adverse to writing Python you can implement states in a plethora of languages (cf. https://docs.saltstack.com/en/develop/ref/renderers/all/index.html), write your own states, grains, pillars, ....
12:12 babilen mortis: I just set whatever I want to schedule in the pillar for that minion
12:13 mortis babilen: what do you mean?
12:13 babilen mortis: https://docs.saltstack.com/en/latest/topics/jobs/schedule.html
12:13 mortis oh wait
12:13 mortis its not going in the minion-config anymore? :o
12:13 mortis hehe
12:13 mortis that would explain stuff :P
12:14 babilen Well .. there are multiple things to do, but I always ever defined it in the pillar :-/
12:14 mortis ah
12:14 mortis tnx :)
12:14 babilen Haven't used schedule.present and don't quite see the need for it tbh
12:14 mortis what do you use instead of present then?
12:14 babilen I just define the data in the pillar. Done.
12:14 mortis nice
12:15 babilen https://docs.saltstack.com/en/latest/topics/jobs/schedule.html read that, it explains what I'm doing.
12:17 babilen sillysausage: And welcome to salt. Hope you like it.. if you run into problems let us know. salt-ssh is pretty new and you might run into some corner cases here and there
12:17 sillysausage heh the ansible author responded to that blog post https://news.ycombinator.com/item?id=8134079
12:18 malinoff sillysausage: he isn't related to ansible anymore, http://michaeldehaan.net/post/109595670406/happy-trails-ansible
12:19 sillysausage interesting.
12:19 sillysausage maybe that's because redhat bought it
12:19 sillysausage https://www.redhat.com/en/about/press-releases/red-hat-acquire-it-automation-and-devops-leader-ansible
12:20 antpa joined #salt
12:22 favadi joined #salt
12:23 jdwilly2001 joined #salt
12:26 sillysausage babilen: i think i will try both ansible and salt
12:27 sillysausage i think i'll start with ansible, because the documentation is possibly a little better
12:27 sillysausage and then i will try salt after i have gotten a lot of the basic concepts
12:27 sillysausage and then i'll see how i feel about which one i stick with
12:28 sillysausage i think pretty much everything i want to do can be done in a yaml playbook
12:28 sillysausage pacman, apt, pip etc and just copying some basic files to ~/
12:29 sillysausage https://ansible.wistia.com/medias/qrqfj371b6 the video was good because i am such a noob
12:30 akhter joined #salt
12:30 sillysausage i have a feeling though for more complicated stuff salt is really a lot better
12:30 sillysausage i imagine it's a lot easier to write complicated setups in python
12:30 sillysausage and use that introspection feature to debug it
12:39 jb_ joined #salt
12:42 sillysausage babilen: i wonder if it's possible to eventually automate it so that i can run it from an archlinux livecd
12:42 sillysausage and get it to run pacstrap and all that
12:42 sillysausage essentially adding my primary user from single user mode into the chroot
12:43 sillysausage basically an automated 'archlinux install'
12:43 sillysausage that is custom to my needs.
12:45 impi joined #salt
12:45 Hell_Fire joined #salt
12:47 amcorreia joined #salt
12:50 otter768 joined #salt
12:54 quasiben joined #salt
12:58 akhter joined #salt
13:00 job what is the recommended number of worker_threads
13:00 job how do you calculate it
13:02 flowstat_ joined #salt
13:03 fredvd joined #salt
13:07 mdupont joined #salt
13:08 quasiben joined #salt
13:09 babilen job: Why do you think that you have to tinker with that?
13:09 job got some warnings
13:09 job Salt request timed out. The master is not responding. If this error persists after verifying the master is up, worker_threads may need to be increased.
13:10 babilen I never found that increasing worker_threads helped at all. Whenever we ran into that it was some network problem.
13:11 job so you have it set at 3 ?
13:11 babilen sillysausage: Okay, have fun! Don't wait too long before trying salt. I would honestly recommend to do something really basic in both more or less at the same time and then scale that up. That way you get a feeling for both pretty early on.
13:12 sillysausage yeah i think to begin with i will just copy some files to a system
13:12 babilen job: I never had to tinker with it. But then my masters are also rather beefy 16 core boxes with enough RAM
13:12 sillysausage and install some packages
13:12 sillysausage then i might figure out how to do the whole partitioning, etc
13:13 babilen sillysausage: Make sure that you include some dynamic bits in those files so that you get a feeling for how to pass data into the system.
13:13 AdamSewell joined #salt
13:13 impi joined #salt
13:14 job how to purge grains that are no longer defined
13:14 babilen fwiw, I am not too familiar with Arch (can't really deploy that in production), but the way this would be done in Debian is that you perform some form of automatic install, install the salt minion and then run an initial highstate against the newly installed minion.
13:14 babilen job: grains.absent for all grains that you want to get rid of
13:14 babilen .oO( job did abuse grains after all)
13:15 job hey, i am learning :>
13:15 babilen I really don't get the fascination with grains .. I mean they are great for data that actually has to be gathered on the minion and, to a lesser degree, to keep a little state on it, but apart from that they are pretty useless and hard to deal with.
13:15 job this https://github.com/NLNOG/ring-salt/blob/master/munin/node.sls#L24-L30 is used here https://github.com/NLNOG/ring-salt/blob/master/munin/munin-master.conf#L15
13:16 job that way i only have to define once https://github.com/NLNOG/ring-salt/blob/master/top.sls#L7 to get the master to update its config
13:17 job so now that we have /a/ mechanism to accomplish what i need
13:17 babilen Yeah, that's exactly what I had in mind
13:17 job you consider this abuse?
13:17 job it feels a bit dirty to me to have something in /etc/salt/minion on the nodes for this
13:17 babilen Well, I probably would have used different names/structures for the grains, but yeah .. :)
13:17 babilen No, I don't consider it abuse.
13:18 babilen I would have considered it abuse if you had targeted the munin.node state based on the value of that grain
13:18 job i don't see how that would even work :>
13:19 babilen (because then you have to deploy those grains *before* you can highstate and you have to manage *that* deployment somehow. The method you used to deploy the grains can just as well be used to deploy munin.node to begin with)
13:19 babilen job: It works by manually setting grains on nodes (think of it as "tagging" them
13:20 job manual :*(
13:20 babilen Which might feel fine if you start out with it, but stands in your way as soon as you want to handle minions without any manual interaction
13:20 babilen yeah
13:21 babilen grains also have the problem that they are not trustworthy (a minion can claim to have whatever grain it wants). If that is a problem or not is not clear, but it is something to keep in mind.
13:25 giantlock joined #salt
13:26 ggoZ joined #salt
13:26 N-Mi_ again this discussion on how to deal with a server having to collect data on all the minions it needs to target
13:27 N-Mi_ I still haven't found an elegant solutions for this
13:28 babilen N-Mi_: I typically pass the tgt expression in via pillars
13:28 babilen Maximum flexibility
13:29 N-Mi_ babilen: how do you define this ?
13:29 N-Mi_ do you have an example ?
13:30 TooLmaN joined #salt
13:31 babilen I simply use salt['mine.get'](some_pillar.tgt_expr, ....)
13:31 tristianc joined #salt
13:32 job so i'd need to make a pillar which matches on the grain
13:33 job and target that pillar?
13:33 babilen no
13:33 babilen I mean I make the state dynamic in that I don't hardcode the target expression there, but pass that in via a pillar also
13:33 babilen (so that I can easily change that without having to tinker with my states)
13:35 Jimlad_ joined #salt
13:36 Mandorath joined #salt
13:39 DammitJim joined #salt
13:40 AndreasLutro how do people manage /srv/reactor? you can't put it in gitfs, can you?
13:40 babilen You can
13:40 babilen Just reference salt://path/your/reactor.sls in your reactor config
13:40 Mandorath Not sure if this is the right place to ask this but i'm trying to install a salt-minion during installation of an os. I created a local repo for this and filled it with the required packages. Now i'm getting the following error: The file python-jinja2-2.2.1-2.el6_5.x86_64 cannot be opened. This is due to a missing file, a corrupt package or corrupt media. I downloaded the package again recreated the repo and still im getting this e
13:41 AndreasLutro but then your reactor .sls has to be in the same place as your state .sls
13:41 AndreasLutro which doesn't seem ideal
13:41 babilen AndreasLutro: Why is that?
13:42 babilen You can easily keep them in their own repository (or file_root)
13:42 Mandorath Same setup worked while installing it on a centos 6.5.
13:42 babilen AndreasLutro: It's just that you can reference them with salt:// rather than an absolute path
13:42 AndreasLutro it would be possible, even though it would probably error, to do `salt state.sls path.your.reactor`
13:43 AndreasLutro just seems a bit messy to me
13:43 babilen You can do the same for jinja templates for files you include
13:44 AndreasLutro I suppose
13:45 AndreasLutro right I'll put it in file_roots for now I guess
13:48 pi3r_ joined #salt
13:49 pi3r_ Hi, I have a custom module in _grains that load grains from a file. I am a bit puzzled by the fact that saltutils.sync_all will clean up all the fact when they are already loaded ...
13:51 pi3r_ So if I do saltutils.sync_all twice, the first time all the minions has the correct grains but the second time they won't be there anymore.
13:52 pi3r_ If I want to have an indempotent behavior I need to clear the cache each time before syncing
13:52 zoquero joined #salt
13:53 pi3r_ Any ideas ?
13:53 aqua^c joined #salt
14:00 marsdominion joined #salt
14:00 marsdominion joined #salt
14:03 lompik joined #salt
14:06 flowstat_ joined #salt
14:07 cyteen joined #salt
14:08 alvinstarr I had a puppet script that would copy the sshd keys to a central location when a system is first installed so that on subsequent installs the ssh keys would stay the same. How would I do that with salt?
14:08 spiette joined #salt
14:08 dyasny joined #salt
14:10 favadi joined #salt
14:10 akhter_1 joined #salt
14:11 yomilk joined #salt
14:15 tkharju joined #salt
14:17 JDiPierro joined #salt
14:19 viq joined #salt
14:20 giantlock joined #salt
14:22 akhter joined #salt
14:24 warci joined #salt
14:24 warci hi all, i'm trying to test salt on amazon linux, but the installer fails due to missing dependencies. Any tricks on how to get this working?
14:24 quasiben joined #salt
14:25 AdamSewell joined #salt
14:27 yomilk joined #salt
14:27 bhosmer joined #salt
14:30 racooper joined #salt
14:30 pi3r_ I have never experienced a channel so silent while crowded with so many people ;-))
14:33 babilen pi3r_: Do you have a specific question?
14:33 stooj joined #salt
14:33 babilen Ah, earlier .. I have never seen the behaviour you describe. You might want to include more examples, your commands and their output on one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, …
14:34 warci ah, found a way: the yum config provided on the website doesn't work for amzn linux, hardcoded to https://repo.saltstack.com/yum/redhat/6Server/x86_64/2015.8/ and it installs!
14:35 babilen pi3r_: You might want to elaborate on the "will clean up all the fact when they are already loaded" bit as it is not clear to me what you mean by that exactly
14:38 warci ok next problem: ImportError: No module named zmq ... while the package is installed
14:39 babilen warci: And can you import the zmq module when you are logged into the box?
14:40 warci babilen: yeah that appears to work
14:42 babilen Right \o/
14:42 subsignal joined #salt
14:42 babilen Power of RedHat
14:43 c4t3l joined #salt
14:44 c4t3l hello all.  I've recently installed 2015.8.1 to master and minions and I'm seeing 'service' __virtual__ returned False
14:44 c4t3l anyone else seeing this?
14:45 inad922 joined #salt
14:45 murrdoc joined #salt
14:45 kbaikov joined #salt
14:45 dendazen joined #salt
14:46 c4t3l I am running Redhat 6.7 on all hosts and using the saltstack repo
14:46 c4t3l interestingly... some hosts return correctly with the service.whathaveyou calls
14:46 c4t3l others do not
14:47 cpowell joined #salt
14:48 TyrfingMjolnir joined #salt
14:49 perfectsine joined #salt
14:49 cpowell joined #salt
14:50 pi3r_ babilen: Thanks. My problem might be related to the fact I had tried a top.sls without a dummy placeholder. I put the dummy back and it looks alright. Though I am running to other strange problems so ...
14:50 aqua^c joined #salt
14:51 otter768 joined #salt
14:51 AdamSewell joined #salt
14:52 pi3r_ babilen: for what it worths I am trying an orchestration script (that works fine in testing) and fails in prod with "No minions responded". Though the minion is there and if I copy/paste the composite target it does respond a test.ping
14:54 pcn Is there any reason that when an initial highstate is run via salt-cloud, it appears to be a lot slower than when it's run via salt or salt-run?  It feels like there's a lot of buffering going on for us.
14:55 pcn Err.. s/salt-run/salt-call/
14:56 Tanta joined #salt
14:57 ekleog left #salt
14:58 m0nteZ joined #salt
14:59 favadi joined #salt
15:02 brianfeister joined #salt
15:04 winsalt joined #salt
15:06 winsalt_ joined #salt
15:07 zmalone joined #salt
15:07 beardedeagle joined #salt
15:09 pi3r_ Humm I have probably figured it out. First the dummy module is indeed needed. That's crazy. You need something dump. If it is not there, well you have cache problem but no other errors or indications that salt is too dumb to put a empty placeholder for you ...
15:10 pi3r_ Then I have the other problem that I orchestrate something that might restart a minon in the go and I don't know how to tell the next step to wait for the minion until it is available again.
15:11 job is this the correct way to generate a piece of pillar based on a list? https://github.com/NLNOG/ring-salt/blob/master/pillars/users/former_users.sls
15:13 winsalt_ pi3r_, https://salt.readthedocs.org/en/stable/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.wait_for_event
15:13 andrew_v joined #salt
15:15 bhosmer joined #salt
15:17 pi3r_ winsalt_: thanks I will check it out
15:21 pi3r_ winsalt_: I  need to read this further but do you know if there is a simple way to say "just wait for my target for 30 sec max before saying it does not respond" ?
15:22 winsalt_ set the timeout option to 30
15:23 c4t3l hello all.  I've recently installed 2015.8.1 to master and minions and I'm seeing 'service' __virtual__ returned False
15:23 tpaul joined #salt
15:23 c4t3l anyone else seeing this?
15:24 StolenToast states must have globally unique names, right?  So can I not make a top.sls file for top because the top file already exists?
15:25 StolenToast it would be kind of silly to make a top state, though...
15:26 ericof_ joined #salt
15:27 pcn job that syntax looks right.
15:28 job i think the jinja is first expanded, and then the pillar would be available
15:28 job so calling piller.get() from within a pillar might not work
15:28 job dunno
15:28 JDiPierro joined #salt
15:29 job what i want to avoid is setting those 3 lines for each entry in former_users
15:29 job absent / force / purge
15:29 winsalt_ job, are those options for the user state?
15:30 job this is what it was https://github.com/NLNOG/ring-salt/blob/df3f9e9d98c66c0fc6cba922be7396c606efb226/pillars/users/former_users.sls
15:30 job if have a 'users' state which will use the 'users' pillar to make or delete all users
15:31 job but as you can see, tons of duplication
15:31 Brew joined #salt
15:32 Hell_Fire whoa, that's painful
15:32 job so i am trying to make the pillar file smaller
15:33 brianfeister joined #salt
15:34 winsalt_ the absent, purge, force options should be in the state
15:34 winsalt_ and only the names should be in the pillar
15:35 Hell_Fire or use salt['pillar.get'] with defaults if you really need the ability to override it
15:37 job thank you people
15:37 job i am slowly getting the hang of salt
15:41 AdamSewell joined #salt
15:42 aqua^c joined #salt
15:43 spuder joined #salt
15:46 kshlm joined #salt
15:48 kaptk2 joined #salt
15:49 Tanta joined #salt
15:50 ekristen joined #salt
15:53 Hell_Fire_ joined #salt
15:53 DanyC joined #salt
15:53 flowstat_ joined #salt
15:56 edrocks__ joined #salt
15:58 DanyC anyone has experience with boto ?
16:01 AdamSewell joined #salt
16:01 DanyC @Ryan_Lane  are you around? i guess you have some exp with boto ?
16:02 malinoff joined #salt
16:03 bhosmer joined #salt
16:05 Tanta joined #salt
16:11 whytewolf good morning everyone.
16:11 DanyC morning
16:16 numkem joined #salt
16:16 mschiff a minion has its pillar data and I want to send some of that data to the mine via a state using jinja. Does anybody have an example for that somewhere?
16:18 whytewolf pillar data typically comes from the master. so why not just assign that data to the other minion? or are you talking about grains?
16:18 anotherZero joined #salt
16:22 mschiff whytewolf: because the state will use jinja to iterate over the data and just pick some of it to send it to the mine ...
16:23 honestly on the 11th day of christmas, salt-ssh gave me permission problems
16:24 honestly so I gave it sudo setfacl -d --set g:root:rwx /var/cache/salt/
16:24 winsalt_ i think whytewolf is asking why that data has to be in the mine, if its already in a pillar
16:25 stomith does salt-minion rely on zeromq, or is that just the master?
16:26 mschiff winsalt_: because another minion might not have all of it or might not be allowed to see all of it
16:26 DanyC anyone knows from this params which ones are mandatory and which one optionals https://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_elb.html ?
16:26 DanyC i did a very simple boto_elb and didn't put the security group in and it failed big time
16:26 zmalone the minion needs zeromq, zeromq is how the minion and master communicate, not just a library that the master depends on.
16:27 zmalone (unless you are using raet etc., but given the release notes for raet/tornado, I don't think many people are)
16:27 stomith zmalone, thanks. I wasn't sure if both needed it.
16:28 programmerq left #salt
16:28 conan_the_destro joined #salt
16:29 mschiff winsalt_: the example here does something like that, but either I am too stupid to understand the example or it does not work this way: https://docs.saltstack.com/en/2015.5/ref/states/all/salt.states.module.html
16:29 Hell_Fire joined #salt
16:30 whytewolf mine.send is a very badly named function
16:30 whytewolf it does not send data. it only sets up a mine function
16:31 mschiff ouch
16:31 mschiff is there a module funktion that sends data to the mine?
16:31 whytewolf no
16:31 hightekvagabond joined #salt
16:31 whytewolf because mine doens't work that way
16:32 whytewolf besides. sending pillar data to mine is redundent. you are sending master level data back to the master
16:32 whytewolf and possably opening a security hole
16:32 winsalt_ i would recomend using logic in the pillar data for that minion
16:32 mschiff yeah but the minion could use its grains ans pillar and process the data somehow, then send back it in another form or the like
16:33 whytewolf mineing grains is a common thing.
16:33 mschiff ok, thanks winsalt_ and whytewolf, I will try to find another solutions
16:34 mschiff Its just that I had a very clean seperation of what minions sees which pillars and now I got the requirement that *some* pillars of a minion must be available to another minions as well...
16:34 izrail hi
16:35 izrail i just found out there is a carbon returner in saltstack. that is awesome! anyone here who is using this feature?
16:35 whytewolf mschiff: i would recomend putting pillars that need to be seen by more then one minion into a seperate file. I do this all the time.
16:35 izrail i configured one of my minions as described in https://docs.saltstack.com/en/latest/ref/returners/all/salt.returners.carbon_return.html, however i get an error when i try to use the returner
16:35 izrail 2015-12-11 17:20:47,855 [salt.loaded.int.returner.carbon_return][ERROR   ][25171] Host or port not defined
16:36 winsalt_ yeah it sounds like you are going to refactor your pillars, instead of hacking together some mine/state/pillar combo
16:36 whytewolf it is still clean, and honestly makes logic 300% easier to follow.
16:36 DanyC nobody knows how to figure out the mandatory options for boto module ?
16:36 whytewolf as well as doesn't bloat the memory stack of the master
16:36 izrail any ideas, what went wrong here? do i need a newer version of saltstack? i'm on debian with the saltstack debian repo configured. version is 2015.5.3
16:37 winsalt_ izrail, did you put the config info at the top of that page in the minion config?
16:38 whytewolf sorry DanyC I'm not in AWS so really have no experence with boto.
16:38 izrail hmmmm
16:38 whytewolf izrail: carbon looks like it needs carbon.host and carbon.port
16:38 izrail winsalt_, i was using the "carbon: host:" variant
16:39 izrail it looks it does work if i use carbon.host:
16:39 izrail :)
16:39 izrail hehe
16:39 DanyC whytewolf: no prob, thanks for reply, much appreciated!!
16:39 whytewolf the profile method might have come in a later point release
16:39 izrail works like a charm! this is awesome
16:40 PeterO joined #salt
16:40 winsalt_ yeah, take note that the docs are on the latest version
16:40 DanyC whytewolf: is just it drives me crazy, nothing is mentioned over there, i have to dive into the code and then into AWS docs to figure out which ones are mandatory - so much waste of time !!
16:40 whytewolf they are supposed to tag when things like that happen. but not all the devs do
16:43 whytewolf DanyC: helpful hint about docs. they list the define strings. so like with boto_iam.add_user_to_group looks like it requires user_name, group_name
16:43 marsdominion joined #salt
16:43 marsdominion joined #salt
16:43 DanyC whytewolf: example ;) docs says "alt.states.boto_elb.present(name, listeners, availability_zones=None, subnets=None, security_groups=None, scheme='internet-facing', health_check=None, attributes=None, attributes_from_pillar='boto_elb_attributes', cnames=None, alarms=None, alarms_from_pillar='boto_elb_alarms', region=None, key=None, keyid=None, profile=None, wait_for_sync=True)" which means sec_groups have default None so is optional, right ?
16:44 favadi joined #salt
16:44 whytewolf DanyC: you would think so ... if it isn't then it was badly designed
16:44 DanyC well not really :D cause AWS doc says "If you selected a VPC as your network, you must assign your load balancer a security group that allows inbound traffic to the ports that you specified for your load balancer and the health checks for your load balancer."
16:45 whytewolf ohh fun. so depending on how you are accessing aws depends on what is mandatory ... lovely
16:46 shaggy_surfer joined #salt
16:47 acsir joined #salt
16:48 jimklo joined #salt
16:50 c4t3l I just performed a fresh install of salt-minion 2015.8.1 on Redhat 6 via saltstack repo. While running salt-call service.status puppet I see this: 'service' __virtual__ returned False.  I am in the process of rolling out minions and got caught in the middle of the repo update window.  Some of my minions exhibit this behavior and others do not.  All have been updated using the saltstack-repo.
16:50 AdamSewell joined #salt
16:51 c4t3l Is this a bug?  Is anyone else seeing this behavior?
16:51 DanyC whytewolf: yup, joy joy and Salt docs gives me nothing to help sailing through
16:51 DanyC grrrr
16:51 otter768 joined #salt
16:52 larsfronius joined #salt
16:54 whytewolf c4t3l: that sounds like a module was corrupted during the install. i would say clean the cache. and rreinstall
16:54 c4t3l whytewolf: Ok.  I'll give it another spin :)
16:58 bonzibuddy I'm trying to use a formula in a pillar and I keep getting syntax errors :/
16:58 favadi joined #salt
17:00 deus_ex joined #salt
17:00 keepguessing joined #salt
17:01 whytewolf bonzibuddy: can you post a gist of what you have currently. all settings involoved please.
17:01 keepguessing how do I know what role my current node has?
17:01 mpanetta joined #salt
17:02 whytewolf keepguessing: depends on how you are assigning roles :P
17:02 whytewolf pillar, grains, smoke signal
17:03 keepguessing whytewolf: I am still working on kubernetes. here is the saltbase https://github.com/kubernetes/kubernetes/tree/master/cluster/saltbase
17:03 keepguessing can I run a command that tells me what roles this node already has?
17:04 keepguessing whytewolf: from what I see at https://github.com/kubernetes/kubernetes/blob/master/cluster/saltbase/salt/top.sls
17:04 bonzibuddy whytewolf: will do, pastebin pending
17:05 keepguessing I would want to have all my nodes to be in the role kubernetes-pool
17:05 whytewolf keepguessing: ahh grains. salt '*' grains.get roles
17:08 Talkless joined #salt
17:08 AlberTUX1 joined #salt
17:08 c4t3l whytewolf: Still no dice... I'm gonna report an issue
17:09 keepguessing whytewolf: so from https://github.com/kubernetes/kubernetes/blob/master/cluster/saltbase/salt/top.sls if my grains['cloud'] is not 'aws','vagrant' and 'gce' then docker and kubelet would never be installed right?
17:09 keepguessing and if my role is kubernetes-master only
17:09 keepguessing whytewolf: just need a second opinion on seeing if my understanding is right.
17:10 DanyC how can you query AWS resources using boto? so far i've seen you can set but not query
17:10 conan_the_destro joined #salt
17:11 Talkless Hello, I'm getting "mapping values are not allowed here" in state https://gist.github.com/Talkless/224dac6ef261b9925034, and I don't follow why I cant substitute variable... Here's full output: https://gist.github.com/Talkless/3d58a9ce860a0f3e469a
17:11 numkem joined #salt
17:13 whytewolf keepguessing: just found kubelet. it is in 2 places. if the role is kubernetes-pool it will install it no mater what. if it is kubernetes-master it will install it if the cloud grain is aws, vagrant, OR gce
17:13 xmj left #salt
17:14 keepguessing whytewolf: yes and as I said my cloud is not one of them and the master is not a kubernetes-pool
17:14 keepguessing I ran the command you gave on the master to verify.
17:14 keepguessing thanks.
17:15 whytewolf np
17:15 bonzibuddy whytewolf: http://pastebin.com/BkPnz0cX
17:16 bonzibuddy whytewolf: this is the error i get http://pastebin.com/vFXAA69x
17:16 whytewolf bonzibuddy: we went over this yesterday. pillar does not go in the states tree
17:17 whytewolf api is in the wrong place
17:17 bonzibuddy hm :/ thats the setup that I inherited from last IT dude
17:17 Kusen joined #salt
17:17 bonzibuddy not saying youre wrong
17:17 bonzibuddy just that this is confusing
17:18 whytewolf bonzibuddy: read this https://docs.saltstack.com/en/latest/topics/pillar/
17:19 anmolb joined #salt
17:19 bonzibuddy I think i've been confusing states and pillars, will read that
17:20 nZac joined #salt
17:20 whytewolf I would say ignore states. and work on learning pillar. set a few pillar values and runt eh pillar tools to see how they interact
17:21 whytewolf the default location for pillar is /srv/pillar
17:21 bonzibuddy okadoke
17:21 brianfeister joined #salt
17:23 writtenoff joined #salt
17:23 whytewolf DanyC: there are way to many boto modules to comb through. but i thought there should some get_ functions at least
17:23 whytewolf makes writing the states difficult if there isn't something there for testing if something exists
17:24 Bryson joined #salt
17:25 DanyC whytewolf: looking at the doc i can't see how i can query first . cause a lot of params like region/ subnet/ SG needs to be added to the boto block and so i was thinking if i can query for the info rather than storing into pillar
17:25 racooper Would a pillar configuration like this be viable? https://gist.github.com/racooper/64028b466033dd00a67b
17:26 whytewolf racooper: not the first to ask that. but that would assign ALL of that to every minion. is that what you want?
17:27 racooper ah, so it won't assign only host1 to host1, host 2 to host 2, etc.  so I'd have to define each minion in a separate pillar sls file?
17:27 racooper then call them each individually from top.sls?
17:27 whytewolf racooper: yes. or dive into pillar_ext
17:29 quasiben joined #salt
17:30 flowstat_ hey guys, I've followed the instructions to set up a local masterless virtualenv / salt environment. I'm trying to start the minion, and it hangs. The output is https://gist.github.com/flowstate/d0b01cc48b3335bc0a69
17:30 whytewolf iirc you don't start a salt-minion on a masterless config
17:30 flowstat_ oh.
17:30 flowstat_ you can run salt-call without a minion running?
17:30 whytewolf everything is done through salt-call --local
17:30 flowstat_ oh
17:31 whytewolf oh yeah
17:31 Ashald_ hi guys
17:31 flowstat_ ohhh, so the minion process itself is just maintaining the socket, etc
17:31 Ashald_ I'm writing a custom runner in python
17:31 whytewolf yeap
17:31 flowstat_ ty again whytest of wolves
17:31 whytewolf lol, np
17:31 Ashald_ and I need to wait for an event inside - I guess how I can call https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.state.html#salt.runners.state.event from inside my runner
17:31 Ashald_ ?
17:32 Ashald_ or maybe I can just import it and call as a function?..
17:32 aqua^c joined #salt
17:32 whytewolf Ashald_: python api or net-api?
17:32 Ashald_ python API
17:32 whytewolf oh wait you said runner
17:32 Ashald_ yep
17:32 Ashald_ I need to wait for an event within runner...
17:33 Ashald_ with dev version it's easy - 2 lines that I can copy :from state.event runner )
17:33 colegatron joined #salt
17:33 whytewolf iirc this is the function you want https://docs.saltstack.com/en/latest/ref/clients/index.html#salt.client.LocalClient.get_event_iter_returns
17:33 Ashald_ but in currently released version it's trickier...
17:34 Ashald_ but how I can specify event tag to look for?...
17:34 joehughes joined #salt
17:35 joehughes hello I am seeing an issue with file.recurse in the latest version of salt v2015.8.3
17:35 whytewolf Ashald_: that i have no idea. i know it is part of the event data
17:35 joehughes my master throws the following error whenever i use the recurse state
17:35 joehughes 2015-12-11 17:28:20,418 [salt.master      ][ERROR   ][1255] Error in function _file_list: Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/salt/master.py", line 1379, in run_func     ret = getattr(self, func)(load)   File "/usr/lib/python2.7/dist-packages/salt/fileserver/__init__.py", line 607, in file_list     ret.update(self.servers[fstr](load))   File "/usr/lib/python2.7/dist-packages/salt/fileserver/gitf
17:35 joehughes the same state and configuration works in salt 2015.5.3
17:35 Ashald_ thanks, I'll try looking into it
17:36 whytewolf joehughes: from that error it looks like gitfs is what is failing.
17:37 joehughes ya, I have seen in the past there has been an issue around gitfs and file.recurse
17:37 whytewolf joehughes: I would say post up the error in the issue tracker. cause that looks like a biggy.
17:37 joehughes Ya I opened an issue
17:37 joehughes https://github.com/saltstack/salt/issues/29631
17:37 saltstackbot [#29631]title: file.recures with gitfs fails in v2015.8.3 | We use the file recurse state and can not update to v2015.8.3 because in combination with gitfs, the state does not work. ...
17:37 joehughes just was surprised that we were the only ones facing this
17:38 joehughes so I was hoping someone might have a workaround
17:38 morissette joined #salt
17:39 whytewolf joehughes: only workaround i can think of is not using gitfs. cause that looks like the issue. I'm not sure how your setup is done though to know if that is even an option
17:39 RabidCicada joined #salt
17:40 whytewolf I'm pretty sure they tested gitfs with file.recurse so I'm not sure what it is that is causing the trigger
17:40 joehughes ya that is not an option... I tested this upgrade on a test server so we will just stay on 2015.5 for now
17:41 Talkless Uhm.. there is not way to install salt 2015.8 on Wheezy? Community repo has .5, SaltStack repo has for debian 8 only..?
17:41 joehughes I use salt boostrap and install from git
17:41 joehughes so I can install whatever version I want
17:41 whytewolf Talkless: the only way currently is through git install
17:41 Edgan joehughes: can your include an example file.recurse statement in your issue?
17:41 joehughes sure thing
17:42 Edgan joehughes: I am curious as to how you are specifying the source
17:43 amcorreia joined #salt
17:44 Kusen joined #salt
17:45 whytewolf joehughes: also try this on the master salt-run fileserver.clear_cache; salt-run fileserver.clear_lock; salt-run fileserver.update
17:46 Edgan joehughes: /etc/salt/master that sets up the gitfs? Do you have a chicken and the egg problem here?
17:48 joehughes gitfs is setup correctly and the config files that I want salt to laydown I have configured by hand to make sure there is no configuration errors
17:48 joehughes all other states that are not file.recurse are working 100%
17:49 Edgan joehughes: Please provide the part of the existing configuration that sets up your gitfs. You make a good point that it works elsewhere.
17:49 Hell_Fire_ joined #salt
17:49 joehughes okay I will dump some more info into the issue
17:49 whytewolf more info always is better
17:51 Edgan joehughes: I had one bug that was foo:bar vs foo: bar. The documentation said foo: bar, but only foo:bar worked.
17:51 DanyC how can i run this salt '*' network.hw_addr eth0 into a state and store the output into a variable ?
17:52 Talkless joehughes: I did install_salt.sh -P git v2015.8.3 and it worked, thanks.
17:52 whytewolf DanyC: if you want that from all servers then it needs to be a mine
17:52 Edgan DanyC: Sounds like you you want a custom grain if there isn't already a grain. If you want it from another/multiple hosts on the same box, you want salt mine
17:52 Talkless But I am still getting this error: https://gist.github.com/Talkless/3d58a9ce860a0f3e469a
17:53 whytewolf although if you just want it from the current server {% set hw_addr = salt.network.hw_addr('eth0') %}
17:53 keepguessing How do I add a new repo in salt?
17:53 DanyC whytewolf: Edgan thanks, whytewolf indeed that is what i want
17:53 keepguessing https://docs.docker.com/engine/installation/debian/
17:53 keepguessing I need to do the step 7.
17:55 TyrfingMjolnir joined #salt
17:55 linjan joined #salt
17:55 chadhs joined #salt
17:58 joehughes keepguessing: updated your gist
17:58 joehughes or commented rather
17:58 keepguessing joehughes: ?
17:59 joehughes file: /etc/apt/sources.list.d/{{grains.get('lsb_distrib_id')}}-{{grains.get('lsb_distrib_codename')}}-non-free.list
17:59 quasiben joined #salt
17:59 chadhs is it possible to store an inline shell script in a pillar, or otherwise include it in a state file?
18:00 baweaver joined #salt
18:00 chadhs essentially i'd like to source a script in my `- cloud_init:` section here https://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_lc.html
18:02 Talkless joehughes: that line's for me?
18:02 LondonAppDev joined #salt
18:03 keepguessing Talkless: I think so
18:03 joehughes Talkless: ya I guess it is lol got mixed up who was asking for what
18:03 joehughes both were asking about debian repo stuff
18:03 keepguessing joehughes: yeah its definitely not for me.
18:04 Talkless joehughes: but why exactly is my version wrong?
18:04 joehughes why were you getting that error?
18:05 Talkless yeah why
18:05 Talkless why some times {{ VAR }} works, but not in this file: case?
18:07 joehughes well your using the pkgrepo.managed state... and what you have there is not valid jinja
18:07 joehughes jinja has to render... which means that you need your variables to be defined by a { set } statement
18:08 joehughes what I gave you works because pillar and grains are python dictionary objects that are exposed to every sls file
18:08 joehughes so when you do pillar.get or grains.get
18:09 nethershaw joined #salt
18:09 joehughes you can access information inside those objects
18:09 Talkless "file: /etc/apt/sources.list.d/{{grains.get('lsb_distrib_id')|lower}}-non-free.list" works now, but "file: /etc/apt/sources.list.d/{{ DISTRIB }}-non-free.list" didn't...
18:09 whytewolf is DISTRIB set somewhere?
18:09 joehughes DISTRIB has to be a variable you have defined
18:09 Talkless yes, here: https://gist.github.com/Talkless
18:09 Talkless oh sorry
18:09 Talkless here: https://gist.github.com/Talkless/224dac6ef261b9925034
18:10 chadhs can you store multiple lines of arbitrary text in pillar data?
18:10 whytewolf chadhs: yes with |
18:10 joehughes Talkess: can you put the error in the gist too
18:11 chadhs @whytewolf, so in theory could should store a shell script that way?
18:11 joehughes I am not seeing what is wrong with what you have there... the error may help
18:11 whytewolf chadhs: yeap
18:11 Talkless joehughes: https://gist.github.com/Talkless/3d58a9ce860a0f3e469a
18:11 chadhs bootstrap_salt_script: |
18:11 chadhs #!/bin/sh
18:11 whytewolf Talkless: you can update gists. you don't need to post a new one
18:11 chadhs so on and so forth?
18:11 whytewolf chadhs: yes
18:12 denys joined #salt
18:12 joehughes :Talkless the error you sent me to is not from your updated file it doesn't look like... line 7 is not the same
18:12 whytewolf ohh. I see what is going on
18:13 whytewolf Talkless: the output of DISTRIB IS {'lsb_distrib_id': 'debian'}
18:13 Talkless yes it's how it renders
18:13 Talkless with { }
18:13 whytewolf because it is a dict
18:13 chadhs @whytewolf trying to do that and getting sls compilation errors
18:13 Talkless like json, I do not know wky.
18:14 Ashald_ Is there is a way to call my runner on master via salt-pepper or API?
18:15 whytewolf {% set key,DISTRIB = salt['grains.item']('lsb_distrib_id')|lower %}
18:15 Talkless oh
18:15 Talkless le'ts try...
18:16 lompik joined #salt
18:16 whytewolf Ashald_: the over all function for that is https://docs.saltstack.com/en/latest/topics/netapi/index.html#salt.netapi.NetapiClient.runner but yes you can call runners from the apis
18:16 chadhs @whytewolf here's the example error: https://www.zerobin.net/?dc67b5b4c0f92aab#fs3OsrZnlFWgcObgcPCh+Zg3pBfG6YzkCLJLxAQDuz0=
18:17 Talkless joehughes: ValueError: too many values to unpack in     - {% set key,DISTRIB = salt['grains.item']('lsb_distrib_id')|lower %}    <======================
18:17 Ashald_ whytewolf, WOW!
18:17 Ashald_ How do I configure it? Are there any examples?
18:17 Talkless joehughes: and why your version does not return key/value pair?
18:18 whytewolf Talkless: that was my version
18:18 Talkless no I mean  "file: /etc/apt/sources.list.d/{{grains.get('lsb_distrib_id')|lower}}-non-free.list"
18:18 chadhs @whytewolf, oh… it relies on explicit indentation
18:18 joehughes Talkless: use grains.get
18:18 chadhs think i solved my issue
18:18 whytewolf so much typeing
18:18 whytewolf lol
18:18 solidsnack joined #salt
18:19 whytewolf grains.get gets a single item. salt['grains.get'] actually calls grains.get which returns the full dict
18:19 joehughes Talkless: the jinja filter lower probably can not take a dictionary object
18:20 whytewolf chadhs: yay! I forgot about the indenting
18:20 joehughes grains.item returns a key value pair while grains.item will just return the value of that grain... which in this case is a string that you are making lowercase
18:20 chadhs whytewolf, np just happy to get this bootstrap script in one place so i have one place to make changes as i add AWS server roles :-)
18:20 whytewolf Ashald_: depends on your net method. each calls it a different way. but if you dig through the docs for each it should just be a runner class
18:21 Ashald_ I mean, I have an API on a host, port 'X:1200'
18:22 Ashald_ is it possible to use this netapi on another machine?
18:22 Ashald_ so it will talk to his API endpoint?
18:22 Ashald_ *this
18:22 Ashald_ or it should talk directly to master?
18:22 whytewolf the api should live on the master. but you can call it from another host
18:24 Talkless joehughes: I am using  {% set DISTRIB = grains.get('lsb_distrib_id')|lower %}, not it works with variable. Thanks!
18:25 marsdominion joined #salt
18:25 marsdominion joined #salt
18:26 Kusen joined #salt
18:27 quasiben joined #salt
18:31 marsdominion joined #salt
18:31 marsdominion joined #salt
18:32 Ashald_ thanks!
18:36 ex-cowboy joined #salt
18:43 DanyC joined #salt
18:44 brianfeister joined #salt
18:45 murrdoc joined #salt
18:46 ageorgop joined #salt
18:46 murrdoc basepi:  any chance u still accept presentations for saltconf ?
18:47 AndreasLutro joined #salt
18:49 AndreasLutro joined #salt
18:51 keepguessing I have modified a salt custom module ... How do I now apply it?
18:52 otter768 joined #salt
18:54 snuggie left #salt
18:55 stomith does 2015.8.4 have a release date?
18:57 hightekvagabond joined #salt
18:57 jaybocc2 joined #salt
19:00 grumm_servire joined #salt
19:01 Fiber^ joined #salt
19:01 whytewolf stomith: no
19:02 keepguessing http://paste.debian.net/343378/ <<< error on the line 34.
19:02 stomith or the latest version. :) I'm running into a weird error that I can't seem to find an answer to. I'll keep looking.
19:02 keepguessing Jinja syntax error: expected token 'end of statement block', got 'string'; line 34
19:02 whytewolf keepguessing: mismatches '
19:02 keepguessing sorry missed adding the error to the pastebin. It was oneline so added it here.^^^^^
19:03 whytewolf mismatched ' even
19:03 whytewolf keepguessing: there is a ' before and after Debian, but only one after 7
19:04 keepguessing whytewolf: ah yes. Damn.
19:04 keepguessing I am running this command to check if the module execute successfully or not.
19:04 keepguessing sudo salt '*-master' state.sls docker
19:05 clintberry joined #salt
19:05 murrdoc joined #salt
19:05 beardedeagle joined #salt
19:08 murrdoc1 joined #salt
19:08 keepguessing whytewolf: the earlier pastebin link has from line 48 to 70 has my addition to add a repo and install docker.
19:08 keepguessing Is it doing what I think its doing?
19:10 keepguessing according to me I am check if it is debian 7 or higher then purging old docker, adding a new repo and installing docker-engine and then starting.
19:10 keepguessing Is it doing what I think it is doing.
19:10 keepguessing http://paste.debian.net/343378
19:13 sjorge joined #salt
19:13 sjorge joined #salt
19:13 whytewolf keepguessing: need an added line between 61 to 62 but this set of lines. will manage the file with /etc/apt/sources.list.d/docker.list with the source of salt://docker/docker.list the apt-update needs a -y but honestly adding refresh: True to the pkg.installed should do the same thing as your cmd.run
19:14 whytewolf it is also installing docker-engine ... is that the name of the package you want installed?
19:14 heaje joined #salt
19:15 bhosmer_ joined #salt
19:15 keepguessing yes
19:15 keepguessing https://docs.docker.com/engine/installation/debian/
19:15 heaje Are there any known issues with using context under file.managed to pass a dictionary?
19:15 mohae joined #salt
19:15 keepguessing I am doing these steps.
19:15 keepguessing I might have to add a key
19:16 heaje Every attempt of mine is giving me errors like this => failed: found unexpected ':'; line 31
19:16 whytewolf keepguessing: you most likely do need a key.
19:18 scoates joined #salt
19:19 anmolb joined #salt
19:22 keepguessing whytewolf: I do not see that this configuration is applied.
19:22 keepguessing whytewolf: I do not see that this docker changes are applied.
19:23 heaje It's like the dictionary is being parsed as yaml before it is sent on to the template
19:24 keepguessing here is out of sudo salt '*-master' state.sls docker http://paste.debian.net/343387/
19:25 cheus joined #salt
19:25 whytewolf keepguessing: the the only thing that is making the jinja cut is that first stanza. your if statments are keeping everything else from rendering so they don't exist to salt
19:25 hightekvagabond joined #salt
19:25 solidsnack joined #salt
19:25 rotbeard joined #salt
19:26 keepguessing oh
19:27 keepguessing whytewolf: you are right.
19:29 keepguessing whytewolf: Installing a vim-plugin to see exactly whats happening.
19:29 solidsnack joined #salt
19:31 solidsnack joined #salt
19:32 marsdominion joined #salt
19:34 mclosson joined #salt
19:35 sdm24 joined #salt
19:35 mpanetta Argh... Has anyone here got beacons to work when configured from pillar instead of minion config?
19:38 druonysus joined #salt
19:38 druonysus joined #salt
19:40 felskrone joined #salt
19:40 Tanta joined #salt
19:40 avenda joined #salt
19:41 stolenmoment joined #salt
19:41 stolenmoment left #salt
19:42 keepguessing whytewolf: modified it. http://paste.debian.net/343389/
19:43 keepguessing whytewolf: error No function declared in state '-watch' in SLS 'docker'
19:43 keepguessing http://paste.debian.net/343390
19:45 hightekvagabond joined #salt
19:46 whytewolf keepguessing: this file is really jinja heavy. something most likely isn't rendering right
19:47 whytewolf you are getting a - watch as the stateid
19:47 hackel joined #salt
19:48 mohae joined #salt
19:49 jefferyharrell joined #salt
19:51 rainman joined #salt
19:52 keepguessing whytewolf: I do not even know what that means.
19:52 murrdoc1 well keep guessing
19:52 murrdoc1 u ll get it right
19:52 whytewolf stateid is the first line of a state stanza
19:52 murrdoc1 stateid:
19:52 murrdoc1 module.function
19:52 murrdoc1 - param1: value1
19:54 Tanta omg, docker + monic
19:54 marsdominion joined #salt
19:54 marsdominion joined #salt
19:54 Tanta I hope you're not running that nightmare in production
19:55 keepguessing monic?
19:55 Tanta auto correct, I typed 'm' 'o' 'n' 'i' 't'
19:55 s_kunk joined #salt
19:55 s_kunk joined #salt
19:55 keepguessing oh ok. I am just fixes some kubernetes salt stuff
19:56 keepguessing its failing for me and did some things manually but thought I will fix it for the spirit of it. :P
19:57 marsdomi_ joined #salt
19:57 hightekvagabond joined #salt
20:01 indispeq joined #salt
20:01 Hell_Fire joined #salt
20:02 JDiPierro joined #salt
20:03 mpanetta So nobody here has used beacons yet?
20:03 JDiPierro joined #salt
20:04 bonzibuddy whytewolf: found my problem.  confusing pillar with state tree
20:04 bonzibuddy fix was to use the pillar to specify the version for node-formula
20:05 bonzibuddy which i had been doing incorrectly before
20:05 bonzibuddy i really dont see the advantage of specifying formula paramters in the pillar
20:05 bonzibuddy in this use case anyway
20:05 DanyC joined #salt
20:06 bonzibuddy i just want to specify which version of a program to install
20:06 bonzibuddy at least it works now and i am back to a regular level on loathing computers
20:06 bonzibuddy level of*
20:07 whytewolf bonzibuddy: formulas are meant to be indapendent. they already setup. pillars are the input method for them.
20:07 AlberTUX joined #salt
20:07 bonzibuddy maybe a formula is not what i want then
20:08 whytewolf you could have ripped the formula apart and made it into your own states
20:08 whytewolf but honestly pillars is something you should know if you are ever going to build a larger salt deploy
20:09 Edgan Is there a way to avoid multiple imports, "{% from "apache/map.jinja" import apache with context %}", for multiple variables from a map.jinja? It would be nice if I could include the whole file.
20:09 bonzibuddy you are correct, i just am not a fan of how this is laid out quite yet
20:10 bonzibuddy like, pillar has a top.sls, state tree has a top.sls
20:10 bonzibuddy in my small use case its like specifying information for one setup across two directoires now
20:10 bonzibuddy but i am assuming the advantages are there for more complicated deployments
20:11 j-fricke joined #salt
20:11 AndreasLutro Edgan: {% import 'map.jinja' as apache %}
20:11 whytewolf there is also security differences. any minion can see all the states. but only the minion that it is assigned to can see the pillar
20:11 AndreasLutro then you can do apache.my_var
20:11 Edgan AndreasLutro: Nice :)
20:12 aqua^c joined #salt
20:12 j-fricke Hello, I've been playing around with Vagrant+SaltStack and wanted to show off my simple vm for getting a nodeJs server up quickly inside a VM: https://github.com/J-Fricke/saltyVagrantNodeJs
20:14 * rainman slaps rainman around a bit with a large fishbot
20:15 DanyC is there any way from minions to access the salt-cloud profile data like security_groups/ image etc ?
20:15 whytewolf DanyC: you mean like this https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cloud.html#module-salt.modules.cloud
20:16 giantlock joined #salt
20:17 DanyC whytewolf: s'thing like that yes :D
20:18 gekitsuu joined #salt
20:18 DanyC whytewolf: and forgot to say kindly thanks
20:19 whytewolf hehe np
20:21 fredvd joined #salt
20:22 flowstat_ joined #salt
20:27 jamesp9 joined #salt
20:30 DanyC any tip on how people are testing their states while still taking the benefit of pillar, dependencies on other states etc ? one way is to spun up/ mirror same env but that is quite  costly
20:32 amcorreia joined #salt
20:33 baweaver joined #salt
20:33 beardedeagle joined #salt
20:34 TyrfingMjolnir joined #salt
20:35 TyrfingMjolnir joined #salt
20:36 lemur joined #salt
20:39 murrdoc1 kitchen salt
20:39 DanyC joined #salt
20:48 brianfeister joined #salt
20:49 ageorgop joined #salt
20:53 otter768 joined #salt
20:54 larsfronius joined #salt
20:55 DanyC whytewolf: from the previous link you sent me (https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cloud.html#module-salt.modules.cloud), can you pls help me understand one thing: how can the execution module be called from witin the salt state ?
21:00 fyb3r joined #salt
21:01 winsalt_ DanyC, you can run execution modules in a state file with module.run.  However, there is a cloud state module already that probably is very close to the cloud execution module
21:01 fyb3r sooooo the problem I was having was caused by the fact that reactors make use of the LocalClient cmd.async anyways
21:01 fyb3r so I was calling LocalClient inside of LocalClient
21:01 racooper does anyone have an example of setting grains from pillar data?
21:03 DanyC winsalt_: well i looked @ https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cloud.html and is only creating, nothing related to query from minion the profiles
21:03 whytewolf DanyC: A. states are used for putting a system into a state. if you are pulling data you call the exacution module in jinja to set a variable then use that veriable in a state
21:04 baweaver joined #salt
21:05 DanyC whytewolf: right so the best way to call the execution module in states is by setting variables and then use it later on
21:05 whytewolf DanyC: depending on what you are doing
21:06 DanyC whytewolf: sure ... thanks, the puzzle is getting to an end
21:07 whytewolf DanyC: good to hear
21:07 netcho joined #salt
21:08 DanyC whytewolf: things will have been easier if this basic things are explain as intro in the docs (with tons of examples, not just blind words - could be that i missed the info).
21:08 whytewolf but yeah pulled data goes into jinja. push settings is done through states. perferably native states but module.run or cmd.run on an as needed bases
21:08 keepguessing Is it necessary that repo should be installed for pkgrepo.managed
21:09 hightekvagabond joined #salt
21:09 whytewolf keepguessing: necessary? no. it tends to be a little easier to manage but not necessary
21:10 keepguessing whytewolf: so it will install it? I am still trying to see if I can do the steps 4+ a better way in https://docs.docker.com/engine/installation/debian/
21:10 keepguessing Along with the keys?
21:10 cberndt joined #salt
21:11 akhter_1 joined #salt
21:11 ViciousLove joined #salt
21:11 whytewolf keepguessing: it can be a little bit of a pain sometimes with debian distros. but once it works it works well.
21:11 hal58th joined #salt
21:13 keepguessing whytewolf: you are saying about pkgrepo?
21:14 whytewolf yes
21:17 denys joined #salt
21:17 fen joined #salt
21:17 fen hi
21:18 fen i have a problem with salt.state.firewalld (2015.8.3) - it adds the requested ports, but it's not persisting the changes (firewalld --permanent ...) - is this an issue or by design?
21:20 whytewolf most likely by design.
21:21 fen but how should the changes then be persisted for reboot?
21:22 whytewolf looks like a new function to the state is needed.
21:23 keepguessing how do I make sure that two commands are run before I install a package?
21:23 fen a persist option would be good enough
21:23 whytewolf put in a feature request and in the meantime use cmd.run [doesn't look like the exacution module for firewalld has a persist option either]
21:24 whytewolf keepguessing: but putting them closer to the top of the file. and adding requires to the state that needs them.
21:25 fen will do
21:26 keepguessing whytewolf: I only what them to run once. Like adding a key
21:26 keepguessing whytewolf: I only what them to run once. Like adding a apt-key and calling apt-update
21:26 forresta joined #salt
21:26 whytewolf keepguessing: ahh. then in those starts add a required_id statment
21:27 racooper well, as of https://github.com/saltstack/salt/issues/27435 in September, it appears that the state is running firewall-cmd with --permanent
21:27 saltstackbot [#27435]title: firewalld state: firewalld.prepare calls new_service, not add_service | Given the following state:...
21:27 whytewolf and have jinja not render them if they already are set
21:30 cberndt joined #salt
21:32 bonzibuddy hey - if a salt command isnt returning any output, how do i debug that?
21:33 druonysuse joined #salt
21:33 druonysuse joined #salt
21:33 bonzibuddy ie $>salt 'mymachine' state.sls mystate  just returns without printing anything
21:33 netcho joined #salt
21:35 lemur joined #salt
21:36 AndreasLutro bonzibuddy: for starters, run the command with -l debug
21:37 tehsu is there a debug command that'll actually show the work being done on the minion
21:37 AndreasLutro tehsu: you can ssh into the minion and run salt-call
21:38 RandyT_ joined #salt
21:38 tehsu kk thanks
21:42 netcho joined #salt
21:42 linjan_ joined #salt
21:43 fen racooper: it's not the same thing, but related
21:43 beardedeagle how does one properly salt '*win*' cmd.script salt://script.ps1  it just sits there forever for me
21:43 beardedeagle all the script does is print out the uptime
21:43 fen racooper: i opened a new issue https://github.com/saltstack/salt/issues/29641
21:43 saltstackbot [#29641]title: salt.state.firewalld missing persist option | Though `firewalld.present` (2015.8.3) manages to manage the runtime configuration, the changes are not persisted to the system configuration. Consequently a reboot reverts the changes which is most of the time not what is desired....
21:44 fen using saltstack makes me really hate yml files
21:44 racooper at least it's not XML
21:45 zer0def joined #salt
21:45 fen yeah - but the indentations drive me nuts - it's almost like cobol where comments start at col 70
21:46 fen and mixed with jinja it's really not nice
21:46 fyb3r ?having issues getting salt['status.uptime'](data['present']) to work. claiming that its passing an argument instead of using it as the target. is there a way to send a list to salt this way
21:48 whytewolf fen, you know you don't have to use yaml right? it is the most supported. but not the only template engine.
21:49 subsignal joined #salt
21:50 shaggy_surfer joined #salt
21:51 solidsnack joined #salt
21:51 fen yeah i know
21:51 beardedeagle nevermind, salt '*win*' cmd.script salt://script.ps1 shell='powershell'
21:51 forresta You're using the sls file vim plugin right?
21:51 fen i prefer to stick to defaults since they are more promising to be bug free
21:51 forresta I mean indenting is pretty standard/easy.
21:52 whytewolf the salt vim plugin is nice, I also like the jinja plugin
21:52 forresta yep they're both good
21:52 fyb3r whytewolf, any clue on how to pass minions as a list to something like salt['status.uptime'](data['present'])
21:53 whytewolf fyb3r: since i have no idea what is in data['present'] I have no idea how to aprse it
21:54 fyb3r should just be a list of minions from a presence event
21:54 fyb3r :P
21:54 ageorgop joined #salt
21:54 whytewolf so a python list?
21:54 fyb3r mhm
21:54 fyb3r to be used in a reactor in that way
21:55 whytewolf what is status.uptime
21:55 RandyT_ joined #salt
21:55 whytewolf oh the exacution module
21:55 fyb3r https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.status.html
21:56 fyb3r yup
21:56 RandyT_ joined #salt
21:56 whytewolf um. the only varable that takes is human_readable
21:56 fyb3r true buttt
21:56 whytewolf if you want to target it. the targeting needs to happen elsewhere
21:56 fyb3r {% set grain_dict = salt['grains.items'](data['id']) %}
21:56 fyb3r that works
21:56 akhter joined #salt
21:56 druonysuse joined #salt
21:56 druonysuse joined #salt
21:57 fyb3r id being a minion
21:57 RandyT_ joined #salt
21:57 solidsna_ joined #salt
21:58 fyb3r :D like id bring you an easy issue
21:58 whytewolf that works on a technicality. grains.items takes a variable sanitize. which defaults to false
21:59 fyb3r so....
21:59 RandyT| joined #salt
21:59 marsdominion joined #salt
22:00 whytewolf fyb3r: data['id'] being passed to grains basicly is saying that sanitize= data['id'] which passes the checks enough to validate it
22:00 whytewolf it isn't targeting on that
22:00 fyb3r ok but it returns the grains for data['id'].
22:00 fyb3r >_>
22:00 RandyT| joined #salt
22:00 whytewolf it should with out the data['id'] also
22:01 fyb3r im saying data['id'] is the id of a minion
22:01 whytewolf fyb3r: yes. and passing it as a veriable to grains.items. isn't what is targeting
22:01 fyb3r oh
22:02 fyb3r hows it targetting the minions then
22:02 fyb3r cause its behaving like salt data['id'] grains.items
22:02 whytewolf basicly the jinja is targeting the minion that caused the event
22:02 RandyT_ joined #salt
22:02 fyb3r hm. samn
22:02 fyb3r damn*
22:03 fyb3r that def throws a giant kink in what im trying to do
22:03 wendall911 joined #salt
22:04 fyb3r back to the drawing board
22:04 RandyT joined #salt
22:05 marsdominion joined #salt
22:05 marsdominion joined #salt
22:07 RandyT joined #salt
22:07 basepi murrdoc1: the submissions for saltconf are closed. I might be able to sneak one into the pile but no guarantees. :(
22:07 murrdoc1 is all good
22:07 murrdoc1 i was busy with baby stuff :D
22:07 basepi that'll do it!
22:07 murrdoc1 lmk if someone falls off
22:07 basepi Will do
22:07 racooper ok another state/pillar issue... https://gist.github.com/racooper/3dd956261ba438941166
22:07 murrdoc1 i can present how $company does salt super simple
22:08 racooper "expected <block end>, but found '-'"
22:08 RandyT joined #salt
22:08 RandyT_ joined #salt
22:09 RandyT_ joined #salt
22:10 RandyT- joined #salt
22:10 RandyT- joined #salt
22:11 RandyT| joined #salt
22:11 AndreasLutro racooper: get rid of the - in -%}, it's messing up the yaml indentation
22:13 RandyT joined #salt
22:14 dustywusty_ joined #salt
22:15 jhauser joined #salt
22:16 hightekvagabond joined #salt
22:16 racooper actually....it was also that on line 13 I didn't have enough spaces before the - {{ role }}.  but you got me looking in the right place
22:16 racooper stupid yaml :P
22:17 RandyT joined #salt
22:17 chadhs @Ryan_Lane do you know if there's a way to set which vpc subnet AGS instances would reside in?
22:17 chadhs via boto_asg state module
22:18 RandyT joined #salt
22:19 RandyT joined #salt
22:20 chadhs or a list of acceptable subnets anyway
22:20 marsdominion joined #salt
22:20 marsdominion joined #salt
22:21 RandyT joined #salt
22:21 RandyT joined #salt
22:23 RandyT joined #salt
22:27 RandyT joined #salt
22:27 RandyT_ joined #salt
22:28 RandyT joined #salt
22:29 RandyT_ joined #salt
22:30 RandyT_ joined #salt
22:30 Hell_Fire_ joined #salt
22:31 RandyT- joined #salt
22:31 RandyT| joined #salt
22:32 RandyT^ joined #salt
22:32 fen whats a good way the manage the search domain for a linux host - is there a state for that?
22:34 RandyT joined #salt
22:34 RandyT joined #salt
22:35 lumtnman joined #salt
22:36 RandyT_ joined #salt
22:36 RandyT_ joined #salt
22:37 brianfeister joined #salt
22:37 RandyT- joined #salt
22:39 RandyT joined #salt
22:39 RandyT joined #salt
22:40 Hell_Fire joined #salt
22:40 RandyT- joined #salt
22:41 nZac joined #salt
22:41 RandyT- joined #salt
22:41 RandyT_ joined #salt
22:42 CeBe joined #salt
22:42 RandyT_ joined #salt
22:43 RandyT- joined #salt
22:45 RandyT joined #salt
22:45 RandyT_ joined #salt
22:46 RandyT_ joined #salt
22:47 RandyT_ joined #salt
22:47 RandyT| joined #salt
22:48 RandyT- joined #salt
22:49 RandyT- joined #salt
22:50 RandyT joined #salt
22:50 Hell_Fire_ joined #salt
22:51 RandyT| joined #salt
22:52 RandyT^ joined #salt
22:53 RandyT_ joined #salt
22:54 RandyTb joined #salt
22:54 RandyT joined #salt
22:54 otter768 joined #salt
22:55 aqua^c joined #salt
22:55 RandyT- joined #salt
22:55 RandyT- joined #salt
22:55 ipmb joined #salt
22:56 RandyT| joined #salt
22:56 hightekvagabond joined #salt
22:57 DanyC joined #salt
22:57 baweaver joined #salt
22:57 RandyT^ joined #salt
22:57 DanyC joined #salt
22:58 RandyT_ joined #salt
23:00 RandyT joined #salt
23:00 bhosmer_ joined #salt
23:00 brianfeister joined #salt
23:01 RandyT_ joined #salt
23:02 RandyT- joined #salt
23:03 RandyT- joined #salt
23:03 hal58th_ joined #salt
23:04 RandyT- joined #salt
23:04 RandyT- joined #salt
23:04 ViciousL1ve joined #salt
23:05 RandyT joined #salt
23:06 RandyT_ joined #salt
23:06 RandyT| joined #salt
23:07 RandyT^ joined #salt
23:07 Skull_Kid joined #salt
23:08 RandyT- joined #salt
23:08 DanyC joined #salt
23:10 RandyT- joined #salt
23:10 yomilk joined #salt
23:10 RandyT joined #salt
23:11 cyborg-one joined #salt
23:11 RandyT_ joined #salt
23:14 RandyT joined #salt
23:14 baweaver joined #salt
23:15 RandyT- joined #salt
23:15 RandyT_ joined #salt
23:16 RandyT| joined #salt
23:17 RandyT^ joined #salt
23:18 RandyTa joined #salt
23:19 RandyT joined #salt
23:19 RandyTb joined #salt
23:20 RandyT_ joined #salt
23:25 AdamSewell joined #salt
23:25 yomilk joined #salt
23:28 AdamSewell joined #salt
23:29 RandyT joined #salt
23:30 RandyT joined #salt
23:31 bfoxwell joined #salt
23:31 RandyT_ joined #salt
23:32 lemur joined #salt
23:32 RandyT- joined #salt
23:33 colegatron joined #salt
23:33 RandyT| joined #salt
23:34 RandyT^ joined #salt
23:41 flowstat_ joined #salt
23:42 ageorgop joined #salt
23:42 nZac joined #salt
23:44 kaushal_ joined #salt
23:50 flowstat_ joined #salt
23:55 larsfronius joined #salt
23:56 yomilk joined #salt
23:57 jimklo joined #salt
23:59 lompik joined #salt

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