Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-12-14

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

All times shown according to UTC.

Time Nick Message
00:02 actn joined #salt
00:02 actn left #salt
00:03 falenn joined #salt
00:07 oida joined #salt
00:12 cyteen_ joined #salt
00:13 keimlink_ joined #salt
00:17 yomilk joined #salt
00:22 hightekvagabond joined #salt
00:27 jeffspeff joined #salt
00:32 abednarik joined #salt
00:34 yomilk joined #salt
00:40 AdamSewell does anyone know if salt can alert if a minion is offline?
00:41 tpaul joined #salt
00:42 aurynn I think there's a reactor event that happens when a minion drops?
00:48 jaybocc2 joined #salt
00:50 akhter joined #salt
00:51 yomilk joined #salt
00:55 yomilk joined #salt
00:59 yomilk joined #salt
01:03 oida joined #salt
01:03 otter768 joined #salt
01:03 spuder joined #salt
01:03 bemehow joined #salt
01:05 quasiben joined #salt
01:19 bhosmer_ joined #salt
01:24 bhosmer_ joined #salt
01:31 yomilk joined #salt
01:36 brianfeister joined #salt
01:36 abednarik joined #salt
01:47 spuder joined #salt
01:59 charli Hello, can i disable usb3.0 and force the system to use 2.0 only?
01:59 brianfeister joined #salt
02:00 solidsnack joined #salt
02:02 catpiggest joined #salt
02:12 otter768 joined #salt
02:21 burp_ joined #salt
02:24 Laogeodritt joined #salt
02:25 synical joined #salt
02:27 favadi joined #salt
02:32 antpa joined #salt
02:35 kshlm joined #salt
02:35 spuder joined #salt
02:37 cyborg-one joined #salt
02:38 beardedeagle joined #salt
02:40 Linuturk joined #salt
02:40 jaybocc2_ joined #salt
02:49 anmol joined #salt
02:51 bemehow joined #salt
02:55 LondonAppDev joined #salt
02:56 otter768 joined #salt
02:58 anotherZero joined #salt
02:58 armyriad joined #salt
02:59 catpigger joined #salt
03:02 malinoff joined #salt
03:06 ageorgop joined #salt
03:06 cberndt joined #salt
03:11 racooper joined #salt
03:24 anmol joined #salt
03:29 BretFish_ joined #salt
03:34 otter768 joined #salt
03:35 dabb joined #salt
03:38 evle joined #salt
03:47 larsfronius joined #salt
04:03 oida joined #salt
04:06 gldnspud joined #salt
04:16 jaybocc2 joined #salt
04:18 malinoff joined #salt
04:18 auzty joined #salt
04:24 rdas joined #salt
04:28 dabb joined #salt
04:32 anmol joined #salt
04:36 ramteid joined #salt
04:37 yuhlw joined #salt
04:37 berto- joined #salt
04:38 Eugene joined #salt
04:38 Edgan_ joined #salt
04:58 hackel joined #salt
04:58 oida joined #salt
05:01 spuder joined #salt
05:04 _ikke_ joined #salt
05:04 riftman joined #salt
05:21 bhosmer_ joined #salt
05:34 alexlist joined #salt
05:46 solidsnack joined #salt
05:48 BretFisher joined #salt
05:49 favadi joined #salt
05:53 oida joined #salt
05:57 spuder joined #salt
05:58 tristianc joined #salt
06:03 calvinh joined #salt
06:11 nZac joined #salt
06:12 ramteid joined #salt
06:12 LondonAppDev joined #salt
06:12 xenoxaos joined #salt
06:13 otter768 joined #salt
06:16 hightekvagabond joined #salt
06:37 AlberTUX joined #salt
06:38 solidsnack joined #salt
06:38 tristianc joined #salt
06:39 ex-cowboy joined #salt
06:45 burp_ joined #salt
06:49 burp_ joined #salt
06:49 felskrone joined #salt
06:54 malinoff joined #salt
06:54 malinoff joined #salt
07:03 hojgaard joined #salt
07:07 Joren joined #salt
07:09 colttt joined #salt
07:11 shilpa joined #salt
07:11 shilpa hi
07:11 shilpa i have just installed slat master and minion on ubuntu hosts
07:11 shilpa when i do "salt-key -L" on master
07:11 shilpa i dont see anything being returned
07:12 shilpa can some one pls help me on this
07:14 AlberTUX1 joined #salt
07:16 tkharju joined #salt
07:22 colegatron joined #salt
07:26 HappySlappy joined #salt
07:26 [vaelen] joined #salt
07:27 dendazen joined #salt
07:27 bhosmer_ joined #salt
07:28 solidsnack joined #salt
07:28 AndreasLutro shilpa: sounds like your minion isn't connecting to the master
07:31 jamesp9 joined #salt
07:33 felskrone1 joined #salt
07:34 linjan joined #salt
07:36 felskrone joined #salt
07:39 colegatron joined #salt
07:39 nafg joined #salt
07:42 tkharju joined #salt
07:47 felskrone joined #salt
07:47 hblah joined #salt
07:47 hblah left #salt
07:49 larsfronius joined #salt
07:49 mattiasr joined #salt
07:54 KermitTheFragger joined #salt
07:56 dgutu joined #salt
08:02 shilpa hi but wht could be the problem
08:02 shilpa i updated the ip in minion file
08:02 shilpa i mean master ip
08:05 oravirt joined #salt
08:07 oravirt joined #salt
08:07 oravirt joined #salt
08:10 oravirt joined #salt
08:10 oravirt joined #salt
08:11 cberndt joined #salt
08:12 nZac joined #salt
08:14 otter768 joined #salt
08:15 eseyman joined #salt
08:15 elsmo joined #salt
08:18 babilen shilpa: You might want to take a look at the minion log and/or start it with "salt-minion -ldebug"
08:22 qman__ joined #salt
08:24 rb_ joined #salt
08:24 oravirt joined #salt
08:25 AirOnSkin joined #salt
08:26 oravirt joined #salt
08:29 slav0nic joined #salt
08:32 oravirt joined #salt
08:34 oravirt joined #salt
08:34 yomilk joined #salt
08:35 oravirt joined #salt
08:38 oravirt joined #salt
08:43 oravirt joined #salt
08:43 oravirt joined #salt
08:43 oravirt joined #salt
08:45 oravirt joined #salt
08:45 oravirt joined #salt
08:48 cyteen joined #salt
08:49 oravirt joined #salt
08:53 oravirt joined #salt
08:53 elsmo joined #salt
08:55 oravirt joined #salt
08:56 GreatSnoopy joined #salt
08:57 oravirt joined #salt
08:59 shilpa i checked and said stop and start master
09:00 shilpa but nothing helped me to get the list of keys
09:03 thalleralexander joined #salt
09:07 Grey_H joined #salt
09:11 Couch joined #salt
09:12 rotbeard joined #salt
09:14 jbax_ joined #salt
09:15 GreatSnoopy joined #salt
09:17 thalleralexander joined #salt
09:21 thalleralexander joined #salt
09:22 s_kunk joined #salt
09:24 N-Mi_ joined #salt
09:26 jhauser joined #salt
09:27 Xevian joined #salt
09:27 LondonAppDev joined #salt
09:30 herzi joined #salt
09:32 rdas joined #salt
09:33 kbaikov joined #salt
09:36 shilpa anyone who has idea pls help me
09:36 shilpa resolve this
09:42 Rumbles joined #salt
09:43 Rumbles hi, I'm trying to set up a user account on a number of machines which is disabled by default, so it can only be used when someone has activated it for use for a limited period. I was hoping I could create these users in salt, but don't see a way to leave the user disabled, can anyone tell me if that's possible?
09:45 jaybocc2 joined #salt
09:47 chiui joined #salt
09:52 pviktori joined #salt
09:55 jchen joined #salt
09:55 jchen left #salt
09:58 keimlink joined #salt
09:58 elsmo joined #salt
10:03 av_ joined #salt
10:08 yawniek how can i list all enabled schedule: tasks ?
10:15 avenda joined #salt
10:15 keimlink joined #salt
10:15 otter768 joined #salt
10:22 charli joined #salt
10:22 giantlock joined #salt
10:24 hemebond joined #salt
10:24 acsir joined #salt
10:30 ggoZ joined #salt
10:42 irctc463 joined #salt
10:42 irctc463 Hey all , I am very new to salt stack , exploring things like file.managed , blockreplace etc ,
10:42 irctc463 I had been facing one problem
10:43 irctc463 I have minions around 100 , all have a php configuration file , but on every server this varies
10:44 irctc463 is there any way to get the values of these configurations from minions and use them in salt state file
10:44 irctc463 so that while executing the tasks these values dont change
10:45 irctc463 any help is welcome
10:46 denys joined #salt
10:47 amcorreia joined #salt
10:49 LondonAppDev joined #salt
10:49 Mandorath joined #salt
10:50 larsfronius joined #salt
10:52 larsfron_ joined #salt
11:00 cb joined #salt
11:00 yomilk joined #salt
11:13 babilen irctc463: The basic idea is to write a php.ini template that incorporates these values from pillar and then to make pillars available to your minions that contain the values you want to be in there.
11:13 babilen So, basically: You tinker with this until salt sets the values you want to be in there (not the ones that are in there)
11:14 babilen I'd also argue that, if you have 100 minions and that if all these values differ for every minion that you might want to make them a bit more similar
11:14 vvoody joined #salt
11:14 babilen This doesn't necessarily have to be in absolute values, but can also be in terms of ratios (e.g. half the RAM)
11:17 babilen Why is everybody leaving as soon as I start talking to them?
11:23 bhosmer joined #salt
11:27 nkuttler you're smelly?
11:31 cb joined #salt
11:31 malinoff_ joined #salt
11:32 malinoff_ joined #salt
11:41 Fabbe :-)
11:44 Grokzen joined #salt
11:46 yomilk joined #salt
11:57 jaybocc2 joined #salt
12:07 fredvd joined #salt
12:07 tristianc joined #salt
12:08 saltypenguin joined #salt
12:12 Rumbles Hi, I asked this earlier, but I had to go out, I didn't see any responses on my return, so apologies for the repetition...
12:12 Rumbles I'm trying to set up a user account on a number of machines which is disabled by default, so it can only be used when someone has activated it for use for a limited period. I was hoping I could create these users in salt, but don't see a way to leave the user disabled, can anyone tell me if that's possible?
12:12 Score_Under joined #salt
12:13 Score_Under does anyone know the behaviour of "salt.states.file.blockreplace" when neither append_if_not_found nor prepend_if_not_found are true?
12:13 jaybocc2 joined #salt
12:15 pfallenop joined #salt
12:16 otter768 joined #salt
12:17 bhosmer joined #salt
12:21 pfallenop joined #salt
12:22 LondonAppDev joined #salt
12:28 ericof joined #salt
12:31 quarcu hi chaps, can someone tell me how to go back to salt 8.1 ?
12:31 quarcu I'm on 8.3 ATM but want to go back, but salt repo does not show me 8.1 available
12:33 Score_Under https://github.com/saltstack/salt/tree/v2015.8.1 I'd pip install from this tag (not 100% sure how to do that without manually checking it out locally though)
12:36 stolenmoment1 left #salt
12:39 akhter joined #salt
12:47 quarcu kk, managed by myseld
12:47 quarcu *myslef
12:47 quarcu **myself
12:47 quarcu turned out the old version got moved to different directory
12:48 quarcu in case someone would be interested (for centos 7 / rhel 7) old version land here: https://repo.saltstack.com/staging/yum/redhat/latest/x86_64/archive/rhel7/
12:48 quarcu so for undo operations you need to add archive repo
12:51 abednarik joined #salt
12:58 akhter joined #salt
12:59 akhter joined #salt
13:06 nZac joined #salt
13:11 Xevian joined #salt
13:11 flowstat_ joined #salt
13:23 DammitJim joined #salt
13:29 tristianc joined #salt
13:37 favadi joined #salt
13:40 favadi joined #salt
13:40 morissette joined #salt
13:41 wangofett Rumbles: you can set them to I think it's /sbin/nologin
13:41 colegatron joined #salt
13:41 wangofett or /bin/false
13:41 wangofett (their login shell, that is
13:41 flowstat_ joined #salt
13:42 wangofett Rumbles: you can also disable their password
13:42 traph joined #salt
13:42 traph joined #salt
13:43 shiriru joined #salt
13:43 wangofett Rumbles: you do that with `- empty_password: True`
13:43 Mandorath Hi, I'm installing a salt-minion on installation of an os with foreman and im getting a strange loop. When i look in the post instal log i see: 'SaltClientError: Could not access /etc/salt/pki/minion. Path does not exist. Exception RuntimeError: maximum recursion depth exceeded while calling a pythion object'. After that it keeps looping that error in combination with 'I/O operation on closed file'.
13:44 _JZ_ joined #salt
13:45 wangofett zesty!
13:50 Mandorath I see there is still a bug open for this #27453
13:52 flowstat_ is there a simple way to test jinja statements (like printing to the console?)
14:01 jvblasco joined #salt
14:01 TooLmaN joined #salt
14:03 tpaul joined #salt
14:05 _JZ_ joined #salt
14:11 jeddi joined #salt
14:13 malinoff joined #salt
14:14 evle joined #salt
14:16 bhosmer joined #salt
14:17 otter768 joined #salt
14:17 Rumbles thanks wangofett, I knew I could change the shell, didn't know about the empty password option
14:17 BogdanR How can I see what are the minions communicating with the master in real time?
14:17 teryx510 joined #salt
14:18 Rumbles passwordless logins would just allow someone to login without a password though...?
14:18 johnkeates joined #salt
14:19 rubenb BogdanR: Run a command with "-l debug", which shows some useful info.
14:19 rubenb "-l garbage" is even more verbose.
14:19 numkem joined #salt
14:22 bhosmer joined #salt
14:22 Ahlee BogdanR: You want to see what chatter is going on? subscribe to the event bus, there's sample code in salt/testing in the repo. Want to see what minions are currently connected? salt-run manage.up (or manage.status for up and down)
14:23 johnkeates left #salt
14:24 jaybocc2 joined #salt
14:25 favadi joined #salt
14:26 cpowell joined #salt
14:27 winsalt joined #salt
14:28 flowstat_ anyone know of a simple way to output jinja variables to console?
14:29 flowstat_ show_full_context() is causing me tons of headaches
14:33 wangofett flowstat_: you could always try cmd.run: - name: echo {{ something_jinja }}
14:33 flowstat_ ... well duh
14:33 flowstat_ I knew there was something obvious I was forgetting
14:33 flowstat_ thanks!
14:34 BogdanR Ahlee: I would like to see the chatter. Can you please give me more info for subscribing to the event bus?
14:36 mpanetta joined #salt
14:36 Ahlee https://github.com/saltstack/salt/blob/develop/tests/eventlisten.py
14:40 jaybocc2 joined #salt
14:41 oeuftete joined #salt
14:41 quasiben joined #salt
14:42 racooper joined #salt
14:44 tristianc joined #salt
14:46 flowstat_ joined #salt
14:47 Deevolution joined #salt
14:48 bluenemo joined #salt
14:50 kshlm joined #salt
14:50 perfectsine joined #salt
14:53 tuxx hey guys
14:53 tuxx why does it happen that after the weekend i go back to work and call "salt -v '*' test.ping"
14:53 tuxx and then like 3 out of 10 minions reply.. then i run it again and maybe 5 or 6 minions reply.. and each time i try again, more minions respond
14:54 tuxx after like the forth attempt they all responded
14:54 Norrland tuxx: all minions running the same version?
14:54 tuxx yea
14:55 Norrland and you're not running some ancient version then?
14:55 tuxx Salt: 2014.1.13
14:55 tuxx is it ancient?
14:56 Norrland yeah. 2015.8.1 is latest
14:56 Score_Under Is there some salt module I can run to output a certain file from the salt env? I'm looking to include other files in templated files, but I will need to be able to pull from the salt env
14:57 flowsta__ joined #salt
14:58 tuxx Norrland: were connectivity issues a known problem in older versions?
14:59 flowst___ joined #salt
15:00 arapaho joined #salt
15:00 Norrland tuxx: yeah, can't remember exactly. But I think most of our delay problems were fixed when updating to the 2015.x branch
15:00 ALLmightySPIFF joined #salt
15:02 tristianc joined #salt
15:03 Ahlee tuxx: what zeromq version? and you'll likelyw ant to enable keep alives
15:04 tuxx PyZMQ: 14.4.0
15:04 tuxx ZMQ: 4.0.5
15:04 Ahlee well, those are recent :)
15:05 Ahlee enable keep alives if upgrading to 2015 isn't feasible
15:06 Ahlee https://docs.saltstack.com/en/latest/ref/configuration/examples.html search for keepalive (couldn't find a way to link directly, and it doesn't appear to be included in conf/master in the repo
15:09 flowstat_ joined #salt
15:09 Tanta joined #salt
15:13 Score_Under Nobody knows how to cat, view, download (etc) a file from the salt master?
15:13 anotherZero joined #salt
15:13 quarcu use command execute ;)
15:14 quarcu ie
15:14 quarcu salt '*' cmd.run 'uname -a'
15:14 quarcu replace uname with the stuff you want to do
15:15 quarcu or if you want to do it directly on salt-master, my bet would be remote ssh command
15:15 andrew_v joined #salt
15:15 zmalone joined #salt
15:15 numkem joined #salt
15:16 mapu joined #salt
15:17 linjan joined #salt
15:19 perfectsine joined #salt
15:22 flowstat_ joined #salt
15:30 tristianc joined #salt
15:33 johnkeates joined #salt
15:34 dyasny joined #salt
15:36 beardedeagle joined #salt
15:38 Tanta_G joined #salt
15:40 flowstat_ has anyone here used the boto_Secgroup module?
15:41 Ahlee Score_Under: cp.list_master
15:42 Ahlee Score_Under: you can then cp.get_file to download it to the minion
15:42 Ahlee cp.get_file_str will apparently return the contents of a file, i've never used that method however
15:43 Ahlee https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html#salt.modules.cp.get_file_str
15:52 fyb3r joined #salt
15:52 fyb3r so that issue I was having with the memory leak is actually a problem with syndicated minions
15:52 fyb3r >_>
15:57 ALLmightySPIFF joined #salt
15:57 Tanta_Ge joined #salt
15:57 ALLmightySPIFF joined #salt
15:58 Score_Under Ahlee: that looks like what I'm looking for, thanks
15:58 flowstat_ joined #salt
16:02 AlberTUX1 joined #salt
16:05 sdm24 joined #salt
16:07 PeterO joined #salt
16:07 flowstat_ joined #salt
16:08 Gareth o/
16:12 lumtnman joined #salt
16:12 amcorreia joined #salt
16:12 whytewolf o/
16:13 giantlock joined #salt
16:17 DanyC joined #salt
16:18 otter768 joined #salt
16:18 DanyC hi all, anyone can give me a quick tip on jinja? so i'm trying to get the grain hwaddr_interfaces of the eth0 which is been defined in pillar like _{% set mac_address = salt['grains.get']['hwaddr_interfaces'][pillar['service_interface'] -%}_
16:19 whytewolf DanyC: looks like you are missing an ]
16:19 johnkeates left #salt
16:19 jaybocc2 joined #salt
16:20 whytewolf salt['grains.get']['hwaddr_interfaces'][pillar['service_interface']]
16:20 AndreasLutro salt['grains.get'] is a function, you're treating it like a dictionary
16:23 whytewolf oh good point that should be salt['grains.get']('hwaddr_interfaces:'~ pillar['service_interface'])
16:24 oida joined #salt
16:24 DanyC whytewolf: goot catch, thanks
16:24 whytewolf AndreasLutro: caught that it is a function.
16:24 DanyC AndreasLutro: indeed cause i couldn't get it working otherwise but whytewolf made a good one :D
16:25 DanyC so thank you both AndreasLutro, whytewolf
16:25 * whytewolf was to tired to rember functions vs dicts
16:26 whytewolf but i do have to ask. out of my own morbid curiaosity. what do you need the mac address for?
16:27 DanyC whytewolf: sure, i do need it because of this http://hastebin.com/ojahufogiq.sm
16:27 perfectsine joined #salt
16:28 DanyC whytewolf: and the way to pull the info like subnet-id or SG is to query the aws metadata service hence the trick to pull it out
16:28 whytewolf huh, interesting.
16:29 DanyC whytewolf: i don't want to hardcode the data into pillar and push it down the chain cause then i'll have a chicken & egg issue: you deploy the instance, you then need to inject the data into pillar before highstate - too much hassle ;)
16:30 DanyC whytewolf: fyi - curl http://169.254.169.254/latest/meta-data/network/interfaces/macs/<mac>/subnet-id
16:30 larsfronius joined #salt
16:30 DanyC whytewolf: job done :) you get the same from OpenStack too :)
16:31 whytewolf huh, I never dug deep into the metadata server.
16:31 ekristen joined #salt
16:32 DanyC whytewolf: ah i see - cursed a lot on OpenStack with the metadata service in OpenStack (on SDN was stable, on Provider Networks i lost all my hair :))) )
16:35 DanyC whytewolf: AndreasLutro any idea why _{% set mac_a = salt['grains.get']('hwaddr_interfaces'~ pillar['service_interface']) -%}_ returns Jinja variable 'function' object has no attribute 'hwaddr_interfaces'
16:35 DanyC when the grain name is correct
16:36 amcorreia joined #salt
16:36 whytewolf DanyC: well you need the : cause it needs to be hwaddr_interfaces:eth0 not hwaddr_interfaceseth0
16:36 mschiff Is there a simple way to use dots in pillar filenames? (like foo.example.com.sls)
16:36 whytewolf but it also looks like service_interfaces isn't filled out
16:37 whytewolf mschiff: no. dots repersent logical breaks. so makes it difficult to work around them
16:38 mschiff Thats why I am asking whytewolf ;) ok thx
16:38 DanyC whytewolf: i've done exacty with the : too and got same error
16:42 N-Mi_ left #salt
16:43 N-Mi joined #salt
16:43 N-Mi joined #salt
16:45 whytewolf DanyC: but that error sugests that you are still calling salt['grains.get']['hwaddr_interfaces']
16:46 DanyC whytewolf: damn, forgot about the cache, had to clear ...grr
16:50 nZac joined #salt
16:50 whytewolf one thing i have done is to switch from salt['grains.get']() notation to salt.grains.get() as i find it a lot cleaner. as well as gives a better understanding of when a function is being called vs a dict.
16:51 pcn Has anyone else noticed how slowly the output is returned line-by-line when launching an instance via salt-cloud?
16:51 beardede_ joined #salt
16:51 whytewolf pcn not really. only slow part i ever saw was waiting for the ssh connection to the new minion
16:52 pcn whytewolf: What I'm seeing is that the output comes in chunky bursts, with perceptible delays
16:53 whytewolf pcn, issues with the network causing it to have to resend things?
16:53 whytewolf dns slownes?
16:53 whytewolf a sloth delivering packets?
16:53 pcn dns and network are unlikely, this is ongoing
16:54 pcn Are you logging output somewhere besides stdout?
16:54 cro joined #salt
16:54 whytewolf no i don't use returners
16:55 beardedeagle joined #salt
16:55 whytewolf although i am thinking of it for the next iteration
16:55 pcn I'm going to try a launch with --state-output=terse
16:56 elsmo joined #salt
16:56 pcn hmm... terse is not very terse
16:57 pcn -out quiet next
16:57 whytewolf I am currently using state_output: changes, but I was using the default before without issue
16:57 pcn In ec2, it's taking a bit over 7 minutes to launch, most of which is running the highstate
16:58 pcn Lots of pauses with info logging.
16:58 whytewolf yeah i never had that. with my openstack i would launch and before i even thought of checking had a live insteance fully highstated.
16:59 whatapain joined #salt
16:59 DanyC whytewolf: fyi the final one :) http://hastebin.com/xehejifufe.sm
17:00 ageorgop joined #salt
17:00 whatapain i have a state file that is causing "ERROR: Minions returned with non-zero exit code" even though everything is successful.  I've put the salt minion into debug logging but I can't seem to find the code that's causing the bad exit status.  Anyone have any suggestions on what to look for in the log file?
17:00 pcn whytewolf: good to know.  Probably totally different under the covers betwen ec2 and openstack
17:02 whytewolf whatapain: depends on what kind of state functions you are running. typically non-zero exit code belongs to cmd.run statements
17:02 linjan joined #salt
17:02 Derek_ joined #salt
17:02 spuder joined #salt
17:04 whatapain whytewolf: don't have any cmd.run statements, just pkg, files, and service.  i did have to create a custom init script so that's what i'm looking into first but that init seems to be working and exiting with a status of 0
17:04 Guest69525 Hi, I recently opened a PR to make a small change around modules/npm.py but I'm seeing an odd test failure that I'm not sure how to triage and I don't think it's related to my change. Would anyone be available to take a look and maybe give some insight?
17:04 Diaoul joined #salt
17:06 whytewolf whatapain: well i did say typically. but other functions might also call cmd.run that returns a non-zero result. however if it all is showing up as working you might need to resort to a -l trace to find out what is going on
17:06 whytewolf Guest69525: whats the pr number? it might be nothing
17:07 racooper Howdy folks. trying to figure out why jinja is not being applied in a managed file.  https://gist.github.com/racooper/4838ee4bd29b80df96fc has the output and files in question
17:07 racooper basically, the yum.conf jinja is not applying the pillar['proxy'] settings.
17:09 spuder_ joined #salt
17:09 pcn Hmm, -l critical and --out terse is not supressing state info very much.  I wonder if it would be better to launch the box, then run salt from a script instead.  There just doesn't seem to be any significant redunction in output, and causes an error at the end.
17:10 johnkeates joined #salt
17:11 wangofett racooper: do you have `- template: jinja` in the state?
17:13 Bryson joined #salt
17:13 wangofett racooper: I see that you do. Can you not just do `{% if pillar['proxy'] %}`?
17:13 wangofett I'm pretty sure that does The Right Thing™ in Jinja
17:14 flowstat_ joined #salt
17:14 racooper the problem is if the pillar isn't defined and I don't check for it, then the state run fails (I think, past experience)
17:14 hackel joined #salt
17:16 wangofett Salt may be more particular than flask with it's jinja-ness
17:16 leev if salt['pillar.get']('proxy', False)
17:16 wangofett Which is probably a good thing :P
17:16 racooper you know, I read about pillar.get. maybe I should try that....
17:16 wangofett oh. Haha
17:16 wangofett I see your problem
17:17 wangofett you're comparing against 'True'
17:17 pcn Man, I'm not finding any way to reduce/suppress the volume of salt output.
17:17 wangofett but True in the pillar file
17:17 wangofett unless you've defined it as "True" or 'True'
17:17 wangofett will evaluate to the boolean
17:18 wangofett and the boolean compared with the string should evaluate falsey
17:18 wangofett i.e. True == 'True' is False
17:18 linjan joined #salt
17:18 racooper ohhh didn't catch that. that makes sense in hindsight
17:18 wangofett but honestly, I'd just put the IP of your proxy in there
17:19 wangofett then you can just rewrite {% if pillar['proxy'] is defined %} proxy: {{ pillar['proxy'] }} {% endif %}
17:19 wangofett plus it gives you the easy ability to change what proxy is based on pillar data, if necessary
17:19 racooper good point.
17:20 whatapain whytewolf: narrowed it down to package installation, it's installing just fine nothing obvious in the trace log.
17:22 sbogg joined #salt
17:23 mschiff I want to use pillar "include:" to include pillar form another file and put it into a seperate key with "key: somekey". But how can I make the included pillar data a subkey deeper in the hierarchy? I already tried "key: foo.bar" and "key: foo:bar", but that will not work... any Ideas someone?
17:23 whatapain and all the "Executing command:" statements are returning 0
17:26 Guest69525 whytewolf: https://github.com/saltstack/salt/pull/29650/files
17:26 saltstackbot [#29650]title: Adding ability to disable npm install silent flag | When trying to debug NPM package installation failures/issues it is very difficult to see what is what is happening during the install/being installed that causes a failure. Adding the ability to disable the silent flag will give users the ability to chose if they want to see the output from install.
17:27 Trauma joined #salt
17:28 whytewolf Guest69525: yeah it doesn't look like your error. another merged pull request looks like to broke the test for tornado.
17:28 Guest69525 :( ok thanks. Anything I can do in the meantime?
17:30 whytewolf nope I'm sure someone from salt will get a hold of you if they have any questions. if you havn't already you might make a issue and link the PR to the issue to speed things up a bit
17:31 bfrog joined #salt
17:31 larsfronius joined #salt
17:31 bfrog is a replacement for mine coming? or improvements so that we can use mine data in templates?
17:31 bfrog er in pillar I should say
17:33 writtenoff joined #salt
17:34 whytewolf bfrog: it already happened and you can use mine in pillar [or any other master side system] as long as you are using a newer version. [2015.8.1 or newer IIRC] you can use the runner version of mine.get
17:36 whatapain whytewolf: even weirder, a salt-call on the minion itself is returning without issue, only when it's going through the master using state.sls
17:36 whytewolf whatapain: that is odd.
17:36 whytewolf whatapain: maybe something with the minion then [salt call works directly with out the minion software]
17:37 whytewolf bfrog: {% set mine_data = salt['saltutil.runner']('mine.get', tgt='host_glob', fun='network.ip_addrs') %}
17:38 flowstat_ joined #salt
17:40 ageorgop joined #salt
17:43 pcn Man, is there a way to get salt-cloud to suppress minion info messages?  I'm not getting any reduction in the volume of log info
17:43 whatapain whytewolf: confirmed, version mismatch on master/minion  master 2015.5.5, minion 0.17
17:44 ingslovak joined #salt
17:44 whytewolf whatapain: ahhh 0.17.5 strikes again
17:45 tzero joined #salt
17:45 whatapain whytewolf: i need to start checking version first :)
17:46 pcn Is this because of this annoying pyopenssl error message that we're getting spammed with?
17:47 lemur joined #salt
17:47 whytewolf pcn, shouldn't be that message is for x509
17:49 wendall911 joined #salt
17:49 pcn whytewolf: I'm wondering if it's blowing up my attempts at making output terse since it seems to log at ERROR constantly.
17:52 conan_the_destro joined #salt
17:52 murrdoc joined #salt
17:54 racooper ok this is weird. (got the pillar proxy jinja issue fixed, thanks!) now after rebooting this server - Centos 7, salt 2015.5.5 from EPEL - minion goes into a restart loop with the error "[ERROR   ] 'bool' object has no attribute 'keys'”
17:59 Rumbles joined #salt
18:03 magic_arrow joined #salt
18:06 baweaver joined #salt
18:08 hightekvagabond joined #salt
18:08 JDiPierro joined #salt
18:10 hightekvagabond joined #salt
18:11 viq joined #salt
18:17 ex-cowboy joined #salt
18:18 otter768 joined #salt
18:22 tristianc joined #salt
18:31 BradThurber joined #salt
18:31 ageorgop joined #salt
18:35 magicarrow joined #salt
18:42 iggy mschiff: you could try playing around with jinja includes, but salt's include won't do that
18:44 fyb3r so when i execute a runner via a reactor, and said runner executes a LocalClient.cmd that targets minions of a syndic (im launching the runner from the master of masters) it causes 2 of the 4 threads to remain open..... no idea how to circumvent this
18:47 ajw0100 joined #salt
18:47 fyb3r other than having the reactor call salt modules via the templating, but i thought i read that was no really best practice
18:47 notnotpeter joined #salt
18:48 murrdoc turducken
18:48 fyb3r ahhhh. forgot about turducken
18:50 stomith salt '*' turducken.nom
18:50 murrdoc use localcmd.async stuff ?
18:51 murrdoc and have the async'ed command fire off another reactor
18:51 murrdoc the 'done' reactor
18:51 fyb3r what if i want seconds though
18:51 murrdoc seconds ?
18:52 fyb3r thought we were still talking about eating a turducken
18:52 whytewolf salt '*' turducken.second_helping
18:52 fyb3r >_>
18:52 Eugene Elevensies!
18:52 fyb3r ^
18:53 fyb3r the upside of IRC, at least if no one has any clue how to fix your problem, youll get a laugh no matter what :D
18:55 Eugene Related: http://imgur.com/gallery/HxdPQXz
18:56 whytewolf that thing looks like cthulhu
18:56 whytewolf do you eat it, or does it eat the world?
18:56 fyb3r the bacon took it to the next level of awesome
18:58 flowstat_ joined #salt
19:01 wangofett lol. That's amazing and horrible
19:01 wangofett nightmare fuel for the holidays \o/
19:03 herlo joined #salt
19:03 chutzpah joined #salt
19:03 chutzpah joined #salt
19:03 scoates joined #salt
19:04 herlo It's been a while since I looked at a minion config this closely. Looking at this http://ur1.ca/ocew1, line 5 does what?
19:05 chadhs joined #salt
19:05 jaybocc2 joined #salt
19:07 whytewolf erlo https://docs.saltstack.com/en/latest/ref/configuration/minion.html#file-roots
19:08 whytewolf herlo: https://docs.saltstack.com/en/latest/ref/configuration/minion.html#file-roots
19:09 herlo whytewolf: that's what I've been looking at. The problem I'm having is that my file_root is not absolute, so I don't necessarily know where it lands...
19:09 solidsnack joined #salt
19:10 whytewolf herlo: it should be absolute. but the default is /srv/salt
19:11 herlo whytewolf: right. This isn't my configuration. So if I just put 'states' like that, does it mean /srv/salt/states? or does it mean /etc/salt/states, since that's where the minion config is located.
19:11 herlo whytewolf: I would normally do it the way you recommend. :)
19:12 whytewolf herlo: honestly i have never just put states in like that so have no idea what the result would be.
19:12 hasues joined #salt
19:12 hasues left #salt
19:12 herlo yeah. That's the same for me. :)
19:12 herlo whytewolf: thus my question.
19:13 pcn Looking at my running salt-minion, the cwd is / so that's a possiblity too
19:13 msx joined #salt
19:13 whytewolf yeah it might be /states
19:13 herlo I guess I need to go beat someone...
19:13 whytewolf beating someone is always the right answer when illogical configs are used
19:14 herlo hehe
19:16 fyb3r what about gouging my eyes out
19:16 chadhs the boto state modules seem to allow the creation of subnets in a vpc, but not the ability to place a resource in a subnet… what am i missing?
19:17 fyb3r i figure its the only thing to relieve the pressure from trying to figure out why execution modules work from cli against minions behind a syndic, but not inside python code
19:17 morissette chadhs, pretty sure you need to create new resources in that subnet vs assign current resources
19:18 morissette "The ID of the virtual private cloud (VPC) the instance was launched into, if applicable"
19:18 morissette Just by definition from AWS
19:18 chadhs @morissette right you can't change it
19:19 chadhs im just curious how to define the subnet a new resource should be in
19:19 chadhs a VPC can have many subnets defined
19:20 morissette https://docs.saltstack.com/en/latest/topics/cloud/aws.html#launching-instances-into-a-vpc
19:20 morissette using the SubnetId?
19:20 pcn whytewolf: here's an example of how bad the cloud outputting time is: https://github.com/saltstack/salt/issues/29682
19:20 saltstackbot [#29682]title: salt-cloud launches via ec2 are very slow | ```...
19:21 hightekvagabond joined #salt
19:21 morissette slower than: http://paste.linux.chat/view/0d5cdaa7
19:21 Edgan How do I make a list in a jinja variable set like yaml? http://fpaste.org/300749/50120852/
19:21 chadhs @morissette, oh im looking at the boto_ modules not salt-cloud
19:22 herlo whytewolf: to answer the question, here's a great read! https://github.com/saltstack/salt/issues/14613
19:22 saltstackbot [#14613]title: permit file_roots to be defined as a relative path | ...
19:22 morissette boto3?
19:22 herlo not necessarily a great way to go about it, but it clears up my question for sure.
19:22 chadhs https://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_asg.html
19:22 chadhs https://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_lc.html
19:22 chadhs looking at those two
19:23 herlo whytewolf: the suggested fixes in the issue seem useful, however.
19:23 chadhs have it working, just haven't figured out ensuring the subnet
19:24 morissette https://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_vpc.html - this does some
19:24 darien joined #salt
19:26 chadhs @morissette so in theory if i define a vpc and subnets then the asg definied in the same state file should use that for membership?
19:26 chadhs if that's the case… interesting :-)
19:26 darien Hey guys, I have one stumbling block left between me and completely automatically provisioned servers - SSH keys. I'd like to have separate keys for each server (but I'm not married to the idea), but I can't figure out how to generate an SSH key on the master for a server I've never seen before. or generate an SSH key on the minion and get the public key to the master before the git-dependent rules run
19:27 morissette chadhs, unsure at this point; doesn't hurt to try it and report back to us though.
19:27 chadhs exactly what im going to do
19:28 darien I'm *assuming* that this is something I could use reactors for (e.g. have the minion generate a key then send a notification to the master to pull it in and put it in place), but I don't want to bark up the wrong tree inadvertently
19:28 morissette darien, gen on master then deploy to new?
19:28 darien morissette: but if the master has never seen/heard of the server before…
19:28 morissette then you need to fix your provisioning script
19:29 morissette bare metal or cloud?
19:29 fyb3r bare cloud
19:29 darien morissette: bare metal
19:29 darien morissette: but I just thought of how I could do it
19:29 darien it'l take some engineering, but so will half the other stuff I have left to do
19:30 morissette I think you'll be okay. This is a pretty common and simple issue to resolve.
19:35 tristianc joined #salt
19:37 darien morissette: yeah, I've already got a few solutions, but honestly I might just use one key for prod servers and call it a day
19:37 mapu joined #salt
19:37 darien with Salt in place I can pretty easily regenerate an SSH key and deploy it out to lock out compromised servers
19:37 morissette Or not getting your servers compromised in the first place :P
19:38 darien you know, these days if someone gets into your VLAN you
19:38 darien re basically screwed
19:38 darien you don't have root access, but you can get into my database so who cares
19:39 MindDrive joined #salt
19:39 * morissette how to encrypt your data
19:39 forrest joined #salt
19:40 morissette two way encryption: http://paste.linux.chat/view/a98a2db9
19:41 colegatron joined #salt
19:41 saltstackbot [reddit-saltstack] Windows Salt-Minions not returning when updating salt. https://www.reddit.com/r/saltstack/comments/3wto0r/windows_saltminions_not_returning_when_updating/ - 2015-12-14 - 19:39:05
19:41 morissette ewww WINDOWS
19:44 cberndt joined #salt
19:44 pmcnabb If I make a file in my local directory called example.sls and run "salt-call --local example" I get a "Module 'example' is not available." Is there a way to run modules without setting up /srv/salt?
19:44 pmcnabb I also tried adding a "-m ."
19:47 whytewolf pmcnabb: well a couple of things. a a file called example.sls wouldn't be a module it would be a state file. so should be called with salt-call --local state.sls example modules are writen in pythong and end in .py
19:48 buhman https://ptpb.pw/AzkP works for me
19:48 whytewolf second see buhman response
19:50 twork joined #salt
19:53 twork i've got a batch of linux minions where the users are authZed by AD, but we add group memberships to their account locally, on the minions' /etc/group. i found https://docs.saltstack.com/en/latest/topics/eauth/index.html#access-control-system
19:54 twork ...but reading there it looks like it's talking about governing access to salt itself, not having salt query AD for account settings. no?
19:55 mschiff iggy: thanks, true. I had it before, then switched to pillar includes maybe its worh a try
19:55 tmclaugh[work] joined #salt
19:55 beardedeagle joined #salt
19:56 twork i should have said 'authNZ'ed', not just authZ, fwiw
19:57 chadhs @morissette: i was able to create subnets and define the availability zone they are in, going to launch an entire test environment and see if it uses the subnets from my config
19:57 morissette w00t
19:57 whytewolf twork. that section is about salt access control. which is controlled by pam.
19:57 morissette let me know; anyone done extension salt-cloud work?
19:58 whytewolf twork: you want this https://docs.saltstack.com/en/latest/topics/eauth/index.html#active-directory
19:59 twork whytewolf: thanks
19:59 chadhs @morissette: :-( it does not, it uses the default subnet(s) for the VPC
19:59 herlo left #salt
20:00 chadhs @Ryan_Lane: do you by chance know a way around that / or defining subnets to use in a boto_lc or boto_asg?
20:02 baweaver joined #salt
20:03 Netwizard joined #salt
20:03 twork whytewolf: actually that link does go to the page where i was looking. ...so it looks like i was on the right track after all. "salt user queries AD for the UID &c of 'user', sets up their home and group memberships on the minion accordingly"
20:04 whytewolf twork: didn't say you weren't looking in the right place :P just that you hadn't looked far enough down the page
20:05 twork whytewolf: ok, thanks
20:12 keimlink joined #salt
20:12 flowstat_ joined #salt
20:14 bhosmer joined #salt
20:19 otter768 joined #salt
20:20 ekristen joined #salt
20:24 jalbretsen joined #salt
20:25 baweaver joined #salt
20:28 johnkeates joined #salt
20:31 GreatSnoopy joined #salt
20:36 tk__ joined #salt
20:38 mclosson joined #salt
20:39 giantlock joined #salt
20:43 PeterO_ joined #salt
20:44 racooper alright. narrowed down my "bool object has no attribute keys" error to a pillar file. https://gist.github.com/racooper/62275c7adc5dc8c9ef57
20:44 Mate joined #salt
20:44 Mate joined #salt
20:45 racooper apparently if I have a pillar key named proxy I get the error, whether it is set to True or False.
20:45 disposable joined #salt
20:46 Tanta_G joined #salt
20:47 AndreasLutro proxy is probably come salt minion config, which can be overwritten by pillars
20:48 ericof joined #salt
20:48 morissette IS this normal: http://paste.linux.chat/view/13871a2f
20:48 morissette (is it waiting for the instance to start)
20:48 ajw0100 joined #salt
20:49 mclosson Greetings, I am trying to conditionally generate part of a managed file in a jinja template based on whether the grains['id'] is in some pillar data but it never matches so I think I must be doing something syntactically wrong in the YAML.  Any suggestions?  https://gist.github.com/anonymous/5a9f41f0e156ec5fb1cf
20:49 bhosmer joined #salt
20:49 Netwizard joined #salt
20:51 pcn mclosson: Always check on the nodes with salt 'hostname' grains.items to check that the grain is present
20:51 perfectsine joined #salt
20:51 keepguessing joined #salt
20:51 keepguessing does anyone have a slack logs of the last week.
20:52 keepguessing irc salt room logs I mean.
20:52 keepguessing I lost my code and I had pastebinned it here.
20:53 racooper keepguessing, /topic
20:53 morissette :)
20:53 ageorgop joined #salt
20:53 keepguessing racooper: ah vow nice.
20:54 bhosmer joined #salt
20:55 johnkeates left #salt
20:57 bhosmer__ joined #salt
20:58 mclosson pcn: thanks!  Indeed that was a problem, a subtle typo in the specified id for the host to match
20:58 mclosson err that was the problem
20:59 fyb3r1 joined #salt
21:01 chadhs @morissette i think i'm going to give this a shot: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_cfn.html
21:02 chadhs i vastly prefer a simple yaml file and the boto modules, but not being able to set subnets is a dealbreaker unfortunately.  at least i can manage and push CFN updates if i get this to work this evening
21:02 chadhs thnx for the help! :-)
21:07 KennethWilke joined #salt
21:08 morissette not sure how much help I was but you're welcome :)
21:09 ex-cowboy joined #salt
21:11 chadhs it was good to explore and make sure i wasn't missing something
21:11 chadhs the other solution is to only have one subnet per AZ per vpc
21:12 flowstat_ yeah, that feels gross to me
21:12 chadhs but i'm going to try using a cloud formation template just for kicks
21:13 mohae joined #salt
21:13 flowstat_ wait, I'm just catching up: I can't specify a subnet for ASG deployment using boto?
21:16 nethershaw joined #salt
21:17 chadhs flowstat_ i couldn't figure it out
21:17 sdm24 Can salt do a reverse dig (get me the hostname from an IP)? I know there is dnsutils module but that only seems to be hostname > IP
21:17 chadhs you can create vpcs and subnets but you can't set a subnet in an asg
21:18 flowstat_ VPCZoneIdentifier
21:18 flowstat_ if you want to spread across 3 subnets, create 3 asgs
21:19 flowstat_ then you can use a single VPCZoneIdentifier per ASG
21:19 chadhs let me know if you get this to work
21:19 chadhs vpc_zone_identifier
21:19 flowstat_ will do
21:19 chadhs i must have been defining it wrong
21:19 flowstat_ I haven't tried it in salt yet, but I'm almost there, i'm just making my IAM roles atm
21:20 flowstat_ I should know by tomorrow
21:20 flowstat_ are you trying to spread a single asg over multiple subnets?
21:20 flowstat_ or just multiple AZs
21:21 flowstat_ sorry, badly worded: are you trying to use multiple subnets in the same AZ for the same ASG?
21:22 baweaver joined #salt
21:24 aidalgol joined #salt
21:24 chadhs subnets are per AZ
21:24 chadhs example to what im after flowstat_
21:25 chadhs existing VPC
21:25 chadhs 15 subnets
21:25 chadhs want to launch an ASG that puts lets say 3 servers into action, across 3 AZs
21:25 chadhs so one server in each
21:26 chadhs i want to define which subnets to use if there's 5 in each of the 3 AZs (15 subnets total in the VPC)
21:26 chadhs this isn't the right syntax but perhaps it would be something similar to this - vpc_zone_identifier: ["subnet-c5de84b2","subnet-c6b1b5a3","subnet-6d8cfe34"]
21:26 flowstat_ right, so there's this quirk of ASGs which have identifiers over 3 subnets
21:26 flowstat_ sorry, over any AZs over 1
21:27 flowstat_ if you lose an instance in 1 AZ, you're not guaranteed that the new one will be in that AZ
21:27 Bryson joined #salt
21:27 chadhs so your solution is to define 3 ASGs?
21:27 flowstat_ so what I've done in the past is make 3 ASGs, each with a single AZ, set to a max of 1/3rd of the total desired instances
21:27 chadhs gotcha
21:28 flowstat_ and that kinda solves this issue too
21:28 flowstat_ the subnet assignment issue, I mean
21:28 chadhs but to do this with boto state module… you still need a way to define the subnet
21:28 chadhs - vpc_zone_identifier: subnet-c5de84b2
21:28 chadhs ^ you just do that in each?
21:28 flowstat_ yep
21:28 chadhs 1:1 relationship
21:28 flowstat_ for a particular stack
21:28 chadhs interesting
21:29 flowstat_ you can get more intelligent about it with jinja, use well-known subnet names or something
21:29 chadhs if this works, my last task will be adding a second block storage device to the instances
21:29 chadhs hmm
21:29 flowstat_ yeah, it sounds restrictive, but you really don't lose that much
21:30 chadhs flowstat_ thanks! you may have saved me a deep dive into Cloud Formation this evening
21:30 flowstat_ np! let me know if that works or if you need any more help with it
21:31 JDiPierro joined #salt
21:33 nZac joined #salt
21:35 chadhs argh! doesn't like it, wish there was an example in the doc
21:35 chadhs `- vpc_zone_identifier: "subnet-c5de84b2"` tried with and without quotes flowstat_
21:35 flowstat_ it's a list
21:36 flowstat_ put brackets around it
21:36 flowstat_ (at least, it's a list in cfn)
21:38 chadhs yeah tried that too
21:38 flowstat_ did you do: - vpc_zone_identifier: \n - subnet-c....
21:38 flowstat_ (I'm not super sure about yaml syntax)
21:39 hightekvagabond joined #salt
21:39 flowstat_ gotta head out, I'll check back in when I get home
21:40 chadhs thnx!
21:41 whatapain is there a way to gracefully exit a state file with a specific error when something like a pillar value isn't found?
21:42 babilen whatapain: What do you mean by "gracefully" exactly? You might be looking for "failhard", but I wouldn't necessarily call that "gracefully" :)
21:43 whatapain for example, i have package file names in a pillar for centos7 and ubuntu14 but if a centos6 box tries to run a state that pillar doesn't exist so i'd like for salt master to come back and say "this state file doesn't support centos6"
21:43 whytewolf whatapain: yes, try to make sure the pillar is setup. and if not the only state that renders should be on of the test states
21:43 nethershaw joined #salt
21:43 magic_arrow joined #salt
21:43 whytewolf wangofett: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.test.html#module-salt.states.test
21:44 whatapain otherwise i get a generic jinja template error that's hard to track down if you don't know what you're looking for
21:44 whatapain like, if pillar['test'] is null then exit with error "blah"
21:47 babilen whatapain: You can easily test for that ("is defined" -- http://jinja.pocoo.org/docs/dev/templates/#defined) + https://docs.saltstack.com/en/latest/ref/states/all/salt.states.test.html#salt.states.test.fail_without_changes + failhard
21:47 babilen whatapain: Do you want the entire highstate to fail?
21:48 ajw0100 joined #salt
21:48 whatapain babilen: i don't mind if the state fails, i'm more interested in a custom error returned when the state fails
21:49 whatapain instead of a generic jinja error
21:49 whatapain well, it's not 100% generic but it's not specific to what the error actually is
21:50 babilen You can probably use 'name' for that ..
21:50 babilen I don't like that, but you can probably do it
21:50 XpLoZeD joined #salt
21:50 XpLoZeD whats up guys
21:51 babilen Which remdinds me: Do we *finally* have some way to summarise the outcome of a highstate run over multiple minions ?
21:51 whytewolf whatapain: you could do something like this https://gist.github.com/whytewolf/60d0318b33122af367e1
21:51 XpLoZeD babilen can I ask you something in query
21:52 babilen XpLoZeD: If you have to, but I typically prefer to keep it in the channel
21:52 XpLoZeD i invited u
21:52 whatapain whytewolf: neat, never used test before.  i'll give it a try.  thanks!
21:54 spuder joined #salt
21:54 whytewolf test states are great for odd things that need doing
21:56 XpLoZeD hey guys
21:57 whytewolf hi XpLoZeD
21:57 babilen ...
21:57 whytewolf ... guess I upset them
21:57 sdm24 :(
21:57 babilen Well, with a nick like that
21:58 whytewolf I'm a friendly wolf ... most of the time
21:58 sdm24 So does anyone know a good way with salt to get the hostname from an IP address?
21:58 chadhs flowstat_ yeah somethings odd i keep getting "TypeError: cannot concatenate 'str' and 'NoneType' objects"
21:59 chadhs syntax looks like it should be similar to the ansible docs
21:59 chadhs http://docs.ansible.com/ansible/ec2_asg_module.html
21:59 whytewolf sdm24: depends on if it is already setup for reverse dns
21:59 chadhs vpc_zone_identifier: [ 'subnet-abcd1234', 'subnet-1a2b3c4d' ]
21:59 sdm24 whytewolf: I think it is
22:00 sdm24 like network.reverse_ip returns something, but not the hostname
22:00 whytewolf huh, never mind I thought the dig module had a PTR function but apperently it doesn't :/
22:01 whytewolf I guess you could get it with cmd.run 'dig -X {{salt.grains.get('ipaddress')}}' template=jinja
22:02 whytewolf but that implys dig is installed
22:02 DammitJim joined #salt
22:03 babilen Shouldn't be too hard to add to the dig module
22:03 racooper joined #salt
22:04 whytewolf it shouldn't be no. looking at the module there is a few functions missing.
22:04 sdm24 nope. that was my fallback plan
22:04 babilen I mean other records are essentially c&p, really
22:05 babilen + a PR and everyone is happy
22:05 jaybocc2_ joined #salt
22:05 sdm24 whytewolf: but I can't just use grains.get ipaddress because I want to query an outside server (maybe) that isn't a minion so I can't do mine either
22:06 jbirdman joined #salt
22:06 Lars__ joined #salt
22:06 whytewolf sdm24: that was just an example.
22:06 sdm24 definitely
22:06 whytewolf doens't mater where the info comes from :P
22:06 sdm24 now I just need to figure out how to pull the hostname field only from dig -x
22:07 babilen sdm24: Why don't you fork the dig module locally?
22:08 sdm24 huwha?
22:08 whytewolf sdm24: https://github.com/saltstack/salt/blob/develop/salt/modules/dig.py
22:09 sdm24 oh cool
22:09 sdm24 time to crack my python knuckles
22:09 babilen Copy that into _modules and add whatever you need
22:09 sdm24 yeah good thinking
22:10 babilen https://docs.saltstack.com/en/latest/ref/modules/#modules-are-easy-to-write
22:10 babilen (hence the PR idea, to get that functionality into mainline)
22:10 sdm24 thanks
22:10 babilen I honestly have no idea why they didn't add a function for every record .. I mean, it really didn't take much :)
22:11 sdm24 should I create that PR now?
22:11 ConnorMC joined #salt
22:11 babilen Well, you have to implement it first, don't you?
22:12 whytewolf for a full PR, might need to also write a test for it. but that shouldn't be to hard either.
22:13 sdm24 man I might be getting in over my head haha. I'll try to work on this over the next few days
22:13 whytewolf at the very least you have a start to your problem
22:14 sdm24 definitely
22:14 whytewolf the dig tests are not that complex eitehr https://github.com/saltstack/salt/blob/develop/tests/unit/modules/dig_test.py
22:16 ConnorMC left #salt
22:17 sdm24 never mind my coworker figured out a different solution : /
22:17 sdm24 but another solution is the win_network.nslookup will take IPs
22:18 whytewolf ahhh windows ... yuck
22:18 whytewolf but at least it solves the problem
22:18 sdm24 yeah
22:19 magicarrow joined #salt
22:21 otter768 joined #salt
22:26 venu0336 joined #salt
22:30 dyasny joined #salt
22:31 burp_ joined #salt
22:32 perfectsine joined #salt
22:33 whytewolf really wish fedex would really hurry up
22:36 xmj joined #salt
22:36 xmj how do i create a pickle in jinja2?
22:36 jrgochan1 Hello hello. Anyone ever come across an error like this? "UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 104: ordinal not in range(128)"
22:36 jrgochan1 '
22:37 zer0def joined #salt
22:38 * babilen hands saltstack some python3
22:39 * whytewolf watches as saltstack chockes and dies
22:39 geekatcmu has python3 ever gotten a functional MySQL module?
22:40 whytewolf geekatcmu: pymysql is said to be python3 compat
22:40 geekatcmu huh.
22:40 geekatcmu Maybe I can finally start using py3
22:43 mosen joined #salt
22:44 babilen sqlalchemy should also be usable
22:45 keepguessing joined #salt
22:46 keepguessing I run the command sudo salt '*-master' salt.highstate '*'
22:46 keepguessing and I see alot  of "Comments" Service blah set to be enabled
22:47 keepguessing should I be waiting for this to happen?
22:47 babilen Not with "test=True" ? Could you paste actual command and output to one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, … ?
22:48 keepguessing babilen: http://paste.debian.net/345123/
22:49 babilen What's the command?
22:50 keepguessing sudo salt '*-master' state.highstate '*'
22:50 babilen Why the trailing '*' ?
22:50 keepguessing babilen: I am not sure I wanted to check if there were any failures.
22:51 keepguessing I am using this command to see which packages where installed.
22:51 whytewolf '*' doens't do anything
22:51 whytewolf least after the state.highstate
22:52 keepguessing okies
22:52 babilen I'm heading off now, all the best!
22:52 babilen (cya guys tomorrow)
22:52 whytewolf you had 0 Failers. 80 Succeeded, with 12 that were unchanged and 5 that did change
22:53 baweaver joined #salt
22:53 whytewolf have a good one babilen
22:54 keepguessing babilen: good bye
22:54 magic_arrow joined #salt
22:54 keepguessing whytewolf: yes the summary is fine. But I do not see any of my services running.
22:54 keepguessing whytewolf: now I see 8 failed.
22:55 keepguessing does the out put show the order in which the packages were installed?
22:55 whytewolf yes
22:56 keepguessing the topmost red thing would hav trickeld the rest of the reds
22:57 nZac joined #salt
22:57 dendazen joined #salt
22:59 hightekvagabond joined #salt
23:05 perfectsine joined #salt
23:06 viq joined #salt
23:10 xmj derp question: Can I write custom filters for the jinja2 used in salt?
23:12 yomilk joined #salt
23:12 bfrog joined #salt
23:13 whytewolf xmj: currently no. however you could +1 this feature request. or put a PR against it. https://github.com/saltstack/salt/issues/28236
23:13 saltstackbot [#28236]title: Feature: Allow users to define custom jinja filters in _filters | It would be awesome to be able to easily extend the jinja renderer ourselves as detailed in http://jinja.pocoo.org/docs/dev/api/#custom-filters...
23:16 Kelsar joined #salt
23:19 jeddi joined #salt
23:20 tristianc joined #salt
23:20 MTeck joined #salt
23:21 MTeck iggy: How do I do "- minute: random" for a cron resource in chef?
23:24 Kelsar joined #salt
23:24 shaggy_surfer joined #salt
23:24 jdwilly2001 joined #salt
23:24 jdwilly2001 good evening salters
23:24 shaggy_surfer anyone using salt-api for orchestration?  I want to shift from using Fabric calls to salt commands using ssh to using api from jenkins.
23:25 shaggy_surfer I see some docs here:  https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html
23:25 shaggy_surfer is this all the documentation for the salt-api?  It's integrated in newer versions correct?  I want a good place to see how to configure it and test it
23:28 gtmanfred shaggy_surfer: it is pretty straight forward
23:28 gtmanfred it is in the newer versions of salt
23:29 gtmanfred you don't have to install a seperate thing
23:29 gtmanfred those configs there are really all you need, and they go in the master config
23:29 shaggy_surfer so just pop in the example and test using get/post , etc.?
23:30 gtmanfred yeah, lemme see if i can find the one where they give you all the commands
23:30 bhosmer_ joined #salt
23:30 shaggy_surfer thanks, that would be great
23:30 gtmanfred basically, you are just calling the backends like from the cli, but giving the data in the -d field, instead of on the command line
23:31 gtmanfred actually, you have ti right there i think
23:31 gtmanfred https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html
23:31 gtmanfred yeah, bottom of the page is all of the things
23:31 shaggy_surfer cool. so I am looking at the right docs then?
23:31 gtmanfred yeah
23:31 shaggy_surfer perfect. thanks man.
23:33 gtmanfred no problem :)
23:34 Kelsar joined #salt
23:35 \ask joined #salt
23:38 Kelsar joined #salt
23:38 job is a mirror out of sync?
23:38 job E: Failed to fetch http://repo.saltstack.com/apt/debian/8/amd64/latest/pool/main/z/zeromq3/libzmq3-dev_4.0.5+dfsg-3_amd64.deb  404  Not Found [IP: 198.199.77.106 80]
23:38 job trying to follow https://docs.saltstack.com/en/latest/topics/installation/debian.html
23:39 whytewolf interesting i don't see a -dev i see a -dbg
23:40 conan_the_destro joined #salt
23:41 whytewolf humm, but there is reference to it in the repo Packages file
23:46 jdwilly2001 here is my challenge and thought... i need to detect a destroy or destroying on salt-cloud... so i set up a reaction.
23:46 jdwilly2001 i want to react by removing the computer from the domain
23:47 Kelsar joined #salt
23:47 jdwilly2001 but i need to get the host name that matches the minion so i can pass to the unjoin_domain module
23:47 jdwilly2001 im thinking i can store it in salt mine... but would it be purged when the minion key is killed?
23:48 Grokzen joined #salt
23:49 jdwilly2001 i think i got it... since im joining the machines to the domain with the AWS instance id, instance-id is in the event data
23:50 jdwilly2001 so i can lookup the computer via powershell and remove it
23:50 abednarik joined #salt
23:55 M-liberdiko Does some one know if they are recording of saltconf15 or if some slides will be made available?
23:56 whytewolf M-liberdiko: https://www.youtube.com/playlist?list=PL9svBjLDUl_8BqpIDKlCTqHZI2mkysTvZ
23:57 houngj joined #salt
23:58 amcorreia joined #salt
23:58 spuder joined #salt
23:59 burp_ joined #salt
23:59 ageorgop joined #salt

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