Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-08-24

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

All times shown according to UTC.

Time Nick Message
00:00 ninjada joined #salt
00:01 amcorreia joined #salt
00:04 jxm_ joined #salt
00:10 woodtablet left #salt
00:11 fannet joined #salt
00:13 dendazen joined #salt
00:19 juanito joined #salt
00:21 MTecknology This is interesting...
00:21 _JZ_ joined #salt
00:22 MTecknology on FreePBX, after rebooting after installing salt-minion, the hostname becomes a pipe (|) ... not sure why or in what config file that exists... but it's there
00:25 MTecknology fun stuff for tomorrow..
00:30 ninjada_ joined #salt
00:37 alexhayes joined #salt
00:38 alexhaye1 joined #salt
00:47 xbglowx hi. new to salt and I am trying to get my top file setup so that minions are mapped to an environment in the top file based on grains. I noticed that my test minion never bothers to check any other environment in the top file other than base. Is there a way to fix this or must I specify config environment or saltenv?
00:49 ninjada joined #salt
00:50 * iggy avoids environments at all cost
00:50 saltstackbot joined #salt
00:50 xbglowx :(
00:50 iggy you shouldn't have to set the environment in the config
00:51 iggy maybe gist your top file
00:52 xbglowx iggy https://gist.github.com/xbglowx/72aa4a20f12cc59a7672aa64801b5720
00:52 iggy you don't have `- match: compound` anywhere in there
00:53 whytewolf I'm kind of shocked anything is working in that
00:53 iggy ^
00:53 xbglowx lol
00:54 xbglowx I thought the compound was implied when using `and`, but I am new to this
00:54 whytewolf blob is the default
00:54 whytewolf all others must be specified
00:54 xbglowx https://docs.saltstack.com/en/latest/topics/targeting/compound.html
00:54 iggy salt doesn't read your matchers and try to figure out what you meant
00:55 xbglowx ok, let me add the compound. Thanks for pointing that out
00:55 iggy everything there specifies compound matches
00:56 whytewolf -C = use compound matching on cli
00:57 xbglowx so I only need to add `- match: compound` for targets that have `and`, `or`, and `not`?
00:57 whytewolf honestly anything you a using a <modifier>@ should have compound
00:57 xbglowx ok
00:58 armonge joined #salt
00:58 iggy _every_ one of your matches in the top you pasted needs match: compound
00:59 Jimlad joined #salt
01:00 |aaron trying to understand the salt:// filesystem... if i have two file_roots defined for base: and they both contain a file with the same name, how does that work? does salt use the first one or..? trying to figure out how to override files from an imported formula
01:00 iggy I _think_ it's documented
01:01 |aaron yeah i thought i saw something mentioned about it somewhere but now i cant find it again lol
01:01 whytewolf first file found
01:01 |aaron awesome thanks :)
01:01 whytewolf https://docs.saltstack.com/en/latest/ref/file_server/file_roots.html#directory-overlay
01:01 xbglowx iggy and whytewolf, I updated the top file to use `match: compound`, but the minion in debug mode is still not even bothering to look at the stage environment.
01:02 iggy and this is why I avoid salt env's at all costs
01:02 whytewolf agreed. salts enviroments are ... to say the least brain damaging
01:03 xbglowx hmm, I think iggy was telling me before to stick with one env (base) and setup multiple saltmasters per environment.
01:04 whytewolf i wouldn't doubt it. I know i have given that advice myself a few times here and seen others give it as well
01:04 xbglowx They funny thing is that I had it working, but can't reproduce.
01:04 xbglowx oh well, thanks for your help iggy and whytewolf
01:05 __number5__ multiple envs is ok if you use only one top.sls in the base env
01:05 iggy :surprised_face:
01:05 xbglowx I thought multiple top files would be ok, as long as you have `top_file_merging_strategy: same`
01:05 John_Kang joined #salt
01:07 __number5__ btw, is https://github.com/felskrone/salt-eventsd still a thing, or there are better way to handle events?
01:08 edrocks joined #salt
01:14 subsignal joined #salt
01:14 jhauser joined #salt
01:18 ninjada joined #salt
01:19 nicksloan joined #salt
01:21 pjs joined #salt
01:21 Nahual joined #salt
01:25 mapu joined #salt
01:25 edrocks_ joined #salt
01:29 DEger joined #salt
01:30 |aaron man i cannot figure out how to override the named.conf template for bind-formula... i have 'bind: config: tmpl: salt://path' in my pillar, and i know the pillar is getting loaded because other settings are picked up. anyone know what im doing wrong?
01:33 |aaron but then the only reference to 'tmpl' in the whole bind-formula project is the pillar example?
01:38 |aaron maybe i need to make my own sls file, include bind and override bind_config files.managed?
01:38 teryx510 joined #salt
01:40 |aaron yeah no that doesnt work lol
01:41 lungaro joined #salt
01:42 sp0097 joined #salt
01:46 edrocks joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.5.11, 2015.8.11, 2016.3.2 | Support: https://www.saltstack.com/support/ | Logs: http://irclog.perlgeek.de/salt/ | Paste: https://gist.github.com/ (please don't multiline paste into channel) | See also: #salt-devel, #salt-offtopic | Ask with patience as we are volunteers and may not have immediate answers
01:49 |aaron whytewolf: thanks but how do i change that path?
01:49 whytewolf actually looking at the code. I'm not sure you can
01:50 whytewolf although maybe bind:lookup:config_source_dir maybe
01:50 whytewolf but you need to have all of the configs there. not just named.conf
01:51 whytewolf this formula looks rather badly pieced together
01:51 |aaron yeah i see what u mean
01:51 |aaron haha
01:51 |aaron ok that makes me feel a little better. this is the first one ive ever looked at lol
01:52 |aaron isnt there a way i can override bind_config: files.managed: like with extends or something?
01:52 jaybocc2 joined #salt
01:52 |aaron /s/extends/extend/
01:52 catpigger joined #salt
01:53 whytewolf not really. extend is for adding info not overriding already existing info. you would be better off, forking the formula and updating with your own setup
01:54 |aaron ok thanks :)
01:57 justanotheruser joined #salt
01:57 jaybocc2 joined #salt
02:00 |aaron yeah this formula is a mess i am 99% sure some of entries in their pillar.example do absolutely nothing
02:00 ninjada joined #salt
02:03 mavhq joined #salt
02:03 xbglowx_ joined #salt
02:06 jaybocc2 joined #salt
02:09 lungaro joined #salt
02:12 fannet joined #salt
02:13 stephanl_ joined #salt
02:21 duckfez joined #salt
02:27 jaybocc2 joined #salt
02:27 stephanlooney joined #salt
02:29 bastiand1 joined #salt
02:43 stephanlooney joined #salt
02:46 teryx510 joined #salt
02:49 ponyofdeath joined #salt
02:55 jhauser joined #salt
02:55 evle joined #salt
02:57 stephanlooney joined #salt
03:01 onlyanegg joined #salt
03:04 quasiben joined #salt
03:08 writtenoff joined #salt
03:14 stephanlooney joined #salt
03:17 jaybocc2 joined #salt
03:17 subsignal joined #salt
03:26 rmohta joined #salt
03:27 ninjada joined #salt
03:27 sp0097 joined #salt
03:28 rmohta While using salt-ssh 2015.8.10, I am stuck in using cmd.run with unless of onlyif statements
03:29 rmohta Even though I have "- unless: ls /home/env35_E0/GanCrypt/bin", state module evaluates the cwd and fails with an error
03:29 rmohta am I using unless/onlyif correctly?
03:30 ninjada joined #salt
03:31 stephanlooney joined #salt
03:44 sp0097 joined #salt
03:46 edrocks joined #salt
03:51 stephanlooney joined #salt
03:52 jaybocc2 joined #salt
03:54 armonge joined #salt
03:55 stephanlooney joined #salt
04:02 iggy |aaron: presumably, you have the bind-formula added to file_roots or gitfs roots... just make a dir in your main file_roots that matches the dir structure of the bind formula and then put your formula there
04:06 hasues joined #salt
04:07 hasues left #salt
04:10 BoogePowell joined #salt
04:13 fannet joined #salt
04:13 jaybocc2 joined #salt
04:13 lungaro joined #salt
04:15 pipps joined #salt
04:23 jaybocc2 joined #salt
04:24 jenastar joined #salt
04:25 DEger joined #salt
04:32 MTecknology UtahDave: I have an idea... git defined everything. If you want a new server, you define it's specs in pillar, git push, and then that server exists, runs highstate, and is joined to whatever cluster it's supposed to be part of after having finished the highstate. ... but it sounds ambitious.
04:32 |aaron iggy: yeah thats what i ended up doing thanks
04:38 Vaelatern joined #salt
04:39 colegatron_origi joined #salt
04:40 iggy saltstackbot: ping
04:40 raspado joined #salt
04:44 ruxu joined #salt
04:49 kshlm joined #salt
04:50 onlyanegg joined #salt
04:59 jaybocc2 joined #salt
05:02 jenastar left #salt
05:03 alexhayes joined #salt
05:03 stephanlooney joined #salt
05:08 Brijesh1 joined #salt
05:08 alexhaye1 joined #salt
05:11 antpa joined #salt
05:14 alexhaye2 joined #salt
05:14 alexhaye3 joined #salt
05:14 onlyanegg joined #salt
05:15 jaybocc2 joined #salt
05:19 subsignal joined #salt
05:19 stephanlooney joined #salt
05:21 ninjada joined #salt
05:28 Brijesh1 joined #salt
05:33 stephanlooney joined #salt
05:55 edrocks joined #salt
05:55 Brijesh2 joined #salt
06:00 stephanlooney joined #salt
06:05 ivanjaros joined #salt
06:14 fannet joined #salt
06:20 jaybocc2 joined #salt
06:20 ninjada joined #salt
06:27 bocaneri joined #salt
06:29 MTecknology I want to write a simple (finish it in the next half hour) custom grain... but I can't figure out what I want it to be.
06:32 scc MTecknology; salt 'minion' grains.set customgrain:somevalue :)
06:33 HWDexperte joined #salt
06:34 HWDexperte Hello, has anybody here knowledge about salt engines?
06:35 antpa joined #salt
06:35 GreatSnoopy joined #salt
06:35 infrmnt joined #salt
06:36 jaybocc2 joined #salt
06:39 evilRails joined #salt
06:40 MTecknology scc: boring!
06:40 MTecknology scc: I was thinking about a grain that picks up whether or not the device is running "out of band" but... meh
06:40 MTecknology too easy
06:43 jxm_ joined #salt
06:43 MTecknology Got it...
06:47 MTecknology scc: actually, grains.set would go against everything I plan to ever do w/ salt
06:47 evilRails left #salt
06:47 MTecknology scc: My plan is to get to the point that I do *NOTHING* outside of pushing changes to a git repo. :D
06:48 MTecknology it'll never actually happen, but I'm getting there
06:50 ivanjaros3916 joined #salt
06:50 bltmiller joined #salt
06:54 * MTecknology is now trying to understand the orchestration stuff, but might just go to sleep instead.
06:55 MTecknology I know what I wanna do, I know salt supports it with ease .. just a matter of finding who done it already
06:55 onlyanegg joined #salt
06:56 MTecknology I remember something about this at saltconf, but don't remember which talk was helpful
06:56 HWDexperte MTecknology: What do you want to do?
07:01 MTecknology HWDexperte: from the reactor, I want to trigger salt -t 90 -b 2 '*' state.highstate
07:03 HWDexperte MTecknology: okay, interesting. We are currently working on connecting salt reactor with out VM Center via salt-cloud to spawn automatically minions if the load on our farm is too high
07:03 MTecknology That was the exact use case presented in the salt talk
07:04 HWDexperte Damn ... i missed it
07:05 MTecknology I feel like cachedout presented it...
07:05 MTecknology or was it dave?
07:06 MTecknology they have a git repo
07:07 MTecknology I remember where I sat, I remember talking to them, I remember the time I got excited, and that's it.
07:08 ninjada_ joined #salt
07:10 MTecknology my notebook is at home :(
07:11 jaybocc2 joined #salt
07:11 HWDexperte MTecknology: Can you help me eventually with salt engines?
07:12 MTecknology I don't know anything about engines
07:13 MTecknology not sure I even want to
07:13 HWDexperte Okay
07:14 MTecknology BAM
07:14 manji joined #salt
07:16 MTecknology this might be it... https://github.com/markahopper/demo
07:17 MTecknology I don't think that's it, but it looks useful
07:18 MTecknology what I remember was much more comprehensive of the one topic
07:18 MTecknology OH!
07:19 MTecknology that /is/ it. this is about beacons, not orchestration .. but good orchestration stuff in there
07:19 MTecknology I probably don't quite care about beacons.
07:21 * MTecknology grumles.. still not completely sure this is the right repo; the right one (if it still exists) is much more stripped down
07:21 subsignal joined #salt
07:24 HWDexperte But beacons are really nice too ;)
07:24 Electron^- joined #salt
07:27 jaybocc2 joined #salt
07:27 MTecknology indeed, and if I ever decide to build a monitoring system, maybe I'll use them
07:28 * MTecknology should get to sleep
07:36 kaushal_ joined #salt
07:43 |aaron so i finally got the bind-formula working and provisioning my primary dns server, awesome. i have the formula hooked to the 'dns' role. but now i want to add a secondary dns server which requires different config. should i create a 'dns-slave' role? or how would you handle this
07:43 babilen |aaron: You typically just provide different configuration data in pillars
07:43 babilen How you target those is entirely up to you
07:44 |aaron babilen: thanks i wasnt sure if there was a best practice to use roles, grains or something else
07:45 SpX joined #salt
07:45 babilen What is your understanding of "role" in this context? Where and how do you define them?
07:46 keimlink joined #salt
07:46 fredvd joined #salt
07:47 |aaron like in my pillar, base: 'roles: dns': -match: grain
07:47 babilen Ah, so you set grains for roles
07:47 |aaron as here http://www.saltstat.es/posts/role-infrastructure.html
07:47 |aaron yeah right
07:47 |aaron how do you do it?
07:47 babilen Okay .. in that case you can target pillar data based on it. Just keep in mind that grains aren't secure and that a minion can claim to have whatever grains it wants to
07:48 babilen Just don't target sensible data based on grains
07:48 |aaron yeah im not crazy about the role data being stored on the minion
07:48 |aaron is there a better way?
07:49 babilen I typically keep roles in pillars, but that prevents you from targeting pillar data based on them. We target pillar data based on their minion id and patterns therein
07:50 |aaron ahhhh that makes a lot more sense
07:50 babilen Summarised some thoughts in https://github.com/saltstack/salt/issues/23910 and you find diferent approaches there also
07:50 saltstackbot [#23910][OPEN] Please implement static pillars | Hi,...
07:51 |aaron i like your way im going with that
07:51 babilen That way roles are handled centrally and pillars are secure. Bit of a pain if you don't have a semantic naming scheme though
07:52 |aaron in my top.sls, is it possible to target two ids in one rule?
07:52 |aaron like an OR
07:52 babilen Sure
07:52 babilen https://docs.saltstack.com/en/latest/topics/targeting/compound.html has an overview of the various ways of targeting
07:52 |aaron thank you
07:52 babilen You can target by regular expression (for example)
07:53 babilen Or just "foo or bar" - match: compound
07:53 |aaron so wait what about your /srv/salt/top.sls, do you have to re-specify your role mapping there too?
07:54 |aaron or how do you associate the right packages with the right machines
07:54 babilen You'd just match against pillars there rather than grains
07:54 |aaron oh how do you match against a pillar?
07:54 |aaron so many questions sorry haha
07:55 babilen - match: pillar or one of the pillar matchers I@ / J@ in compound (cf. also https://docs.saltstack.com/en/latest/topics/targeting/pillar.html)
07:56 babilen I'd recommend to read the entirety of https://docs.saltstack.com/en/latest/topics/targeting/index.html#node-group-targeting and the bug repot
07:56 onlyanegg joined #salt
07:56 |aaron sweet ok i think i got it :) thanks a lot man you saved me a ton of trial and error
07:56 |aaron i will thx
07:56 SpX joined #salt
07:57 |aaron oh so nodegroups could be used to assign your roles too?
07:57 babilen Sure
07:57 babilen The pain with nodegroups is that you have to restart your master whenever you change them
07:57 |aaron oh yeah forget that
07:58 |aaron yeah i dont think i need them anyway im ok with just assigning by name in the pillar
07:59 edrocks joined #salt
08:02 Rumbles joined #salt
08:02 impi joined #salt
08:04 jaybocc2 joined #salt
08:05 |aaron is it just me or is it weird that it uses the fqdn as the default minion id? i kind of want to change it to just the hostname, would that be bad?
08:11 iggy it doesn't always... it depends on various factors
08:11 felskrone joined #salt
08:13 |aaron i was going to use minion ids for targeting but my fqdn is long... but now that im thinking abrout it i guess i kind of have to use it because i may want to control minions that live in a different subdomain from this master someday
08:13 boogibugs joined #salt
08:13 iggy you can use globs... 'dns001*':
08:14 iggy or whatever
08:14 |aaron oh duh right
08:14 |aaron thanks lol
08:20 jaybocc2 joined #salt
08:21 |aaron can i add to an existing key in a pillar?
08:21 subsignal joined #salt
08:24 geomacy joined #salt
08:25 |aaron nvm i found the answer
08:27 s_kunk joined #salt
08:27 lovecraftian joined #salt
08:27 lovecraftian joined #salt
08:28 kaushal_ joined #salt
08:29 babilen What was the answer?
08:29 traph joined #salt
08:30 |aaron no haha
08:30 |aaron you can add new keys but it will jsut overwrite if it already exists
08:31 |aaron i was just reading that github issue you linked me.. im still struggling to picture what my pillars should look like. i get the matching by minion id, but how do you identify the role?
08:31 |aaron like i thought to do something like create /srv/pillar/bind.sls and in that put "roles: - dns"
08:31 |aaron and then assign that pillar to my dns minions
08:32 babilen |aaron: Add it where?
08:32 |aaron in a pillar
08:33 babilen Sure, you'd just add it to the list
08:33 |aaron oh really? i guess i misunderstood the docs. that makes it easy then thank you
08:33 babilen https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-merging-options
08:34 babilen https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-merge-lists in particular
08:34 |aaron babilen: oh cool so i just set pillar_merge_lists: True ?
08:35 babilen If you want lists to be merged that would be the correct setting, yes
08:36 |aaron babilen: do i need to set that like in my /etc/salt/master or can i do it at the pillar levle?
08:36 babilen That is set in the master config
08:37 |aaron hm i guess thats okay as long as its not going to screw up formulas i may want to use later, you think?
08:37 babilen The data you set and how you set it is entirely up to you. I wouldn't expect problems with that setting.
08:38 |aaron cool thanks again :)
08:38 babilen (formulas just care about the result, not the way you arrived there)
08:38 Mattch joined #salt
08:46 JPT Hello again :-) I'm having an issue with the saltstack formula: There is a gpg-key in the repository, but since the key_url for the apt-repository is hard coded in [1], i am unable to deploy salt to servers that are not allowed to connect directly to the internet. Is there a simple way to override the value without modifying the salt-formula itselt?
08:46 JPT [1] https://github.com/saltstack-formulas/salt-formula/blob/master/salt/map.jinja
08:47 Electron^- joined #salt
08:47 babilen JPT: In this case I'd simply make that value overridable and submit a PR. I would happily merge that right away
08:48 babilen In the more general case you can extend the state or deploy a local fork
08:48 JPT Okay, i'll take a look at how that goes. Thanks :)
08:54 hasues joined #salt
08:56 jaybocc2 joined #salt
08:56 armin joined #salt
08:59 |aaron ok so i have a pillar "roles: - dns" shouldnt `salt -I 'roles: dns' test.ping` ping any hosts with that pillar set?
09:00 babilen "roles:dns"
09:00 stephanlooney joined #salt
09:01 |aaron in the pillar? but i want it to be a list so i could add to it in another pillar file if needed
09:01 babilen No, in the target expression
09:01 N-Mi joined #salt
09:01 |aaron thats what i tried
09:01 babilen No, you had a space in there
09:01 |aaron oh derp i see the space was the problem
09:01 |aaron thx that worked :)
09:02 lero joined #salt
09:02 babilen Great :D
09:02 |aaron errr actually... wow thats weird... so it targets the right minion but the ping fails with that command. but if i do salt '*' test.ping it pings the same minion successfully?
09:02 fannet joined #salt
09:03 babilen Impossibru!
09:03 |aaron right?? i even tried it twice
09:05 |aaron http://pastie.org/10939483
09:10 yuhlw_ joined #salt
09:11 jaybocc2 joined #salt
09:11 |aaron oh shit i think i just deployed primary and secondary dns servers entirely with salt :) thanks again you guys rock
09:15 hoonetorg hi
09:16 hoonetorg proxy management for file.managed or archive.extracted is now in /etc/salt/minion (due to switch to tornado)
09:16 hoonetorg when i set proxy it is now global
09:17 hoonetorg we hv the problem that we must fetch some resources via local maven (without proxy) and some from internetds
09:17 hoonetorg is there a solution to set proxy per archive.extracted resouce and not global????
09:22 subsignal joined #salt
09:32 jaybocc2 joined #salt
09:47 jaybocc2 joined #salt
09:57 onlyanegg joined #salt
10:01 giany hi, is there a way to use orchestration and pass the names var as arg for salt-run?
10:04 lero joined #salt
10:16 catpig joined #salt
10:20 antpa joined #salt
10:21 lero joined #salt
10:23 jaybocc2 joined #salt
10:28 babilen giany: What have you tried, what did you expect to happen and what did happen?
10:39 jaybocc2 joined #salt
10:44 colegatron joined #salt
10:49 RealMurphy joined #salt
10:50 teryx510 joined #salt
10:50 keimlink joined #salt
10:51 RealMurphy Hi, brief question about salt's overhead and if it's possible to reduce it: At the moment we are running 2015.8 and when running highstate on target without any changes happening, I get a wallclock time of close to 2 minutes while summing up all durations as printed by state.apply I wonly get 13-15s. Thus, I guess somewhere is quite a bit of overhead hidden here.
10:53 JPT babilen: I found a way to override the key_url i mentioned earlier. While digging through the formula, i decided to create a pull request regarding the structure and readability of map.jinja. Please take a look at https://github.com/saltstack-formulas/salt-formula/pull/248 :)
10:53 saltstackbot [#248][OPEN] Adjust map.jinja, clean up os_family_map | After trying to find out how to override the key_url for my own purposes, i decided to try and refactor the `map.jinja` to be more easier to read....
10:55 JPT Also please check i did not break anything. I had some trouble using the Vagrantfile to test it because i got tons of backtraces regarding something related to tornado.
11:01 amcorreia joined #salt
11:02 edrocks joined #salt
11:06 bbbryson joined #salt
11:06 Pulp joined #salt
11:19 subsignal joined #salt
11:28 Jimlad joined #salt
11:28 stephanlooney joined #salt
11:30 stephanlooney joined #salt
11:31 fracklen joined #salt
11:32 RealMurphy joined #salt
11:35 stephanl_ joined #salt
11:40 Harmless joined #salt
11:41 giany babilen: something like this : salt-run -l debug state.orchestrate orch.ec2orch host , and i expect for "host" server to be deployed.
11:42 Harmless left #salt
11:43 Harmless_Sponge joined #salt
11:44 jaybocc2 joined #salt
11:47 keimlink joined #salt
11:54 bluenemo joined #salt
11:56 RandyT joined #salt
11:57 onlyanegg joined #salt
12:00 jaybocc2 joined #salt
12:07 stephanlooney joined #salt
12:09 stephanlooney joined #salt
12:12 antpa joined #salt
12:17 west575 joined #salt
12:21 cyborg-one joined #salt
12:21 RealMurphy joined #salt
12:21 edrocks joined #salt
12:23 edrocks joined #salt
12:24 akhter joined #salt
12:26 subsignal joined #salt
12:26 mikecmpbll joined #salt
12:28 subsignal joined #salt
12:29 teryx510 joined #salt
12:29 numkem joined #salt
12:31 jhauser joined #salt
12:32 subsigna_ joined #salt
12:35 akhter joined #salt
12:35 jaybocc2 joined #salt
12:35 keimlink joined #salt
12:40 akhter joined #salt
12:43 raspado joined #salt
12:44 stephanlooney joined #salt
12:47 phx how can i debug whether my pillar top.sls is 1) being called 2) if there's an exception what's that exactly 3) what does it return?
12:47 Ivv joined #salt
12:47 phx salt-run pillar.show_top is returning nothing
12:48 _JZ_ joined #salt
12:49 dendazen joined #salt
12:50 phx also whenever i'm running refresh_pillar or pillar.show_top i'm getting the following:  Exception occurred while handling stream: [Errno 0] Success
12:51 jaybocc2 joined #salt
12:53 ssplatt joined #salt
12:59 ninjada joined #salt
12:59 akhter joined #salt
13:01 gh34 joined #salt
13:02 ninjada joined #salt
13:05 AndreasLutro phx: I usually just end up increasing the master log level and tailing the master log
13:06 phx i've just done that
13:06 phx increasing it in /etc/salt/master didn't have any effect, so i started salt-master with -l debug, there's the same thing
13:07 phx [DEBUG   ] Gathering reactors for tag salt/run/20160824080803967378/new
13:07 phx [ERROR   ] Exception occurred while handling stream: [Errno 0] Success
13:07 phx that's all I got from the log
13:07 AndreasLutro :|
13:07 phx totally useless for me
13:07 AndreasLutro well all I can tell is that it's probably coming from salt/transport/ipc.py
13:07 AndreasLutro I don't know when/how that's used
13:08 mpanetta joined #salt
13:09 phx ipc? always
13:09 nicksloan joined #salt
13:09 AndreasLutro I mean in the context of salt
13:10 AndreasLutro this is the first time I even see the ipc.py file and I dive into salt internals quite a lot
13:10 phx salt works with IPC, the default method is zeroMQ, and IPC is used between the minions and the masters
13:11 phx zeroMQ is the default IPC method it's using. other one is REAT. with salt, everything is IPC, kinda
13:11 AndreasLutro apparently it's used for the event bus - so maybe there's something going wrong with the event bus process
13:12 tapoxi joined #salt
13:12 amcorreia joined #salt
13:12 mapu joined #salt
13:13 west575_ joined #salt
13:16 stephanlooney joined #salt
13:16 akhter joined #salt
13:18 west575 joined #salt
13:19 Tyrm joined #salt
13:19 Brew joined #salt
13:21 racooper joined #salt
13:21 edrocks joined #salt
13:23 west575_ joined #salt
13:24 ALLmightySPIFF joined #salt
13:24 jaybocc2 joined #salt
13:25 mdpolaris joined #salt
13:28 mdpolaris Does anyone do pillar overides in a reactor? When i pass some pillar values into my reactor from kwarg it overides the entire pillar for that top key. For example:
13:28 mdpolaris application:
13:28 mdpolaris username: test
13:28 mdpolaris pass: secure
13:28 mdpolaris version: 1.0.1
13:29 Brew joined #salt
13:29 mdpolaris when I pass this pillar as a kwarg, the version is lost as the pillar does not get merged
13:29 mdpolaris application:
13:29 mdpolaris username: overide user
13:29 mdpolaris pass: overide pass
13:33 akhter joined #salt
13:35 MadHatter42 joined #salt
13:35 andrew_shay joined #salt
13:36 mohae_ joined #salt
13:36 andrew_shay Hey all. Just started using salt. I'm on the command line and wondering how I can access the data from pythonversion grain. I'm trying `salt 'mach*' grains.item pythonversion` which gives me all the data. But how do I access the major, minor etc?
13:36 andrew_shay I guess salt 'mach*' grains.item pythonversion[0] but that didn't work
13:38 impi joined #salt
13:40 drawsmcgraw andrew_shay: Huhn, that's interesting. Are you using this as part of one of your automated processes?
13:41 Tanta joined #salt
13:41 drawsmcgraw I know you can do something like salt['grains.get']('pythonversion')[0] when writing states and templating it.
13:41 misconfig joined #salt
13:42 andrew_shay Ya. I actually want to use this information in a jinja file, and was just going to test out what would work on the command line.
13:43 andrew_shay You example should be sufficient. Would grains['pythonversion'][0] work?
13:44 west575 joined #salt
13:46 VnrycepuxO joined #salt
13:47 scoates joined #salt
13:49 ferbla joined #salt
13:49 stephanlooney joined #salt
13:53 west575_ joined #salt
13:53 anotherZero joined #salt
13:53 anotherZero joined #salt
13:57 DEger joined #salt
13:57 XenophonF i realize that i ask this once a month or so, but has anyone else worked with templated XML files, and if so, what approaches do you take?
13:58 AndreasLutro just a little bit
13:58 AndreasLutro very small files. I just use xml with jinja
13:58 onlyanegg joined #salt
13:58 jerredbell joined #salt
13:58 west575 joined #salt
13:59 kbaikov joined #salt
14:02 XenophonF so just subbing in variables?
14:02 XenophonF ultimately, i probably need to generate xml configs from pillar data
14:02 XenophonF so i'm looking at writing a serializer
14:02 XenophonF which is quite a lot of work
14:03 XenophonF esp. since i'm trying to be careful about emitting valid xml, with all the right namespaces and the like
14:05 mpanetta joined #salt
14:05 AndreasLutro subbing in variables, some if statements, in one place there's a loop for emitting elements with dynamic names
14:06 mpanetta joined #salt
14:08 XenophonF thanks AndreasLutro
14:12 akhter joined #salt
14:14 orionx joined #salt
14:16 orionx_ joined #salt
14:17 stephanlooney joined #salt
14:17 mapu joined #salt
14:20 kbaikov joined #salt
14:21 heaje joined #salt
14:26 edrocks joined #salt
14:27 akhter joined #salt
14:35 akhter joined #salt
14:39 akhter joined #salt
14:39 DEger joined #salt
14:41 impi joined #salt
14:42 hasues joined #salt
14:42 akhter_1 joined #salt
14:43 ninjada joined #salt
14:47 hasues left #salt
14:48 keimlink joined #salt
14:48 stephanlooney joined #salt
14:52 _JZ_ joined #salt
14:53 bltmiller joined #salt
14:54 krymzon joined #salt
14:59 akhter joined #salt
15:02 ronp_usa1 joined #salt
15:02 ronp_usa1 hello Is there a way to have a salt minion trigger an action based on a specified threshold (e.g. % memory used, software installed, etc.)?
15:07 akhter joined #salt
15:09 armonge joined #salt
15:10 raspado joined #salt
15:10 raspado joined #salt
15:13 DEger_ joined #salt
15:13 west575_ joined #salt
15:14 babilen ronp_usa1: Sure, just raise suitable events on the salt event bus and write reactors that react to it. You can do that from Python, via salt-call or by using beacons.
15:14 babilen ronp_usa1: Where do you get the "memory used" metrics from?
15:14 babilen (e.g.)
15:17 stephanlooney joined #salt
15:18 jenastar joined #salt
15:18 jenastar left #salt
15:26 lero joined #salt
15:26 tapoxi joined #salt
15:29 akhter joined #salt
15:29 west575 joined #salt
15:34 west575_ joined #salt
15:35 sp0097 joined #salt
15:35 Brijesh1 joined #salt
15:39 west575 joined #salt
15:40 Llmiseyhaa joined #salt
15:44 onlyanegg joined #salt
15:49 keimlink joined #salt
15:49 amcorreia joined #salt
15:50 stephanlooney joined #salt
15:50 barajasfab joined #salt
15:51 spuder joined #salt
15:53 kshlm joined #salt
15:57 akhter joined #salt
15:58 Ish_ joined #salt
15:58 Ish_ hi
15:59 Ish_ I have a query/problem I'm hoping someone can help with
16:03 Ish_ ll
16:04 west575_ joined #salt
16:06 bltmiller joined #salt
16:07 akhter joined #salt
16:10 fredvd joined #salt
16:14 akhter joined #salt
16:15 pipps joined #salt
16:16 edrocks joined #salt
16:18 mohae joined #salt
16:18 tiwula joined #salt
16:18 cyborg-one joined #salt
16:20 ssplatt joined #salt
16:20 UtahDave Ish_: Go ahead and ask your question. No need to ask permission.
16:20 Ish_ I'm trying to use salt to execute an expect script on a minion machine and it isn't working.
16:21 Ish_ The behaviour is the same as if I try to execute it remotely via ssh i.e.
16:21 Ish_ ssh user@host '/path/to/expect.exp'
16:21 Ish_ However, if I add the pseudo-tty option on the ssh command so it becomes
16:21 Ish_ ssh -t user@host '/path/to/expect.exp'
16:21 Ish_ It works fine. Is there any way I can create this same condition with salt cmd.run
16:21 brotatochip joined #salt
16:23 SpX joined #salt
16:24 sp0097 joined #salt
16:25 woodtablet joined #salt
16:35 UtahDave can you pastebin what you're trying to do?
16:43 pipps joined #salt
16:43 Edgan joined #salt
16:43 iggy mdpolaris: you probably have to mess with the pillar merging config variables in the master/minion config files
16:45 patrek joined #salt
16:46 mdpolaris I tried a couple different ones and didn’t seem to make any difference…well, i changed the master config, but i didnt try the minion config. i can give that a shot
16:49 Ish_ http://pastebin.com/0xDVtsWD
16:50 XenophonF bah
16:50 XenophonF xml sucks
16:51 pfc joined #salt
16:54 akhter joined #salt
16:55 stomith joined #salt
16:56 onlyanegg joined #salt
16:58 sp0097 joined #salt
17:02 amy_ joined #salt
17:03 giany hi, is there a way to use orchestration and pass the names var as arg for salt-run? Currently I have an template and based on that template I just create a different .sls for each server.
17:03 pppingme joined #salt
17:09 akhter joined #salt
17:12 wendall911 joined #salt
17:15 jaybocc2 joined #salt
17:15 stephanlooney joined #salt
17:20 mapu joined #salt
17:20 impi joined #salt
17:21 Tyrm_ joined #salt
17:22 teryx510 joined #salt
17:29 stephanlooney joined #salt
17:30 SpX joined #salt
17:31 win_salt giany you can insert pillar data when you call salt-run, like salt-run state.orchestrate orch pillar="{'name':'stuff'}", and in the orchestration - name: {{ pillar['name'] }}
17:31 Tyrm joined #salt
17:32 CTaylor joined #salt
17:32 amy_ joined #salt
17:32 Tyrm joined #salt
17:35 west575 joined #salt
17:35 autofsckk joined #salt
17:37 ajw0100 joined #salt
17:39 dyasny joined #salt
17:47 akhter joined #salt
17:48 tuxx joined #salt
17:51 Tyrm joined #salt
17:55 fer_bla joined #salt
17:58 esharpmajor joined #salt
18:03 Tyrm joined #salt
18:06 cliluw joined #salt
18:06 ivanjaros joined #salt
18:06 akhter joined #salt
18:10 ALLmightySPIFF joined #salt
18:13 fracklen joined #salt
18:17 akhter joined #salt
18:18 jerredbell joined #salt
18:19 stephanl_ joined #salt
18:23 edrocks joined #salt
18:25 akhter joined #salt
18:27 Tyrm joined #salt
18:27 ronp_usa joined #salt
18:28 ronp_usa bablien: thanks for your reply. I was out at a meeting. That metric was passed onto me :)
18:29 intr1nsic joined #salt
18:30 raspado joined #salt
18:30 raspado joined #salt
18:33 edrocks joined #salt
18:34 akhter joined #salt
18:35 GreatSnoopy joined #salt
18:37 \ask joined #salt
18:42 debian112 joined #salt
18:46 Tyrm joined #salt
18:47 steveoliver joined #salt
18:48 west575_ joined #salt
18:48 stephanlooney joined #salt
18:54 sagerdearia joined #salt
18:56 Tyrm_ joined #salt
18:57 akhter joined #salt
18:59 akhter_1 joined #salt
18:59 MTecknology HALP!!!
18:59 Tyrm__ joined #salt
19:00 MTecknology not really the place for help, but... I'm on a weird system, derived from centos, and salt-minion is doing some weird as crap stuff. It actually appears to be improperly escaping a pipe somewhere.
19:01 MTecknology Anyway... derived from centos 6. I'm trying to get python-pudb and don't know how to make it available
19:02 akhter joined #salt
19:02 bbbryson joined #salt
19:04 Tyrm joined #salt
19:04 khaije1 is it normal and expected for keys to need to be accepted on the syndic, rather than the master?
19:04 ssplatt yes
19:05 ssplatt the syndic is that minions master
19:05 Tyrm joined #salt
19:05 khaije1 Oh hey ssplatt, I thought it was more like a proxy, but I guess that is only for commands, not all actions?
19:05 ssplatt the master controls the syndics
19:06 Tyrm joined #salt
19:06 ssplatt but the minion only knows about the syndic(s) that it is connected to
19:07 khaije1 I see how that makes sense, just wasnt expecting it!
19:07 nicksloan joined #salt
19:09 khaije1 I've been using salt-key -L to give me an inventory, guess I'll need to switch to salt-run manage.joined
19:09 mohae_ joined #salt
19:10 khaije1 is there a more clever way to manage syndic keys than the cmd.run 'salt-key -Ay' I just did?
19:10 akhter joined #salt
19:10 Fiber^ joined #salt
19:10 mohae__ joined #salt
19:12 ssplatt khaije1: https://docs.saltstack.com/en/latest/ref/wheel/all/salt.wheel.key.html#module-salt.wheel.key  is one option
19:13 impi joined #salt
19:13 akhter joined #salt
19:13 khaije1 cool, yeah that'll do
19:13 ssplatt it’s useful with runner/reactor scripts if you don’t mind giving full @wheel permissions to things https://docs.saltstack.com/en/latest/topics/reactor/#a-complete-example
19:14 khaije1 So how do I get a listing of all minions, (including the syndic-joined minions)?
19:14 ssplatt that i have not found an answer too
19:14 ajw0100 joined #salt
19:15 cyborg-one joined #salt
19:15 * khaije1 checks to see if test.ping from the master will return from syndic-joined-minions
19:15 khaije1 Looks like test.ping works ...
19:16 khaije1 but salt-run manage.joined does not
19:16 ssplatt yeah, you can definitely run salt commands off the master to hit all and see return from all
19:16 khaije1 seems that the only obvious way since salt-run is master specific as I understand it...
19:17 ssplatt for salt-cloud, i made some modifications to the reactors in that example above to have them auto-join the syndic instead of the master
19:17 ssplatt and then auto-highstate when joined
19:17 khaije1 Cool!
19:18 ssplatt the thing is, there’s no way to send a message on the bus from a master to the syndic directly
19:18 khaije1 The idea that I could have syndics spread all over and only bring my master online when I want to command them is kind interesting.
19:18 Tyrm joined #salt
19:18 ssplatt so when the salt/cloud/*/created message comes in, you have to event.fire down to EVERY minion and have them send a response back to the syndic to get them to look for a pending minion
19:18 stephanlooney joined #salt
19:19 ALLmightySPIFF joined #salt
19:19 west575 joined #salt
19:20 ssplatt that could be fixed by having the master add the minion name to an autoaccept file on the syndic when it starts the process
19:20 ssplatt but we haven’t added that orchestration in yet. and i like the idea of having a master <-> syndic bus
19:21 khaije1 ssplatt: or somehow use pre-generated keys
19:21 Tyrm joined #salt
19:21 ssplatt the pregenerated keys require @wheel access, and we don’t wnat to open the api up that much
19:22 ssplatt but yeah.
19:22 akhter joined #salt
19:22 ssplatt there’s a bug open to allow locking down @wheel things, and a bug open to allow master -> syndic messages
19:23 tapoxi joined #salt
19:29 akhter joined #salt
19:30 Rumbles joined #salt
19:31 khaije1 ssplatt: wheel can already be locked down according to the publisher_acl system, no?
19:32 khaije1 Would master <-> syndic communication allow anything that isn't already possible by acting on the syndic as a minion?
19:32 codehotter Is there a way to make a remote procedure call of sorts to a master while executing a state file or module on the minion?
19:32 patrek_ joined #salt
19:34 codehotter I know I can send an event, but I need the result of the function call to continue executing my state
19:34 codehotter can you do that with events?
19:34 DsAAzvTVQt joined #salt
19:42 zmalone joined #salt
19:42 JoeJulian Is the oldest supported release branch 2015.8 currently?
19:43 khaije1 ssplatt: I initially misunderstood the role of a syndic but I may have it now.
19:43 mohae joined #salt
19:43 felskrone joined #salt
19:43 VaUsfOUbRl joined #salt
19:44 ssplatt khaije1: yeah it’s kind of a master in itself, but also a proxy
19:44 khaije1 So I can command minions from the upstream master or from the syndic-in-the-role-of-master with equal effectiveness.
19:44 ssplatt right
19:44 ssplatt but the syndic can only talk to the minions connected to it
19:45 edrocks joined #salt
19:45 ssplatt so you can run salt \* state.highstate on a syndic directly, and it will send that to all of it’s minions
19:45 khaije1 It seems like the decisions revolve around if/how to distribute state and pillar data, and how to manage the return info (when commanding from the syndic).
19:45 ssplatt or if you do it on the master of masters, it will hit all minions
19:46 ssplatt JoeJulian: according to the topic, i think 2015.5.11 is still supported in some regard, i’d suspect similar to LTS
19:46 JoeJulian Ah, missed that up there. Thanks.
19:47 khaije1 This could be a cool way to live pivot an existing deploy, to give syndics access only to certain parts of the state/pillar data as appropriate.
19:48 khaije1 if I wanted to add a new deploy environment like LAB, I could config the syndic to only have access to that branch (if using gitfs states/pillars)
19:48 ssplatt sure.  or you could implement environments
19:49 khaije1 it's a really nice to have actually!
19:49 akhter joined #salt
19:49 khaije1 so to setup a remote syndic in a relatively untrusted network, I could be very deliberate about the state/pillar data it can access, much less distribute to downstream minions.
19:50 xcGlQHdZGT joined #salt
19:50 khaije1 When a command is run from a syndic to a connected minions, is this action visible on the most-upstream-master?
19:52 ssplatt i think the return data will only go to the syndic
19:52 ssplatt iirc
19:52 khaije1 Thats what I'd expect, based on the idea the syndic has it's own cache et al
19:52 ssplatt i’m not sure if you could query the job info from the master
19:52 ssplatt like salt-run job.blah
19:53 khaije1 probably so, even if it involves some russian doll nesting
19:55 mapu_ joined #salt
19:56 khaije1 Cool, I have a much better understanding now. Thanks ssplatt!
19:57 spuder_ joined #salt
20:00 bltmiller joined #salt
20:00 nethershaw joined #salt
20:01 nicksloan joined #salt
20:02 jhauser joined #salt
20:02 sp0097 joined #salt
20:07 nonades joined #salt
20:09 pipps joined #salt
20:09 turnagwf joined #salt
20:10 jhauser joined #salt
20:21 akhter joined #salt
20:25 khaije1 fwiw, looks like 'salt-run manage.up' will list syndic-connected minions in its listing
20:26 akhter joined #salt
20:28 stomith hey, I've got server{1} - server{n}, and application{1}-{n} where applications are 'mostly' the same, but with a few different variables. is there a way to make that happen without a sls file for each application?
20:30 akhter joined #salt
20:30 ssplatt am i the only one, or does salt-bootstrap not support fedora24?
20:31 ssplatt as in, it doesn’t add in the new repos and install the latest version. it only installs from the old, default repos and installs a very old version.
20:32 viq stomith: jinja templating and if statements
20:32 viq And/or pillars
20:32 ssplatt i kind of want to hunt it down and fix it, but i’m only doing some very small testing on fed24 and don’t really have a need to spend time on it
20:33 stomith viq: thanks.
20:35 MTecknology Can I run salt with --no-forking-forks?
20:36 velikan joined #salt
20:36 velikan hi all! is there php7 in salt? don’t understand how to install it…
20:36 Sketch salt --spork
20:37 keimlink joined #salt
20:37 MTecknology I think I'm seeing an SMP issue but can't figure out because .... *AAAAAAAGH!!!!*
20:38 ssplatt velikan: you’d have to make a formula or add to an existing.  or ‘salt
20:38 MTecknology I can't really follow any further in pudb because salt-minion forks itself and really get's the waters muddy
20:38 ssplatt oops.   salt \* pkg.install php7
20:38 velikan ssplatt: I’m trying to write simple state with php7-fpm
20:39 velikan ssplatt: thank you
20:39 ssplatt https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html should help you
20:39 pipps joined #salt
20:40 misconfig joined #salt
20:40 * MTecknology wonders how many times the word "hostname" shows up in salt source...
20:41 stephanlooney joined #salt
20:42 velikan com. pli. cat. ed.
20:45 akhter joined #salt
20:47 MTecknology BAM! I think I might have maybe found it..
20:48 velikan it’s so strange… why I just can not write require.pkg: php.fpm
20:48 velikan in state
20:48 stomith okay, so if I want to reference a variable with an appX or appY, do I set it in a pillar variable, or do I make a custom grain for it?
20:49 MTecknology velikan: - require: \n\  - pkg: php-fpm
20:49 MTecknology velikan: look up state requisites
20:49 brotatochip joined #salt
20:51 velikan MTecknology: when I’m trying to apply.state it just says “The named service php-fpm is not available”
20:52 MTecknology I don't know what apply.state is..
20:52 MTecknology would have to look it up
20:52 MTecknology velikan: do you have a service on your system named php-fpm?
20:52 MTecknology What does "service php-fpm status" give you?
20:53 velikan MTecknology: no… I’m trying to install it on my minion via salt
20:53 velikan like nginx in quick start
20:53 ajw0100 joined #salt
20:54 MTecknology velikan: put your current states on gist or dpaste
20:58 nicksloan joined #salt
20:59 akhter joined #salt
21:01 ALLmightySPIFF joined #salt
21:03 quasiben joined #salt
21:03 stomith joined #salt
21:09 rocket joined #salt
21:11 velikan MTecknology: please, take a look
21:11 velikan https://gist.github.com/anonymous/da0f3b727ec430ae79b25e94c79eedb7
21:12 velikan it says “The named service php-fpm is not available"
21:12 MTecknology UtahDave: Is there any possible chance you have some familiarity with cmd.shell vs. cmd.run? I'm looking for some git examples of modules that were updated so that I can try to find an instance of the old broken version somewhere in salt... somewhere
21:12 west575_ joined #salt
21:13 MTecknology velikan: lemme ask another way... If you do not have the php-fpm service available, then how do you expect salt to make sure it's running?
21:13 UtahDave they're both basically the same, except that cmd.shell will always shell out and cmd.run will use python_shell=True for security purposes
21:14 UtahDave velikan: what service do you want to be running?   nginx or apache or some other web server?
21:14 velikan MTecknology: but how it does install nginx?
21:14 velikan UtahDave: I need to install php-fpm
21:14 MTecknology velikan: what you shared does nothing with nginx
21:15 velikan MTecknology: yes, I’m just trying to install fpm like that did with nginx
21:15 velikan *like I did it with nginx
21:15 UtahDave velikan: then you don't need the service.running because php-fpm isn't a service
21:15 jhauser joined #salt
21:15 MTecknology UtahDave: it actually is..
21:16 velikan it definitely is
21:16 * MTecknology types too slowly :(
21:16 UtahDave so you'd  run   systemctl start php-fpm   ?
21:16 UtahDave on the cli to start up the php-fpm  service?
21:16 MTecknology it's probably a different name... probably php5-fpm
21:17 * MTecknology is guessing ubuntu
21:17 UtahDave so whatever the name is you'd put it like this:    - name:  < service name >
21:18 MTecknology velikan: I'd suggest 1) stop using php-fpm. 2) If you're using nginx, then just learn to use uwsgi for everything because it makes future apps w/ any language easy 3) look at doing it by hand first (https://michael.lustfield.net/nginx/dummies-guide-to-setting-up-nginx) 4) then bring in salt when you know what needs to happen to the system
21:18 velikan guys, please take a look at this gist: https://gist.github.com/velikanov/5b4b918124df9a6123004a01e2f9507c
21:19 UtahDave velikan: what is the name of the php-fpm service?  like what you'd use on the command line to start it up?
21:19 velikan this sls installs nginx on web1 server and does not install php-fpm on another server… and I don’t understand why
21:19 UtahDave If it's just php-fpm  then you need to remove the   - name line
21:19 MTecknology UtahDave: I'm picturing   cmd.run('hostname | ') somewhere in the source. If it were run w/ cmd.shell, it'd be fine. However, the simple act of starting salt-minion causes the system to be renamed to a pipe... but that change isn't written to disk
21:19 velikan UtahDave: em… I don’t know because it’s not installed
21:19 UtahDave velikan: what OS?
21:20 velikan debian 8
21:20 MTecknology if it's not installed, then you don't have a service to run
21:20 UtahDave ok, just remove the  -name oline
21:20 velikan MTecknology: definitely, but I want salt to install this service for me and run it after installation
21:20 MTecknology velikan: my point was... walk before you run. Figure out what you need to do with nginx... THEN saltify it
21:20 UtahDave velikan: have you tried it after removing the   -  name   line?   You can't have a bare  - name line like that
21:21 velikan MTecknology: I know what I want, I just want to make it with salt
21:22 ALLmightySPIFF joined #salt
21:22 MTecknology UtahDave: I used pudb to step through salt-minion loading. pudb is great up until os.fork(). Once that line runs, the new minion kicks off and changes the hostname. I get the feeling that there's a module loading up and the module probably just didn't get updated with everything else. That's why I'm trying to find the git history where the change took place so I can more easily look for the
21:22 MTecknology problem chunk
21:22 UtahDave MTecknology: can you pastebin what you're doing?
21:23 UtahDave velikan: like this:  https://gist.github.com/UtahDave/c79a6bc8e8c09573532f4fe7f1582fd8
21:24 velikan name…
21:25 UtahDave velikan: do you have a package or repo for php-fpm?   I'm not seeing it in the default ubuntu repos.
21:25 MTecknology UtahDave: "yum install salt-minion"  is fine. Once I run "service salt-minion start" the hostname on the running system becomes a pipe { 'hostname': '|' }. No states run, no execution modules are called... that's it. The same thing happens if I run salt-call state.sls <anything> it'll also change the hostname
21:25 MTecknology not really any log file that I can produce
21:26 UtahDave MTecknology: that is REALLY weird.  what version of Salt?
21:26 fusionx86 joined #salt
21:26 MTecknology 2016.3.2
21:27 UtahDave velikan: i'm seeing php5-fpm, actually
21:27 MTecknology heheh...
21:27 MTecknology I feel like I said "probably php5-fpm" :P
21:27 velikan UtahDave: where do you see it? can you link?
21:27 MTecknology velikan: ls /etc/init.d/
21:27 velikan emm
21:27 velikan MTecknology: it is if it was installed
21:28 UtahDave velikan: http://pastebin.com/VbiwePBd
21:28 velikan hm
21:29 velikan UtahDave: I need php7, so it just not present in apt-cache
21:29 velikan so…
21:29 velikan I don’t know what to do then
21:30 MTecknology UtahDave: here's the fun part! It doesn't write to the system. If I reboot after "chkconfig salt-mninion off", the correct hostname comes back. "ckconf sm on" ... starts up with the wrong name, a pipe
21:30 velikan I just thought that salt will make me not think about debian packages or so… but… it won't)
21:30 MTecknology I don't know of any other command that does that beyond "hostname"
21:31 UtahDave velikan: Salt has to know how to get the software you want.  So generally you'll use your package manager. If you need to download sources and compile and install them, you can have salt do that, but you'll have to tell Salt how to do that
21:32 UtahDave MTecknology: That is one of the weirdest things I've heard of Salt doing.  Is this a fresh VM?  Was an older version of Salt installed on it previously?  Was it upgraded?
21:32 velikan all right
21:32 zmalone left #salt
21:32 UtahDave velikan: How would you expect Salt to know about php-fpm to install it?
21:33 velikan there is https://github.com/saltstack-formulas/php-formula which contains I believe php-fpm 7 (what I need), but when I’m trying to include it in sls - it says Specified SLS php.fpm in saltenv base is not available on the salt master or through a configured fileserver
21:33 MTecknology UtahDave: yup, fresh VM deployed to do nothing but test. That's why I was wondering about where in the git history that happened. Then I have a bit more clue what I'm looking for.
21:33 velikan UtahDave: I don’t know… like salt knows about nginx for example?
21:33 MTecknology salt doesn't know about nginx
21:34 MTecknology velikan: nginx: pkg.installed    You tell salt to tell the system's package manager to make sure salt is installed
21:34 ponyofdeath joined #salt
21:34 UtahDave velikan: Aahhhh.  OK.
21:34 MTecknology you still have to do the work; salt isn't magic
21:34 MTecknology but... you only do the work once; you can easily re-create things once you get used to it
21:34 UtahDave velikan: look in the pillar.example file in the php-formula. You can see there that they are adding a  ppa  that has the php-fpm in it.
21:35 velikan MTecknology: so salt just installed nginx for me. I did nothing to install it, just salt apply.state and salt installed nginx on my server
21:35 MTecknology velikan: but you told salt that you want nginx on the box
21:35 UtahDave velikan: That's because nginx is in the default debian package repository.
21:35 UtahDave php-fpm is not
21:35 velikan oh
21:36 UtahDave that php-formula adds a repo for you that has php-fpm in it.  That's why that would work
21:36 UtahDave MTecknology: are there any custom modules in your /srv/salt/_modules directory?
21:36 UtahDave on your salt master?
21:37 velikan but how to use these formulas? I do everything as it said in docs: 1. ADDING A FORMULA AS A GITFS REMOTE, 2. INCLUDING A FORMULA IN AN EXISTING STATE TREE and it says Specified SLS is not available
21:39 UtahDave clone that repo and put it in   /srv/salt/php-formula   on your salt master
21:39 UtahDave sorry, that's incorrect
21:40 UtahDave take the php directory that's in the php-formula and put that here:   /srv/salt/php
21:40 velikan oh :’’’’(
21:40 velikan I thought it will work with git repository so I won’t need to copy anything
21:40 UtahDave Then take the pillar.example and use that to create a pillar file that matches your minion
21:41 anotherZero joined #salt
21:41 fracklen joined #salt
21:41 UtahDave you can use gitfs so you don't have to clone it yourself, but I'd recommend forking it to your own github account first.
21:41 MTecknology velikan: you can... but it's less easy than what UtahDave is telling you
21:42 velikan MTecknology: I understand, and I have my own private repo in gitfs and it’s working, but this public repo isn’t working or what - I don’t understand
21:42 velikan allright
21:43 velikan maybe salt is not for me and I just need to install all this stuff by hands as usual)
21:44 MTecknology UtahDave: I'm trying to drill down to the culprit using salt-call since I noticed it's not just salt-minion. It looks like it has something to do with a grain. There are custom grains; not sure which grain is causing it, yet.
21:44 UtahDave what happens when you remove all custom grains?
21:44 MTecknology I'll try as soon as I'm done w/ this pudb session
21:45 MTecknology oh....
21:45 MTecknology err... hmm
21:46 MTecknology NICE!
21:46 patarr joined #salt
21:47 MTecknology core grains load/execute before any other grains... seems obvious, but seeing it in source ... :D
21:47 orionx_ joined #salt
21:48 velikan my holy God, I’m an idiot. I just didn’t restart salt-master after config changes :(
21:48 velikan thank you MTecknology and UtahDave
21:48 velikan you rock guys!
21:49 amcorreia joined #salt
21:50 MTecknology ah, I thought core meant not custom, but it just means not core
21:50 MTecknology err... whatever combination of words similar to that which makes sense is what I meant
21:51 * MTecknology screams loudly
21:51 fusionx86 Hello. How would I go about using GitFS for reactor sls files? Is it possible? Not seeing any docs for doing that.
21:51 MTecknology fusionx86: YES!
21:51 * MTecknology *JUST* did that last night
21:52 fusionx86 :)
21:52 MTecknology fusionx86: SO! Here's what you do!
21:52 MTecknology find a pencil... don't eat it
21:52 pipps joined #salt
21:52 fusionx86 ok...
21:52 MTecknology then get rid of it because we're IT guys and we use keyboards
21:52 MTecknology :)
21:52 Antiarc joined #salt
21:52 fusionx86 I'm with you there...
21:52 MTecknology you keep states in git?
21:52 fusionx86 yes
21:53 fusionx86 and pillars
21:53 MTecknology at the root of your states dir, make a reactor dir; put your sls files in there
21:53 MTecknology then they're in git! :D
21:54 fusionx86 Ok, that makes sense, but how do you reference them in the master file?
21:54 MTecknology oh...
21:54 MTecknology You still have to write a master config to disk on the master; I like to use /etc/salt/master.d/reactor.conf; then instead of - /disk/path/to/file.sls, you use - salt://reactor/file.sls
21:55 fusionx86 oh interesting
21:55 fusionx86 I will try that. Thanks!
21:55 MTecknology it took me a few hours to figure out, but it actually is documented how, just kinda subtle when we were looking for a great big heading
21:55 rocket joined #salt
21:56 MTecknology at least I was
21:56 fusionx86 ahh yeah. I just started looking around for it today and didn't really see anything jump out.
21:56 fusionx86 Like it does for states and pillars
21:57 MTecknology ya, I expected similar
21:57 pipps joined #salt
21:57 MTecknology to be honest, though... this makes way more sense
21:59 sp0097 joined #salt
22:01 velikan hm… so how can I point to specific version using formula?
22:01 MTecknology velikan: look at pillar stuff
22:04 velikan MTecknology: do you mean pillar.example file?
22:04 MTecknology yup
22:04 MTecknology read up on what pillar is
22:05 pipps joined #salt
22:07 velikan MTecknology:
22:07 velikan sorry
22:07 velikan mistyped
22:07 snarfy^ joined #salt
22:08 velikan no any examples on internet… so frustrating
22:08 velikan seems like nobody installed php7-fpm with salt
22:08 * MTecknology grumbles
22:09 MTecknology velikan: I told you what you should do but you don't wanna do it. :(
22:10 velikan :(
22:10 velikan I want a simple solution
22:10 lionel joined #salt
22:12 velikan it’s obvious that I can somehow install 7 version with this formula, but where do I need to specify it?
22:12 cliluw joined #salt
22:16 * MTecknology hugs UtahDave
22:16 MTecknology UtahDave: got it figured out... was a custom grain. Thanks!!!
22:17 UtahDave ah, good!
22:17 guerby joined #salt
22:17 UtahDave velikan: can you pastebin the steps you would use to install php7-fpm?  I'll see if I can help you saltify it.
22:18 APLU joined #salt
22:18 kus joined #salt
22:19 velikan UtahDave: sure, this is the latest version of my problem: https://gist.github.com/velikanov/5b4b918124df9a6123004a01e2f9507c
22:19 velikan I tried to use almost everything in pkg, but it always say that The following requisites were not found
22:19 stephanlooney joined #salt
22:20 velikan also it says The named service php5-fpm is not available
22:20 velikan I don’t know why
22:20 velikan I looked here: https://github.com/saltstack-formulas/php-formula/blob/master/php/map.jinja
22:20 MTecknology velikan: he wants your actual commands ... what would you do without salt?
22:20 velikan it contains some information about php7.0-fpm
22:22 velikan okay, I just removed all about ‘service.running’
22:23 UtahDave ok, velikan.  Hold on a second.
22:23 JPT joined #salt
22:24 UtahDave When you use  pkg.installed  on Salt, Salt uses your OS's package manager to install the software.   So if you want to install   'foo'  then you have to have a package repo configured that provides the 'foo' software package
22:25 UtahDave velikan: so if    apt-get install foo -y        doesn't work on the command line, then   pkg.installed  is not going to work in Salt.
22:25 mohae_ joined #salt
22:26 bltmiller joined #salt
22:26 velikan UtahDave: ok, but this formula contains something about dotdeb for php 7
22:26 cliluw joined #salt
22:27 Salander27 joined #salt
22:27 velikan in init.sls
22:27 velikan {% if (grains['oscodename']=="Jessie" and salt['pillar.get']('php:version')=="7.0") or salt['pillar.get']('php:use_dotdeb') %}
22:28 snarfy^ is there a rule of thumb about minion-master version relationships? should they always be a perfect match, match major version #s etc?
22:29 UtahDave velikan: Yeah, I see that, but the sls file it's referring to isn't there. I'm not sure why
22:29 velikan UtahDave: does it means that it impossible to install 7 version
22:30 velikan ?
22:30 UtahDave snarfy^: We try to make them all compatible, but we recommend keeping the salt master the same version or newer compared to the minions
22:30 UtahDave velikan: that php-formula doesn't seem to be able to do it right now out of the box.
22:32 velikan very strange… but why they included all this stuff about php 7?
22:33 stomith ugh. how do you apply a single sls file?
22:33 UtahDave I don't know. I'm guessing that someone in the community was starting to add php7 support or something.
22:33 UtahDave stomith: salt <minion> state.sls myfile
22:33 stomith thanks
22:33 Eugene snarfy^ - upgrade the client first; it's more likely to understand the new server version than the other way 'round
22:34 velikan UtahDave: you said “but the sls file it's referring to isn't there”, do you mean php.dotdeb?
22:34 UtahDave velikan: correct
22:35 UtahDave Eugene and snarfy^:  No, you want to upgrade the Salt Master first.
22:35 velikan hm… allright. I guess I’m starting to understand
22:35 Eugene Oh?
22:35 snarfy^ yeah heh. master first for sure
22:35 Eugene I'm just cargo-culting a recommendation from in here from years ago
22:35 velikan UtahDave: but do I really need to have a pillar file to specify the php version that I need?
22:35 UtahDave Yeah.  That's what we test and support for our customers.
22:35 snarfy^ ive got some older 2105.8 ones whinging about a retcode key
22:35 UtahDave velikan: No, you don't
22:36 * Eugene makes an ote
22:36 velikan hm
22:36 velikan so how can I make this evaluation to return true? {% if (grains['oscodename']=="Jessie" and salt['pillar.get']('php:version')=="7.0") or salt['pillar.get']('php:use_dotdeb') %}
22:36 jenastar joined #salt
22:41 stephanlooney joined #salt
22:42 stephanlooney joined #salt
22:43 mohae joined #salt
22:45 velikan all right
22:45 velikan thank you everyone
22:45 velikan will try to make it happen tomorrow
22:45 velikan cheers
22:52 snarfy^ my face is going to sleep
22:53 nicksloan joined #salt
22:54 alexhayes joined #salt
23:02 Bryson joined #salt
23:04 * woodtablet slaps snarfy
23:04 woodtablet wake up =D
23:05 ninjada joined #salt
23:06 edrocks joined #salt
23:10 snarfy^ mmgguha what no i dont wanna go to school
23:10 ninjada joined #salt
23:11 akoumjian joined #salt
23:12 pipps joined #salt
23:17 dendazen joined #salt
23:17 modizl joined #salt
23:25 PerilousApricot joined #salt
23:39 fusionx8_ joined #salt
23:52 lungaro joined #salt
23:58 akhter joined #salt

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