Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-07-16

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

All times shown according to UTC.

Time Nick Message
00:00 gadget-girl UtahDave  line 32 and 40 and buging me what should be their
00:00 ajw0100 joined #salt
00:01 UtahDave it looks like the state is returning malformed data structure
00:01 UtahDave is this a state Salt ships with or a custom state?
00:02 gadget-girl custom that i am writing to support but like make part of the salt
00:02 gadget-girl officaly
00:02 gadget-girl https://gist.github.com/sarasfox/d96ecc6b9e43dae0ce9f
00:04 fsteinel_ joined #salt
00:04 gadget-girl https://gist.github.com/sarasfox/652fbcba9385c83f0fec here is the code UtahDave
00:07 gadget-girl ps the fun part is the foxx-manger api is not fully documented
00:08 napsterX joined #salt
00:08 GrueMaster joined #salt
00:09 UtahDave OK, I think I see what's going on.
00:10 UtahDave So the proper way to make this work is first create a Salt execution module for this.  The execution modules are where the rubber hits the road and your code actually does something
00:10 UtahDave Things like "add something", "delete something" "check for the existence of something"
00:11 UtahDave Then you create a Salt state that will use the execution module to check the state of what you're doing, then use the execution module to actually do the required actions to get everything into the correct state
00:11 UtahDave The Salt states have to return a very specific data structure, which is probably why you're seeing this error
00:12 UtahDave gadget-girl: I have to head home now, but I should be back online tomorrow morning
00:13 gadget-girl is their any way that we gettin google hangout so get going the right way on this
00:14 zzzirk joined #salt
00:16 UtahDave gadget-girl: check with me in the morning. I've run out of time this evening. dinner is waiting   :)
00:17 zzzirk_ joined #salt
00:17 sarerto joined #salt
00:18 zzzirk joined #salt
00:20 zzzirk joined #salt
00:23 brianfeister joined #salt
00:25 zzzirk joined #salt
00:25 zzzirk joined #salt
00:26 zzzirk joined #salt
00:28 murrdoc joined #salt
00:30 cowpunk21 joined #salt
00:34 zsoftich1 joined #salt
00:36 druonysus joined #salt
00:37 ujjain joined #salt
00:37 ujjain joined #salt
00:39 surge__ joined #salt
00:41 zzzirk_ joined #salt
00:41 Furao joined #salt
00:48 dendazen joined #salt
00:50 primechuck joined #salt
00:54 yomilk joined #salt
00:58 brianfeister joined #salt
00:58 XenophonF joined #salt
01:00 quasiben joined #salt
01:05 druonysuse joined #salt
01:05 druonysuse joined #salt
01:09 napsterX joined #salt
01:14 breakingmatter joined #salt
01:16 jarpy joined #salt
01:17 modulus801 joined #salt
01:19 hal58th joined #salt
01:19 alexanderilyin joined #salt
01:20 Singularo joined #salt
01:20 LtLefse_ joined #salt
01:22 KyleG joined #salt
01:22 KyleG joined #salt
01:22 Tod-Work joined #salt
01:22 numkem joined #salt
01:22 fbrey joined #salt
01:23 heshuge what does the Illegal instruction debug message mean?
01:23 heshuge my minion is having issues starting up
01:24 jarpy Hi Salters. Is there currently a simple way to enqueue asyncronous jobs and execute them serially? My naive attempt results in concurrent execution: https://gist.github.com/jarpy/fce79dcc6eb294622e06
01:25 gadget-girl joined #salt
01:25 beauby joined #salt
01:25 zsoftich1 joined #salt
01:26 SheetiS jarpy seems like an orchestration for the jobs would be best.  http://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html
01:26 jarpy Thanks SheetiS. I'll take a look.
01:27 SheetiS salt-run (used for orchestration) does support --async.
01:28 jarpy Pardon my ignorance: I got the impression from the docs that salt-run if for local execution on one minion. Am I mixed up?
01:28 jarpy *is for
01:28 karlthane joined #salt
01:29 jarpy Ah, I was thinking of 'salt-call'. Lots of reading to do.
01:30 jarpy Thanks again.
01:30 TyrfingMjolnir joined #salt
01:35 SheetiS jarpy: no problem.  salt-run is for 'runners' on the master.  In this case the orchestrate runner that runs states or calls to execution modules in a top-down order in the orchestration file.  They can be to the same minion or to multiple minions (e.g. setup a database minion and a webserver minion to host a website in the same execution)
01:35 RandyT can someone give me some help debugging an s3 fileserver_remote?
01:35 boon joined #salt
01:35 RandyT fileserver.update tells me Could not LazyLoad s3.envs
01:37 SheetiS RandyT: have you already configured the fileserver layout as described in http://docs.saltstack.com/en/latest/ref/file_server/all/salt.fileserver.s3fs.html?
01:37 fbrey left #salt
01:37 SheetiS If it could not pull the list of folders from the bucket, that could be part of the issue.
01:37 RandyT SheetiS: affirmative
01:38 beauby joined #salt
01:38 RandyT trying to come up with some more debug info... I suspect this may be an ec2 instance role issue as well, but that one liner not telling me much
01:40 SheetiS hmm.  are you using iam machine roles (not sure if the s3 fileserver supports this) or did you set the s3 key and keyid in the master config?
01:40 RandyT using the machine roles
01:41 SheetiS you could always try and run the master in --debug mode to try and get more data (https://docs.saltstack.com/en/develop/topics/troubleshooting/master.html#live-python-debug-output)
01:42 RandyT yep, have tried running in debug. still only logging that one liner...
01:45 boon Hello, I have a basic question about installation. Basically, I need to install salt version 2014.7.6 on debian jessie (it has to be this specific version). The latest install instruction install 2015.2 version which is not compatible in my environment. Any help will be greatly appreciated?
01:45 RandyT will play around with using the keys to see if that is the issue.
01:45 RandyT I hear there is some working happening on the fileserver_backend support.
01:45 RandyT would like to get involved in that if they support for machine roles is not there.
01:45 SheetiS have you tried to use s3cmd or something to test access to the bucket from the machine outside of salt?
01:45 RandyT just installed aws-cli for that reason. will check back in. thanks for our help
01:45 mbrgm_ joined #salt
01:45 primechuck joined #salt
01:47 ilbot3 joined #salt
01:47 Topic for #salt is now Welcome to #salt | 2015.5.2 is the latest | Please use https://gist.github.com for code, don't paste directly into the channel | 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/
01:47 boon That version has a bug with gitfs and I was told it's now fixed in 2014.7.6
01:48 SheetiS Ahh. hmm
01:48 RandyT boon: I think you can run the bootstrap install.sh script and specify git v2014.07.05
01:48 RandyT assuming that is a valid tag
01:49 RandyT https://github.com/saltstack/salt-bootstrap
01:50 SheetiS https://github.com/saltstack/salt/tree/v2014.7.6 is a valid tag if that is the version needed.
01:50 zzzirk joined #salt
01:51 boon thank you, RandyT and SheetiS. I was hoping to just do apt-get install but if that's not available, I will look into using salt-bootstrap
01:51 saltstackbot [reddit-saltstack] file.managed a whole directory? https://www.reddit.com/r/saltstack/comments/3dgelu/filemanaged_a_whole_directory/ - 2015-07-16 - 02:48:06
01:51 favadi joined #salt
01:54 favadi joined #salt
01:55 RandyT SheetiS: figured out I had confused the config name for s3 vs s3fs between pillar remote and fileserver_remotes
01:57 RandyT boon: the bootstrap script works nicely and I am finding it is necessary to stay a bit further ahead than the distro repos allow
01:58 twork the top file doc makes my brain bleed
01:58 boon I see. very much appreciate, RandyT. I'll give it a try.
01:59 twork i feel like i'm reading the script for the don's speech to the kids in 'meaning of life'.
02:04 hal58th joined #salt
02:05 furrowedbrow joined #salt
02:08 napsterX joined #salt
02:09 beauby joined #salt
02:11 favadi joined #salt
02:13 quasiben joined #salt
02:15 breakingmatter joined #salt
02:25 jaybocc2 joined #salt
02:25 invalidexception joined #salt
02:29 beauby joined #salt
02:31 TyrfingMjolnir joined #salt
02:37 TyrfingMjolnir joined #salt
02:40 murrdoc joined #salt
02:42 hal58th joined #salt
02:44 evle joined #salt
02:45 beauby joined #salt
02:47 favadi joined #salt
02:53 amcorreia joined #salt
02:54 Bryson joined #salt
02:57 subsignal joined #salt
03:00 jonlangemak joined #salt
03:02 skullone anyone have issues with salt and using batch sizes for the runs? im getting this:
03:03 skullone https://gist.github.com/anonymous/01b1be29971d7b07954a
03:04 skullone runs complete fine if i dont specify the batch size :p
03:04 skullone (albeit slow, from too many machines connecting)
03:06 beauby joined #salt
03:07 iggy skullone: did you search the issue tracker
03:07 iggy istr something like that
03:09 jarpy Is it this one: https://github.com/saltstack/salt/issues/24875 ?
03:09 saltstackbot [#24875]title: ValueError: list.remove(x): x not in list  in   File "/usr/lib/python2.6/site-packages/salt/cli/batch.py", line 179, in run active.remove(minion) | Was running salt 2015.5.2-3.el6...
03:09 getabc joined #salt
03:10 getabc hello
03:10 skullone seems to be the one
03:10 getabc does anybody have experience with windows install_flags?
03:12 getabc trying the following, but giving errors
03:12 getabc install_flags: ' /quiet /qn /norestart /L*V c:\msi.log'
03:14 getabc the minion is returning the following
03:14 getabc '/quiet', '/qn', '/norestart','/L*V','"c:\msi.log"'
03:15 murrdoc joined #salt
03:16 getabc the following puts minion in execute loop
03:16 getabc install_flags: ' /quiet /qn /norestart "/L*V c:\msi.log"'
03:18 skullone im not a windows guy, but whats "/L*V
03:18 skullone heh
03:18 skullone do you need to escape characters there?
03:19 breakingmatter joined #salt
03:21 getabc tells msiexec.exe to log to file
03:22 jarpy so "/L*V c:\msi.log" is a single flag, but it looks like it's tokenizing to two.
03:23 getabc correct
03:23 jchen joined #salt
03:23 jchen left #salt
03:24 jarpy sorry, I don't know anything about that module, bit is it possible to declare the flags as an array perhaps?
03:24 cberndt joined #salt
03:24 Bryson joined #salt
03:26 getabc it's possible
03:31 Bryson joined #salt
03:36 zipkid joined #salt
03:39 evilrob joined #salt
03:39 getabc but not ideal
03:40 ageorgop joined #salt
03:42 hasues joined #salt
03:43 hasues left #salt
03:44 mosen joined #salt
03:45 antonw joined #salt
03:48 JordanRinke joined #salt
03:51 CaptTofu_ joined #salt
03:53 rjoensen joined #salt
03:54 ashb joined #salt
03:54 LyndsySimon joined #salt
03:54 moderation joined #salt
03:55 EWDurbin joined #salt
03:55 codekobe joined #salt
03:55 baweaver joined #salt
03:55 tcolvin joined #salt
03:56 LinuxHorn joined #salt
03:56 gazarsgo joined #salt
03:57 furrowedbrow joined #salt
03:57 m0nky joined #salt
03:57 esharpmajor joined #salt
03:57 munhitsu joined #salt
03:58 frankS2 joined #salt
03:58 wiqd joined #salt
03:59 imanc joined #salt
03:59 mattl joined #salt
03:59 supermike__ joined #salt
04:00 Sokel left #salt
04:00 zzzirk joined #salt
04:01 OliverMT joined #salt
04:01 OGuilherme joined #salt
04:02 mihait joined #salt
04:02 copelco joined #salt
04:05 jchadwick joined #salt
04:05 packeteer joined #salt
04:06 shawnbutts joined #salt
04:07 chutzpah joined #salt
04:13 lkannan joined #salt
04:15 akafred joined #salt
04:16 JonGretar joined #salt
04:16 ramblinpeck joined #salt
04:18 mikepea joined #salt
04:18 joeyparsons joined #salt
04:22 TyrfingMjolnir joined #salt
04:22 akoumjian joined #salt
04:24 neilfse joined #salt
04:29 ramishra joined #salt
04:29 Tritlo joined #salt
04:30 collinanderson joined #salt
04:33 twodayslate joined #salt
04:37 kutenai joined #salt
04:37 malinoff joined #salt
04:37 [vaelen] joined #salt
04:39 Guest10289 joined #salt
04:41 ITChap joined #salt
04:42 ITChap Hi everyone
04:43 ITChap I am trying to generate a haproxy configuration following the doc example: http://docs.saltstack.com/en/latest/topics/mine/index.html
04:43 ITChap But I don't want to call the mine.get directly from the template
04:43 ITChap I am trying to store the value returned byt mine.get into a variable and iterate over the variable
04:44 ITChap but I don't find the good way to do it
04:44 ITChap Could someone give me a hint
04:44 murrdoc use mines as a pillar
04:45 yomilk joined #salt
04:48 cberndt joined #salt
04:48 quasiben joined #salt
04:49 wendall911 left #salt
04:50 Furao joined #salt
04:50 Guest10289 joined #salt
04:55 Furao joined #salt
04:59 lala joined #salt
05:05 jaybocc2 joined #salt
05:06 cberndt joined #salt
05:09 otter768 joined #salt
05:10 napsterX joined #salt
05:17 rdas joined #salt
05:17 alexanderilyin joined #salt
05:18 jaybocc2 joined #salt
05:19 zzzirk joined #salt
05:26 brianfeister joined #salt
05:39 favadi joined #salt
05:46 ITChap murrdoc: how do you do that
05:47 zzzirk joined #salt
05:51 catpiggest joined #salt
05:54 shantanoo joined #salt
05:57 shantanoo hi
05:58 colttt joined #salt
05:58 shantanoo i am trying to use mysql state. have added mysql credentials in /etc/salt/minion and also added 'pillar_opts: True' in /etc/salt/master.
05:59 shantanoo how can i test whether mysql state is working using CLI?
06:00 breakingmatter joined #salt
06:01 shantanoo i tried "sudo salt '*' mysql.db_list", but i am getting "'mysql' __virtual__ returned False" error
06:02 dopesong joined #salt
06:06 surge__ joined #salt
06:06 packeteer joined #salt
06:13 ITChap shantanoo: where are you running the command ?
06:14 ITChap on the master or minion ?
06:14 shantanoo i am trying this on salt-solo. it will be run on minion once i get it working.
06:16 harkx joined #salt
06:16 AndreasLutro joined #salt
06:17 ITChap shantanoo: try http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.sls
06:17 shantanoo checking
06:17 aparsons joined #salt
06:19 sirex joined #salt
06:20 stoogenmeyer joined #salt
06:22 aparsons joined #salt
06:25 gladiatr joined #salt
06:25 shantanoo ITChap: not able to understand how i can figure out whether mysql state is available and working properly.
06:28 mbrgm_ joined #salt
06:29 jaybocc2 joined #salt
06:30 jhauser joined #salt
06:35 andrew joined #salt
06:36 neilfse joined #salt
06:37 ITChap something like: salt '*' state.sls mysql
06:37 ITChap on your master
06:37 ITChap better targeting your minion instead of *
06:45 ValF shantanoo, what is your version of salt / what is your minion OS ?
06:46 shantanoo ValF: salt 2015.5.2 (Lithium), CentOS release 6.6 (Final)
06:47 fredvd joined #salt
06:48 shantanoo ITChap: Getting error "Cannot extend ID 'reload-yum-database' in 'base:mysql.repositories'. It is not part of the high state."
06:49 julienlavergne joined #salt
06:50 gladiatr joined #salt
06:51 thalleralexander joined #salt
06:54 kawa2014 joined #salt
06:54 ValF shantanoo, can you verify that MySQL-python and python26-mysqldb are both installed on your minion ?
06:54 ValF It's a requirement for that mysql salt module
06:55 ValF https://github.com/saltstack/salt/blob/develop/salt/modules/mysql.py
06:55 shantanoo ValF: let me verify that
06:59 ValF Just got it working, you also need to configure in /etc/salt/minion how to access your mysql server (it is also explained in the module - link I pasted above )
07:00 shantanoo i have install anaconda (2.7.7) along with the native python 2.6. have installed mysql-python for anaconda, but seems like salt is using python 2.6.
07:01 ValF It's fine for python  2.7.7, salt is quite tolerent
07:03 ValF Haven't touched centos for a while but :   'sudo yum list available | grep mysql ' should point you at what package you are after
07:04 Ztyx joined #salt
07:04 oravirt joined #salt
07:04 dopesong joined #salt
07:04 shantanoo i have installed mysql-python for native python using pip.
07:05 ValF alright, what is "sudo salt '*' mysql.db_list" returning now?
07:06 dopesong_ joined #salt
07:06 shantanoo ValF: looks like its working. not getting any error.
07:07 ValF Getting empty output ?
07:07 shantanoo displaying minion-id
07:07 ValF try  :  sudo salt '*' mysql.version
07:08 shantanoo same output
07:09 ValF Ok, so you are just missing the last bit which will let the minion know how to access your mysql server
07:10 shantanoo i have updated /etc/salt/minion with 'mysql.*' details
07:10 otter768 joined #salt
07:10 ValF restart the minion and retry :)
07:10 shantanoo also restarted the salt-minion and salt-master service
07:11 ValF still just returning your minion_id only ?
07:11 shantanoo yes
07:15 sarlalian joined #salt
07:16 terinjokes joined #salt
07:18 shanemhansen joined #salt
07:18 eseyman joined #salt
07:21 ValF shantanoo, there must have an issue in the mysql config to access your minion mysql server
07:21 ValF maybe drop something like this in a file :
07:21 shantanoo \d:/
07:21 shantanoo got it working
07:21 FineTralfazz joined #salt
07:22 ValF alright sweet
07:22 shantanoo instead of port, added socket in mysql config
07:23 shantanoo thanks ValF, ITChap for the help
07:24 jaybocc2 joined #salt
07:24 ITChap shantanoo: np
07:24 ITChap ValF: hey do you have an idea for my previous mine.get issue ?
07:25 ITChap I am following the haproxy sample from the doc
07:26 ITChap but instead of having my for statement on the mine.get inside the template file I would like to have it in the map.jinja
07:26 sifusam joined #salt
07:27 skullone joined #salt
07:27 voxxit joined #salt
07:31 garthk joined #salt
07:32 twiedenbein joined #salt
07:34 retr0h joined #salt
07:34 retr0h joined #salt
07:36 Sniper^^ joined #salt
07:37 hoonetorg joined #salt
07:38 Ztyx joined #salt
07:40 ValF shantanoo, np !
07:41 ValF ITChap, I have to go for a bit but paste your config file so I can remember what it was please
07:44 KermitTheFragger joined #salt
07:44 favadi_ joined #salt
07:49 ITChap ValF: ok thanks will do it
07:50 breakingmatter joined #salt
07:51 ITChap ValF: my map: https://bpaste.net/show/0c33b0c21b46
07:52 ITChap ValF: my config file: https://bpaste.net/show/42071ccfee74
07:53 Gruaig joined #salt
07:53 Gruaig Morning!
07:53 ITChap Gruaig: morning
07:54 Gruaig I have a little question someone may be able to answer:)
07:55 Gruaig Im using cmd.run to run a custom script on a minion, Is there anyway to check what is return by stdout in my state file.?
07:58 ITChap Gruaig: you could redirect stdout to a log file and then use the file.contains module
07:59 ITChap http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html#salt.modules.file.contains
07:59 ITChap But that not very pretty :(
07:59 Gruaig No:( how do you redirect output?
07:59 ndrei joined #salt
08:00 ITChap Gruaig: http://stackoverflow.com/questions/6674327/redirect-all-output-to-file
08:00 ITChap you could add this to your cmd.run
08:00 Gruaig Thanks:)
08:00 ITChap What are you trying to do ?
08:01 ITChap you might be able to replace your whole script by salt states
08:02 Gruaig no im writing a kafka state and I want a health check so I've written a python script that will send and recieve a test message.
08:03 Gruaig On a particular kafka topic
08:10 UForgotten joined #salt
08:11 ValF ITChap, back to your problem, variables don't get populated from your map, is that right?
08:12 fredvd joined #salt
08:13 s_kunk joined #salt
08:15 jaybocc2 joined #salt
08:18 ITChap ValF: this is what happen when I highstate https://bpaste.net/show/f143d631d08b
08:18 stephanbuys joined #salt
08:20 mbrgm_ joined #salt
08:21 ITChap ValF: I am still new to python so it might be something really stupid
08:21 ValF I think it's related to your YAML file
08:22 ITChap ValF: which YAML file Oo
08:23 ValF This : {%- for server_name, server_address in haproxy.backend.servers %}  expects a list and it seems that you give a simple key value
08:23 ITChap but the value of this key is a list no ?
08:24 ValF hang on
08:24 ITChap haproxy.backend.server should contain what has been returned by mine.get
08:25 ValF I think it should look like this :
08:25 ValF https://bpaste.net/show/6653b04eeebf
08:26 ValF and your pillar should have the same format
08:26 ValF for servers
08:26 ITChap but those servers come from mine.get
08:26 ITChap I don't know them in advance
08:27 ITChap can I create a for loop inside the structure ?
08:27 ValF hmmm
08:29 ValF let me check your code again, maybe I misunderstood something
08:29 ITChap maybe I should try to import the servers variable directly inside my config file
08:29 ITChap without trying to add it to the haproxy map
08:30 ITChap check the {% set servers at the top of the map.jinja
08:30 AndreasLutro ITChap: .items needs to be .items()
08:31 ITChap --_--
08:31 ITChap let me check
08:32 ITChap AndreasLutro: you nailed it
08:32 ITChap AndreasLutro, ValF: thank you very much :)
08:33 hoonetorg i have a question regarding using salt-formulas from github.com (f.e. https://github.com/saltstack-formulas/mysql-formula)
08:33 ValF Huh, missed than one, well done AndreasLutro
08:33 hoonetorg usually i fork it in my own account
08:33 hoonetorg then i clone it to /srv/salt-formulas/<name of git repo>
08:36 aberdine How are modules use to feed other modules? Can I call them directly in Python, or is there some other mechanism
08:36 babilen aberdine: "feed other modules" ?
08:36 hoonetorg and then i link f.e. /srv/salt-formulas//mysql-formula/mysql to /srv/salt/base/mysql
08:37 keimlink joined #salt
08:37 babilen hoonetorg: That is a bit complicated to be honest, but please go on .. (there might be a question lurking somewhere)
08:37 hoonetorg is that the "best practice" approach ?
08:37 aberdine babilen so if I I run service.get_all and what to check given services then restart them
08:38 aberdine babilen that is, use the output for some other modules input
08:38 CeBe joined #salt
08:38 hoonetorg babilen: or how is it thought to "bring" a salt formula from <somewhere> on to the salt server?
08:39 impi joined #salt
08:39 babilen hoonetorg: There are basically two approaches: 1. You use GitFS to reference your repositories directly (salt would then take care of checking them out) or 2. Add your local checkouts to file_roots in the master config (which means that you no longer have to symlink)
08:39 ITChap hoonetorg: link to what babilen just explained http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#installation
08:39 babilen hoonetorg: I typically manage my master and minion's salt config with the salt-formula (cf. https://github.com/saltstack-formulas/salt-formula)
08:40 babilen hoonetorg: The first approach would essentially entail to add your formulas as gitfs_remotes to https://github.com/saltstack-formulas/salt-formula/blob/master/pillar.example#L24
08:40 hoonetorg babilen: ITChap: thx a lot, will have a look at it
08:41 babilen hoonetorg: The second approach is handled by defining your formulas in: https://github.com/saltstack-formulas/salt-formula/blob/master/pillar.example#L136 -- In this case salt would clone your formulas automatically to /srv/formulas, keep them up-to-date on highstate runs and add them to the master config in the file_roots.
08:43 shantanoo joined #salt
08:43 ajw0100 joined #salt
08:45 hoonetorg babilen: on 1st look i think i like this approach: https://github.com/saltstack-formulas/salt-formula/blob/master/pillar.example#L136 (only updating development automatically)
08:45 babilen hoonetorg: Deciding between the two approaches is not easy and depends on what you want to achieve. An advantage of the first approach is that you don't really have to do anything but push into your repositories to "activate / roll-out" changes to your formulas as they will be checked every minute for changes. I typically prefer the second approach these days though as it allows me to manually update specifi
08:45 hoonetorg will now try out
08:45 babilen c formulas (simply by running git pull in ...
08:45 babilen ... the checkout) and provides finer control over which master picks up changes at which point in time. In the end you can achieve both workflows with both approaches, but I simply prefer to have "tangible" formulas :)
08:46 babilen hoonetorg: Yeah, that is *exactly* what we are doing. Two branches (dev/master) and corresponding environment
08:46 babilen +s
08:47 babilen (note that you can achieve the same thing with gitfs_remotes in which branches are automatically translated into environments)
08:47 hoonetorg babilen: Yeah, great
08:50 babilen aberdine: Where do you want to use it? (as in: a state written in jinja, python, ... or another custom execution module, ....)
08:53 ITChap Is there a way to execute a state on the specific minion when another minion with a defined grain is added ?
08:55 ITChap for example executing my haproxy-configuration statement when I add a new backend server
08:59 neocid_ joined #salt
09:00 aqua^c joined #salt
09:00 babilen ITChap: You could easily do that with a suitable reactor configuration
09:01 babilen https://docs.saltstack.com/en/develop/topics/reactor/index.html#passing-event-data-to-minions-or-orchestrate-as-pillar has a simple example
09:01 Xevian joined #salt
09:01 ITChap babilen: nice
09:03 ITChap btw I noticed in the job scheduling doc an example to trigger a highstate every hour
09:03 ITChap is it common to do this in production ?
09:03 babilen It does, however, rely on a specific naming scheme of your worker nodes (you can target them differently with all the other targeting methods) and uses the mine to keep track of their IP addresses.
09:04 babilen I don't like to run highstates from a schedule, but I can totally understand why some people do
09:04 markm joined #salt
09:04 markm_ joined #salt
09:04 ITChap babilen: I have a 'cluster' grain that allow me to group LBs and App servers and I use the mine for the IP as you said
09:05 ITChap babilen: how do you do ? you manually run the highstates after updating your states ?
09:05 babilen exactly
09:05 jaybocc2 joined #salt
09:06 babilen I need these "if this goes wrong the entire infrastructure is down" moments to keep me awake ;)
09:06 babilen And no amount of testing really gets rid of that
09:06 ITChap at least you know if it works directly
09:06 ITChap not like 1h later
09:06 ITChap when you are already working on somethign else
09:07 babilen And a colleague asks: "Hmm, did something change? The monitoring is going crazy"
09:07 ITChap exactly
09:07 ITChap and do you highstate a specific subset of machines or '*'
09:10 babilen That really depends on what changed since the last highstate. If I want to roll out a specific change I might not even highstate a minion, but use state.sls. I try to run a highstate against all minions frequently though (say daily) just to make sure that there are no "lurking dangers" or drift between the "should" and the "is" state.
09:10 ITChap ok
09:11 ITChap same looks like a good idea
09:11 otter768 joined #salt
09:11 ITChap I will check the reactor, it might be interesting to automatically highstate new minions
09:12 ITChap after accepting the key
09:12 ndrei joined #salt
09:12 babilen You could do that more easily simply by setting startup_state, but knock yourself out! Salt is very powerful and there are many ways to achieve the same thing.
09:12 babilen http://docs.saltstack.com/en/latest/ref/states/startup.html
09:13 ITChap there is so much stuff to see --_-- between beacon,reactor, states,pillar,mine,orchestrator
09:15 babilen I still haven't done anything serious with beacons :(
09:16 ITChap I will check soon once the provisioning part is done
09:16 ITChap it might be good to replace collectd
09:19 ITChap for the initial highstate. startup_state should be in the minion config right ?
09:22 ITChap I provision my minion with the default config and I use states to update the minion config
09:28 jeddi joined #salt
09:29 khebbie joined #salt
09:31 cberndt joined #salt
09:34 jim__ joined #salt
09:36 morsik hi… can somebody tell me WTF?! :D  https://dpaste.de/4286
09:36 slav0nic joined #salt
09:37 impi joined #salt
09:40 breakingmatter joined #salt
09:44 ITChap babilen: is there anyway to use gitfs for the reactor files ?
09:47 babilen ITChap: You can reference reactors easily with salt:// (and thereby put them anywhere in file_roots or gitfs) -- https://github.com/saltstack/salt/commit/c087f48e787f464b150caf73342c087da941cebf
09:48 ksj is there any further documentation on writing states in pure python than http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.py.html ? I'm really preferring it to jinja+yaml, but there's a few issues have come up, such as why a normal file.write doesn't seem to work.
09:48 ITChap babilen: nice thanls
09:48 ksj I'm a python beginner btw, but even knowing as little as I do, it's MUCH easier and more efficient than jinja+yaml, IMO. I feel like I actually have control over the system now
09:49 babilen Python ftw! :)
09:49 ksj seriously. I can't believe how much time I've wasted trying to do things with yaml and jinja that are TRIVIAL with python
09:50 ksj still can't figure out why I can't write to a file though...
09:51 ksj another thing that's so nice about it is that the salt debug messages actually mean something. The line numbers correlate to actual lines in my code!
09:54 ksj I don't actually need to write to a file, if I could just write to stdout or something. I just want to dump the pillar as python sees it to understand why it's not parsing correctly
09:54 AndreasLutro salt minion-name pillar.get pillar-name ?
09:55 ksj that only works if it's correctly rendered the pillar :-)
09:56 ksj I'm trying to debug
09:56 AndreasLutro possible to share a stack trace/error output?
09:56 ksj mostly I'm wondering why I can't write to a file directly from a pure python state. There must be something special about the environment. That's why I was wondering if there were any other documents about writing pure python states
09:58 ksj it's not one particular problem. It's just that my general approach to debugging has always been "print the variables to stdout and see what you've screwed up". I've never been able to do that with jinja+yaml states. now I've switched to pure python states, I was hoping there was a way
09:59 AndreasLutro well, you can do that if you run `salt-call`
09:59 AndreasLutro if you don't it won't matter what renderer you use
10:01 aqua^c joined #salt
10:01 ksj do you know why I can't write a file within my pure python state file?
10:02 AndreasLutro not without seeing a stack trace and/or your state file
10:02 jmreicha joined #salt
10:07 ksj there is no stacktrace. the highstate runs fine, it's just it doesn't write the file. paste here: http://dpaste.com/01EFSS5
10:08 AndreasLutro nope, no idea
10:11 ITChap babilen: hmm it looks like even with the salt:// trick I still need to define my reactor "top" file in side the master config
10:12 babilen https://github.com/saltstack-formulas/salt-formula/blob/master/pillar.example#L113
10:14 denys joined #salt
10:17 is_null hi all, how to update grains with salt-formula ? i tried adding a new grain in grains:salt:grains /etc/salt/minion.d/_defaults.conf and of course with grains.get salt i don't see it ^^
10:19 is_null ksj: maybe try another pattern like that one ? http://blog.yourlabs.org/post/122381003283/test-driven-development-with-saltstack-sls-code
10:19 is_null ksj: where run() calls generators and fills the dict it'd return
10:21 is_null ksj: i don't recommend code instrumentalization for debugging, but rather using a real debugger, ie. epdb for remote debugging which is what you'll need for things like salt
10:22 is_null ksj: if that code you pasted is included and doesn't do anything, my guess would be that __pillar__['all']['users'] and __pillar__['all']['packages'] are empty.
10:23 ksj is_null: they're not empty. the code works fine. the only problem is that it doesn't write the file /tmp/myfile
10:23 is_null ksj: appart from that, you might have other problems ie. a user has the same name as a package name or vice-versa
10:23 is_null ksj: did you check on both the minion and master ?
10:24 is_null i'm not sure where it'd be executed sincerely
10:24 ksj hmmmm.....no.....didn't check minion.....hold on
10:24 ksj that may be it
10:24 babilen is_null: So, are they written to the minion config?
10:24 ksj yay!
10:24 ksj it's on the minion
10:24 ksj I guess it all gets executed on the minion. I should have thought of that. Thanks a lot
10:26 ksj btw, with regards to grains, you know you have to restart the minion to pick them up?
10:26 babilen The formula would do that automagically
10:28 Aidin joined #salt
10:29 is_null first things first, i don't understand how to just add a new grain, this is what i tried: http://dpaste.com/3G2ZMRT
10:31 is_null ksj: still i recommend that you do users['user_' + user] instead of users[user] and same thing for the package, even if it fixes an edge case bug
10:32 CeBe1 joined #salt
10:33 is_null because if i can't add a new grain, there's no chance i can merge a new grain into an existing grain dict (salt grain dict, used by salt-formula is what i'm aiming to update)
10:33 yomilk joined #salt
10:34 cberndt joined #salt
10:41 linkedinyou joined #salt
10:48 babilen is_null: Where is the f_defaults from? What is the pillar you use?
10:50 giantlock joined #salt
10:50 nocturn joined #salt
10:50 dimduj joined #salt
10:51 shantanoo while creating user using mysql_user, getting following error - https://gist.github.com/anonymous/f05d0aa7af3e628c271c
10:52 bhosmer joined #salt
10:54 bhosmer_ joined #salt
10:54 hoonetorg joined #salt
10:55 bhosmer__ joined #salt
10:56 babilen shantanoo: Could you paste your state too?
10:57 babilen (and the salt version ...)
10:59 linjan joined #salt
11:00 shantanoo babilen: salt 2015.5.2 (Lithium)
11:01 shantanoo babilen: code - https://gist.github.com/cf24a83f44861b654da4
11:05 babilen http://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_user.html#salt.states.mysql_user.present it's "name" rather than "user"
11:06 jaybocc2 joined #salt
11:09 shantanoo thanks
11:09 dopesong joined #salt
11:09 shantanoo my bad
11:11 bhosmer joined #salt
11:12 otter768 joined #salt
11:13 ndrei joined #salt
11:15 mbrgm_ joined #salt
11:17 markm joined #salt
11:18 aberdine babilen either states or other modules. I'm just trying to see how it fits together
11:18 cyteen joined #salt
11:19 shantanoo mysql_user has connection_host, connection_user which overrides config in /etc/salt/minion. did not find anything similar in mysql_grants (http://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_grants.html).
11:20 shantanoo so to use mysql_grants one needs to set DB host details in /etc/salt/minion?
11:22 shantanoo or if there is no configuration, it uses root@localhost by default for mysql_grants?
11:28 sgargan joined #salt
11:29 breakingmatter joined #salt
11:30 fredvd joined #salt
11:32 stoogenmeyer joined #salt
11:37 sgargan joined #salt
11:37 nocturn_ joined #salt
11:38 evle joined #salt
11:40 neocid_ joined #salt
11:41 yudao joined #salt
11:42 yudao Hi all
11:44 yudao In Jinja template file managed I have a loop on the mine.get function. All works except that I want the number of objects and the "number" of the current object in the loop. It is possible to do that? Thanks
11:45 dopesong_ joined #salt
11:45 yudao example of what I want to do => {%  for server,ip in folks %} {"name":"{{ server }}","ip":"{{ ip[1] }}","port":9000}   {% if server is not last %},{% enfid %}   {% endfor %}
11:50 denys joined #salt
11:54 amcorreia joined #salt
11:55 lala_ joined #salt
11:59 cberndt joined #salt
12:04 zzzirk joined #salt
12:06 calvinh joined #salt
12:06 rhodgin joined #salt
12:07 yudao I've my answer. I was searching into saltstack doc instead of the Jinja2 ddoc => {%  for server,ip in pakhets %}{"name":"{{ server }}","ip":"{{ ip[1] }}","port":9000}{% if loop.last is sameas false %},{% endif %}{% endfor %}
12:07 yudao Thanks
12:09 quasiben joined #salt
12:12 che-arne joined #salt
12:17 stoogenmeyer joined #salt
12:17 ingslovak joined #salt
12:20 joeto joined #salt
12:21 mbrgm_ joined #salt
12:23 napsterX joined #salt
12:24 icflournoy joined #salt
12:26 zemm joined #salt
12:28 CeBe joined #salt
12:30 yomilk joined #salt
12:32 PI-Lloyd` joined #salt
12:36 shantanoo joined #salt
12:37 calvinh_ joined #salt
12:38 Bryson joined #salt
12:39 ndrei joined #salt
12:39 lothiraldan joined #salt
12:49 dendazen joined #salt
12:50 aqua^c joined #salt
12:52 shnbdrtgsd joined #salt
12:52 shnbdrtgsd i am not getting any output from salt commands such as test.ping on my new setup
12:52 shnbdrtgsd even though there are three accepted keys
12:52 shnbdrtgsd why is that?
12:53 shnbdrtgsd i am running four instances on amazon ec2
12:53 shnbdrtgsd i had doubts about which ip should i put into "master:" setting, public or private
12:53 shnbdrtgsd i went with private because public didn't seem to work
12:54 shnbdrtgsd now that i am not getting any response from the minions i wonder if it is connected
12:55 che-arne joined #salt
12:57 subsignal joined #salt
13:01 Bryson joined #salt
13:03 hal58th joined #salt
13:04 che-arne joined #salt
13:05 CeBe joined #salt
13:05 DammitJim joined #salt
13:06 furrowedbrow joined #salt
13:07 jaybocc2 joined #salt
13:08 LtLefse joined #salt
13:09 jonlangemak joined #salt
13:10 Tecnico1931 joined #salt
13:11 zzzirk joined #salt
13:11 linjan joined #salt
13:13 otter768 joined #salt
13:13 fxhp joined #salt
13:15 Bambie joined #salt
13:16 kbaikov joined #salt
13:17 Bambie hi there
13:18 racooper joined #salt
13:18 breakingmatter joined #salt
13:22 amcorreia_ joined #salt
13:22 Ymage joined #salt
13:24 cpowell joined #salt
13:27 Bambie can somebody tell me, what is the best practice to get notified by mail, if some state has changed on a minion? I tried to set up a job, but i wasn't able to get a mail only when there was a change. get a mail everytime the job runs...
13:28 primechuck joined #salt
13:32 peters-tx joined #salt
13:34 LtLefse Bambie: I'm thinking a cmd.run state that sends the email, with an onchanges requisite pointing to the state in question
13:34 LtLefse http://docs.saltstack.com/en/latest/ref/states/requisites.html#onchanges
13:35 bhosmer joined #salt
13:36 fredvd joined #salt
13:37 iamtew_ joined #salt
13:38 jonlangemak joined #salt
13:39 mpanetta joined #salt
13:39 Bambie thanks, i will look into it
13:42 shnbdrtgsd another question, why would that be that i can't get my custom grain to run?
13:42 shnbdrtgsd it used to work alright, but now i that transferred salt master to another server it doesnt
13:42 timoguin joined #salt
13:42 shnbdrtgsd i deleted /var/cache/salt/minion, to no avail
13:43 shnbdrtgsd no errors/related debug messages in the log as well
13:43 shnbdrtgsd in the log and in the stdout/stderr when minion is run in foreground
13:43 shnbdrtgsd *now that i
13:44 Bambie @LtLefse: do you have an example, salt is new to me and i'm confused with the documentation at some points
13:45 surge__ joined #salt
13:47 shnbdrtgsd i had to delete minion_master.pub on each minion to make it talk with the new server, now i am looking for a similar glitch somewhere
13:47 shnbdrtgsd *to make them
13:48 Oleg joined #salt
13:48 Oleg Hi there!
13:49 Oleg I got trouble with grains,  in a few server  my "shell" grain  is  /bin/sh .   Howto to change this grain to /bin/bash ?
13:50 LtLefse Bambie: I haven't tested it but I think something like this:
13:50 LtLefse https://gist.github.com/jvestrum/29025f7d5367651b2324
13:50 shnbdrtgsd also, an error: "No Top file or external nodes data matches found"
13:50 iamtew joined #salt
13:51 LtLefse Bambie: oops, I missed a - before file:
13:51 LtLefse but that's the general idea
13:52 Bambie the /etc/somefile is then changed into the "cron"-job?
13:52 LtLefse what cron job?
13:53 babilen Oleg: Why is that a problem?
13:53 Oleg salt '*' grains.item shell server_name:     ----------     shell:         /bin/sh
13:53 shnbdrtgsd Oleg: would grains.setval work for you?
13:53 Bambie i would like to call something on the minion that runs highstate and send me a mail with only changes
13:53 Oleg but for all users default shell is  /bin/bash
13:54 LtLefse Bambie: oh, hmm.
13:54 Oleg It is problem, because with /bin/sh   I lost some PATH environments.   My states works with server which has /bin/bash, and doesn't work with server which has /bin/sh
13:55 favadi joined #salt
13:55 calvinh joined #salt
13:55 Oleg salt 'server_name*' grains.setvals "{'shell': '/bin/bash'}"
13:55 Oleg Salt accept it,  but doesn't change grain
13:56 Bambie at the moment, i using this: https://gist.github.com/anonymous/ebd75f6a0f258e9a8e00
13:56 Oleg 2015.5.2-3
13:56 Bambie but everytime the job runs, i get a mail
13:57 babilen shnbdrtgsd: The value of that grain reflects the server's configuration. You shouldn't set that manually just so that your setup is aesthetically pleasing
13:58 zmalone joined #salt
13:58 Oleg Which value  reflects for shell grain ?
13:58 babilen Oleg: You shouldn't change that grain. Your server is configured that way. If you want to change that grain you have to configure your server to use bash as shell not dash (if *that* is what this is really about)
13:59 calvinh_ joined #salt
13:59 babilen https://github.com/saltstack/salt/blob/develop/salt/grains/extra.py#L18
13:59 perfectsine joined #salt
14:01 shnbdrtgsd babilen: i don't disagree
14:01 rhodgin joined #salt
14:03 Deevolution joined #salt
14:03 Oleg python -c "import os; print os.environ.get;"   on this server i got -   ....     'SHELL': '/bin/bash'  ...
14:03 andrew_v joined #salt
14:05 babilen because you are running it in bash
14:05 babilen Which problem are you *really* trying to solve?
14:05 morsik anyone has an idea how can use my states with rvm/rbenv in salt?
14:06 morsik i have problem with cmd.run that doesn't see rvm/rbenv ruby :<
14:06 morsik I tried both, and I just don't know how to use it with rvm/rbenv correctly to run multiple commands and deploy Rails app
14:07 LtLefse Bambie: yeah, I don't think that approach will work because I don't think you can make the returner conditional
14:07 hasues joined #salt
14:07 Oleg I have states,   it works in my servers. All is good.   Then  I add new servers, but my states which use cmd.run  doesn't  works, because  can run command, because PATH is differend.   The one different is  SHELL grain.   So, when shell=/bin/bash it works,  if shell=/bin/sh,  it doesn't work.     I can change cmd.run state for add shell: /bin/bash .   But, may be it is possible to change grain for shell.
14:08 hasues left #salt
14:08 babilen morsik: Are you sure that you are using the correct path?
14:08 morsik babilen: probably not… but i'm not sure if i should do 'cmd.run:  - name:   RBENV_PATH=/some/thing gem something'  or is there some better way to do this?
14:09 babilen morsik: You want to set - env: ... in the state
14:09 Bambie can i call salt-call state.highstate with changes only? i know there is an option  --state-output=changes, but it shows output even if there is no change
14:10 morsik rvm is pita cause it's function… I ran into strange problems using it with salt. I installed it correctly, I was finally able to run ruby script that used it, but it didn't worked correctly anyway (i needed to do 'source /etc/profile' and then state.sls… not nice)
14:10 morsik babilen: will see.
14:11 Bambie i can pipe the output to a file and send a diff via mail, but i think thats a dirty workaround
14:11 babilen morsik: You are aware of http://docs.saltstack.com/en/latest/ref/states/all/salt.states.rvm.html aren't you?
14:11 bhosmer joined #salt
14:11 morsik babilen: yep, saw that (and about rbenv too)
14:12 morsik babilen: problem is i can even activate ruby… but it doesn't work with salt using one highstate
14:12 b18 joined #salt
14:12 morsik see: i deploy rvm, then rails app, and cmd.run from rails app doesn't see rvm even it was installede correctly
14:12 morsik doing source /etc/profile manually *in terminal*, and then highstate again works -.-
14:13 jaybocc2 joined #salt
14:13 babilen Oleg: So, either configure your box to use bash as sh, use absolute paths or provide any *additional* paths you require
14:13 morsik now trying with rbenv… will see
14:13 morsik I was unable to find anything on the net about deploying rails app using saltstack so… :D
14:14 LtLefse Bambie: yeah, I don't know of any elegant way to do that
14:15 Oleg babilen:   Thanks,  it is good idead.   But I have a many states for changing.  May be there is another path to solve ? )
14:15 Bambie i think i will write a small pythonscript for that, thanks for your help and time
14:16 keimlink joined #salt
14:17 morsik babilen: can i insert original env variable into env? :D  i need to extend PATH…
14:17 morsik just   PATH=/usr/local/rbenv/shims:${PATH} will work like alywas in shell?
14:19 morsik hmm… looks like works!
14:19 shnbdrtgsd how do i know which salt-minion version corresponds to/is compatible with which salt-master version?
14:20 babilen morsik: I guess that would work, yeah
14:20 shnbdrtgsd can i run 0.17.5 master vs 2015.5.2 minion?
14:20 shnbdrtgsd certainly yes, they are both the freshest in saltlaunchpad
14:20 shnbdrtgsd *salt's launchpad repo
14:21 tmclaugh[work] joined #salt
14:21 shnbdrtgsd however the error i get "No Top file or external nodes data matches found" seems to be related to version problems pretty often
14:21 morsik or… no :<
14:22 shnbdrtgsd anyway i did nothing to my salt configuration apart from moving both master and minions to different boxes, but then again i was scrapping/setting up minions all the time with no problems
14:22 morsik babilen: nope. didn't worked. now my PATH is 'PATH=/usr/local/rbenv/shims:${PATH}' so it found ruby… but couldn't find bash :D
14:22 jaybocc2 joined #salt
14:23 babilen progress!
14:24 morsik and i'm using 'shell: /bin/bash' btw…
14:24 cowpunk21 joined #salt
14:24 shiin joined #salt
14:25 morsik eh ok… let's hardcode /bin
14:25 yomilk_ joined #salt
14:25 SheetiS joined #salt
14:26 morsik hell yeah.
14:26 shiin I'm pondering to set "open_mode: True" for my salt development workflow. Is this still discouraged according to documentation (here: http://docs.saltstack.com/en/latest/ref/configuration/master.html)? Because I'd repeatedly create and provision minions using vagrant, and they'd have the same name, but authenticate with the master having different keys. Maybe auto_accept: True alone would work, but I'm not sure.
14:34 ljt joined #salt
14:37 asoc shiin: depending on how you have your networking set up on your vagrant boxes it could be difficult to connect ouside of your box.
14:37 bluenemo joined #salt
14:38 shiin asoc: No. That's a wide open door due to the vagrant boxes having a bridged interface and getting a DHCP IP.
14:38 Ztyx left #salt
14:39 aqua^c joined #salt
14:39 zmalone joined #salt
14:40 Blode- joined #salt
14:41 asoc shiin: ok. If it is set up like that then yes you would have that risk but if you are running in virtualbox with host only networking then it wouldn't be something to worrk as much about.
14:41 asoc If I understand how that works correctly
14:42 shiin Yes that seems about right, thank you.
14:44 asoc If you are looking for ease and some security through obscurity then you could do node name based acceptance.
14:44 asoc example here: http://docs.saltstack.com/en/latest/topics/reactor/#a-complete-example
14:44 __monty__ joined #salt
14:45 asoc That would require that the minions used in you development workflow follow the same naming convention.
14:46 rideh joined #salt
14:47 pcdummy joined #salt
14:48 rideh joined #salt
14:48 surge__ For salt-call state.show_highstate and show_lowstate, the order #s are simply the order that salt has “seen” each function from top to bottom right?
14:49 surge__ In other words, it’s not a true execution order of how Salt will run, correct?
14:49 Brew joined #salt
14:54 ajw0100 joined #salt
14:54 speriyasamy joined #salt
14:55 Gareth morning morning
14:55 Bart_ joined #salt
14:57 ndrei joined #salt
14:58 Bart_ Hi guys, just a general best practices question.
14:58 Bart_ For "state.highstate" Do you prefer to have the master on a cronjob that "syncs" the minions or have minions with cronjobs ?
14:58 Bart_ Daily state.highstes, maybe have one on reboot ?
14:59 bhosmer joined #salt
15:00 TomJepp Updating the firewall on 50+ machines with one command in a terminal :) I love salt some days
15:00 asoc Bart_: I think I would rather have a schedule in their highstate so that you have less peices of the puzzle to remember.
15:01 asoc since it is salt scheduling vs having to manage cronjobs
15:01 shantanoo joined #salt
15:01 Bart_ Salt shedualing ?
15:03 ekristen joined #salt
15:07 Bryson joined #salt
15:09 stoogenmeyer joined #salt
15:10 Bart_ What about having a State.highste on minion boot ?
15:11 teryx510 joined #salt
15:12 sdm24 joined #salt
15:13 morsik maybe stupid question… but it's possible to do state that have variable that contains file content?
15:13 morsik I need to get .ruby-version contents and install it via salt… :D
15:14 otter768 joined #salt
15:14 illern joined #salt
15:18 bmac2 joined #salt
15:19 jondonas joined #salt
15:19 CeBe joined #salt
15:20 dendazen joined #salt
15:24 pcn Hey, is there any tool that uses salt to compare two minions?
15:25 pcn Like: sudo salt compare node-a compare.filesystem node-b
15:25 yomilk joined #salt
15:26 iggy nein
15:28 pcn Interesting...
15:30 jalbretsen joined #salt
15:30 _JZ_ joined #salt
15:31 pcn So, a function that does os.path.walk on two systems, does a checksum on each file, accepts some exclusion/inclusions, and in some cases compares with certain grains being considered equivalent would be helpful for testing
15:31 iggy sounds like it would be highly detrimental to the system actually doing anything useful for a while
15:31 pcn Yup.  It's testing.
15:32 pcn I'm thinking of it as a CI tool to demonstrate the scope of a change.
15:32 iggy I'd think the inotify beacon would be good for that
15:33 iggy well... once the minion event bus is tied into the master anyway
15:33 dopesong joined #salt
15:34 pcn Is there some design doc for that?
15:34 pcn Because yeah, that would be much lighter weight - show me everything minion A did, and everything minion B did from the same image, and I have a smaller list of items to compare at the end.
15:36 iggy not that I know of
15:36 iggy there were some talks on it at saltconf this year
15:38 zsoftich1 joined #salt
15:40 pcn Hm.  I've got an idea about the tool I just described, anyway, so I think I'll noodle on that a bit.
15:40 pcn Thanks
15:41 asoc Bart_: http://docs.saltstack.com/en/latest/topics/jobs/schedule.html
15:42 asoc Bart_: also if you wanted it to highstate on boot you could have the reactor set up to highstate on connect.
15:43 asoc Simiar to this: http://docs.saltstack.com/en/latest/topics/reactor/#syncing-custom-types-on-minion-start
15:43 asoc But you would write a reactor state to highstate instead of sync_grains
15:44 dendazen joined #salt
15:48 mattrobenolt Is it normal to expect that an ext_pillar is called multiple times in a single run?
15:48 iggy kind of depends what said run does
15:48 iggy not unheard of
15:48 mattrobenolt I see when running even sync_grains, our ext_pillar is called 4 times.
15:48 Oleg Hello,  I already asked this questions,  but I try to do it again.       Why grain "shell"  got  value = /bin/sh ?    Howto change it value to /bin/bash?     When I try to get   "  os.environ.get"  from python,   I always got   /bin/bash  ( from any users, and if I set shell - /bin/sh )
15:48 XenophonF joined #salt
15:52 UtahDave joined #salt
15:56 speriyasamy joined #salt
15:57 XenophonF any one here with commit access to saltstack-formulas/users-formula who wouldn't mind taking a look at my pull request? (https://github.com/saltstack-formulas/users-formula/pull/77)
15:57 saltstackbot [#77]title: Rework ssh_keys_pillar-related states | SSH key pairs deployed via the user's ssh_keys_pillar dict aren't...
15:58 * iggy avoids the users-formula
15:58 amcorreia joined #salt
15:58 XenophonF when users-formula deploys keys listed in ssh_keys_pillar, they don't get the proper file system ownership and permissions
15:59 XenophonF users-formula actually works really well
15:59 ndrei joined #salt
15:59 XenophonF i'd end up rewriting most of it (and sudoers-formula) if i didn't use it
16:00 XenophonF that was totally worth it for apache-formula and postfix-formula, which both really suck
16:00 XenophonF but users-formula and sudoers-formula mostly Do The Right Thing
16:00 shiin left #salt
16:03 rhodgin joined #salt
16:04 rideh joined #salt
16:07 wendall911 joined #salt
16:08 RandyT good day folks
16:08 spookah joined #salt
16:08 nebuchadnezzar joined #salt
16:09 RandyT wanted to ask if anyone can suggest a way to access AWS keypairs in a more secure way than having them on local filesystem.
16:09 RandyT is it possible to store them in s3 pillar for example and pull them that way?
16:10 RandyT digging through the docs but not seeing any other approach beyond local filesystem
16:10 rhodgin joined #salt
16:12 sdm24 I don't use AWS (or file server backends) so I don't know if this will work, but http://docs.saltstack.com/en/latest/ref/file_server/all/salt.fileserver.s3fs.html#module-salt.fileserver.s3fs
16:12 sdm24 and then Salt can pull the keys remotely when needed
16:13 RandyT sdm24: thanks, currently using s3fs for pillar files, so will give this a look.
16:14 tmclaugh[work] joined #salt
16:14 RandyT any idea what the path to file looks like when on a salt.fileserver?
16:15 RandyT anyone know if I can just reference the file using s3://bucket/filename for private_key: ?
16:16 sdm24 I think its just salt://bucket
16:16 RandyT ah, ok, will give that a go
16:16 sdm24 oh nope never mind I didn't read the docs I linked
16:16 RandyT sdm24: thanks
16:16 sdm24 Like I said, I don't use it so i'm not sure how its done
16:17 RandyT sdm24: yeah, that is the module. will poke around the source for example perhaps
16:17 sdm24 I use minionfs, and thats referenced with salt://{{ minion id }}/
16:20 mr_const joined #salt
16:20 lexter joined #salt
16:20 druonysus joined #salt
16:20 druonysus joined #salt
16:21 mr_const hi all
16:23 mr_const can you help me with this task: I need to pull sources from git (I created state and it works) and then I need to copy this sources to working directory of the web server
16:23 jaybocc2 joined #salt
16:23 mr_const however file.recurse doesn't allow me to do it
16:23 mr_const Invalid source '/srv/deploy/src/appserv-common/itl' (must be a salt:// URI)
16:23 tmclaugh[work] joined #salt
16:24 sdm24 what is your salt base environment?
16:24 sdm24 that needs to be referenced as salt://
16:25 sdm24 so if in file_roots base is set to /srv/deploy/src, the source line in the state should be salt://appserv-common/itl
16:26 mr_const won't it mean, it copies data from server?
16:27 tmclaugh[work] joined #salt
16:27 sdm24 Is git set up as a file server? http://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html
16:27 mr_const no
16:28 aqua^c joined #salt
16:28 shnbdrtgsd [DEBUG   ] Could not find file from saltenv 'base', 'salt://top.sls'
16:28 mr_const http://pastebin.com/YpvZCDWZ
16:29 shnbdrtgsd minion won't fetch states from the master
16:29 iggy salt-call cp.list_master
16:29 sdm24 the way I use git (inefficiently) is that I have a test environment where I write states, upload those to git after testing, and git will rsync those files down to my production master, and salt uses those local files to push to the minions
16:29 shnbdrtgsd # salt-call cp.list_master
16:29 shnbdrtgsd local:
16:29 shnbdrtgsd hmm
16:29 sdm24 but it works for us because we don't use files that are that large
16:31 favadi joined #salt
16:31 UtahDave joined #salt
16:31 ksj when writing a pure python statefile, how do I get the results of a salt command as a python dictionary? I'm doing this: http://dpaste.com/2APGJGY . Sorry for dumbness - python newbie
16:32 mr_const hmm... maybe it's worth to switch to gitfs?
16:32 mr_const for me
16:32 shnbdrtgsd iggy: but why would that be the case? salt-key seems to have successfully authenticated the minion
16:32 favadi joined #salt
16:32 shnbdrtgsd it shows up in salt-key -L
16:33 wordtodabird joined #salt
16:33 shnbdrtgsd and it prints these messages to stdout
16:33 shnbdrtgsd [INFO    ] Authentication request from Sluis
16:33 shnbdrtgsd [INFO    ] Authentication accepted from Sluis
16:33 sdm24 mr_const or put the files in salt's base directory, defined in file_roots in /etc/salt/master, then "source:  salt://appserv-common/itl" or whatever the path is relative to the file_roots
16:33 shnbdrtgsd whenever minion calls it
16:34 shnbdrtgsd oh, i misinterpreted the meaning of list_master
16:34 sdm24 shnbdrtgsd: are your states located in your file_roots directory?
16:35 shnbdrtgsd sdm24: sure thing they are
16:35 shnbdrtgsd /srv/salt, the default
16:35 sdm24 and cp.list_master is still blank?
16:35 ksj ahh, got it, it should have been: allUsers = __salt__['user.list_users']()
16:35 shnbdrtgsd sdm24: yeah
16:36 mr_const sdm24: thanks, I'll try
16:39 aparsons joined #salt
16:40 sdm24 shnbdrtgsd is roots defined in the fileserver_backend in /etc/salt/master? http://docs.saltstack.com/en/latest/ref/file_server/all/salt.fileserver.roots.html#module-salt.fileserver.roots
16:41 shnbdrtgsd sdm24: it should be, i didn't change a line in the configuration file
16:42 sdm24 try running salt-run fileserver.dir_list on the master
16:44 shnbdrtgsd # salt-run fileserver.dir_list
16:44 shnbdrtgsd Function 'fileserver.dir_list' is unavailable
16:44 SheetiS1 joined #salt
16:44 shnbdrtgsd sdm24:
16:45 sdm24 what master version are you using (salt --version)
16:45 shnbdrtgsd 0.17.5
16:46 sdm24 you should try to upgrade to 2015.5.2
16:46 shnbdrtgsd hmm
16:46 sdm24 http://docs.saltstack.com/en/latest/topics/installation/index.html
16:46 sdm24 I assume you just used the default ubuntu repo?
16:47 shnbdrtgsd oh shi
16:48 shnbdrtgsd i just copy&pasted commands from my salt state that added the ppa etc
16:49 btorch how can I expand this within cmd.run ? echo /var/log/haproxy/haproxy.error-20150{6..7}{01..15}.gz
16:49 shnbdrtgsd somehow it didn't quite work(?!), i assumed it did, i even noticed the difference in versions, but i thought it must be that salt-master and salt-minion have different version lines (!)
16:49 shnbdrtgsd wasted like 4 hours on this
16:49 shnbdrtgsd thank you a lot
16:49 btorch nm bash -c did it
16:50 sdm24 no problem, glad I could help
16:50 oeuftete I've been messing with requisites, and from the docs there are no examples with multiple requisites.  I have a use case that would benefit from adding a list to "onchanges", any of which should be able to trigger it.  That doesn't work... is an 'onchanges' list and-ed?  Or undefined behaviour?
16:50 bhosmer joined #salt
16:51 zmalone joined #salt
16:51 sdm24 I believe its "and", so all of the list would have to change
16:53 jaymc joined #salt
16:54 sdm24 I know that unless is "and", so all listed commands need to return True to trigger the unless
16:54 oeuftete sdm24: Thanks.  Hmmm, maybe I should refactor to use onchanges_in, although I think that's going to have less self-documentation value in my states.
16:55 btorch heh anyone know how to get this working ?  cmd.run 'bash -c "for i in haproxy.error-20150{6..7}{01..15}.gz ; do echo $i ; done  "'
16:55 tmclaugh[work] joined #salt
16:56 sdm24 thats what I do for my apache state. The list of sites for each server is defined in pillars, so I have a service.restart if the site changes, but I needed onchanges_in inside the for loop, so if only 1 changes, it will still restart the service
16:56 mr_const left #salt
16:57 sdm24 https://gist.github.com/sdm24/4a4d23efe2b6a64ed6d1 thats the state if you want to check it out
16:58 sine_nitore joined #salt
16:58 rhodgin joined #salt
17:01 lala joined #salt
17:03 gadget-girl Utah you around mate
17:05 zmalone joined #salt
17:06 UtahDave yep! what's up?
17:07 gadget-girl we where going to talk about how to build module for arangodb
17:10 pppingme joined #salt
17:10 shantanoo joined #salt
17:11 ksj is there a good explanation of the differences between the various OS grains? What's the best one to use for identifying an OS plus its major release? osfinger?
17:12 bluenemo joined #salt
17:12 bluenemo joined #salt
17:14 yomilk joined #salt
17:14 otter768 joined #salt
17:15 ndrei joined #salt
17:17 oeuftete sdm24: thanks for that
17:18 sdm24 did it end up working for you? I realized I used watch_in instead of onchanges_in, but the results should be the same
17:19 wryfi_ joined #salt
17:20 aw110f joined #salt
17:20 Antiarc joined #salt
17:21 oeuftete sdm24: it probably would.  Because my state that needs the onchanges isn't dealing with a dynamic list of things to deal with, I'm just writing a loop to make a separate state with one onchanges item apiece.  I'm pretty confident the onchanges_in way would work, though
17:21 esharpmajor joined #salt
17:21 sdm24 ah gotcha. Definitely use whatever works for you
17:21 Corey joined #salt
17:22 ageorgop joined #salt
17:25 aparsons joined #salt
17:27 gadget-girl UtahDave did you forget we where going to talk how to build support for arangodb
17:29 rideh joined #salt
17:30 Gareth gadget-girl: he probably got pulled into a meeting.
17:30 gadget-girl sounds like fun
17:32 lothiraldan joined #salt
17:35 viq joined #salt
17:39 coval3nce joined #salt
17:40 coval3nce Hi All, popping in to see if anyone has some suggestions for me. In need of a way to enumerate every FIBRE interface on a system and throw them into a bond.  I had a shell script do this for me before using lscpi and ethtool, any cool ways to accomplish this with Salt?
17:40 sdm24 have salt run the shell script haha
17:40 coval3nce im totally thinking about doing that haha
17:41 coval3nce Grains gets me interfaces, but dont see andy modules that can get me detailed NIC info like ethtool can tho
17:41 UtahDave gadget-girl and Gareth, Yeah I was in a meeting and I have another one in about 15 minutes
17:42 UtahDave coval3nce: have you looked at the network module?  I'm not sure if it has what you need there
17:42 sdm24 check out http://docs.saltstack.com/en/latest/ref/states/all/salt.states.network.html and http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.network.html
17:42 coval3nce UtahDave: looking at it now
17:42 UtahDave http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.network.html#module-salt.modules.network
17:42 sdm24 ok good haha
17:42 UtahDave ah, ok
17:42 UtahDave :)
17:42 coval3nce Yeah doesn’t have the HW info
17:43 coval3nce its all just interface names, addresses, ip’s - no way to figure out if its ethernet/fibre, etc
17:44 UtahDave coval3nce: sounds like we should make an ethtool module
17:44 UtahDave gadget-girl: Sorry, I'm getting pulled into a lunch meeting
17:44 coval3nce Totally, then we could enumerate through, and get hw infos and make decisions in jinja
17:45 UtahDave yeah, sounds handy
17:45 gadget-girl np me google can have fun
17:45 coval3nce i’ll put in an issue if i get a chance for a feature request
17:45 coval3nce Can cmd.run output be iterated?
17:45 coval3nce within jinja?
17:47 __monty__ joined #salt
17:54 tomh- joined #salt
17:55 ndrei joined #salt
17:55 ndrei_ joined #salt
17:55 rhodgin joined #salt
17:56 dthom91 joined #salt
17:56 Gareth ethtool module sounds interesting.
17:58 michelangelo joined #salt
18:00 SheetiS1 coval3nce: cmd.run output can be manipulated.  You'll be getting a string, so you'll have to break it apart in some fashion.  If you need to split and the like, using the py renderer might give you more mileage.
18:01 coval3nce My jinja fu not so amazing, how would you use a jinja value within a cmd.run string?
18:01 coval3nce i’ll gist it real quick, one moment
18:02 bhosmer joined #salt
18:02 coval3nce https://gist.github.com/dkiser/159e20e0ab8fee11a42c
18:03 teryx5101 joined #salt
18:04 SheetiS how are you wanting to use the value?  What you are doing there would work great in a template to just output _port_type on its own line or whatever.
18:05 coval3nce I’d like to use the {{nic}} value as part of the cmd.run command
18:05 coval3nce Then i can if check its type in theory and do what i need to do
18:05 amfarrell joined #salt
18:05 SheetiS so like a cmd.run state? or again with a function?
18:06 SheetiS if you want to parse output, calling the module via salt['cmd.run']() would be require.
18:06 SheetiS required.
18:06 amfarrell What approach to folks take to debugging errors that start with 'Pillar failed to render with the following messages:' ?
18:07 amfarrell for example: https://gist.github.com/amfarrell/99e57e83cefbce6d118d
18:07 SheetiS coval3nce: jinja supports pythonic .format so you could do salt['cmd.run']('grep {0} foo'.format(_port_type)) for example
18:08 amfarrell Is there a way to see where it is trying to find 'elasticearch' or what file salt is reading when it raises that error?
18:08 murrdoc joined #salt
18:08 coval3nce Oh nice, right now i’m trying to figure out how i can use {{nic}} that i already have as part of a command to cmd.run
18:09 SheetiS amfarrell: it's looking for elasticsearch.sls or elasticsearch/init.sls inside of your pillar root and cannot find it.
18:09 Bart_ joined #salt
18:09 bastion1704 joined #salt
18:09 SheetiS coval3nce: give me an example of the command you want to run, and I can share how I'd format it.
18:10 Bart_ Hi Guys, quick PKG question with YUM
18:10 SheetiS or is that the example above?
18:10 Bart_ i'm trying to do a "yum clean all" alternative via pkg state file
18:10 Bart_ there's a "refresh" option but it does not work
18:10 amfarrell SheetiS: if /opt/anaconda/srv/ contains directories 'pillar', 'salt', and 'salt-master', then my pillar root would be /opt/anaconda/srv/pillar/, right?
18:10 Bart_ http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.installed
18:11 coval3nce SheetiS: in https://gist.github.com/dkiser/159e20e0ab8fee11a42c, i’d like to use {{ nic }} from iterating over the dictionary provided by network.interfaces module as part of a cmd.run
18:11 Ztyx joined #salt
18:11 coval3nce SheetiS: Essentially, loop for every nic, use the nic name, as part of that ethtool command to snag the string identifier of the port type
18:12 SheetiS amfarrell: that would be the default most likely, but you'd want to check your salt master config (usually etc/salt/master or whatever)
18:12 SheetiS coval3nce: one moment.
18:13 SheetiS coval3nce: try this: https://gist.github.com/rfairburn/7adeb54c61b9083c6fd7
18:15 coval3nce SheetiS: ah now i see what you meant, gettting farther, chocking on the “$” now
18:16 aqua^c joined #salt
18:18 amfarrell SheetiS: if it is looking for elasticsearch in a location, then do you know why strace shows that salt isn't having any trouble finding/opening any files related to elasticsearch
18:18 amfarrell https://gist.github.com/amfarrell/d2dc0421927223f4ca42
18:18 coval3nce SheetiS: KeyError: 'print $2'
18:19 SheetiS ahh it's seeing the  { } and trying to process as a .format.
18:19 SheetiS double the braces there
18:19 SheetiS {{ print $2 }}
18:20 SheetiS That's how the underlying python handles it, so I bet that works for jinja as well
18:20 quasiben I see that pillar data can be set on the CLI — but it seems I need to reference an existing state.  Any ways to set pillar data on CLI WITHOUT a references state.sls ?
18:21 coval3nce SheetiS: yuppers worked
18:21 SheetiS quasiben: you are wanting to run a state.highstate?  or what state are you wanting to run on the CLI?
18:21 Bart_ Anyone have any clue regarding my Yum pkg question ?
18:21 SheetiS Bart_: I am looking into it right now.  I use a lot of yum and I think mine runs a yum clean all on every pkg.whatever state.
18:22 coval3nce SheetiS: thanks for the assist, this gets me farther, still invetigating best way to do this, but awesome.  Wondering if there is something i can check via proc instead of soem ueserland tool
18:22 SheetiS I'm checking debug output.
18:22 Bart_ Sheetis: I have CentOS 6.6
18:22 Bart_ some stations "state.highste" were ok, others I had to manually "yum clean all"
18:22 rhodgin joined #salt
18:22 quasiben SheetiS: I want to add new pillar data through the CLI and update existing pillar data
18:23 Bart_ Now I have a minion for testing puroposes that fails on stateéhighstate
18:23 SheetiS quasiben: anything you add via the cli would be transient.  It would only exist for the run called via CLI.  If you want permanent data, you need to update the pillar or run an external pillar that you update.
18:23 Bart_ Salt 2015.5.2
18:24 denys joined #salt
18:25 SheetiS Bart_: are you able to output the entire highstate called from the minion with 'salt-call state.highstate -l debug' via a gist or bpaste or the like?  The extra debug info might give some insight.
18:26 quasiben SheetiS: i was thinking i could something similar to what grains.append or grains.setval
18:28 quasiben i guess my question then is, can I update a pillar on the CLI ?
18:29 SheetiS not the default system pillar.  it's by default a full jinja/yaml setup (more complex processing than a grain).  It's possible that you could setup an external pillar and then have it updateable via CLI.
18:29 Bart_ SheetiS: https://gist.github.com/anonymous/95b882d1bd36e5664e67
18:29 Bart_ ----------           ID: yum     Function: pkg.installed       Result: False      Comment: The following package(s) were not found, and no possible matches were found in the package db: python-dateutil, xcowsay      Started: 14:25:40.188658     Duration: 679.769 ms      Changes:
18:29 ajw0100 joined #salt
18:30 mohae_ joined #salt
18:31 SheetiS and if you manually run a yum clean all on the minion, then it works?
18:31 Bart_ If I do a "yum clean all" it will work on next highstate
18:31 SheetiS hmm
18:31 icflournoy joined #salt
18:31 Bart_ I'll add a "cmd.wait" yum clean all if i have no other choice
18:32 shantanoo joined #salt
18:32 andrew_v joined #salt
18:34 Edgan joined #salt
18:34 murrdoc Bart_:  eugh
18:35 iggy new shortcut for docs
18:35 iggy !salt module.cmd.run
18:35 saltstackbot http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cmdmod.html#salt.modules.cmdmod.run
18:35 murrdoc http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.yumpkg.html#salt.modules.yumpkg.clean_metadata
18:35 murrdoc use that
18:35 SheetiS well you could try the module function pkg.refesh_db or pkg.clean_metadata
18:35 iggy let me know any aliases I need to add
18:35 murrdoc you could also do check_db to see if you want u want is there, and then clean_metadata if needed
18:36 Bart_ not a bad idea.
18:36 Bart_ So I would do a "module.run" or something
18:37 druonysuse joined #salt
18:38 Bart_ Funny there's no salt state option though
18:38 sunkist joined #salt
18:39 Edgan I am trying to come out with a way to do the equivalent of rsync -aHS --delete with salt-ssh. I can use file.recurse to clean, aka --delete. I can use file.copy to preserve, aka -a. But I can't do preserve on .recurse, and I can't do clean on .copy.
18:40 murrdoc joined #salt
18:41 zmalone1 joined #salt
18:41 iggy just cmd.run rsync
18:42 dopesong joined #salt
18:42 jmreicha What are folks doing to remove stale minions from their environments?
18:42 otter768 joined #salt
18:43 iggy sudo salt-run manage.down removekeys=True
18:43 Bart_ it works with "module.run name: pkg.clean_metadata"
18:43 Bart_ I'll go that way for now :-)
18:43 Edgan iggy: Guess I will do it that way. My alternative was tar and untar, which I like less.
18:44 iggy or FR an rsync state
18:44 Edgan you mean pull request?
18:44 Edgan oh, feature request
18:45 Edgan yeah, I will run with rsync. Seems like clean + preserve will appear at some point
18:46 jmreicha iggy: was that for me?
18:46 rome_390 joined #salt
18:47 iggy jmreicha: si
18:47 jmreicha iggy: thanks, I'll try it
18:50 Edgan iggy: I can't use salt:// with rsync, and hard coding a path as the source won't work. Ideas?
18:51 UtahDave joined #salt
18:51 iggy no
18:51 nickg joined #salt
18:52 nickg is there a specific reason the timezone module/state doesn't update /etc/timezone on Ubuntu/Debian?
18:52 Edgan Guess I have to go back to the tar idea.
18:54 teryx510 joined #salt
18:54 linjan joined #salt
18:56 jmreicha_ joined #salt
18:56 rideh joined #salt
18:57 giantlock joined #salt
18:58 teryx510 joined #salt
18:58 murrdoc joined #salt
18:58 baweaver joined #salt
18:58 Edgan iggy: Hmm, I don't think tar will help either. With it I would still have to rm -rf the directory first to make sure it is clean. I guess I will have to recurse and ignore permissions to get the clean directory, and then copy to get the permissions right.
18:59 iggy do you have a bunch of different perms?
19:00 spookah joined #salt
19:00 Edgan iggy: it is a whole build of ruby and gems. So it isn't as simple as 644 files and 755 directories. I need 755 .so files and so on. I don't want to have to go extension by extension and assume my list will always be 100%
19:01 iggy I guess I'm not seeing why you have to do this in multiple steps
19:02 Edgan iggy: I need file.recurse's clean to make sure old files aren't left laying around. I need file.copy's preserve to make the permissions perfect.
19:03 yomilk joined #salt
19:03 Edgan iggy: I actually then need a third step to fix the owner/group. I am deploying as jenkins, so the owner/group aren't root on the jenkins slave, but I want them to be root:root on the minion
19:04 iggy you can't just get all that right on the master and then just file.recurse directly?
19:05 Edgan iggy: I originally wanted to do this with rpms, but then I would need a yum repo per env/app to keep all the random versions of gems separated.
19:05 Ryan_Lane sigh. 2014.7 was such a shitshow. https://phabricator.wikimedia.org/T106074
19:05 iggy nvm, I'm sure you've got some wacky reason for doing it the way you do
19:05 Ryan_Lane wikimedia upgraded to it and now constantly complains about how poorly it works
19:05 Edgan iggy: This is salt-ssh, not salt master-mode
19:05 Ryan_Lane and doesn't want to upgrade because they're worried it may be even worse after they do
19:05 Edgan iggy: This is a deploy
19:06 Ryan_Lane this is a good reason why still stable versions should have major bugs fixed, rather than encouraging people to upgrade to a newer version
19:06 iggy Ryan_Lane: semi-valid concern (in my experience 2015.5 has been better, but...)
19:06 Ryan_Lane it's solid for me so far, but I'm doing masterless
19:07 iggy except they keep breaking "stable" versions by backporting random shit that doesn't need to be backported
19:07 Ryan_Lane it couldn't be /worse/ for master/minion than 2014.7, right?
19:07 Edgan I am on 2015.5.x. Even it, I have to patch it to get what I really want.
19:07 Ryan_Lane 2014.7 seems unusable
19:07 iggy but I also get why they would tell people to upgrade
19:07 iggy they barely have the manpower to keep up with what they've got going on now
19:07 Ryan_Lane Edgan: what do you need to patch?
19:08 Ryan_Lane iggy: if so then features should be less of a priority and quality should be a priority for a while :)
19:08 Ryan_Lane basepi: ^^ not to complain too much, but wanted to give a bit of feedback
19:08 iggy well, in a perfect world we'd get both
19:09 Ryan_Lane wikimedia is considering ditching salt because it's been very unreliable for them
19:09 iggy that would certainly be a noticeable ding
19:09 Ryan_Lane of course it went from being reliable for what they needed in 2014.1 to being unreliable in 2014.7
19:10 iggy 2014.1 wasn't super for us
19:10 coval3nce https://github.com/saltstack/salt/blob/bcd91a9ecb3a5b4950fa08f007839272687a9c0d/salt/modules/rh_ip.py#L349   <— Hmm so arp_ip_target is really required?
19:10 Ryan_Lane since quarterly releases are a thing now, it may be good to spend a quarter or two just focusing on making the current platform solid
19:10 Ryan_Lane iggy: wikimedia is basically just doing remote execution
19:11 Ryan_Lane I know the state system and some other things were a bit rough in 2014.1
19:11 Edgan Ryan_Lane: salt-ssh, to add support for agent-forwarding and to try to fix exit codes so that you can detect failure when using it for deploying via jenkins
19:11 Deevolution joined #salt
19:11 Ryan_Lane Edgan: ah. cool
19:12 iggy salt-cloud, reactor, scheduler, etc was what we had problems with
19:12 Edgan Ryan_Lane: remote execution as in orchestration?
19:12 iggy but yeah, agreed, some people focusing on stabilization would probably go a long way
19:12 iggy but who wants to move to Utah to work on that stuff
19:13 RandyT perhaps a related question to the current discussion...
19:13 RandyT If I create an s3fs fileserver_root, how do I reference the files?
19:13 hybridpollo joined #salt
19:13 RandyT salt://dir/file ?
19:14 RandyT or salt://bucket/dir/file ?
19:14 Edgan Ryan_Lane: I would somewhat agree with you with 2,750 issues on github. My view is salt is the bleeding edge of configuration management with a great community. Puppet/Chef are the previous generation. Ansible would be doable if there are an alternative to Tower. I don't want to pay per instance. With salt, I have theforeman.
19:16 andrej joined #salt
19:16 manfred you reference them with the file stuff.
19:16 manfred RandyT: i don't think you have to use the bucket name, because you already specified it
19:16 baweaver joined #salt
19:17 RandyT manfred: I'm struggling to figure out what the appropriate "file stuff" is.
19:18 RandyT \/salt ?
19:18 RandyT salt:// ?
19:18 RandyT and perhaps I am trying to do something with it that does not work...
19:19 RandyT trying to story ssh keys for ec2 deployments and reference them with key_filename: rather than keep local copies
19:19 manfred RandyT: http://docs.saltstack.com/en/latest/ref/file_server/backends.html#using-multiple-backends
19:19 RandyT hoping to use S3 to load encryption keys, etc for a number of services.
19:19 manfred they should all be referenced by salt:// once the file root is setup
19:21 shantanoo Getting "State ... is SLS ... is not formed as list". URL: https://gist.github.com/2c95977aabbdd6236652
19:21 shantanoo what am i missing?
19:21 RandyT manfred: not maintaining a local file_roots, so salt://dir/file should work?
19:21 manfred shantanoo: get rid of the create-db line, and back everything up
19:22 manfred RandyT: it is still a file root, inside of the file server you set up, I am not refering to the file_roots directive
19:22 shantanoo manfred: so it is not possible to create multiple db's in single state?
19:22 Ztyx joined #salt
19:22 manfred shantanoo: it is, use the names: directive
19:22 manfred create-db:
19:22 manfred mysql_database.present:
19:22 manfred - names:
19:23 manfred - one
19:23 manfred - two
19:23 shantanoo aah
19:23 shantanoo thanks
19:24 manfred shantanoo: names works with any state, and you can override the containing states variables if you want
19:24 manfred http://docs.saltstack.com/en/latest/ref/states/highstate.html
19:24 manfred search for 'ius' on that page
19:24 RandyT manfred: what is the proper way to list those S3 resources from command line using salt?
19:24 manfred RandyT: no idea
19:24 RandyT perhaps what I am trying to do with key_filename: does not work
19:25 shantanoo manfred: this is interesting...
19:25 manfred shantanoo: throws some extra stuff that you can do into the mix :P
19:25 RandyT is there a better way to do what I want to do to distribute encryption keys to minions?
19:26 manfred RandyT: store them in external pillars?
19:27 RandyT manfred: s3 pillar seems to lack functionality that the fileserver_roots has.
19:27 RandyT for example, seems s3 pillar still requires me to give it IAM credentials
19:28 manfred you don't have to use the pillars, you could use something else, that data fits better in pillars
19:28 manfred because you control what minions can actually see it
19:28 manfred where as any minion can get any data from the file servers
19:28 RandyT ok, great reason not to use fileserver
19:29 surge__ When setting up environments,
19:29 surge__ Is it required to specifiy file_roots: -dev -/srv/salt/dev -/srv/salt/base
19:30 surge__ Currently I added a -dev env in file_roots, but did not add the root of the BASE environment. It seems to function fine.
19:30 shantanoo manfred: trying to create multiple mysql user. user@localhost and user@'%'. Code: https://gist.github.com/371ac47742acee4fa925. But it is creating only one user.
19:30 amfarrell joined #salt
19:30 amfarrell Within the internals of salt, does anyone know how __pillar__ is brought into scope such that a file like salt/modules/state.py can access it without it being imported or defined anywhere?
19:31 amfarrell see https://github.com/saltstack/salt/blob/develop/salt/modules/state.py#L86
19:32 manfred shantanoo: hosts doesn't work the same way
19:32 manfred shantanoo: names is special
19:32 shantanoo oh. ok.
19:32 iggy amfarrell: they're called dunder dicts
19:33 amfarrell iggy: *googles* and finds http://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html
19:33 manfred amfarrell: is is loaded in the salt.loader
19:34 amfarrell okay, is there a way to find where each dunder dict is assembled?
19:34 manfred it is in the code somewhere
19:34 manfred amfarrell: https://github.com/saltstack/salt/blob/develop/salt/loader.py#L1090
19:34 shantanoo manfred: so https://gist.github.com/4c63ba47eff4a64696ba is also invalid?
19:34 manfred it just injects the self.__pillar__ into the module after loading it
19:35 amfarrell manfred: here https://github.com/saltstack/salt/blob/develop/salt/loader.py#L1090 ?
19:35 amfarrell oh yes
19:35 manfred shantanoo: get rid of the create-user line
19:35 manfred amfarrell: you can't add extra levels like that
19:35 manfred it is stateid:\n state.modules:\n configurations
19:36 shantanoo manfred: ok. i was trying to reduce number of states...
19:36 Sniper^ joined #salt
19:36 manfred shantanoo: you can't do it like that
19:36 amfarrell manfred: what do you mean by "extra levels"?
19:36 bastion1704 is salt.runners.fileserver.update will also take care of ext_pillar git  ?
19:36 manfred amfarrell: not you, sorry
19:36 shantanoo manfred: thanks.
19:36 irctc003 joined #salt
19:37 iggy bastion1704: yes (if it's not done before that already)
19:37 Aikar left #salt
19:38 bastion1704 iggy tx
19:41 surge__ joined #salt
19:42 amfarrell manfred: thank you
19:43 SheetiS joined #salt
19:44 ageorgop joined #salt
19:45 Bart_ Hi Guys, any way to "Disable" SElinux     http://docs.saltstack.com/en/latest/ref/states/all/salt.states.selinux.html
19:45 rideh joined #salt
19:48 X67r joined #salt
19:48 joeto joined #salt
19:49 iggy I think that's usually considered bad form
19:50 iggy salt has enough ways for you to shoot yourself in the foot... do you really want to make it easier to do that?
19:50 dendazen_ joined #salt
19:51 tmclaugh[work] joined #salt
19:51 ericof joined #salt
19:52 Ryan_Lane Edgan: I think open bugs are a sign of a healthy community
19:53 Ryan_Lane I've opened 156 issues myself, it seems :)
19:56 RandyT folks, I have the following setup in master config
19:56 RandyT https://gist.github.com/rterbush/9541a1e6d5fdcafa90f0
19:56 RandyT salt-run returns nothing.
19:56 RandyT I can list the buckets with aws cli
19:57 RandyT any hints as to how to debug this?
19:57 RandyT -l debug does not tell me anything more
19:59 speriyasamy joined #salt
20:04 paha joined #salt
20:04 rhodgin joined #salt
20:05 hoonetorg i forked and created a few salt formulas
20:05 hoonetorg i decided to use git flow to develop them
20:05 ageorgop joined #salt
20:05 aqua^c joined #salt
20:06 hoonetorg git flow feature start i will try to do as often as possible from upstream/master to ease creating pull requests
20:06 hoonetorg any remarks on that
20:06 hoonetorg ?
20:07 hoonetorg how do you people develop or improve formulas with git?
20:08 basepi Ryan_Lane: thanks. I'm with you on that.
20:09 hoonetorg also i ask myself how to  test my formulas. currently i have only 1 salt master but a production and a dev environment
20:09 Ryan_Lane basepi: are the master/minion issues seen in 2014.7 fixed for sure in 2015.5?
20:10 hoonetorg should i do now a git checkout develop or git checkout feature/feature123 on master and then run on my dev machines and then switch back to master branch (or release)?
20:11 hoonetorg i'm scared if somebody inbetween runs salt formulas on production machines
20:13 hoonetorg again, how do you people test your formulas when using git branches
20:13 hoonetorg i'm also not a big fan only testing on vagrant boxes
20:13 mschiff on two of my hosts salt is failing in the beginning of highstate like this ( https://www.refheap.com/106637 ) when I do "salt 'thehost' state.highstate" from the master, but its working fine when I do salt 'thehost' cmd.run 'salt-call state.highstate'
20:13 mschiff any idea someone?
20:14 hoonetorg i want to see that all works fine on my dev boxes (which are as much as possible equal to prod boxes)
20:15 pppingme joined #salt
20:16 nickg left #salt
20:17 iggy mschiff: I'd guess bad python cached compiles or some mixed versioned stuff
20:17 basepi Ryan_Lane: I guess I'm not sure which master/minion issues you're talking about. Since I don't triage full time I'm less "in the know" lately
20:17 basepi My brain isn't coming up with any major "minions swarming the master" issues
20:18 basepi (I also happen to be exhausted, which isn't helping)
20:19 surge__ joined #salt
20:19 Ryan_Lane basepi: too many auths, auth failures, minions flooding the masters with returns, etc.
20:19 Ryan_Lane none of the "scaling" docs solutions' help
20:20 CeBe1 joined #salt
20:26 mschiff iggy: yes, seemed like the minion did not get restarted after upgrade..
20:26 basepi Ryan_Lane: I asked around a little, and the answer is "we think so", but for anyone running into those kinds of issues we'd love to get our QA team on trying to verify improvements in those areas. Hard to quantify, especially for such a general question.
20:30 netengineer1010 joined #salt
20:32 BradThurber joined #salt
20:32 netengineer1010 Hi guys, I have a question.  I'm using the latest version of salt and RHEL 6.6 on a minion.  I'm configuring networking and I'm trying to have the string IPV6INIT=”no” passed to the network-scrips/ifcfg-eth1 script file, but  i can't figure out what to put in my sls file to get it working.
20:33 netengineer1010 I've specified IP address settings, DNS settings, everything sticks, I just can't get it to not use IPv6.
20:33 amfarrell If I am editing the salt source and want to restart the salt master so that it is running the new code, how do I do that?
20:34 breakingmatter joined #salt
20:34 yomilk joined #salt
20:34 breakingmatter left #salt
20:34 BradThurber Hi everyone. Is it possible to strip newline characters from a jinja2 var? I'm base64 encoding a pillar password with salt's hashutil.base64_encodestring. Unfortunately, it is using a legacy python encoder that insists on adding newlines (/n) to the output
20:34 SheetiS netengineer1010: file.replace might be ok for that with the append_if_not_found flag: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.replace
20:35 BradThurber my jinja2 line:
20:35 BradThurber {% set connector_base64_password = salt['hashutil.base64_encodestring'](salt['pillar.get']('jbosseap:domain_connector:password')) %}
20:35 netengineer1010 so essentially put it in the sls file ordered after the network connection settings?
20:35 netengineer1010 cause if i do anything before, it will remove it.
20:35 asoc amfarrell: on most linux boxes a 'service salt-master restart' would do it if the service has been installed (normally it is)
20:36 asoc I also am not sure if it would be necesray to restart though
20:36 asoc I think it would depend on where you are editing.
20:36 SheetiS netengineer1010: if you are managing the interface with another state, then that might not be best
20:39 ageorgop joined #salt
20:39 netengineer1010 currently have one sls file and I'm using network.managed to manage the connectivity settings, should I migrate everything back to file.replace?
20:40 bfrog joined #salt
20:40 XenophonF joined #salt
20:40 bfrog is there a state for ensuring that all the updates available are installed?
20:40 bfrog so on centos, yum update
20:41 SheetiS netengineer1010: I am taking a look now.  The interface stuff is configured by this module https://github.com/saltstack/salt/blob/develop/salt/modules/rh_ip.py so I am seeing how it handles ipv6 to see what should be passed into the state (if anything can be)
20:43 hybridpollo joined #salt
20:43 surge__ joined #salt
20:44 netengineer1010 SheetiS: thank you.
20:44 Edgan Ryan_Lane: If you are already using --batch, it sounds like you have either unusually complex states or number of states per instance. You think you should be able to have say 500 minions per master, but it doesn't work. The solutions seem like debugging the salt master cause, reducing the complexity/number of states, or more masters.
20:44 Ryan_Lane Edgan: this is just for test.ping
20:45 Ryan_Lane they have ~1000 minions for the master
20:45 Edgan Ryan_Lane: But how many minions per master, and what is the batch set to?
20:45 Ryan_Lane but the master isn't CPU, disk or network bound
20:45 Ryan_Lane it isn't running out of files, etc.
20:45 Ryan_Lane they have the re-auth jitter set, they reduced the auth frequency, they lowered the key size
20:45 murrdoc joined #salt
20:45 Edgan Ryan_Lane: What is the batch size?
20:46 Deevolution joined #salt
20:46 Ryan_Lane they've tried very low batch sizes. like 10%
20:46 Ryan_Lane batch is also broken, of course
20:46 Ryan_Lane because guess how batch works? :)
20:46 Edgan Ryan_Lane: Do tell, has worked for me
20:47 baweaver joined #salt
20:47 Ryan_Lane it pings all nodes, then splits the returned nodes into batches
20:47 Ryan_Lane so if ping doesn't work....
20:47 Edgan Ryan_Lane: Well is that just ping, or real salt runs?
20:47 Edgan Ryan_Lane: zeromq 4.x?
20:47 Ryan_Lane Edgan: when I say they're doing remote execution, I mean they're just running execution module commands, like cmd.run
20:47 Ryan_Lane or test.ping
20:48 zmalone joined #salt
20:48 Edgan Ryan_Lane: ok, cmd.run is orchestration
20:48 Ryan_Lane they don't have states. basically no pillars. no files
20:48 ageorgop joined #salt
20:48 Edgan So it isn't CM, it is mass parallel command execution
20:48 Ryan_Lane yeah. that.
20:48 SheetiS netengineer1010: the flag looks to be 'enable_ipv6: False' based upon the rh6 network template here: https://github.com/saltstack/salt/blob/develop/salt/templates/rh_ip/rh6_eth.jinja
20:49 SheetiS but with it false it just removes the line
20:49 Edgan Ryan_Lane: I can tell you that in my experience salt gets buggier the further away from salt master-mode you get.
20:49 SheetiS instea of saying no
20:49 Edgan Ryan_Lane: Because it is meant to be a CM tool first, and everything else second
20:49 Ryan_Lane Edgan: libzmq3:amd64                        4.0.4+dfsg-2
20:49 netengineer1010 SheetiS: when I do that and run that state, there are no changes.  I check the config script locally on the minion and it also reflects no change.
20:49 Edgan Ryan_Lane: That package vs version is funny
20:50 Ryan_Lane Edgan: it was originally designed only for remote execution :)
20:50 netengineer1010 SheetiS: it just leaves that line out it looks like.
20:50 theologian joined #salt
20:50 zmalone joined #salt
20:50 Edgan Ryan_Lane: But it isn't the focus any more. I see salt as the ideas from ansible merge with puppet.
20:50 netengineer1010 Sheetis: but that line left out gives it an automatic IPv6 address.
20:51 SheetiS netengineer1010: yeah that's what I am seeing from the jinja there.  you could open a bug report or submit a PR that tells it to explicitly say "no" there in that template.
20:51 netengineer1010 okay, will do, thank you.
20:51 SheetiS It'd be a fairly trivial change to test locally since it's just jinja.
20:52 Edgan Ryan_Lane: Looks like zeromq 4.1.2 is out and 4.0.7 is retired. Mass execution is going to largely be about how well zerom4 works. I would look into it more. Though it could still easily be a salt issue.
20:52 Ryan_Lane they have mismatched zmq on masters and minions
20:52 Edgan Ryan_Lane: That might hurt
20:52 Ryan_Lane Edgan: 4.0.4 is the stable version on ubuntu
20:53 otter768 joined #salt
20:53 Ryan_Lane seems salt's PPA ships mismatched versions
20:53 netengineer1010 SheetiS: end of day for me at work here, will give it a shot tomorrow and I'll submit a bug report if it works or not just so it's documented.
20:53 netengineer1010 SheetiS: Thanks for everything!
20:54 Ryan_Lane oh. wait. no they don't
20:55 Edgan Ryan_Lane: What was the confusion?
20:55 Ryan_Lane I was looking in the ppa and saw an older version
20:55 Ryan_Lane but when I filtered for ubuntu version it looks like it's 4.0.4 for precise and trusty
20:56 murrdoc joined #salt
20:56 rgarcia_ joined #salt
20:56 julienlavergne joined #salt
20:56 Edgan Ryan_Lane: worker_threads?
20:57 rgarcia_ is there something like cmd.run that retries until the command returns 0?
20:57 rgarcia_ having some issues with a service.running requisite where the service actually takes a few seconds to spin up
20:58 gchao rgarcia_: you could do a while loop in bash
20:58 ageorgop joined #salt
20:58 rgarcia_ gchao: was hoping there was a cleaner solution
20:59 gchao :\ agreed, there probably is but i thought i'd bring it up in case you're in hair-on-fire mode :)
21:03 aparsons joined #salt
21:04 Edgan Ryan_Lane: Actually errors messages would also be useful. You talked about authentication errors.
21:07 Ryan_Lane Edgan: they adjusted worker threads too, yeah
21:07 Ryan_Lane lowered the job cache length
21:09 baweaver joined #salt
21:11 amcorreia joined #salt
21:12 rgarcia_ left #salt
21:13 yomilk joined #salt
21:13 speriyasamy joined #salt
21:15 coval3nce Is there  a way to bomb out of a state render programmatically?
21:15 murrdoc i use a test states
21:15 sgargan joined #salt
21:16 SheetiS coval3nce: if you want a particular state to stop all state processing, you can use '- failhard: True'  http://docs.saltstack.com/en/latest/ref/states/failhard.html
21:17 SheetiS or there are failure test states as murrdoc said.
21:17 dthom91 For the source parameter of the various file module operations, can you provide a relative path?
21:17 murrdoc !salt state.test
21:17 saltstackbot ValueError: need more than 2 values to unpack (file "/srv/willie/.willie/modules/salt.py", line 34, in salt)
21:17 coval3nce Gotcha, was hoping to fail if a particular jinja variable wasn’t set.
21:18 piotr_ joined #salt
21:18 SheetiS coval3nce: you can bail out at render time with http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.test.html#salt.modules.test.exception  (e.g. {% do salt['test.exception']('Ooops') %} )
21:21 iggy !salt state.test
21:21 saltstackbot http://docs.saltstack.com/en/latest/ref/states/all/salt.states.test.html
21:21 iggy murrdoc: fixed
21:21 iggy find('.') != count('.')
21:22 murrdoc :)
21:22 ageorgop joined #salt
21:23 coval3nce SheetiS: exactly what i needed!  thanks!
21:23 murrdoc thanks iggy
21:23 murrdoc !salt help
21:29 yomilk joined #salt
21:32 iggy murrdoc: it's just the states/modules docs for now, if you think of anything else, let me know
21:33 iggy (and it's supposed to watch the salt subreddit, github, etc)
21:34 yomilk_ joined #salt
21:35 mbrgm_ joined #salt
21:38 teryx5101 joined #salt
21:40 ageorgop joined #salt
21:44 gekitsuu joined #salt
21:46 gekitsuu I understand that if you use multiple file_roots you can have multiple top.sls files. If the top.sls files specify the same targets then the one highest on the list of file_roots overrides the other top.sls files. Is there a way to have the behavior be a dict.update() instead?
21:47 Nazca joined #salt
21:47 iggy not without editing code
21:47 iggy and... there be dragons
21:49 gekitsuu joined #salt
21:49 yomilk joined #salt
21:49 gekitsuu @iggy thanks I thought that might be the dragons.. I mean case
21:49 gekitsuu ;)
21:50 iggy There's a bug open about the behavior of top merging that might be a good place to start looking
21:51 iggy but there are external tops that probably do a better job than hacking salt's file tops
21:51 gekitsuu external tops?
21:51 iggy http://docs.saltstack.com/en/latest/salt-modindex.html#cap-t
21:52 gekitsuu thanks, I'll check it out
21:54 aqua^c joined #salt
21:55 iamtew joined #salt
21:59 rhodgin_ joined #salt
22:00 dustywusty joined #salt
22:01 cberndt joined #salt
22:01 hasues joined #salt
22:01 hasues left #salt
22:01 dalexander joined #salt
22:01 yomilk joined #salt
22:03 baweaver joined #salt
22:03 keimlink joined #salt
22:04 baweaver_ joined #salt
22:09 druonysus joined #salt
22:09 sunkist joined #salt
22:12 surge__ joined #salt
22:12 sunkist1 joined #salt
22:15 primechuck joined #salt
22:18 jmreicha joined #salt
22:19 ageorgop joined #salt
22:24 baweaver joined #salt
22:30 wryfi_ i have a question about hostnames ...
22:30 wryfi_ my ubuntu minions identify themselves to the master using their fqdn
22:30 wryfi_ while my centos minions identify themselves using the unqualified hostname
22:31 wryfi_ both centos and ubuntu minions correctly return the fqdn in response to `hostname -f` and the short name in response to `hostname`
22:31 wryfi_ is there some way i can make the naming consistent?
22:33 zmalone joined #salt
22:33 whytewolf wryfi_: you could set the minion_id before you start the minion for the first time
22:34 wryfi_ yeah, but ... that's irritating
22:34 wryfi_ why do they show up differently in the first place?
22:36 whytewolf wryfi_: i don't know, just never looked into it.
22:39 iggy it doesn't use hostname -f, it uses a python function
22:40 iggy python -c 'import socket; print socket.getfqdn()'
22:42 jmreicha joined #salt
22:44 whytewolf wryfi_: salt uses this function to decide on a minion_id when one doesn't exist https://github.com/saltstack/salt/blob/develop/salt/utils/network.py#L260-L287
22:45 whytewolf wryfi_: https://github.com/saltstack/salt/blob/0379805e9d6cd3976307b0cc6f4c58aa154d5057/salt/config.py#L2486
22:48 rhodgin_ joined #salt
22:54 otter768 joined #salt
22:54 sgargan is there a module I can use to add a tag to an existing ec2 instance ?
22:54 llua joined #salt
22:54 llua joined #salt
22:55 RandyT still tearing my hair out trying to get a working s3 ext_pillar
22:55 RandyT https://gist.github.com/rterbush/9541a1e6d5fdcafa90f0
22:56 RandyT upgraded to 2015.8 to get an updated version of ext_pillar.s3
22:56 RandyT newer version doesn't require keys
22:56 RandyT complaining about only getting 3 arguments when 4 needed, yet I am passing 7
22:57 RandyT trying to find a secure way to pass digital keys to minions. can't imagine I am the only one trying to do this.
22:57 RandyT perhaps there is a better way?
22:58 iggy we've all been talking for a while about a vault ext_pillar, but nobody's ever done it
22:58 gchao http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.gpg.html ?
22:59 iggy but pillars are just like states... you can write them using the py renderer (aside from ext_pillar's)
23:00 RandyT iggy: got some feedback that states are available to all minions, which would be undesireable if passing digital keys...
23:00 iggy that is true, not sure if you're asking a question or not
23:00 RandyT well, asking you to confirm that...
23:01 RandyT trying to find a way to pass a digital key to the provision process for an ec2 instance through the key_filename:
23:01 RandyT I've yet to get a working filesystem that allows me to pass salt://filename...
23:02 neocid_ joined #salt
23:03 ndrei joined #salt
23:03 iggy should start there before going to town on ext_pillar
23:03 RandyT where?
23:03 ndrei_ joined #salt
23:04 RandyT works fine if on the local filesystem if that is what you are suggesting
23:04 RandyT cannot get it to work in ext_pillar filesystem
23:05 iggy oh, I misunderstood what you said
23:05 unused_PhD joined #salt
23:11 mosen joined #salt
23:11 rhodgin joined #salt
23:11 sgargan should i be able to call ec2.set_tags from inside a state or is it only available through salt-cloud?
23:11 keimlink_ joined #salt
23:13 rhodgin joined #salt
23:21 iggy !salt modules.cloud
23:21 saltstackbot http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cloud.html
23:21 RandyT iggy: did you glance at the gist I sent?
23:21 iggy I don't use aws/s3
23:21 crashmag_ joined #salt
23:21 RandyT I think more fundamentally, the code is complaining about parameters passed and the count is incorrect
23:21 iggy your indentation is incorrect
23:22 iggy look at the example
23:24 RandyT logically it does not make sense that there are three tabs to the s3: parameters... no?
23:24 iggy hint: it doesn't say it there, but it does elsewhere... you need to indent that nested dict extra spaces because of a pyyaml idiosyncracy
23:25 iggy http://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html
23:26 joehh1 ~/~.
23:27 furrowedbrow joined #salt
23:27 breakingmatter joined #salt
23:27 RandyT doesn't appear to make any difference.
23:27 ajw0100 joined #salt
23:28 iggy restart
23:30 RandyT good eye
23:30 RandyT that does it...
23:30 RandyT iggy: thanks
23:30 iggy lol, was totally joking
23:30 iggy #WindowsCure
23:30 * iggy out
23:31 RandyT try to avoid #WindowsCure out of principal :-)
23:32 markm_ joined #salt
23:32 whytewolf sadly #WindowsCure works to often. damn layers of caches, and stuck bits
23:33 cyteen joined #salt
23:38 baweaver joined #salt
23:38 baweaver joined #salt
23:43 aqua^c joined #salt
23:44 aw110f joined #salt
23:51 tkharju joined #salt
23:51 murrdoc !salt module.saltutil
23:51 saltstackbot http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html
23:52 thayne joined #salt
23:58 subsignal joined #salt

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