Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2014-07-28

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

All times shown according to UTC.

Time Nick Message
00:00 nrgaway joined #salt
00:06 ghartz joined #salt
00:09 drakimor joined #salt
00:12 chiui joined #salt
00:18 zandy joined #salt
00:20 drakimor joined #salt
00:28 Luke joined #salt
00:36 ajw0100 joined #salt
00:37 nyx_ joined #salt
00:51 Talos joined #salt
00:52 Outtone [»:: I am Now Away ::«][»::Reason: Pausa Pranzo ::«][»:: Left at ::«][»:: 2:52 am ::«]
01:04 TheThing joined #salt
01:06 sectionme joined #salt
01:13 Outtone [»:: I am Now back from ::«][»::Reason: Pausa Pranzo ::«][»:: Gone For ::«][»:: 21mins 14secs ::«]
01:13 Outtone [»:: I am Now Away ::«][»::Reason: None ::«][»:: Left at ::«][»:: 3:13 am ::«]
01:13 Talos [»:: I am Now back from ::«][»::Reason: none ::«][»:: Gone For ::«][»:: 3secs ::«]
01:14 Outtone [»:: I am Now Away ::«][»::Reason: None ::«][»:: Left at ::«][»:: 3:14 am ::«]
01:14 Talos [»:: I am Now back from ::«][»::Reason: none ::«][»:: Gone For ::«][»:: 8secs ::«]
01:14 zandy joined #salt
01:26 mosen joined #salt
01:27 zandy joined #salt
01:33 andrej is there a way to force a salt minion to contact the mast via a certain interface?
01:33 andrej interface being e.g. eth1.1
01:34 andrej I have a number of machines that have several interfaces, and the master is accessible via 3 of them. I'd like to specify exactly one to use
01:44 jhauser_ joined #salt
01:47 TyrfingMjolnir joined #salt
01:56 bmatt andrej: doesn't look like it - can you file an issue?
02:12 nyx joined #salt
02:13 Luke joined #salt
02:33 sectionme joined #salt
02:34 andrej bmatt : OK, I'll do that.
02:34 zain_ joined #salt
02:39 Luke joined #salt
02:44 steveoliver joined #salt
02:46 m1crofarmer joined #salt
02:47 faulkner joined #salt
02:48 andrej How would one go about using the masters knowledge of existing (and accepted) minions to generate e.g. config files for nagios/icinga monitoring in a pythonic way?  At the moment I'm using a kludgy shell srcipt that iterates over the list of minions (manage.status) and some primitive regex matches to generate 3 different types of config (ubuntuVM, ubuntuHW, centosHW).
02:49 andrej But there has to be a better way :}
02:49 jY andrej: use the salt-mine
02:49 jY i can show you how i do it in nagios.. so it should be simple
02:50 iggy joined #salt
02:51 zz_chamunks joined #salt
02:52 andrej That would be brilliant :) jY
03:04 ramishra joined #salt
03:13 otter768 joined #salt
03:19 darless_ joined #salt
03:21 ramishra joined #salt
03:36 ramishra joined #salt
03:41 drakimor joined #salt
03:48 yomilk joined #salt
03:48 malinoff joined #salt
03:50 Luke joined #salt
04:03 ckao joined #salt
04:08 mosen joined #salt
04:10 aquinas joined #salt
04:19 bluehawk joined #salt
04:24 ramishra joined #salt
04:28 sinh joined #salt
04:28 sinh got a simple question. . how does file.manage handle insecure https sources?
04:29 malinoff sinh, by saying "insecure" you mean that the certificate is not valid, expired or revoked? Or something else?
04:31 sinh yeah
04:33 sinh so i can do one of two things
04:33 sinh actually i can't
04:33 sinh wait no i can. . symlink the directory containing the files i want to /srv/salt and using salt:// as a source or not
04:34 sinh sounds a little hokey but it should do what i need to do instead of dealing with insecure https requests if salt currently can't handle that
04:36 sinh sorry i didn't answer your question properly malinoff.  yes to the invalid certificate
04:42 torrancew joined #salt
04:43 malinoff sinh, I guess it's better to ask on the mailing list
04:44 war2 joined #salt
04:51 Luke joined #salt
04:53 ramteid joined #salt
05:08 sontek joined #salt
05:10 ramishra joined #salt
05:20 beneggett joined #salt
05:38 drakimor joined #salt
05:40 malinoff joined #salt
05:44 ghartz joined #salt
05:46 drakimor joined #salt
05:50 sadte joined #salt
05:50 badon joined #salt
05:51 aqua^lsn joined #salt
05:52 Luke joined #salt
05:52 sadte left #salt
05:52 duncanmv joined #salt
05:53 duncanmv_ joined #salt
05:57 Katafalkas joined #salt
05:58 fdgsgsdfg joined #salt
05:59 trgstri joined #salt
06:00 Katafalkas joined #salt
06:04 VictorLin joined #salt
06:17 roolo joined #salt
06:21 schimmy joined #salt
06:24 schimmy1 joined #salt
06:26 beneggett joined #salt
06:29 sinh can i only reference the salt filestore when using source: ?
06:31 grischa joined #salt
06:31 grischa Hi, I have a strange issue during the deploy part of a cloud profile state. This is the end of the traceback
06:31 grischa File "/usr/lib/python2.7/dist-packages/salt/utils/cloud.py", line 1601, in root_cmd     ' '.join(ssh_args), kwargs, pipes.quote(command) KeyError: 'username'
06:32 grischa so, kwargs does not have 'username'. However, it reaches the stage where it wants to 'Using sudo to run command sudo test -e \"/tmp/.saltcloud\"'
06:36 aqua^lsn joined #salt
06:37 schristensen joined #salt
06:39 jeddi joined #salt
06:42 grischa kwargs only contains {'known_hosts_file': '/dev/null'}
06:53 Luke joined #salt
06:54 Katafalk_ joined #salt
06:55 workingcats joined #salt
07:02 duncanmv_ joined #salt
07:06 MrTango joined #salt
07:07 grischa fixed it https://github.com/saltstack/salt/commit/7ca9fe5f1997e105d510a43b22dc87e49ebc5313#diff-5c29a90fdbde829422c42791babb52dbR696
07:09 grischa and https://github.com/saltstack/salt/issues/14544
07:09 VictorLin joined #salt
07:10 grischa sorry, I don't have time for a proper fix/pull request right now
07:12 matthiaswahl joined #salt
07:15 ml_1 joined #salt
07:20 alanpearce joined #salt
07:24 ignis joined #salt
07:41 intellix joined #salt
07:42 Katafalkas joined #salt
07:45 chiui joined #salt
07:47 Katafalkas joined #salt
07:48 linjan joined #salt
07:48 Nazzy joined #salt
07:50 intellix_ joined #salt
07:53 intellix_ joined #salt
07:53 Luke_ joined #salt
07:55 xsteadfastx joined #salt
07:57 darkelda joined #salt
07:57 darkelda joined #salt
08:03 intellix_ joined #salt
08:04 scott_w joined #salt
08:11 mike25de joined #salt
08:12 mike25de hi guys - is it possible to run a state only if the minion has a specific file (or doesn't have it)?
08:12 mike25de thanks in advance
08:13 ndrei joined #salt
08:22 wm-bot4 joined #salt
08:29 ramishra joined #salt
08:34 viq mike25de: I'd probably go about setting up a state checking for presence/absence of that file, and other states that would require it
08:35 mike25de viq:  thanks
08:35 dzen left #salt
08:35 Katafalk_ joined #salt
08:35 mirko joined #salt
08:37 pseudonymous joined #salt
08:38 pseudonymous I was wondering - for getting started in a jiffy - is there a particular book recommended ? Should I peruse the official docs or read the "getting started" parts of the docs and then look @ github & tinker ? Recommendations ?
08:38 alainv joined #salt
08:38 simmel joined #salt
08:39 babilen mike25de: file.exist is what you are looking for.
08:41 bram__ joined #salt
08:41 scott_walton joined #salt
08:41 babilen pseudonymous: There isn't a book, but the official documentation is quite approachable. I'd read http://salt.readthedocs.org/en/latest/topics/tutorials/index.html 3.1 and 3.3 and then continue with http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
08:42 bram__ Hiya #salt! What’s the status on salt web-ui? Seems like no new check-ins for at least quite some time…
08:42 pseudonymous balilen: I see, I'll do just that, then.. Maybe salt can help me tame the inconsistencies among my desktop configs :P Thanks ! :)
08:42 babilen pseudonymous: Ah, throw in 3.2.{6,7}
08:43 Katafalkas joined #salt
08:45 al joined #salt
08:47 mike25de babilen: thank you too.
08:54 Luke joined #salt
09:06 ramishra joined #salt
09:07 KaaK_ joined #salt
09:12 scott_w joined #salt
09:13 djinni` joined #salt
09:15 malinoff joined #salt
09:18 ramishra joined #salt
09:25 malinoff joined #salt
09:26 ramishra joined #salt
09:29 ndrei joined #salt
09:30 intellix joined #salt
09:39 sectionme joined #salt
09:39 che-arne joined #salt
09:41 mirko joined #salt
09:43 giantlock joined #salt
09:55 war3 joined #salt
09:58 war3 joined #salt
09:59 war2 joined #salt
10:06 bhosmer joined #salt
10:11 zandy joined #salt
10:14 zandy_ joined #salt
10:15 Outlander joined #salt
10:15 bhosmer joined #salt
10:20 lahwran joined #salt
10:20 zandy joined #salt
10:23 war2 joined #salt
10:24 war2 joined #salt
10:24 bhosmer_ joined #salt
10:34 war2 joined #salt
10:37 war2 joined #salt
10:40 war3 joined #salt
10:44 ramishra joined #salt
10:45 TheThing joined #salt
10:46 war2 joined #salt
10:48 war2 joined #salt
10:49 ghartz joined #salt
10:49 war2 joined #salt
10:55 ramishra joined #salt
10:58 mechanicalduck joined #salt
11:12 war2 joined #salt
11:21 Outlander joined #salt
11:26 ramishra joined #salt
11:27 intellix joined #salt
11:35 TheThing joined #salt
11:36 war2 joined #salt
11:37 war3 joined #salt
11:39 war2 joined #salt
11:40 war2 joined #salt
11:41 poogles joined #salt
11:42 MrTango joined #salt
11:52 yomilk joined #salt
11:54 hobakill joined #salt
11:58 nyx_ joined #salt
11:59 war2 joined #salt
12:06 diegows joined #salt
12:06 TheThing joined #salt
12:14 agend joined #salt
12:15 war2 joined #salt
12:16 ramishra joined #salt
12:17 blarghmatey joined #salt
12:17 _mel_ joined #salt
12:18 _mel_ Hi. i try to restart xinetd via service.running and watch on debian wheezy. but the service doesn't restart at changing config files.
12:19 _mel_ http://pastebin.com/2xhDiCq7
12:21 Holygoat joined #salt
12:22 Holygoat Hi. It seems that if I change the fqdn of a salt minion, I need to change /etc/salt/minion_id on the minion in order to reflect the new fqdn on the salt master. Is this intended behavior, or does this sound like a bug?
12:24 TheThing joined #salt
12:26 war2 joined #salt
12:29 mechanicalduck_ joined #salt
12:32 Holygoat Alright. Apparently it's default behaviour until you explicitly set caching off. I'm suspecting this could cause confusion for some people :)
12:33 hop Holygoat: as far as i understood it, minion_id is _set_ from the fqdn the first time the minion starts
12:33 hop from then on it should override the fqdn
12:34 hop i set all my minion_ids to something different before ever starting the minions
12:34 scoates joined #salt
12:38 zandy joined #salt
12:38 Holygoat hop: right, in my case the host had a wrong fqdn when I started the salt minion process on it for the first time. So after fixing the fqdn for the host, I wondered why the wrong one still kept showing up on the salt master.
12:39 Holygoat So then I figured out that one of the salt files still contained the old (wrong) fqdn. After I changed that one, the change was reflected on the master
12:41 Holygoat I'd suspect that when a sysadmin would change the fqdn of a host, he'd expect to change his salt configuration on the master as well, but not on the minion. But I might be wrong.
12:41 ajprog_laptop joined #salt
12:42 vbabiy joined #salt
12:43 Katafalkas joined #salt
12:43 elfixit joined #salt
12:51 pclermont joined #salt
12:52 che-arne joined #salt
12:53 KGrange hmm, perhaps a saltutil function to change the minion_id would be useful
12:54 mapu joined #salt
12:55 nhubbard joined #salt
12:55 TheThing joined #salt
12:55 nicolerenee left #salt
12:56 Holygoat I'm not sure what the rationale behind this implementation was. If anything though, I'd suspect that something that is "cached" like that, would be stored under /var/cache/salt/minion somewhere, instead of /etc/salt
12:57 techdragon @basepi / @whiteinge - either of you around?, got a community messaging related question I hope one of you can answer.
12:57 brandon joined #salt
12:59 blarghmatey Does anyone know where the __salt__ object gets defined? I'm having trouble parsing through the code because I don't fully understand what the purpose of that object is.
13:02 jslatts joined #salt
13:03 hop Holygoat: you are very wrong. read again what i wrote
13:04 hop there is nothing cached, or even "cached"
13:06 mpanetta joined #salt
13:06 Holygoat hop: I sense it is not something to argue with ;)
13:06 racooper joined #salt
13:08 Holygoat hop: I can see how it works, it just doesn't seem logical to me. But each to their own.
13:10 vejdmn joined #salt
13:11 scott_walton joined #salt
13:12 FeatherKing joined #salt
13:13 ramishra joined #salt
13:13 scoates joined #salt
13:15 borgstrom joined #salt
13:16 user__ joined #salt
13:18 Kalinakov joined #salt
13:22 jcristau joined #salt
13:24 khodgson joined #salt
13:25 techdragon blarghmatey its a little non obvious, but when i started learning, i just traced the calls that reffered to things in the __salt__ object, i found that way easier than working out where it started.
13:25 techdragon or are you trying to start from 'step 1' and follow through a particular execution path ?
13:26 scott_w joined #salt
13:30 Kalinakov I'm having difficulty targeting environments. I have a /srv/salt/top.sls that lists hosts by an environment heading. But what I can't seem to figure out is how to target them with the salt command. What is the proper syntax?
13:31 _mel_ joined #salt
13:32 _mel_ how can i check if there is a interface eth0
13:33 Kalinakov _mel_ : salt '*' grains.item ip_interfaces
13:33 alaskabear joined #salt
13:33 Kalinakov That'll list them all.
13:33 borgstrom joined #salt
13:33 ramteid joined #salt
13:33 _mel_ i want to use somthing like this: {% if grains['ip_interfaces']['eth0'][0].startswith('10.200') %}. but it fails if there is a br0 instead of eth0
13:35 viq _mel_: how about http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.network.html#salt.modules.network.in_subnet ?
13:36 KaaK_ anyone used docker in combination with salt? I love the container isolation --especially when i've got apps that have conflicting dependencies on Debian/Ubuntu...
13:36 KaaK_ but I can't quite see how you can add configuration management to that mix.
13:36 manfred KaaK_: i haven't yet, but salt air 20 is all about it
13:36 manfred https://www.youtube.com/watch?v=EVq6hn25lYM
13:36 _mel_ how would i write network.interface inside the pillar?
13:37 manfred _mel_: i think the link viq gave you solves your problem
13:37 KaaK_ manfred, nice! thanks for the link
13:37 viq {% if salt['network.in_subnet]('10.200.0.0/16') %}
13:37 manfred {% if salt[network.in_subnet]('10.200.0.0/16') %}
13:37 manfred yeah
13:37 _mel_ thx!
13:38 user__ joined #salt
13:38 kermit joined #salt
13:38 TheThing joined #salt
13:41 duncanmv__ joined #salt
13:42 lauri joined #salt
13:42 lauri Hi guys, where could I find any examples how to programmatically read files on minions using Salt?
13:45 duncanmv_ joined #salt
13:45 zandy joined #salt
13:47 stickystyle joined #salt
13:48 kiorky joined #salt
13:49 stickystyle I'm looking to manage the CUPS config on workstations, but I need to make sure that the cupsd process is stopped before I replace the printers.conf file (cupsd writes the file on exit). What do I need to look into with salt to make sure that the steps of stopping cupsd, replacing printers.conf, and starting cupsd happens in that order?
13:50 _mel_ it seams to run on the master not the minion. so i can't use it in the pillar
13:50 FeatherKing stickystyle: i would look into require/watch for your states http://docs.saltstack.com/en/latest/topics/tutorials/states_pt2.html
13:50 FeatherKing stickystyle: http://docs.saltstack.com/en/latest/ref/states/ordering.html
13:51 scoates joined #salt
13:51 stickystyle Thank you FeatherKing, I will look into those.
13:51 NV more specifically
13:51 NV you want prereq
13:51 NV http://docs.saltstack.com/en/latest/ref/states/requisites.html#prereq
13:52 duncanmv__ joined #salt
13:52 NV note the graceful-down example
13:52 NV stopping apache prior to a file being updated
13:52 NV then a later state can bring it back up
13:52 NV that said - is there any reason you _HAVE_ to ensure cups is dead first?
13:52 viq _mel_: what do you mean "in the pillar" ?
13:52 NV surely replacing the config file then restarting cups would be sufficient?
13:53 toastedpenguin joined #salt
13:53 NV or is cups "special"?
13:53 stickystyle NV: cups writes out to the printers.conf file on exit
13:53 NV ah
13:53 NV what a prick
13:53 NV no command to reload it?
13:53 NV (sighup?)
13:53 _mel_ this is in my pillar: {% if grains['ip_interfaces']['eth0'][0].startswith('10.200') %} it is not working, if there is no eth0 device. but the alternative {% if salt['network.in_subnet]('10.200.0.0/16') %} runs on the master not the minion, so the result is always the same
13:53 aquinas joined #salt
13:53 stickystyle NV: hummm….that's a good question, let me check that avenue.
13:54 NV seems like a safer option (couple with cmd.watch)
13:54 NV but yeah, otherwise prereq is your friend
13:54 _mel_ i try to look for the ip range in either eth0 or br0 on the minnion
13:54 NV i've got some states that have to do that funkyness
13:54 NV but i try to avoid it if at all possible
13:54 ipmb joined #salt
13:57 UtahDave joined #salt
13:57 UtahDave left #salt
13:59 toastedpenguin joined #salt
14:00 kaptk2 joined #salt
14:00 FeatherKing is there any salt mechanism to rollout over several days? say i want to update all servers but maybe 50 servers a night. Something like group 1, group 2, etc. Batch mode looks close but i dont see any way to stop mid batch and resume the next night for example
14:02 TheThing joined #salt
14:02 nahamu FeatherKing: if you wanted to set up static groupings of hosts, you could set a custom grain on each server indicated which group it's in, then only target one group at a time.
14:02 nahamu *indicating
14:03 FeatherKing nahamu: that was my next thought. i wonder about to best way to set that grain however
14:03 FeatherKing ive got around 600 vms in this group
14:03 smcquay joined #salt
14:03 bhosmer joined #salt
14:03 manfred FeatherKing: grains.setval
14:04 manfred or a file.managed, that puts it in /etc/salt/grains.d, cause that doesn't require a minion restart to pick up
14:04 FeatherKing yeah i just meant like a loop somehow, ie count to ten then increment group number, count to ten increment etc
14:04 FeatherKing instead of setting the grain one by one
14:04 FeatherKing on 600
14:04 manfred there is not one afaik
14:04 FeatherKing yeah just thinking out loud
14:04 FeatherKing maybe a bash script on the salt master
14:05 FeatherKing to actually run the grains.setval
14:05 manfred you could set each server as it's own number, and then batch them if the grain is between like 11 and 20
14:05 FeatherKing in a loop
14:05 FeatherKing ah true
14:05 nahamu for i in {1..1000}; do echo $(( $RANDOM % 5 )); done  | sort | uniq -c | sort -n
14:05 manfred just loop through salt-run manage.up, and then set them each a number incrementing each time
14:05 nahamu but there's probably a salt-y-er way to do that. :)
14:06 Ahlee so yeah.  Master ran out of disk this weekend, which appears to have cuased all my windows minions to have correupted partial messages in their cache
14:06 nahamu incrementing rather than random is probably better... good point
14:06 Ahlee this should be fun.
14:07 FeatherKing nahamu: manfred: ty i will think more on this
14:07 manfred FeatherKing: num=1; for srv in $(salt-run manage.up);  salt $srv grains.setval number=$num; num=$((num + 1)); done
14:07 manfred ; do*
14:07 manfred forgot the do
14:07 FeatherKing does manage.up run in the same order each time
14:08 FeatherKing it seemed that batch mode was always the same order
14:08 manfred it does not
14:08 FeatherKing ok
14:08 manfred it might
14:08 nahamu num=0; for i in {1..1000}; do echo $num; num=$(( ($num + 1) % 5 )); done  | sort | uniq -c | sort -n
14:08 FeatherKing i will explore that, i could not figure out how batch mode was ordering them
14:08 manfred i believe it returns in the order that the minions return
14:08 FeatherKing but it was consistent
14:08 nahamu oh, manfred beat me to it. :)
14:09 manfred FeatherKing: you could also ... always integer device the num
14:09 FeatherKing i was just thinking if i add servers later (i will) i will have to set this grain again and then would i execute the loop or just know the id somehow
14:09 nahamu manfred: is it possible to target a machine based on a mathematical operation on the grain?
14:10 manfred nahamu: i would thing so?
14:10 manfred hold on
14:10 housl joined #salt
14:10 manfred FeatherKing: num=1; for srv in $(salt-run manage.up); do salt $srv grains.setval batchnum=$((num/10 +1 )); num=$((num +1)); done
14:10 vbabiy joined #salt
14:10 manfred [root@salt ~]# echo $((21/10))
14:11 manfred 2
14:11 manfred bash defaults to integer division
14:11 manfred so you would batch those into groups of 10
14:11 FeatherKing nice
14:12 Prasanna joined #salt
14:12 nahamu so the numbering of each server would be a bit slow as you have to invoke salt once per server, but the batch targeting would be clean for the rollout.
14:13 FeatherKing yeah the initial rollout i dont care about
14:13 quickdry21 joined #salt
14:13 FeatherKing i have 11.8 more hours to just bootstrap salt i figure
14:13 FeatherKing looks like manage.up results are alphabetical
14:14 ramishra joined #salt
14:14 funzo joined #salt
14:14 FeatherKing that would make adding new servers trickier from a loop perspective because everything will shift
14:14 halis joined #salt
14:14 nahamu FeatherKing: you could just renumber everything before a new rollout.
14:15 FeatherKing yeah
14:15 FeatherKing if servers are created during the rollout i could target servers that dont have a group id
14:16 vbabiy joined #salt
14:16 nahamu that too
14:16 FeatherKing generally the rollouts are quick so im not sure if it will come up
14:16 FeatherKing quicker with salt is the goal anyway
14:17 manfred FeatherKing: you could just add newer servers into the numbering scheme as you spin them up
14:18 FeatherKing one thought there is i have a group of 5 and anyone would need to know what the next id was
14:18 FeatherKing not impossible, just a thought
14:18 FeatherKing group of 5 people*
14:19 manfred FeatherKing: the other way you could do it is script the whole update
14:19 manfred FeatherKing: run a grains.setval that marks all the servers as not updated.
14:20 manfred FeatherKing: then, night after night, you do a grains.get to see which server haven't been updated, randomly select 10, and then update them. including a grains.present in there that marks them as updated as an order: last
14:20 FeatherKing i will sort of be doing this but by storing the version number as a grain
14:20 beneggett joined #salt
14:20 manfred so you won't have the same order every night, but you won't have to remember a number, you just need a script that is smart enough to only pick out the first 10 from a list that haven't been updated
14:21 FeatherKing another twist on our rollout is i have to notify each customer days before, so i wonder if number might be better. i.e notify these 10 update these 10, notify those 5 update them. always the same ones i notify
14:22 manfred ahh ok
14:22 manfred then yeah, you will need to number them probably
14:22 alanpearce joined #salt
14:22 FeatherKing for this particular rollout i think
14:22 FeatherKing but for other things we do, your suggestion will be helpful thank you
14:22 CeBe1 joined #salt
14:22 manfred np
14:23 NV makes sense
14:23 NV bah
14:26 ramishra joined #salt
14:27 colinbits joined #salt
14:28 giantlock joined #salt
14:28 elfixit joined #salt
14:32 colinbit_ joined #salt
14:34 rallytime joined #salt
14:34 TheThing joined #salt
14:35 zooz joined #salt
14:39 jonbrefe joined #salt
14:44 colinbits joined #salt
14:45 nyx joined #salt
14:47 vejdmn joined #salt
14:48 vital101 joined #salt
14:49 vejdmn1 joined #salt
14:52 vital101 I'm having some issues using the MySQL package with InnoDB.  When Salt tries to start MySQL after install, it errors out.  After some investigation, the problem is "InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes".  Internet wisdom suggests I just need to delete the old log files first, but I'm not sure if: 1) Thats the best choice. 2) I even need to do that.  Any help would be greatly apprec
14:52 vital101 iated.
14:52 thedodd joined #salt
14:52 t0rrant joined #salt
14:54 schristensen joined #salt
14:57 aquinas joined #salt
14:58 vexati0n_ so... suddenly, no user but root is allowed to run salt commands, even though they are specified with full access in the master config file ?
14:58 vexati0n_ other users get 'failed to connect to the master'
14:58 vexati0n_ even tho it works just fine for root, and it works for the other user if they use sudo
14:59 FeatherKing when i use cmd.run in a state and a require on another code block, will it wait for the cmd.run to finish executing or will it execute when the cmd.run process is started
14:59 manfred vexati0n_: delete the ib_logfile0 and restart mysql
14:59 manfred err
14:59 manfred vital101: ^^
14:59 manfred vital101: it is just not matching the set ib_logfile size in your my.cnf, so it won't start
15:00 vital101 mandred: Right, but how do I do this programatically with Salt?
15:00 vital101 manfred*
15:00 manfred just do a cmd.run /var/lib/mysql/ib_logfile0
15:00 manfred service.start mysqld
15:01 vital101 manfred: So that solves the problem, but this process needs to be hands off.
15:01 vital101 manfred: I'm new to Salt, so forgive me if this is a silly question.
15:01 manfred you will want to add a watch: file.absent for if you make changes to /etc/my.cnf in your salt run
15:02 manfred it will only delete the file then if you make changes to your my.cnf
15:02 jalbretsen joined #salt
15:02 vital101 manfred: Ah, ok.  That makes sense.  Will the watch work on first run as well?
15:02 ghartz joined #salt
15:02 manfred yeah, watch will run if your file.managed makes a change to /etc/my.cnf
15:03 manfred then have another watch that restarts mysqld
15:03 linjan joined #salt
15:04 vital101 Awesome, thanks.
15:04 manfred np
15:06 ericof joined #salt
15:07 CeBe1 joined #salt
15:07 vejdmn joined #salt
15:07 cpowell joined #salt
15:09 Theo-SLC joined #salt
15:10 smcquay joined #salt
15:12 Theo-SLC oh happy day!  I noticed this morning that EPEL has an update for Salt.  (so excited to no longer see iptables --help output).
15:14 intellix joined #salt
15:17 smcquay_ joined #salt
15:23 patarr Ooh cool they fixed that issue? :D
15:24 manfred patarr: yes, long time ago
15:24 manfred :( i just logged into a rhel 4.7 server
15:26 ramishra joined #salt
15:28 nyx joined #salt
15:34 halis joined #salt
15:34 fragamus joined #salt
15:34 halis joined #salt
15:34 xcbt joined #salt
15:43 peno Almost want to go to that, just to heckle.
15:43 peno er. wrong #.
15:44 hobakill joined #salt
15:48 giannello joined #salt
15:49 ramishra joined #salt
15:50 giannello is there any way to pass pillars to salt-run from the command line?
15:51 Heartsbane joined #salt
15:51 Heartsbane joined #salt
15:53 bhosmer_ joined #salt
15:53 giannello oh, seems it has been added to 2014.7 - great.
15:54 ramishra joined #salt
15:56 tligda joined #salt
15:58 nyx_ joined #salt
16:04 jergerber joined #salt
16:05 khaije1 joined #salt
16:05 joehillen joined #salt
16:06 khaije1 hi all, I'm having a bit of difficulty getting salt-ssh to read-from and use my salt-states ... is this expected to work? Any caveats I should be aware of?
16:07 khaije1 my goal with this small network is to forgo the master and minion in favor of salt-ssh, states and rosters
16:07 manfred it works for me
16:07 manfred what are you running into? and what version of salt?
16:07 manfred it is still beta in 2014.1, but it is more stable in 2014.1.7, and works really well for me in 2014.7/develop
16:08 khaije1 manfred: just knowing it works for you helps
16:08 scoates joined #salt
16:09 khaije1 I'm using 2014.1.7 (on debian), and am using the --config-dir option in hopes to produce a user executable ssh-salt controller
16:10 ramishra_ joined #salt
16:10 jhansen joined #salt
16:10 khaije1 i think maybe the paths in my master config are failing... do you know if it's possible to provide relative paths to file_roots in the master config? I'm trying to keep the whole thing contained to a git repo
16:10 Drakimor Greetings all... does anyone have a good newbie's guide on setting up Salt? I have followed the docs, got what I think should be working config, but sshd_config isn't getting overwritten like it should be.
16:11 khaije1 i am using root_dir btw
16:11 manfred khaije1: that i have no idea
16:11 manfred i haven't fiddled with it that much
16:12 khaije1 mkay, it's a very appealling notion to me to have a self-contained git clonable infrastructure controller setup
16:12 Drakimor If it helps here is the best troubleshooting lead I have... when running `salt-call state.highstate` I get "No Top file or external nodes data matches found"
16:13 manfred Drakimor: where is your top.sls ? /srv/salt/top.sls?
16:13 Drakimor mandred: correct
16:13 manfred how are you matching your servers?
16:13 manfred Drakimor: http://docs.saltstack.com/en/latest/topics/targeting/
16:14 masterkorp Hello does anyone know a salt formula for pgpool ?
16:14 eliasp is anyone knee-deep into YAML/Pillar internals and has an idea where to start looking for the bug?: https://github.com/saltstack/salt/issues/14550
16:14 Drakimor base:
16:14 Drakimor '*':
16:14 Drakimor - servers
16:15 Drakimor should match everything yes?
16:15 SpeeR joined #salt
16:15 manfred eliasp: https://github.com/gtmanfred/salt-states/blob/master/website/mysql.sls#L4 you want something like this?
16:15 manfred Drakimor: and you have /srv/salt/servers.sls or /srv/salt/servers/init.sls?
16:16 eliasp manfred: no, in this case just regular YAML anchors/references … and it seems they're not properly merged when using in Pillar YAML
16:16 Drakimor manfred: correct, /srv/salt/servers.sls
16:16 eliasp manfred: sorry… wait
16:17 manfred Drakimor: i got nothing, that should work, what version of salt is your master and minions?
16:17 rps_ joined #salt
16:17 Drakimor manfred: 2014.1.7
16:18 Drakimor At least I'm not just being dumb... it should work :)
16:18 * fxhp highfives robawt, a bit late
16:18 manfred yeah
16:18 manfred Drakimor: and salt-call test.ping works?
16:18 Drakimor I did check for matching versions as I found that could be an issue
16:18 Drakimor Yes, that works fine
16:19 manfred what if you do salt \* state.highstate ?
16:19 Comradephate joined #salt
16:19 Lomithrani joined #salt
16:19 Drakimor Just comes back blank
16:19 eliasp manfred: looks like in your example, you use anchors/references only to DRY up your SLS a bit, but you don't overwrite defaults provided by an anchor at any place if I get this right…
16:20 notpeter_ joined #salt
16:20 Lomithrani Hi everyone, Babilen do you happen to be here and remember my issue with prereq ? That I thought was solved ?
16:21 rps_ probably RTFM - if anyone could point me at the right manual ... I have multiple salt syndics and no DNS so I need a way to get the different syndic IPs into the minion. Ideally I would like this to be a jinja template but how do I query the SYNDIC IP?
16:21 Drakimor manfred: weird... I am getting a different error now: “No matching sls found for 'servers' in env 'base’”
16:22 manfred eliasp: i believe that is correct
16:22 manfred eliasp: that was the only way I was able to get it to reference everything correctly
16:22 manfred someone else in here figured out the last bit and I used it
16:23 eliasp ok… looks like I'll have to dive into the YAML-internals of Salt this evening… this will be fun… NOT!!
16:23 manfred eliasp: there is not a good way to seperate out the definitions, because everything in the yaml files for states is considered a state block, so you have to do it inside of those
16:23 manfred eliasp: take this sword, it is dangerous to go alone
16:23 manfred =|====>
16:23 eliasp :)
16:24 schimmy joined #salt
16:24 fragamus joined #salt
16:24 babilen Lomithrani: I sort of remember it, yeah. What about it?
16:25 eliasp manfred: well, I moved the defaults out of my elements I'm going to use later so I don't mess with them… and the defaults block will never be referenced from the outside, it's just a YAML internal for me
16:25 khaije1 can the root_dir value (in master) be set to a relative path?
16:25 KyleG joined #salt
16:25 KyleG joined #salt
16:25 khaije1 or can it be set dynamically in a way that approximates a relative path?
16:26 Lomithrani babilen: Well it doesn't work :(. I just executed a highstate , and the state with the prereq didn't execute even though the on pointed by the trigger did.  "Comment: No changes detected"
16:26 schimmy1 joined #salt
16:26 babilen And the state you defined the prereq on had changes?
16:26 troyready joined #salt
16:26 bombbastic joined #salt
16:27 babilen Lomithrani: Could you paste the relevant bits to http://refheap.com ?
16:27 ramishra joined #salt
16:27 Lomithrani sure
16:28 babilen Don't really have much time right now (my day of work came to an end a little while ago and i'll head out soon) :-/
16:29 Lomithrani https://www.refheap.com/88649   result of https://www.refheap.com/88650
16:30 Lomithrani and nvm if you got to go I just thought as you helped me on this issue you might see what's wrong really easily
16:31 babilen The service is dead, wasn't that what you wanted?
16:32 babilen "Cannot run program "javac": error=12, Not enough space" too
16:32 KyleG ^ You need more memory or swap probably
16:32 Lomithrani service isn't dead thats why I get the error of space
16:32 babilen Lomithrani: Which state do you want to execute *only* when which other state has changes?
16:33 bombbastic When selecting a host can I filter using two grains such as  'webserver' and 'dev' under 'roles'    I tried salt -C 'G@roles:webserver' -C 'G@roles:develop' test.ping but I'm looking for a logical "AND"
16:33 babilen Lomithrani: And "service application/advertising stop" works?
16:33 thayne joined #salt
16:33 babilen (what about "service application/advertising status" ?
16:34 Lomithrani I did a restage.sls that does these 3 steps
16:34 Lomithrani but without any test on service dead
16:34 Lomithrani and it works
16:34 Lomithrani but with the condition it doesn't.
16:35 war2 joined #salt
16:35 Lomithrani So I really don't know what does it mean by "no changes detected"
16:35 babilen Lomithrani: Don't you want to run kill app *before* clean stage?
16:36 Lomithrani yes I want to
16:37 higgs001 joined #salt
16:37 babilen Unfortunately I have to leave now, but your prereq and watch might be wrong. You want prereq: - git: git@git.truc.com:moksha/advertising.git don't you (plus suitable require statements)
16:37 Lomithrani I want this exact behavior : https://www.refheap.com/88651    this is a restage.sls that a execute through salt Advertising01 state.sls advertising .restage  and it works fine, unfortunately it doesn't in my init.sls with the prereq
16:39 Lomithrani Ok thanks babilen !
16:39 brianz joined #salt
16:41 diegows joined #salt
16:42 higgs001 joined #salt
16:43 VictorLin joined #salt
16:45 robawt the topic says 2014.1.5 is latest, but 2014.1.7 is in the repo.  Which is latest *stable*?
16:49 manfred 2014.1.7
16:49 manfred topic needs to be fixed
16:49 manfred whiteinge: basepi ^^
16:50 chrisjones joined #salt
16:51 Gareth morning morning
16:52 bombbastic When selecting a host can I filter using two grains such as  'webserver' and 'dev' under 'roles'    I tried salt -C 'G@roles:webserver' -C 'G@roles:develop' test.ping but I'm looking for a logical "AND"
16:52 manfred bombbastic: and/or
16:52 manfred just put it in there
16:53 cwyse joined #salt
16:53 jkleckner joined #salt
16:53 joshpaul joined #salt
16:53 manfred -C 'G@roles:webserver and G@roles:develop'
16:53 FeatherKing ^
16:53 khaije1 is there a way to have salt print the directories it's looking for state info in? (and preferably order)
16:53 jkleckner joined #salt
16:54 bombbastic Holy crap thats perfect  thanks
16:54 rap424 joined #salt
16:54 FeatherKing khaije1: maybe start the master in debug mode, it shows all the conf directories, cant remember if all the state paths are shown
16:54 FeatherKing probably the file roots at least
16:55 rps_ probably RTFM - if anyone could point me at the right manual ... I have multiple salt syndics and no DNS so I need a way to get the different syndic IPs into the minion. Ideally I would like this to be a jinja template but how do I query the SYNDIC IP?
16:55 khaije1 I've been using salt-ssh -l debug which shows lots of paths but not the file_roots one unfortunately
16:56 jonbrefe joined #salt
16:56 brianz khaije1, not sure if this is useful for you but I've been running salt-call --local -ldebug state.highstate which spits out the file search paths
16:57 brianz running that on the minions....just getting started with salt myself
16:57 brianz example output: [DEBUG   ] Jinja search path: ['/srv/salt/dev', '/srv/salt/base']
16:58 khaije1 brianz: oh I'm looking for the Jinja search path? shoot! It's been staring me in the  face %-)
16:58 FeatherKing khaije1: are you trying to get the paths from a highstate or just a state
16:59 khaije1 i just expected it to be differently labelled
16:59 rypeck joined #salt
17:00 brianz i have about a week's worth of experience with salt and my understanding is that's what you're interested in....if someone here could confirm that's true it'd be helpful
17:01 brianz i'm setting the file_roots myself and can see that reflected in the jinja serach paths
17:01 khaije1 thats _exactly_ what I was looking for thanks!
17:02 FeatherKing anyway if you run a salt 'server' state.show_highstate you will see output like salt://ssh/files/etc/sudoers.d/salt for each state as well
17:02 FeatherKing or state.show_sls
17:02 Ryan_Lane joined #salt
17:02 FeatherKing then salt:// is just the file_root defined in the master config
17:03 forrest joined #salt
17:05 Drakimor manfred: Not sure what happened before but seems to have cleared up... digging through a rabbit hole of other config mistakes but at least progress now... thanks for your help!
17:05 robawt manfred: thanks
17:05 manfred np
17:11 alanpearce joined #salt
17:12 ramishra joined #salt
17:12 chiui joined #salt
17:13 ml_1 joined #salt
17:17 VictorLin joined #salt
17:24 higgs001 joined #salt
17:25 jonbrefe joined #salt
17:26 nyx joined #salt
17:27 laubosslink joined #salt
17:27 brianz I'm just getting started with salt and my first big hurdle is figuring out how to get set up for multiple stacks (dev, qa, etc.).  I've been reading as much as possible over the last week and what I landed on is the following config: https://gist.github.com/brianz/1e96a94de86f72fde573
17:27 brianz does this seem like a reasonable setup?
17:28 manfred brianz: have you looked at gitfs yet?
17:28 brianz no...i haven't
17:28 manfred one second
17:28 Ashu_ joined #salt
17:28 manfred brianz: http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html
17:28 manfred then each environment is just a different branch in your git repo
17:29 brianz ah....interesting
17:29 manfred and you can merge and maintain your stuff between them instead of having 4 locations on a server
17:29 brianz the docs are quite thorough but this is one section which I didn't read
17:29 manfred gitfs is one of my favorite things
17:29 brianz nice...i'll give that a read now
17:30 manfred otherwise, your setup looks solid
17:30 brianz i was wondering how this would all tie into to version control anyway :)
17:30 Drakimor manfred: you would recommend gitfs over local files then? seemed like an extra layer of complication.
17:30 manfred Drakimor: but it is a good layer of complication
17:30 Techguy67 joined #salt
17:30 brianz thanks for the pointer manfred
17:30 Drakimor manfred: fair enough :) would it allow file updates without server restart?
17:30 manfred you keep all of your states and stuff remote, and if you use something like multimaster, you don't have to keep syncing files between the two masters
17:31 manfred Drakimor: it checks for changes in states at certain intervals
17:32 Drakimor manfred: I see... is that configurable? Would love a "I'm debugging right now check often" option :)
17:32 che-arne joined #salt
17:32 manfred i believe so
17:32 Drakimor Sweet ;)
17:32 jslatts joined #salt
17:32 manfred i have to dig more into how it works, but I have never had an issue of pushing a commit and running it 5 seconds later
17:32 manfred so i think default it works well, might check it on all highstate runs ... /shrug
17:33 Drakimor Using gitfs?
17:33 manfred yeah
17:33 Drakimor Ok... look into that once I get a default setup working
17:35 aw110f joined #salt
17:36 kballou joined #salt
17:39 jslatts joined #salt
17:39 vital101 Part of a mysql database config file looks like this (http://pastebin.com/c4jFfsCH), and Salt is throwing an error "Rendering SLS "base:database.master" failed: Conflicting ID 'file.absent'"
17:40 vital101 I feel like I'm missing something really simple here.
17:40 linjan joined #salt
17:41 robawt vital101: one of the blocks of code in your salt state has the same label
17:41 nyx_ joined #salt
17:42 vital101 Right, `files.absent`, but I need to make sure two different files are absent when my.cnf changes.
17:42 ramishra joined #salt
17:43 Drakimor I know this is a longshot but has anyone here used Salt to manage OpenLDAP entries?
17:43 jchen ldap is actually awful
17:43 jchen I went through this dance a few months ago
17:44 Drakimor Guessing I shouldn't even ask about AD then eh? :)
17:45 robawt vital101: you can give files.absent a list of files
17:48 vital101 robawt: Thanks for helping out.  I changed files.absent to only be listed once, and then added the other file I need as a list item.  Now I'm getting the following: Name "/etc/mysql/my.cnf" in sls "database.master" contains multiple state decs of the same type
17:48 druonysus joined #salt
17:51 talwai joined #salt
17:53 talwai How do you get the salt-master to 'forget' a minion? Destroyed one of my minions, but it seems like the salt master still tries (and fails) to reach it when I do something like salt '*" test.ping. How do I get it to stop trying?
17:53 robawt vital101: if possible can you pastebin the sls?
17:53 FeatherKing talwai: delete the key
17:53 FeatherKing salt-key -d server
17:54 vital101 robawt: √
17:54 vital101 robawt: http://pastebin.com/ztVJFJqA
17:54 talwai FeatherKing: thanks! that worked a charm
17:54 FeatherKing np
17:56 forrest robawt, vital101 file.absent doesn't support multiple names
17:57 forrest robawt, unless the docs are incorrectly stating the functionality? Even if that's the case the format is incorrect, and should be 'names' with a list of items
17:57 forrest but I don't see that supported per the documentation
17:58 vital101 forrest: It interpreted the docs as you did, but I'm pretty new here and didn't know how accurate they were.
17:58 forrest vital101, it's all good
17:59 forrest vital101, so, you recognize that the file.absent will be run every time correct? Is it supposed to do so?
18:00 vital101 forrest: Correct.  I'm having some issues with the innodb log files being the wrong size.  Easiest path to fixing is just to delete the old and make new ones when my.cnf changes.
18:00 forrest vital101, why not just this then? https://gist.github.com/gravyboat/5b62a6e91d6994fffb4a
18:02 vital101 forrest, that will delete the files every time I call highstate on this minion correct?
18:02 forrest Yep
18:03 vital101 So if I wanted it to only delete the files when /etc/mysql/my.cnf changes?
18:03 forrest robawt, were you able to get names working somehow inside of file.absent?
18:03 forrest really it should support a list..
18:03 vital101 Could I just move those blocks in?
18:03 forrest vital101, no
18:03 forrest vital101, you can't have 'sub' IDs
18:03 ramishra joined #salt
18:04 vital101 forrest, Ah, thats a key piece of information that I somehow missed.  This problem makes more sense now.
18:04 forrest vital101, ok cool
18:04 forrest vital101, imagine it like this
18:04 forrest vital101, you can only have 1 file.* per section
18:04 vbabiy joined #salt
18:05 forrest vital101, the way salt looks at it, it only recognizes that top level item. So you can't do file.present, and file.absent, or pkg.installed, and pkg.purged
18:05 vital101 forrest, ah ok.
18:05 vbabiy joined #salt
18:05 forrest vital101, yea, it's annoying in this sort of situation where you want to manage, and remove two completely different files :P
18:06 forrest So was the goal to have this run the state every time?
18:06 vital101 forrest So one way to do this would be to make a new id, have it watch my my.cnf template file, then have it call file.absent?
18:06 vital101 forrest, no, only when my.cnf changes.
18:06 mway joined #salt
18:06 vbabiy joined #salt
18:07 vbabiy joined #salt
18:07 forrest vital101, I've updated my gist with a comment, I've never used watch before in a file.absent
18:07 forrest vital101, so I don't know if it will work, but my comment on the gist shows the update
18:08 jslatts joined #salt
18:08 forrest vital101, also, as a heads up you know the ID doesn't need to be the actual file correct?
18:08 vital101 forrest I didn't before this, but now I do.
18:08 VictorLin joined #salt
18:08 oz_akan joined #salt
18:08 forrest so you have /etc/mysql/my.cnf. where as I have remove_logfile0, and then I use the name for the actual file path. It's not a required thing, it just makes it easier when you have long paths, or are doing weird requires and such.
18:08 vital101 forrest, thank you for the help.
18:09 forrest vital101, yea np
18:09 forrest it's still early, the workload hasn't crushed me yet :D
18:09 alainv vital101: I don't think file.absent support watch, I would probably use cmd.wait instead if you really only want it called in the appropriate case
18:09 vital101 forrest, Hah, this is my workload ;)
18:09 forrest heh
18:09 snuffeluffegus joined #salt
18:09 forrest If watch works can you let me know?
18:10 forrest then we can update the docs
18:10 vital101 Will do.  Going to give it a go now and report back.
18:10 forrest cool
18:14 awilson joined #salt
18:17 thedodd joined #salt
18:17 rallytim_ joined #salt
18:17 zandy joined #salt
18:18 rallytim_ joined #salt
18:19 rallytim_ joined #salt
18:20 helderco joined #salt
18:21 mgorman joined #salt
18:21 mgorman Hello salt
18:21 mgorman hitting a little issue
18:21 bhosmer_ joined #salt
18:22 mgorman running salt 17.1, in 1 location we can run salt '*web*prd' mine.get 'G@role:frontend and G@env:prd' network.ip_addrs compound
18:22 mgorman and it works fine.
18:22 mgorman in our production env however
18:22 mgorman it fails to return, with stacktrace in master log
18:23 rallytime joined #salt
18:23 mgorman https://gist.github.com/mjgorman/08617826d66420d9189b
18:24 mgorman mine.get works fine in PRD if we don't match, so it spits out the IP addresses of everthing, but we're trying to use this to programmatically populate some things, and it was working for months but just stopped.
18:24 manfred mgorman: can you provide the full error message? THat is missing the last line of the traceback saying waht the actual exception was
18:25 mgorman sorry, copy and past cut it off from jira..
18:25 mgorman AttributeError: 'NoneType' object has no attribute 'get'
18:25 manfred and all of them are 0.17.1?
18:25 mgorman Yep
18:27 manfred https://github.com/saltstack/salt/pull/14388
18:27 manfred that is the closest thing I see in the issue tracker
18:28 mgorman Yeah
18:28 manfred and that is fixed in 2014.1 ...
18:28 alanpearce joined #salt
18:28 manfred i have no idea about 0.17, that is before I started using salt
18:28 mgorman I'm just curious why it worked last monday, and by friday it was dead.
18:28 mgorman i could see if this was new, but we use it to populate a listing for our NFS server's exports file.
18:29 mgorman and have for months, suddenly dead, no updated, not change.
18:29 allanparsons joined #salt
18:29 mgorman grains are all available, pillar too. Just bizzare
18:32 rap424 joined #salt
18:34 bhosmer joined #salt
18:35 roolo joined #salt
18:38 eliasp Gareth: is the fix for https://github.com/saltstack/salt/issues/14426 supposed to also work for 2014.1.7 or only 2014.7 and develop?
18:38 vital101 forrest: Watch seems to have worked.  Things didn't go well for the MySQL install, but thats a different issue.  Thanks for the help.
18:39 diegows joined #salt
18:39 manfred eliasp: looks like it is only in develop, he was asking for confirmation before getting it backported
18:40 allanparsons is there any other way to query salt minions within an sls other than publish.publish?
18:40 allanparsons (using grains)
18:40 forrest vital101, yea np
18:40 eliasp yep, was just wondering as it doesn't work as drop-in for 2014.1.7… so it looks like it needs explicit backporting to it
18:40 Drakimor How much code can you insert into a jinja file? i.e. could I use it to pull info from a database with the right python?
18:41 mpanetta Drakimor: I would think the pillar module for DB would be more suited...
18:42 Drakimor mpanetta: Ok, will look into that... trying to come up with a good user management scheme and don't want to manually edit all the files, easier if they are in a db
18:42 colinjohnson joined #salt
18:45 Gareth eliasp: only 2014.7 & develop.
18:45 Gareth eliasp: what manfred said :)
18:46 eliasp Gareth: ok, thanks… will provide results in a few minutes
18:48 zandy joined #salt
18:49 ghartz joined #salt
18:49 Gareth eliasp: thanks.
18:50 forrest left #salt
18:51 forrest joined #salt
18:52 kermit joined #salt
18:56 taterbase joined #salt
18:58 lalla joined #salt
19:03 thedodd joined #salt
19:06 smcquay joined #salt
19:08 eliasp Gareth: negative feedback ;( see #14426
19:08 smcquay joined #salt
19:10 kjkoster5489 joined #salt
19:10 Gareth eliasp: probably missing the python apt module, based on those errors.  Can you install python-apt manually and run it again?
19:10 yomilk joined #salt
19:11 eliasp will do… so this would have to be added to the bootstrap scripts then
19:12 Gareth Yeah.  It gets installed as part of the package install but should be included in the script too.
19:13 forrest Gareth, That's going to be problematic, the bootstrap is the bare minimum required for salt to install
19:13 forrest so you guys might have to talk to s0undt3ch about it, I've proposed adding things before
19:13 FeatherKing can i match a partial string in a jinja comparison? {% if salt['grains.get']('product_version','') == '5.8.*' %} ? 5.8.* doesnt seem to be matching for me
19:14 eliasp I usually don't use the bootstrap script (only now for reproducing/debugging)… but it might make sense for anyone else using them on Debian/Ubuntu
19:14 forrest eliasp, Gareth https://github.com/saltstack/salt-bootstrap/issues/245
19:14 peters-tx joined #salt
19:14 forrest So if it's a hard dependency, we can bring it up again
19:15 eliasp forrest: ran into the same situation on Gentoo :) https://bugs.gentoo.org/show_bug.cgi?id=485522
19:16 Gareth forrest: In this case it would be a hard dependancy since you can't install packages via salt with python-apt :)
19:16 eliasp correct
19:16 Gareth s/with/without/
19:16 forrest Gareth, yea I agree, we just need to make sure to clearly state that
19:16 Gareth virtual packages anyway.
19:16 Gareth eliasp: so it worked with python-apt?
19:16 eliasp Gareth: could you take care of the bootstrap PR? don't have much time today…
19:16 eliasp Gareth: yes, it did
19:17 Gareth eliasp: yeah.  I'm taking a look at it now.
19:17 eliasp thanks a lot!
19:17 Gareth thanks for testing that change :)  glad we got it fixed.
19:20 matthiaswahl joined #salt
19:21 forrest Gareth, if you put in a PR make sure to hit up s0undt3ch, sometimes the PRs on the bootsrap fall through the cracks
19:21 eliasp you should probably seal your cracks :)
19:22 forrest well, he's the only one that has merge perms on it I believe
19:22 Gareth will do.
19:23 to_json joined #salt
19:29 alanpearce joined #salt
19:30 forrest Gareth, what did you end up proposing for the actual content of the salt talk?
19:30 forrest I saw you submitted
19:31 manfred forrest: for what?
19:31 forrest manfred, seaGL
19:32 forrest conference up here in Seattle
19:33 manfred kk
19:42 Katafalkas joined #salt
19:43 jhauser joined #salt
19:46 HK_ joined #salt
19:47 Comradephate_ joined #salt
19:48 zandy joined #salt
19:51 Drakimor_ joined #salt
19:53 scoates_ joined #salt
19:53 war2 joined #salt
19:56 Drakimor_ Is it a bad idea to run minion on the master to keep config files in line?
19:57 forrest Drakimor_, not at all, it's actually pretty common
19:58 Drakimor_ forrest: thanks, just sanity checking making sure I'm not doing something stupid
19:58 forrest Drakimor_, you're good.
20:04 Gareth forrest: talk on the new schedule related bits in Salt.
20:04 bhosmer joined #salt
20:05 kermit joined #salt
20:06 Gareth forrest: I titled it "Dr SaltStack or How I Learned to Stop Worrying and Replace the Cron" :)
20:07 Drakimor Replace cron? *faints* I'm still working on user account creation! lol
20:07 Ozack1 joined #salt
20:08 vejdmn joined #salt
20:08 eliasp I'm mostly looking forward to having systemd on Ubuntu/Debian to finally replace *cron with systemd timer-units… (which will be generated via Salt) :)
20:09 eliasp but using the schedule stuff doesn't sound that bad either… ;)
20:10 thedodd joined #salt
20:11 danielbachhuber joined #salt
20:12 Theo-SLC I'm noticing that each time I upgrade salt I have to delete all of the salt master cache or I start having problems.  Is deleting the cache required for upgrades?
20:12 mackstick Never had to do it myself
20:13 mackstick If I have lots of olf jobs in the cache it can cause the master to spin for a while though
20:13 FeatherKing the docs say there should be a grains.setvals function, but i am getting grains.setvals not available in 2014.1.7?? http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html#salt.modules.grains.setval
20:13 FeatherKing http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grains.html#salt.modules.grains.setvals
20:15 mpanetta FeatherKing: I think it is setval
20:15 mpanetta not setvals
20:15 FeatherKing should be both according to the docs
20:15 mpanetta O?
20:15 mpanetta Hmm
20:15 jalbretsen joined #salt
20:15 mpanetta Never used setvals
20:15 FeatherKing setvals for multiple keys at once
20:15 FeatherKing neither have i
20:16 mpanetta Someone was asking about setvals a couple weeks ago... Maybe the docs are wrong then?
20:16 doddstack joined #salt
20:16 FeatherKing im wondering
20:17 eliasp FeatherKing: the docs are 'latest', not 2014.7 ("These docs are for Salt's development version: 4c52bc8.")
20:17 eliasp FeatherKing: to see what your minion actually supports: "salt minion -d grains"
20:18 FeatherKing even still generally it will say, new in verion 2014.7
20:18 FeatherKing or new in helium
20:18 FeatherKing the lack of here is puzzling then
20:18 brendanburns joined #salt
20:18 FeatherKing if the convention is to mark new features
20:19 brendanburns hey folks
20:19 FeatherKing looking in the code, its definitely not there https://github.com/saltstack/salt/blob/2014.1/salt/modules/grains.py
20:19 brendanburns I’m seeing errors on install w/ debian wheezy backports + salt
20:19 brendanburns it looks like its looking for a salt-api service
20:19 brendanburns and its not finding it.
20:20 FeatherKing so should say 'new in 2014.7' (which it is there)
20:21 thayne joined #salt
20:23 war2 joined #salt
20:26 taxi1729 joined #salt
20:27 taxi1729 left #salt
20:30 Steve1729 joined #salt
20:31 rypeck I'm confused - is Salt 2014.7 out? Or isn't it? Looking at the announcements... https://groups.google.com/forum/#!forum/salt-announce
20:31 intellix joined #salt
20:31 rypeck I'm guess it is released. I'm just used to seeing a feature freeze THEN a release.
20:31 intellix joined #salt
20:32 FeatherKing its not released
20:32 FeatherKing are you seeing 2014.1.7
20:32 FeatherKing not 2014.7
20:32 racooper if it is released then someone ( basepi ? ) needs to update the channel topic. it still says 2014.1.5
20:32 jonbrefe joined #salt
20:32 Katafalkas joined #salt
20:32 intellix joined #salt
20:33 FeatherKing We're pleased to announce that the 2014.7 release of Salt is closer than ever
20:33 rypeck Ah got it.
20:33 druonysuse joined #salt
20:33 druonysuse joined #salt
20:34 rypeck Is that planned by the end of the month or august some time?
20:34 FeatherKing in chat the other day i think they were saying they might cut RC this week
20:34 intellix joined #salt
20:34 Drakimor joined #salt
20:37 jacksontj joined #salt
20:40 forrest Gareth, Sorry went and got some food, that's pretty funny
20:40 forrest Gareth, Is it just going to be an intro/overview?
20:40 forrest Also, did you ask when they plan to have talks chosen by?
20:42 bmatt hm, I'm seeing a weird error on salt-master start after installing 2014.1.7-1precise1
20:42 bmatt looks like upstart is complaining about salt-api?
20:43 forrest what about it?
20:43 forrest that it's missing?
20:43 bmatt I think so
20:43 bmatt the error message is:
20:43 bmatt start: Unknown job: salt-api
20:43 bmatt * ERROR: No init.d support for salt-api was found
20:43 forrest bmatt, odd, let me look at the init script for 2014.1.7
20:43 bmatt this is a bare 12.04 LTS host being salt-bootstrap'ed
20:44 forrest bmatt, is it an actual ini script?
20:44 forrest *init
20:44 bmatt forrest: unsure; still investigating
20:44 forrest bmatt, ok, is this the master or minion package you installed?
20:44 bmatt salt-master, as a result of dpkg installing the salt-master package
20:45 bmatt my source is deb http://ppa.launchpad.net/saltstack/salt/ubuntu precise main
20:45 forrest ok
20:45 kjkoster5489 joined #salt
20:45 forrest bmatt, that seems really odd that it would require the api, Gareth have you run into that?
20:46 bmatt agreed
20:46 forrest bmatt, or that it wouldn't install the API if it was a requirement
20:47 Gareth forrest: probably an intro to Salt, some intro examples, then the rest would focus on the schedule related additions in the 2014.7 release.
20:47 alanpearce joined #salt
20:47 forrest ahh cool, I would be down for learning about the new additions
20:47 Gareth forrest: haven't seen anything related to salt-api, but lately I've been running develop from git.
20:48 forrest Gareth, hmm
20:48 amontalban Hey guys, is possible to uninstall saltstack-bootstrap?
20:48 amontalban I want to give it a try to Ubuntu packages
20:48 zandy joined #salt
20:48 forrest amontalban, by default the bootstrap uses packages unless you specify something else.
20:49 amontalban forrest: I used git
20:49 amontalban Because that's what I was using in dev on my masterless tests
20:49 forrest amontalban, ok, then you'd just need to remove the associated files and install the debs if you want to ensure a 'clean' install.
20:50 amontalban forrest: Ok thanks!
20:50 forrest bmatt, Once you track that down, can you double check to see if you get the error with the salt-api package installed? And if not, then create an issue? If the service isn't starting without the api, then we need to get it as a deps
20:50 forrest amontalban, yea np
20:50 zandy joined #salt
20:50 basepi rypeck: plan is to cut the release candidate tomorrow
20:50 basepi (2014.7.0rc1)
20:50 rypeck basepi: (y)
20:51 forrest basepi, when do we get the yo yo edition?
20:51 basepi current release is 2014.1.7, need to update the topic
20:52 basepi forrest: i'm trying to come up with jokes along those lines, but nothing's coming.  i blame the fact that i'm sick
20:52 forrest basepi, while a lame excuse, it is acceptable
20:52 basepi Welcome to #salt | 2014.1.7 is the latest | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
20:52 basepi whoops
20:52 Topic for #salt is now Welcome to #salt | 2014.1.7 is the latest | Please be patient when asking questions as we are volunteers and may not have immediate answers | Channel logs are available at http://irclog.perlgeek.de/salt/
20:52 basepi there
20:52 forrest basepi, oh that reminds me
20:52 forrest we should add this link to the MOTD
20:53 forrest http://bots.wmflabs.org/~wm-bot/dump/%23salt.htm
20:53 forrest for the bot dteails
20:53 TaiSHi woosh
20:53 TaiSHi it's been a while
20:53 forrest *bot details
20:53 TaiSHi joehh, mind me bothering you, any news on those repos ?
20:54 poogles joined #salt
20:54 forrest TaiSHi, he's probably asleep still, only 7 AM in Australia
20:54 TaiSHi OH, that or he's been killed by a spider
20:54 basepi forrest: wait what?
20:54 vejdmn joined #salt
20:54 bmatt forrest: hm. not sure how I'd test that; I'm using the bootstrap script to install salt-master on initial boot
20:54 * bmatt ponders
20:54 forrest basepi, ?
20:54 forrest basepi, that's the salt bot
20:54 forrest !help
20:54 wm-bot4 I'm a documentation bot. To control me, please use #salt-bot to avoid channel spam. See this URL for my commands: http://meta.wikimedia.org/wiki/WM-Bot
20:55 basepi i didn't know we had a documentation bot....
20:55 forrest bmatt, I'm just saying manually install the deb for the salt-api
20:55 forrest and see if it still has an issue
20:55 forrest basepi, lol
20:56 kermit joined #salt
20:57 bmatt hm
20:57 forrest !acl
20:57 wm-bot4 http://docs.saltstack.com/en/latest/topics/eauth/access_control.html#acl
20:59 TaiSHi Someone here suggested me to use reclass with salt
20:59 TaiSHi With that I'd avoid using formulas
20:59 TaiSHi And not being bond to Helix
21:00 viq joined #salt
21:02 madduck TaiSHi: no, ideally you would use reclass *with* formulae. reclass only provides data to recipes (formulae)
21:02 madduck i don't know what Heli is
21:02 madduck Helix
21:02 TaiSHi Sorry, Helium
21:03 TaiSHi Helix is an AMC series, pretty decent actually
21:03 MK_FG joined #salt
21:03 smcquay_ joined #salt
21:04 herlo TaiSHi: ah, you had me confused.
21:04 TaiSHi madduck, currently I'm limited to develop branch due to 'merge' function only being available there
21:04 * herlo couldn't figure out what helix was in this context. :)
21:08 bombbastic How do I convert -> salt '*' apache.a2dismod vhost_alias <- from salt.modules.deb_apache  into something used in a sls file
21:10 talwai bombbastic: Not sure about your use case, but check out the module.run state - http://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html
21:10 talwai Your should be able to put apache.a2dismod under func
21:11 darrend joined #salt
21:13 yomilk joined #salt
21:16 jcl joined #salt
21:16 jcl Hi all, I'm trying to generated a sorted list of interfaces from the ip_interfaces grain but code that works in python is not working in salt, namely this line:
21:17 jcl for ifname in sorted(grains['ip_interfaces'].keys(), key=lambda k: k[1])
21:17 jcl it says it's a jinja syntax error, expecting a comma and got a k
21:17 jslatts joined #salt
21:20 higgs001 joined #salt
21:23 TheThing joined #salt
21:25 geekmush joined #salt
21:25 smcquay joined #salt
21:26 jcl Anyone able to help with this jinja code issue I'm having? Can't seem to sort a list of a dictionary's keys in a template. Here's the state file, template, and example of the code working in python on the command line: https://gist.github.com/Calygos/e703da3cfcbdf8602891
21:27 forrest jcl, lambda doesn't work in jinja
21:27 jcl ah, well that would explain that. is there a clean solution to what I'm trying to do, i.e. sort the keys so the resulting file is always consistent?
21:28 jcl fwiw i'm really new to python, only written a few basic scripts
21:28 jcl (fwiw, i'm also pretty new to salt and jinja...)
21:29 forrest ok, so you just want to loop through the ip_interfaces?
21:29 Drakimor joined #salt
21:29 jcl yes, just getting the keys (ifnames) and sorting them
21:31 jcl i was trying to do it in a single line, not sure if that's possible given jinja's limitations like lambda not working
21:32 geekmush joined #salt
21:33 forrest jcl, well, you can always use the python renderer http://docs.saltstack.com/en/latest/ref/renderers/
21:33 forrest jcl, and just have it write out to a file or something
21:35 forrest jcl, you might also be able to run some more fancy stuff when you actually call {{ ifname }}
21:35 forrest where you do some of your parsing there
21:35 forrest and avoid using the lambda
21:36 forrest jcl, you can also use make (another templating language salt supports) which does support lambda I believe
21:36 forrest jcl, *mako, not make
21:36 jcl hmm...this seems like it should be fairly simple, getting a list of sorted dictionary keys. what am i missing?
21:36 mpanetta joined #salt
21:37 Ahlee but dicts aren't sorted
21:38 * Ahlee backs off before he gets involved with something he hasn't read
21:38 forrest Ahlee, looping through interface devices
21:38 forrest Ahlee, do you have a clean way to do it in a templatized file?
21:38 forrest when you just want the interface name
21:38 Ahlee No.  We don't use salt for interfaces (yet
21:39 Ahlee we're still on 0.17 which doesn't understand 10G
21:39 forrest lol ahh yea
21:39 forrest I forgot about that
21:39 forrest man that caused some problems...
21:39 jcl All I'm trying to do is generate a file with a sorted list of the keys from ip_interfaces
21:40 Ahlee something with SaltClient() and then build the file?
21:40 Ahlee damnit, now i'm intrigued
21:40 Ahlee reading back log
21:40 forrest Ahlee, lol
21:40 forrest jcl, I mean, there's dictsort, and sort inside of jinja
21:41 forrest http://jinja.pocoo.org/docs/templates/#dictsort
21:42 Ahlee jcl: is this a report or are you going to do something with this sorted list of ifname?
21:42 jaimed joined #salt
21:43 Ahlee 'cause if you just need this value, you can do this all within python from your master by using SaltClient
21:43 jcl forrest, Ahlee: dictsort is perfect! I'm not familiar with the syntax, so I'll have to read up on it, but this works: for item in grains['ip_interfaces']|dictsort
21:43 forrest jcl, cool
21:43 jcl and then just using {{ item[0] }} to generate each line
21:44 forrest jcl, yea I forget the jinja syntax all the time
21:44 jcl again, i'm really new to python, salt, jinja, etc.
21:44 jcl i've got a handful of things but mostly pretty simplistic stuff so far
21:44 forrest jcl, yea no worries, I forget jinja syntax all the time, I didn't even know about dictsort until just now :P
21:44 jcl having a lot to wade through
21:44 forrest jcl, you saw the formulas right?
21:44 forrest jcl, https://github.com/saltstack-formulas
21:44 jcl the salt-formulas repo on github?
21:44 forrest yea
21:44 jcl yeah
21:44 forrest cool
21:45 forrest I'd avoid the NG folders though, they're kind of confusing
21:45 jcl like i said, a lot to wade through
21:45 markhayden joined #salt
21:45 Ahlee I try to avoid jinja like a plague
21:45 jcl good to know
21:45 jcl why?
21:45 forrest jcl, yea it is. If you find anything missing in the salt docs, can you create an issue on github so we can make sure the docs are as helpful as possible?
21:45 forrest Ahlee is just an angry man
21:45 jcl i'm learning to whole salt ecosystem and trying to learn the salt way to do things (shifting from puppet)
21:45 Ahlee jinja syntax is just different enough
21:45 Node32 joined #salt
21:46 Ahlee like you found, can't use lambda
21:46 Ahlee so it's python-ish
21:46 Ahlee until you want it to be python
21:46 Ahlee then it's jinja
21:46 Ahlee *shrug*
21:46 Ahlee as forrest said, i'm just an angry man
21:46 jcl well for me it's just that there are a lot of docs and figuring out the right order to learn things in is though, having to learn python at the same time, and trying to learn everything at once so i can try to do things "the salt way" since i have existing puppet stuff to port
21:47 forrest jcl, ok, let me suggest a few things then: http://docs.saltstack.com/en/latest/topics/best_practices.html helps with some of the idea of structure.
21:47 forrest jcl, I also wrote a post about doing a full install for a blog app: http://hungryadmin.com/building-a-static-blog-and-deploying-it-with-saltstack.html
21:47 jcl trying to understand the right tool for the right job, like when to use pillar, grains, write custom grains, how to organize modules for my environments, etc.
21:47 forrest jcl, gotcha
21:47 markhayden ahoy. total noob here trying to get salt up and running on a new machine. running ubuntu 14.04 in vmfusion from mac. have everyting installed but when i try to start my master it is saying the ports are not available to bind. doing a grep for the ports it shows http://mrtr.co/image/2S0q1c1D472i
21:47 forrest jcl, yea it's complicated.
21:47 jcl yep, got the best practices bookmarked
21:47 forrest jcl, cool
21:48 alanpearce joined #salt
21:48 khaije1 i've been able to narrow down my questions to this: can file_roots use a relative path? (I'm using salt-ssh always from the same directory)
21:48 markhayden would be greatful to anyone that can help point me in the right direction
21:48 jcl thank you very much for the assistance today
21:48 Ahlee woah, I didn't realize the best practices made it up
21:48 forrest markhayden, are those bound when the service isn't started?
21:48 Ahlee nice forrest
21:48 markhayden yah. did a fresh reboot of both the mac and the vm
21:48 zandy joined #salt
21:48 markhayden first command i ran was the grep and they are bound.
21:49 Ahlee firewall getting in the way?
21:49 markhayden no firewall unless maybe vmfusion turns something on by default.
21:49 jcl Ahlee, forrest:: thanks again for the help, gonna sign off and finish this stuff up!
21:49 forrest jcl, yea np, always glad to help out. Especially if you create issues which we can use to improve the docs :P I think there is already a ticket for the flow of the docs. Have a good one
21:49 Ahlee jcl: welcome to the community, gl and hf
21:50 jcl will do, thanks!
21:50 jcl left #salt
21:50 Ahlee markhayden: meant ubuntu side, so salt-master process is not running, but something is listening on 4505 and 4506?
21:50 forrest khaije1, I've never tried to use relative paths with file_roots. Are you able to just test it and see if it owrks?
21:50 forrest khaije1, for some reason it seems to me like it wouldn't, but I have no evidence to say it wouldn't
21:50 Guest5180 joined #salt
21:50 markhayden ahlee, yah looks like it. but its a fresh install. does ubuntu have firewall built in that might be on?
21:51 Ahlee markhayden: it's been a long time since i installed ubuntu, so I'm not sure what they do/don't install by default these days
21:51 Ahlee iptables -F; try again :)
21:52 khaije1 hey forrest, i don't think it does... when I run a test command using salt-ssh -l debug and watch for the 'Jinja search path' it only shows the '/home/khaije/tmp/salt_test/rootfs/var/cache/master/files/base' which is implicit from the root_dir I've configured
21:52 gzcwnk iptables -L -n to see whats on or not
21:52 markhayden ha yah. looking now. not a linux guy, so this is a learning experience.
21:52 forrest khaije1, ahh ok,
21:52 Drakimor markhayden: what sort of Nic do you have installed in Fusion? There are a few types and only the type where you get a unique IP will allow what you are trying to do.
21:53 Drakimor I mean where the VM gets a unique IP
21:53 khaije1 forrest: as you may guess, I'd like this whole config to be self-contained as much as possible. Looked around a bunch and seen consideration for this flexibility in may other areas of salt, but not this one ... unless I'm missing something?
21:54 MatthewsFace joined #salt
21:55 forrest khaije1, you probably aren't. I'd suggest to look at the issues to see if something exists for this. If it doesn't it might be worth filing an issue to at least add an option for that support.
21:55 markhayden drakimor at the moment it is just sharing the ip with my mac...it seems
21:55 Drakimor markhayden: yup, so your mac is taking the traffic, it's never getting passed into the VM
21:56 khaije1 forrest: copy that & will do - thanks for affirming
21:56 Drakimor markhayden: change the nic type to shared I think where the VM gets it's own IP and try
21:56 forrest khaije1, yea np. I could be wrong. I don't use salt-ssh, so I don't know about all the options/support unfortunatey :\ I haven't checked it out in a while
21:59 khaije1 forrest: from here it sure looks like your right heheheh :)
21:59 forrest hah
22:03 ndrei joined #salt
22:04 Comradephate_ joined #salt
22:04 markhayden drakimor still same issue...hrmm. ubuntu and mac now have different ips but those ports are taken on boot
22:05 jslatts joined #salt
22:05 Drakimor joined #salt
22:05 SpeeR is there a working copy of the salt manual pdf?
22:05 jonbrefe joined #salt
22:05 SpeeR https://media.readthedocs.org/pdf/salt/latest/salt.pdf doesn't work
22:06 Drakimor joined #salt
22:06 bmatt damn, I'm really stumped on how to diagnose this
22:06 bmatt so I download the upstream salt-bootstrap script, run it
22:07 bmatt and it installs salt-master
22:07 bmatt and the install complains about salt-api... but how do I install salt-api before I've run the bootstrap script?
22:07 dusel joined #salt
22:09 oz_akan joined #salt
22:10 bmatt augh.
22:10 * bmatt pulls his hair out
22:10 forrest bmatt, why are you using the bootstrap?
22:10 forrest bmatt, why not just install the packages
22:11 bmatt forrest: using the vagrant salt provisioner
22:11 forrest bmatt, ahh ok
22:11 forrest bmatt, this is on ubuntu right?
22:11 bmatt correct
22:11 forrest bmatt, so it install the salt-master right?
22:11 forrest or does that never finish because of the API
22:12 tcotav I just ran into that.  it installs.  just ugly error I think
22:12 bmatt well, it makes vagrant bail because salt-bootstrap returns with a non-zero
22:12 forrest akoumjian, are you around?
22:13 tcotav bmatt: it bails, but salt-master is running (at least on the node I've got here)
22:13 bmatt right, but it doesn't run any of my post-provisioner actions, nor creates any of the other VMs etc :)
22:14 tcotav ah, right.  :(
22:14 forrest Are you able to specify where in the vagrant config it pulls the bootstrap from?
22:15 forrest if so, you could fork the existing one, add the salt-api to the 'things to download' then do the wget from there.
22:15 bmatt it's an ugly wall of text, but here's the output https://gist.github.com/thenewwazoo/4790600e5e948a16888d
22:15 oz_akan joined #salt
22:15 kermit joined #salt
22:16 forrest bmatt, tcotav have either of you guys tried that?
22:16 bmatt it's getting it from https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh
22:16 babilen bmatt: I'm sure that you actually want to solve this, but I simply use docker with salt-minion and salt-master packages already installed (same for when I was still using vbox, slow, but okay) -- (cf. https://gist.github.com/babilen/e9479fdfbcca431db208 )
22:16 Deevolution joined #salt
22:17 babilen bmatt: I also never ran into your particular problem. All the best! (/me is off)
22:17 forrest bmatt, I don't mean that, I mean are you specifying it to say WHERE to pull it from? I don't use vagrant much
22:17 tcotav forrest: have not tried that
22:17 forrest you specify in the vagrant conf file or whatever where to pull the bootstrap right?
22:17 bmatt forrest: er, sorry. no, that path is baked into Vagrant
22:17 tcotav I don't think so
22:17 forrest ughh
22:17 tcotav yeah -- what bmatt said
22:17 tcotav you choose a provisioning method: salt, chef, puppet, etc...
22:18 tcotav and it "magically" handles that next part
22:18 tcotav :D
22:18 bmatt it curl/wget's the raw bootstrap script from upstream and pipes it into sh
22:18 babilen bmatt: Do you specify 'salt.install_type = "stable"' ?
22:18 bmatt the bootstrap script adds the PPA, and the apt-get installs salt-master, iirc
22:18 forrest hmm, even with the vagrantfile like it's specified here? https://github.com/saltstack/salty-vagrant/blob/develop/example/complete/Vagrantfile#L65
22:19 babilen Ah, on Ubuntu ...
22:19 bmatt babilen: pending
22:19 * babilen *strongly* dislikes any "curl https://..... | sh" -- just horrible
22:19 forrest babilen, yea no kidding
22:20 forrest ok what about this? https://github.com/saltstack/salty-vagrant/blob/bf1baf2804bcdaafd035929d8df5dafe9a8a1373/README.rst#other
22:20 bmatt when was 2014.1.7-1precise1 released? :)
22:20 forrest that looks like an option you can pass or something?
22:20 forrest bmatt, last week I think? Maybe the week befre
22:20 forrest *before
22:20 forrest I'd have to check the release notes
22:20 bmatt weird!
22:20 bmatt I must have burned these VMs down a hundred times over the weekend
22:20 * bmatt checks the bootstrap commit history
22:21 tcotav wait -- is that the right repo?
22:21 babilen bmatt: The Vagrantfile I pasted worked fine with virtualbox base boxes (standard Debian), but I since mostly abandoned it because vbox is just soooo slow. The salt provisioner settings are, however, identical and it works well. I've been using this day to test a variety of formulas/deployments.
22:21 tcotav I thought there was some transition when salt was pulled into vagrant (might be mis-remembering)
22:22 forrest tcotav, there totally could be
22:22 forrest tcotav, I'm just trying to think of ideas for you guys at this point
22:22 scoates joined #salt
22:22 tcotav https://github.com/mitchellh/vagrant/tree/master/plugins/provisioners/salt
22:22 tcotav I think that's it
22:22 forrest yea I'm looking at the docs now
22:23 forrest it looks as though they pulled out the custom bootstrap option :\
22:23 forrest bleh
22:23 tcotav but yah, forrest, I didn't dig that far into it.  salt-master worked enough for me so I moved on
22:23 forrest tcotav, yea, it's only a problem if you're trying to run post setup stuff
22:23 forrest but it's still a damn problem regardless.
22:23 bmatt oh man, weird, okay, so is it some weird interaction between ... something ... and debconf-utils?
22:24 forrest bmatt, I don't know
22:24 bmatt I'm still not quite sure why debconf would know anything about salt-api
22:24 forrest me neither
22:24 bmatt this is tres bizarre
22:24 forrest but it's not in the deps
22:24 forrest and it's not in the service.
22:25 markhayden joined #salt
22:26 dstokes hey guys
22:26 markhayden anyone have experience getting salt up and running on a mac?
22:27 Drakimor_ joined #salt
22:27 forrest markhayden, on the mac OS itself? Or with a VM?
22:27 dstokes say i had a cluster of app servers, and i wanted to bring up an additional node that would deploy the same revision of app code as the other cluster nodes. what would be the best way to go about this? i know i can use the mine to get data about minions, but i need to reduce the list down to a single sha..
22:27 forrest dstokes, what about a custom grain?
22:28 tedski custom grain and salt mine
22:28 forrest markhayden, there's this http://docs.saltstack.com/en/latest/topics/installation/osx.html
22:28 markhayden either or forrest. whatever is the smoothest most stable way.
22:28 forrest markhayden, ok, well you can use that one I just linked, there's also http://docs.saltstack.com/en/latest/topics/tutorials/walkthrough_macosx.html which talks about setting it up on virtualbox
22:28 dstokes so, i already have grains on all minions that detail the currently deployed sha, but those are only accesible from the master right?
22:28 forrest so you have a few options
22:29 markhayden awesome thanks. anyone have experience on mac native vs virtual box?
22:29 forrest dstokes, right but that's where the mine comes in
22:29 forrest markhayden, well, I don't have experience on mac native, but I do have experience with virtualbox being a pain sometimes :P
22:30 markhayden haha
22:30 dstokes i guess if i shifted the first minion off the array in the mine data and used that sha that could work. they _should_ all have the same code deployed ;)
22:30 herlo alt-install could create environments for each distro/os and allow profiles to go in each. From that, each system could pick a profile, which would be configured in dhcp (if desired) and the tftp server.
22:30 herlo oops
22:30 forrest off topic
22:30 forrest jeez herl
22:30 forrest *o
22:31 forrest dstokes, have you looked at the mine docs yet?
22:31 forrest I don't see why you'd need to shift the minion off
22:31 forrest can't you grab the data from the system live?
22:32 forrest dstokes, alternatively (and what I'd probably do) is you could just set the value of the software via pillar, you're the one deploying updates correct? They don't auto update?
22:32 dstokes forrest: to clarify, 5 minions in a cluster means 5 sha's (tho they should all be the same), which also means a minion would need to "pick" one to deploy
22:32 forrest dstokes, so what is keeping you from setting this value inside of pillar
22:32 dstokes pillar does define revision but because the git state doesn't rly support shas we're using branches which can be updated
22:33 forrest dstokes, I see
22:33 dstokes pillar defines 'master', but obvi that's a moving target
22:33 forrest dstokes, right
22:33 forrest yea that's a problem for sure
22:33 bmatt oh, okay, yep. it's lines 1784-5 in the salt-bootstrap.sh script
22:33 dstokes i think i can probably safely get away with pulling the first minion in the mine data and assuming that is the cluster deployed revision (sha)
22:34 forrest dstokes, yea I was going to suggest that you define one node as the 'correct' node
22:34 forrest by which all other nodes are judged :P
22:34 bmatt installing the master implies salt-api, but it's not in the deps
22:34 poogles joined #salt
22:34 bmatt I *know* we're excited about helium, guys, but it's not released yet! :)
22:34 dstokes bmatt: you having trouble with vagrant salt provisioner? seeing the same on latest tag (v2014.7)
22:34 bmatt dstokes: yes
22:34 forrest dstokes, seems to be only an issue with 2014.1.7
22:35 bmatt the install_ubuntu_restart_daemons function in salt-bootstrap wants salt-api
22:35 forrest and later?
22:35 bmatt but doesn't install it by default
22:35 dstokes bmatt: cool. i opened a pr on bootstrap a few weeks back to add salt-api, but looks like it came out before salt dep update
22:35 bmatt yeah, it got merged in :)
22:35 dstokes forrest: sounds good (re sha ident), thx
22:35 forrest dstokes, np
22:35 forrest there was a stable release of the bootstrap yesterday...
22:36 forrest what line was the add on to handle the salt-api dstokes?
22:36 bmatt 1784
22:36 forrest or was it the 1784 as noted by bmatt
22:36 dstokes forrest: in bootstrap?
22:36 forrest yes
22:36 dstokes https://github.com/saltstack/salt-bootstrap/commit/5a46dc326690c84f881c5739c225158c7c7649ea
22:36 dstokes from https://github.com/saltstack/salt-bootstrap/issues/415
22:37 bmatt yep, dstokes has it
22:37 forrest https://github.com/saltstack/salt-bootstrap/blob/stable/bootstrap-salt.sh#L1780
22:37 forrest am I missing something?
22:37 forrest or not understanding?
22:37 forrest that's in stable now
22:37 bmatt forrest: check 1784 and 1785
22:38 bmatt both say "$_INSTALL_MASTER"
22:38 bmatt so if you're installing master, it tries to restart the salt-api service
22:38 bmatt which fails
22:38 bmatt because there is no salt-api
22:38 bmatt I blame s0undt3ch
22:39 forrest and you submitted a patch for this dstokes?
22:39 dstokes i think the issue is saltstack/salt not salt-bootstrap. checking..
22:39 forrest develop looks the same to me on those lines
22:39 forrest dstokes, ok
22:39 bmatt dstokes: I'm 100% certain the problem is in salt-bootstrap :)
22:40 dstokes forrest bmatt: yeah, nvm. i was thinking of something else (copying over netapi dirs)
22:40 forrest dstokes, ok
22:40 dstokes worked with whitehinge on that
22:40 forrest bmatt, can you submit a patch?
22:40 forrest bmatt, if so, I can talk to s0undt3ch to see if we can push it to stable
22:40 forrest since it's totally breaking vagrant :P
22:40 bmatt I'm not actually sure how to add salt-api as a dep for salt-master in the script
22:41 bmatt which, imo, is the right call
22:41 bmatt probably
22:41 bmatt I guess?
22:41 bmatt :)
22:41 forrest bmatt, ok let me ask s0unt3ch
22:41 forrest if he's around
22:44 forrest I've messaged him, he doesn't seem to be around however.
22:44 forrest but he's aware at least now
22:46 stevednd When pillar files are flattened, is it possible to declare that a nested hash value in the later file completely win out, rather than merge with the file above it?
22:46 bmatt alright, pull request coming in a few minutes
22:46 forrest bmatt, what fix are you proposing on it?
22:46 markhayden forrest. think i got it installed natively. whats the best way to test that the master is working properly? i ran `sudo salt-master --log-level=all` and it loaded the right config / is outputting some trace stuff.
22:47 bmatt forrest: adding salt-api as a "master install" package to e.g. line 2150
22:47 bmatt https://github.com/saltstack/salt-bootstrap/blob/stable/bootstrap-salt.sh#L2150
22:47 forrest markhayden, I'd probably just do that, and confirm it's listening on ports 4505 and 4506, then from there install the minion on a system and try to join it
22:47 forrest bmatt, cool.
22:48 markhayden word. working on that now, thanks for your help.
22:48 forrest markhayden, yea np, I'm great at linking docs :P
22:48 zandy joined #salt
22:48 markhayden hahaha.
22:49 bmatt forrest: I don't think that'll resolve the issue on non-package-managed platforms
22:49 markhayden are there many users that stop by trying to get set up on mac?
22:49 forrest bmatt, neither do I
22:49 bmatt I'm not sure what magic happens for those
22:49 forrest markhayden, a few, most people are running Salt off of servers though or playing with it on cheap VMs so it isn't huge
22:50 manfred bmatt: you are making it optional right?
22:50 bmatt manfred: negative
22:50 manfred you should
22:50 manfred salt-api is not required for a salt master to run
22:50 carmony is there really something called saltnado?
22:50 bmatt either master depends on it or it doesn't
22:50 forrest bmatt, the master doesn't depend on it
22:50 manfred ^^^
22:50 forrest manfred, it's problematic because of how it works
22:51 bmatt well, then I should probably submit a PR to revert the commit that introduced it?
22:51 manfred it doesn't depend on it, so you should add an extra flag to install it
22:51 bmatt and bootstrap won't support salt-api?
22:51 forrest manfred, nah you're overlooking the main issue
22:51 manfred bootstrap should support it
22:51 dstokes suggestion in my pr was to "install by default". there wasn't any talk about a flag, but you should be able to disable..
22:51 forrest manfred, there was a commit that introduced a bug for the api :\
22:51 manfred i just jumped in
22:51 manfred oh ok
22:51 manfred what bug
22:51 forrest manfred, yea I figured. Basically it tries to restart the API service when you specify to install the salt master, but the api package isn't installed
22:51 forrest so it craps itself
22:51 bmatt my goal is to get the bug out of stable :)
22:51 manfred ahh ok.
22:52 forrest bmatt, I'd say revert the change for now
22:52 dstokes also, is 2014.7 officially "stable"?
22:52 manfred then yeah, fix that, but it shouldn't always install salt-api unless you specify it to
22:52 manfred dstokes: no
22:52 dstokes bmatt: or were you referring to bootstrap?
22:52 forrest manfred, bmatt I'm looking at https://github.com/saltstack/salt-bootstrap/issues/415
22:52 manfred dstokes: it is just a tag/branch, when it still needs some release candidates, and then to have 2014.7.0 tagged
22:52 dstokes manfred: right
22:53 forrest which dstokes linked earlier. And this is problematic for sure, since whiteinge is saying it should be installed by default
22:53 manfred yeah, i don't want it to install salt-api
22:53 manfred unless I add like -A ...
22:54 forrest manfred, yea, I think it's because of that new support that was mentioned
22:54 dstokes "A"s taken ;)
22:54 manfred i said like -A, doesn't have to be A, it could be -a or --api or --dinnertime
22:54 manfred for all that i care :P
22:54 bmatt alright, i submitted https://github.com/saltstack/salt-bootstrap/pull/437
22:55 N-Mi joined #salt
22:56 bmatt also, I vote for the '--dinnertime' flag
22:56 forrest dstokes, bmatt I've messaged s0undt3ch so he's aware of the PR
22:56 bmatt thanks sir
22:56 dstokes forrest++
22:56 forrest hopefully when he shows up he'll be able to get it pulled in so shit isn't broken at least :P
22:56 forrest dstokes, breaking stuff with your requests, JEEZ
22:56 bmatt I'm a fan of notbroken shit
22:56 bmatt =D
22:56 forrest I think everyone is
22:56 dstokes forrest: i didn't hit the merge button brah
22:56 dstokes ;)
22:56 forrest dstokes, EXCUSES
22:57 manfred i prefer my code to be broken
22:57 dstokes forrest: OK IT WAZ MEEE
22:57 bmatt job skurity amirite
22:58 bmatt oh hey look, someone actually beat me to it
22:58 bmatt hahahah https://github.com/saltstack/salt-bootstrap/pull/436
22:58 forrest that only reverts the one though
22:58 bmatt ahh
22:58 bmatt indeed
22:58 forrest so it's still going to be a problem for all the other occurences
22:58 Luke joined #salt
22:58 bmatt yep
22:59 forrest I've made a note requesting that 436 is closed
23:00 oz_akan joined #salt
23:03 Outlander joined #salt
23:03 bmatt woohoo. salt-formulas, now salt-bootstrap
23:03 bmatt I'm going to back out commits everywhere! :)
23:03 forrest bmatt, untill s0undt3ch goes "NO, PROPER FIX INCOMING'
23:03 forrest and then closes your PR
23:03 bmatt hahaha I'll take that too
23:03 forrest actually he probably won't, s0undt3ch is awesome
23:04 bmatt I feel bad that I can't be like "YO HEREZ UR FIX BRO" but I just don't have time to try to understand the script :)
23:04 forrest bmatt, nah it's fine.
23:04 forrest fixed > not working.
23:05 aquinas joined #salt
23:06 FeatherKing joined #salt
23:06 dstokes orchestration should load sls files in the std format right? getting an error about a missing sls that's totes there..
23:07 dstokes i.e. salt-run state.orchestrate relativepath.tosls
23:07 tedski if you're missing an sls that included somewhere downstream, it errors at the highest level
23:07 tedski it's misleading
23:07 dstokes the errors mentions the targeted sls specifically
23:07 bmatt not just missing, but have a syntax error within
23:07 yomilk joined #salt
23:07 FeatherKing joined #salt
23:07 tedski what bmatt said
23:07 bhosmer joined #salt
23:08 tedski if foo includes bar which includes baz, and there's an error in baz, it'll tell you foo isn't found
23:08 tedski iirc
23:08 * dstokes facepalms
23:08 brendanburns joined #salt
23:09 tedski blame bmatt for that on
23:09 tedski e
23:09 bmatt it's probably my fault, I didn't try to back someone's commit out
23:09 tedski hah
23:09 dstokes i don't suppose -lall will give me anything to go off of..
23:09 bmatt tedski: last night's contribution to mysql-formula included backing one of whiteinge's changes out
23:09 bmatt dstokes: alas not
23:10 * dstokes assumes fetal position
23:10 FeatherKing joined #salt
23:10 tedski dstokes: the prescription is head scratching and a second set of eyes
23:11 dstokes tedski: noted, thx
23:13 FeatherKing joined #salt
23:14 bmatt dstokes: I recommend a depth-first search of the include space
23:15 dstokes saucy.. already on it ;)
23:15 dstokes strange thing is it works locally (vagrant) but not on staging
23:18 bmatt dstokes: oh, I often break scripts by not expecting zero-length lists in pillar data
23:18 bmatt er, s/scripts/states
23:19 FeatherKing joined #salt
23:19 mosen joined #salt
23:20 dstokes deleting all but a single variable assignment (w/ static string) in my target sls does not resolve the issue. gonna keep looking
23:21 dstokes current syntax for orchestration is `salt-run state.orchestrate thing` right?
23:21 dstokes i'm on 2014.7
23:22 stevednd does anyone know if it's possible when using pillar includes to include the data under a nested key?
23:22 stevednd dstokes: that looks correct
23:23 stevednd I just copied this from my history that I ran the other day 'salt-run state.orch orch.apps.board.deploy'
23:24 eliasp stevednd: see http://docs.saltstack.com/en/latest/topics/pillar/#including-other-pillars
23:24 eliasp "[…]  as well as an optional key under which to nest the results of the included pillar:"
23:25 stevednd eliasp: yes, I know how to include pillars. I'm asking about including those results under a nested key
23:25 stevednd as you can see from that example they just nest under 'users'
23:25 stevednd I'm looking for something like 'users:settings' 'user.settings', or something like that
23:26 stevednd neither of those work btw
23:26 bmatt stevednd: {% set foo = salt['pillars.get']('dict:path:bar', False) %} {% if foo != false %}{{ foo.quux }}{% endif %}
23:27 eliasp bmatt: salt['pillar.get'] doesn't work from Pillars…
23:27 eliasp bmatt: other Jinja stuff works, but pillar.get is seemingly excluded to prevent circular reference issues
23:28 FeatherKing joined #salt
23:28 stevednd bmatt: yeah, eliasp is in the right place. It's just the nested part that's the problem
23:28 snuffeluffegus joined #salt
23:28 eliasp stevednd: https://github.com/saltstack/salt/issues/6955
23:28 bmatt oh derp. right.
23:29 eliasp stevednd: once that's implemented, you could solve your issue by simply re-using the included pillar inside your pillar…
23:30 stevednd eliasp: yeah, I've seen that issue before, but it's been out there for a while. So I'm not really holding out for that
23:31 mosen is it a super bad idea to introduce external dependencies into a custom grain?
23:36 stevednd I think this is about where the pillar magic happens https://github.com/saltstack/salt/blob/95b44af831eeca3df261b3d61b7519fbd65319c6/salt/pillar/__init__.py#L417
23:36 stevednd I'm not a python master, but I'm pretty sure there's no way to specify a nested dict key using the syntax {key: nstate} is there?
23:41 bmatt sure there is
23:41 bmatt {"foo": bar, "mydict": {"baz": quux}}
23:42 bmatt is that what you mean?
23:44 stevednd bmatt: no, I mean using the syntax as it is in salt right now for the pillar include
23:44 bmatt oh, you want to include only part of a dict tree defined in an sls?
23:45 stevednd no
23:45 bmatt :-\
23:46 bmatt alright, clearly my question answering powers have run out today, and so I must go home
23:46 * bmatt &
23:46 stevednd it looks like it will require an update to salt to allow for it to work
23:48 zandy joined #salt
23:49 alanpearce joined #salt
23:50 nyx joined #salt
23:53 vejdmn joined #salt
23:54 ifmw joined #salt
23:57 billh joined #salt
23:59 dccc joined #salt

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