Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-03-30

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

All times shown according to UTC.

Time Nick Message
00:01 alexlist joined #salt
00:13 abednarik joined #salt
00:30 pipps joined #salt
00:38 Pyro_ joined #salt
00:39 st8less joined #salt
00:56 nikdatrix joined #salt
01:00 jimklo_ joined #salt
01:00 ahrs joined #salt
01:06 schemanic_ joined #salt
01:08 nikdatrix joined #salt
01:18 leonkatz joined #salt
01:21 mpanetta joined #salt
01:23 hemebond Only been back working with Puppet for two days and already annoying the heck out of me.
01:26 shoemonkey joined #salt
01:29 Pyro_ joined #salt
01:33 mpanetta joined #salt
01:40 SaucyElf joined #salt
01:40 oida_ joined #salt
01:46 SaucyElf_ joined #salt
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.6, 2016.11.3 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ (please don't multiline paste into channel) <+> See also: #salt-devel, #salt-offtopic <+> Ask with patience as we are volunteers and may not have immediate answers
01:49 XenophonF joined #salt
01:55 leonkatz joined #salt
01:56 catpigger joined #salt
01:58 LordOfLA joined #salt
01:58 XenophonF there's something wrong with users-formula on windows
01:59 jas02 joined #salt
01:59 XenophonF i think it was whatever changed after commit ebc81c806ba0b9f3f2df0e692b1aea6b56676da5
02:00 XenophonF Rendering SLS 'development:users' failed: Jinja variable 'bool object' has no attribute 'get'
02:00 XenophonF i'm really sick of salt's crappy error messages :/
02:00 * XenophonF pouts
02:01 XenophonF LOL
02:01 whytewolf you do know that isn't salts error message. jinja has it's own
02:07 Pyro_ joined #salt
02:09 whytewolf looking through the formula i see nothing that would even hint at it supporting windows. the only mention of windows in the entire formula is in the vimrc
02:11 whytewolf the only thing called out in the map.jinja is Debian, Gentoo, FreeBSD, and default which looks to be a generic linux
02:13 XenophonF yeah, i know it's jinja
02:13 XenophonF am a little slap happy from beating my head against salt all day
02:14 XenophonF users-formula was working fine on windows up until changes made after that commit
02:14 * whytewolf hands XenophonF a banana
02:15 Pyro_ joined #salt
02:15 * hemebond hands XenophonF some buja mix
02:16 XenophonF commit 2ac21426af44248f6c58ab2cb77bfff7e8a06df1 breaks it
02:16 whytewolf ... huh that commit doesn't add a .get
02:16 XenophonF yes it does
02:16 whytewolf one sec
02:16 vegasq joined #salt
02:16 XenophonF https://github.com/saltstack-formulas/users-formula/commit/2ac21426af44248f6c58ab2cb77bfff7e8a06df1
02:17 whytewolf I typed that before you gave a new commit id
02:17 XenophonF https://github.com/saltstack-formulas/users-formula/commit/2ac21426af44248f6c58ab2cb77bfff7e8a06df1#diff-7cbd305a7df429ca599a3c2b2e1b4adaR42
02:17 XenophonF line 42, current.get(...) is what's failing
02:17 whytewolf yeah which is pulled from user.info
02:17 XenophonF right
02:18 whytewolf so user.info on windows returns a bool while in linux it pulls user info
02:18 canci joined #salt
02:18 whytewolf humm that doesn't seem right
02:19 whytewolf https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.win_useradd.html#salt.modules.win_useradd.info that should return correct info
02:19 XenophonF in my test case, the target user account doesn't exist yet
02:21 whytewolf honestly. don't think this is a windows vs linux issue
02:21 whytewolf not sure user.info on a user that doesn't exist will work as expected
02:23 whytewolf yeah it doesn't try to figure out if the user exists before. not sure how this is working for anything
02:24 whytewolf XenophonF: what does windows return for user.info <user that doesn't exist>
02:24 whytewolf on linux it just returns nothing
02:26 raspado joined #salt
02:26 whytewolf like such https://gist.github.com/whytewolf/1fb4f41e5b82b90f885cf6d5c29f1490
02:27 XenophonF checking
02:27 XenophonF in my case running user.info for a non-existent user returns false
02:28 whytewolf humm, that would be why that jinja blows up
02:28 whytewolf it is a bool
02:28 whytewolf bug report to salt that win_user.info on windows does not follow the same output standard that useradd.info does
02:29 whytewolf on of coarse a non existant user
02:30 XenophonF yup - i am going to try to patch win_user.info
02:30 whytewolf that would be better. then you can submit a PR ;)
02:31 XenophonF exactly !
02:31 XenophonF ok so here's another one for you
02:31 hasues left #salt
02:31 XenophonF file.recurse on windows results in the minion hanging at 100% cpu utilization
02:31 * whytewolf shrugs
02:31 XenophonF which is a real bummer since that's used _everywhere_
02:32 XenophonF i'm going to give pycharm on windows a try, per the earlier discussion today
02:32 XenophonF thanks for your help by the way
02:32 whytewolf actually that was what i was going to sugest
02:35 evle joined #salt
02:40 st8less joined #salt
03:04 Klaus_D1eter_ joined #salt
03:06 Pyro_ joined #salt
03:15 Pyro_ joined #salt
03:16 raspado joined #salt
03:17 raspado joined #salt
03:40 mpanetta joined #salt
03:45 SaucyElf joined #salt
03:50 shoemonkey joined #salt
03:54 nikdatrix joined #salt
03:58 justan0theruser joined #salt
04:02 st8less joined #salt
04:07 PatrolDoom joined #salt
04:09 kore joined #salt
04:14 ninjada joined #salt
04:15 ninjada_ joined #salt
04:15 bocaneri joined #salt
04:19 bocaneri joined #salt
04:20 cyborg-one joined #salt
04:27 Praematura joined #salt
04:28 bocaneri joined #salt
04:32 st8less joined #salt
04:32 dxiri joined #salt
04:40 djinni` joined #salt
04:42 mpanetta_ joined #salt
04:44 bocaneri joined #salt
04:44 notCalle joined #salt
04:45 theblazehen joined #salt
04:54 onlyanegg joined #salt
05:14 heyimawesome joined #salt
05:14 jrklein_ joined #salt
05:16 jerrcs joined #salt
05:16 lorengordon joined #salt
05:16 ChubYann joined #salt
05:20 ivanjaros joined #salt
05:26 XenophonF joined #salt
05:33 utahcon joined #salt
05:33 ashmckenzie joined #salt
05:34 carmony joined #salt
05:36 Valfor joined #salt
05:36 Valfor joined #salt
05:37 duckfez joined #salt
05:37 q1x shadoxx: thank!
05:37 rdas joined #salt
05:40 eprice joined #salt
05:46 ninjada joined #salt
05:47 dimeshake joined #salt
05:49 impi joined #salt
06:05 onlyanegg joined #salt
06:06 felskrone joined #salt
06:06 golodhrim|work joined #salt
06:08 candyman88 joined #salt
06:22 dxiri joined #salt
06:25 yuhl______ joined #salt
06:31 CheckYourSix joined #salt
06:32 Zachary_DuBois joined #salt
06:33 Inveracity joined #salt
06:33 rome_390 joined #salt
06:33 gadams joined #salt
06:34 emid joined #salt
06:38 duncanmv joined #salt
06:43 Ricardo1000 joined #salt
06:50 candyman89 joined #salt
06:51 Ricardo1000 joined #salt
07:04 jas02 joined #salt
07:10 fooker joined #salt
07:12 samodid joined #salt
07:15 do3meli joined #salt
07:16 fxhp joined #salt
07:18 kukacz joined #salt
07:20 tom[] joined #salt
07:21 jas02 joined #salt
07:26 JohnnyRun joined #salt
07:36 dknight87 joined #salt
07:37 dknight87 hi guys, how can I install the Boron version(2016.3.4) of salt-minion on rhel 7? I just can't find the repo
07:43 Reverend https://docs.saltstack.com/en/latest/topics/installation/rhel.html
07:43 babilen http://repo.saltstack.com/#rhel
07:46 DarkKnightCZ joined #salt
07:46 onlyanegg joined #salt
07:47 APLU joined #salt
07:50 Electron^- joined #salt
07:50 ronnix joined #salt
07:51 kiorky joined #salt
07:52 shoemonkey joined #salt
07:56 mikecmpbll joined #salt
08:07 impi joined #salt
08:08 dknight87 Reverend: babilen: How do I install an older version..Boron?
08:09 nikdatrix joined #salt
08:14 Reverend --show-duplicates
08:14 Reverend yum list salt-minion --show-duplicates
08:14 Reverend then provide whatever version you want on the yum install.
08:18 dknight87 Reverend: I just see '2016.11.3-1.el7  ' when I run that command
08:20 babilen https://repo.saltstack.com/yum/redhat/salt-repo-2016.3-1.el7.noarch.rpm maybe?
08:20 babilen http://repo.saltstack.com/2016.3.html#rhel has information on that (there's a drop down menu at the top)
08:24 dknight87 babilen: I need 2016.3.4 not 2016.3.1
08:24 dxiri joined #salt
08:27 jhauser joined #salt
08:34 babilen dknight87: I would guess that the 2016.3 branch includes that version
08:34 mikecmpbll joined #salt
08:35 babilen AFAICT the "-1" in the package name refers to the package version rather than the version of the software itself
08:36 babilen Or do you want to pin to a single version?
08:41 Mattch joined #salt
08:47 onlyanegg joined #salt
08:49 Reverend that's also a good question.
08:50 gmoro joined #salt
08:58 SaTa left #salt
09:06 snow__ joined #salt
09:26 aaditya joined #salt
09:26 muxdaemon joined #salt
09:28 fujexo[m] joined #salt
09:32 ikarpov joined #salt
09:32 fooker joined #salt
09:33 dknight87 babilen: I want version 2016.3.4 ... show duplicates doesn't show that package
09:35 babilen And you followed the instructions on the 2016.3 version specific instructions? What did you do and what happened?
09:38 dknight87 babilen: I followed the steps in the last link that you sent and I see only '2016.3.6-1.el7 ' as the available pkg
09:40 babilen So you don't want the latest package in the 2016.3 branch, but 2016.3.4 specifically?
09:40 dknight87 babilen: yes
09:40 babilen (as per an earlier question)
09:40 dknight87 babilen: yes
09:40 babilen Well, follow the isntructions on pinning to a single version then and adapt them to your needs
09:40 dknight87 babilen: where are the instructions?
09:41 freelock joined #salt
09:41 jerrykan[m] joined #salt
09:41 ThomasJ|m joined #salt
09:41 saintaquinas[m] joined #salt
09:41 babilen Same place "Pin to minor release"
09:45 dknight87 babilen: https://pastebin.com/LxFwf5GF
09:45 dknight87 i still dont see the package
09:48 babilen http://repo.saltstack.com/yum/redhat/7/x86_64/archive/2016.3.4/ -- I see many applicable packages
09:53 shoemonkey joined #salt
09:56 dknight87 babilen: I don't see them when I try to install. just 2016.11.3 now
10:04 babilen Well, all I can tell you is that the packages you are after appear to be present in the repository. I would assume that if you correctly configure that repository that your packaging system would also be able to see them.
10:15 aaditya following this https://docs.saltstack.com/en/getstarted/ssh/connect.html (Initial Connection section)
10:16 aaditya when i try to connect it says permission denied
10:16 aaditya # salt-ssh 'managed1' test.ping
10:16 aaditya [WARNING ] Key 'file_ignore_glob' with value None has an invalid type of NoneType, a list is required for this value
10:16 aaditya Permission denied for host managed1, do you want to deploy the salt-ssh key? (password required):
10:16 aaditya [Y/n]
10:16 aaditya Password for vagrant@managed1:
10:16 aaditya managed1:
10:16 aaditya Permission denied (publickey,password).
10:17 aaditya however if i type in the same password as above, but use the --askpass option, it works
10:17 aaditya # salt-ssh 'managed1' test.ping --askpass
10:17 aaditya [WARNING ] Key 'file_ignore_glob' with value None has an invalid type of NoneType, a list is required for this value
10:17 aaditya Password:
10:17 aaditya managed1:
10:17 aaditya True
10:18 aaditya so for some reason key deployment is not working...
10:18 mikecmpbll how does the source option work with blockreplace? does it use that file to render into the block?
10:18 aaditya # salt-ssh --version
10:18 aaditya salt-ssh 2015.8.8 (Beryllium)
10:19 aaditya system is ubuntu 16.04 and salt-ssh is installed via apt-get
10:27 dxiri joined #salt
10:29 netcho joined #salt
10:35 ninjada joined #salt
10:35 onovy joined #salt
10:43 Dopa726 joined #salt
10:46 netcho hi all
10:46 netcho i get this error when trying to create a windwos EC2 machine with salt-cloud
10:46 netcho [ERROR   ] There was a profile error: local variable 'userdata' referenced before assignment
10:47 Dopa726 Hi! Can someone tell me where saltstack has its name?
10:48 onlyanegg joined #salt
10:51 netcho i removed userdata from prifile and i still get the error
10:51 netcho s/prifile/profile
10:51 AndreasLutro netcho: sounds like a bug in salt itself, should probably report it on github
10:52 AndreasLutro maybe make sure you've got the latest bugfix release first
10:54 london01 joined #salt
10:55 london01 Hi all, is it possible to update pillar dictionary with a new key/value from inside an sls file?
10:58 AndreasLutro london01: pillar sls or state sls? updating pillars from states is generally not recommended as it can lead to a lot of undefined behaviour
11:09 mikecmpbll how do i have a file.blockreplace state that requires a file.managed state? the requisite syntax appears to be just `require:\n  - file: /path/to/file` — will that know that i'm requiring the managed state?
11:10 mikecmpbll it won't try and require itself or something weird like that i assume?
11:11 mikecmpbll source: https://gist.github.com/mikecmpbll/f30ca720810d3793fff30c39107b49c8
11:11 AndreasLutro mikecmpbll: you need to split those 2 states up, you can't have 2 file.* state function calls within the same state id
11:12 mikecmpbll ahhh. that makes sense :)
11:12 AndreasLutro also the require: [ file: /path/to/file ] does not mean it requires the file to be present, it means require the state with ID /path/to/file to be successful
11:12 AndreasLutro so just adjust your state IDs and requirements appropriately
11:12 mikecmpbll AndreasLutro: fantastic, all falling in to place now.
11:15 abednarik joined #salt
11:23 dxtr joined #salt
11:26 chowmeined joined #salt
11:27 Pyro_ joined #salt
11:28 london01 AndreasLutro i am looking to do it from state sls
11:30 london01 i have written a workflow using orchestrate runner and I need to pass a variable between two separate state sls files that this workflow runs. I thought best approach would be just to update pillar with the key/valeu and then i can access that with a pillar.get in the other state sls file
11:34 AndreasLutro I would probably look for ways to do this without any sls magic
11:35 london01 ok thanks
11:36 london01 are you aware of any other way to do this?
11:36 k_sze[work] joined #salt
11:37 london01 only other thing i can think of is dumping the variable to a file on master from first state sls file and then second state sls file would read the content of that file and so the variable could be used within that state. But this seems very messy approach
11:39 dxtr Why isn't there a pvresize in salt.modules.linux_lvm? :p
11:40 amcorreia joined #salt
11:43 dyasny joined #salt
11:45 ronnix joined #salt
11:47 inad922 joined #salt
11:47 o1e9 joined #salt
11:49 Neighbour AndreasLutro: Why would you consider updating the pillar from within an sls 'sls magic'? :)
11:50 AndreasLutro any sort of logic meant to transfer state from one sls to another would be sls magic in my eyes
11:51 AndreasLutro for example if you update pillars, it might work, but suddenly you're reliant on states being rendered in the correct order to get the expected results
11:51 AndreasLutro london01: what is this variable exactly, what are you trying to do?
11:54 shoemonkey joined #salt
11:54 zulutango joined #salt
11:54 london01 I see what you are saying. The workflow i am writing uses the orchestrate runner to perform a rather complex workflow to upgrade an OS. This worflow also interacts with various different internal API's which include updating a ticketing system with progress updates
11:56 london01 essentially the first state sls file kicks off the first stage of upgrade and perforsm all tickets updates on progress. The second state sls file now handles some other things related to the upgrade and within this state sls i need to also update ticket system with progress updates
11:56 shoemonk_ joined #salt
11:56 london01 ...but I need to somehow pass the ticket number to the next state file so i can use that in the api call i need to make
11:57 london01 thats why i am thinking that if I can update pillar from first state sls file then in second and third state sls file all i have to do to get this variable should hopefully just be pillar.get('ticket')
11:58 AndreasLutro sounds to me like this whole OS upgrade should just be a bash script, not a series of SLS files/states
11:58 AndreasLutro bash or python or whatever
12:00 london01 ok i see
12:00 london01 so is it not possible to update pillar using some jinja in a state sls file?
12:00 AndreasLutro it is possible, I just wouldn't recommend it because it's going to have unexpected behaviour
12:00 london01 I just want to test it out to see if this will work and be available to the next state
12:01 AndreasLutro like in your case, it's entirely possible that your "next state" gets rendered before the first state has been rendered, which means it won't see the updated pillar
12:03 london01 ok i see thats definately not what i would want happening
12:04 duncanmv joined #salt
12:05 netcho AndreasLutro: i have almost latest salt version, when i coment out userdata line it creates the machine but does noe install salt-minion
12:05 dopa joined #salt
12:05 netcho salt-master 2016.3.4 (Boron)
12:16 gmoro joined #salt
12:17 Mogget I am trying to figure out if salt is able to provide files to minions in a pillar like fashion, meaning that only minions defined to have those files will be able to see that they actually exist.
12:18 XenophonF Mogget: there are ways to do that, maybe
12:18 XenophonF i've considered two different approaches
12:18 Mogget Is this possible at all? My googling finds tickets half a year to 1 year old which gives alternative solutions for just this.
12:18 Mogget XenophonF: What are those options?
12:18 XenophonF the first is using the files pillar, where the pathname of the file becomes the key name(s) and the file contents, the value
12:18 Mogget If you don't mind sharing.
12:19 XenophonF you can keep such a thing in git as long as you don't mind having a cron job that updates it on a schedule
12:20 Mogget so, manually adding a git repository to whereever the files pillar is pointing and using cron to pull updates?
12:20 XenophonF the other way is to use read-only SSH keys to deploy from a remote git repo
12:20 XenophonF correct
12:20 XenophonF i went with the latter because to me, it's more clear as to what's going on
12:21 XenophonF either way, one state.apply later and the minion has the content in question
12:22 Mogget For me I think the first option would be more viable. Simply because then I don't have to deal with key handling on large amounts of hosts.
12:22 XenophonF of course
12:22 Score_Under I've got a really awful question now. Is it possible to import a jinja template from mako?
12:22 XenophonF https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.file_tree.html
12:22 Mogget XenophonF: Thanks for the input. I was hoping this would be a part of salt, but I'll take what I get. :)
12:22 XenophonF sorry Mogget it's called file_tree
12:23 Score_Under I have a mako|yaml SLS I'm refactoring and I want it to import a variable I defined elsewhere in a .jinja file
12:23 Score_Under if not I can probably rewrite the thing in jinja
12:23 XenophonF Mogget: it's mostly there except for keeping the file_tree in git. of course you can use salt to set all that up
12:24 XenophonF it's basically how salt-formula's salt.formula SLS works, only with Salt states instead of Pillar data
12:24 XenophonF Score_Under: no - rendering runs don't share state
12:25 XenophonF you'd have to somehow import the jinja template
12:25 XenophonF er, jinja file that defines the variable, much like the map.defaults pattern
12:25 XenophonF er i mean map.jinja pattern
12:25 aldevar joined #salt
12:25 Mogget XenophonF: OK. Ifigured you were talking about file_tree when you gave me the suggestion. I find it strange that its not possible to use git natively there when you can other places in salt.
12:25 XenophonF brb
12:27 shoemonkey joined #salt
12:29 dxiri joined #salt
12:29 abednarik joined #salt
12:30 XenophonF joined #salt
12:30 XenophonF back
12:31 XenophonF Mogget: i think file_tree is intended to be generic
12:32 nikdatrix joined #salt
12:33 Neighbour AndreasLutro: And that's exctly the case for orchestrations :)
12:34 ronnix joined #salt
12:43 duncanmv joined #salt
12:45 dxtr How do I use modules.disk.resize2fs from a state file? Right now I've done: 'foo:\n  disk.resize2fs:\n  - device: /dev/sda2' but I get "[DEBUG   ] Could not LazyLoad disk.resize2fs: 'disk.resize2fs' is not available"
12:49 onlyanegg joined #salt
12:49 art5005 joined #salt
12:49 art5005 Hi all.. Is there a reason this compound matcher doesn't work?    salt -C 'nginx* and (S@10.2.1.0/24 or S@10.2.3.0/24)' test.ping
12:50 art5005 if i drop the parenthesis and and only use one of the CIDRs, it returns one of the instances.
12:50 art5005 aka:   salt -C 'S@10.2.3.0/24 and nginx*' test.ping
12:51 AndreasLutro add spaces inside the parens
12:51 AndreasLutro ( S@... or S@... )
12:51 art5005 Well, I feel silly.. Thanks.
12:52 AndreasLutro don't think you should, it's very unintuitive
12:53 art5005 lol, just read this line in the docs: Be certain to note that spaces are required between the parentheses and targets. Failing to obey this rule may result in incorrect targeting!
12:53 art5005 But yea, definitely not intuitive. Thanks for the help!
12:53 Score_Under looks like a classic case of split()-based parsing :P
12:54 numkem joined #salt
12:54 Score_Under so, a lot of jinja questions I find answered online end up requiring some supporting python code
12:54 numkem joined #salt
12:55 Score_Under is there any way to do that in salt? e.g. define a custom filter function
12:55 AndreasLutro don't think so, I usually end up writing custom modules if I need that sort of thing
12:56 AndreasLutro but I think a customizable jinja environment is a big feature request
12:56 brousch__ joined #salt
12:59 Score_Under so in that case, is there an easy-ish way to do `set(a) - set(b)` in mako?
12:59 AndreasLutro I guess you just do `set(a) - set(b)` because mako supports embedded python?
13:00 Score_Under sorry, misspoke, I meant jinja
13:00 Score_Under it seems to have undefined the builtin `set` variabel
13:00 yidhra joined #salt
13:01 AndreasLutro jinja isn't python, it just looks like it
13:01 AndreasLutro I guess you'll have to use a nested for loop and manually delete keys from one list
13:03 Brew joined #salt
13:04 racooper joined #salt
13:04 edrocks joined #salt
13:04 mikecmpbll i'm a bit confused by this situation rn: https://gist.github.com/mikecmpbll/ca031975b1c1c894c8f03aa7d12f6e21
13:07 Neighbour Does anyone know how I can programmatically add more functions to the __salt__ dict than are defined in the (custom execution) module itself?
13:08 Score_Under Neighbour: generally you just replace the execution module by putting your own in <fileserver root>/_modules I think
13:09 shoemonkey joined #salt
13:09 Score_Under I think I wrote a patch to that system a while back so that it properly merges in missing functions from the builtin version of the module too
13:12 mikecmpbll saltutil.refresh_pillar sorted it :/
13:12 Tanta joined #salt
13:12 Tanta joined #salt
13:12 numkem joined #salt
13:19 Neighbour Score_Under: This is already a custom execution module...I've created generic functions for certain operations, like _eq for objects, with the possibility to define object-specific functions with more details
13:19 netcho joined #salt
13:20 Neighbour And created a loop that adds (using functools.partial and lambda's) the functions for all objects where these functions arent defined in the source to the current module
13:20 Neighbour So the functions are available to be called in the module itself, but not from other salt modules (or states), which is what I want :)
13:21 raspado joined #salt
13:23 PatrolDoom joined #salt
13:26 Neighbour Score_Under: Looking at loader.py, it seems that I can dynamically add functions to __load__ from the __init__ function :)
13:28 evle1 joined #salt
13:31 Neighbour Hm, that's not quite working as I expected :)
13:33 shoemonkey joined #salt
13:35 SaucyElf joined #salt
13:38 schemanic_ joined #salt
13:43 jdipierro joined #salt
13:46 shoemonkey joined #salt
13:52 Neighbour Score_Under: ok, that won't work because the extra functions are generated in __init__, which is executed *after* the loader has imported the module
13:53 Neighbour Do you know (does anyone) how this can be done (add functions to __salt__ from the __init__ of a custom execution module)
13:55 ssplatt joined #salt
14:03 vegasq joined #salt
14:03 muxdaemon joined #salt
14:05 jas02 joined #salt
14:09 nikdatrix joined #salt
14:13 jas02 joined #salt
14:13 jdipierro joined #salt
14:15 edrocks joined #salt
14:16 gmoro joined #salt
14:18 jas02 joined #salt
14:21 mikecmpbll is there a technique for debugging "Recursive requisite found" ? it doesn't seem to make sense to me. the state for which i'm getting that error has one `require` and the state it's requiring has no requisites.
14:22 yuhl______ joined #salt
14:23 Neighbour mikecmpbll: is there a state that has any type of requisite to the state you're getting the error for?
14:23 mikecmpbll nope not that I can see
14:23 mikecmpbll about the gist the whole thing 1 sec
14:23 mikecmpbll https://gist.github.com/mikecmpbll/9f15e0132b479480173d7ba82d9857c9
14:26 netcho joined #salt
14:27 Neighbour hmm, the only odd thing (for me) is that you have both a require and a watch on service.redis_6379
14:27 Neighbour the rest seems pretty straightforward
14:27 dxiri joined #salt
14:27 mikecmpbll is that not necessary? the service needs it's config, and i want the service to restart if the config changes
14:27 kjb joined #salt
14:27 mikecmpbll i'm still getting to grips with requisites.
14:28 jdipierro joined #salt
14:28 Pyro_ joined #salt
14:28 dxiri joined #salt
14:29 st8less joined #salt
14:29 mikecmpbll maybe the recusive thing was spurious because another state failed. lemme try something.
14:30 mikecmpbll nope, still happening
14:31 art5005 Have you tried removing requisites one by one just to isolate where the problem is at?
14:31 art5005 Er, well.. Comment them out.
14:32 mikecmpbll art5005 : i'll give that a try now
14:34 art5005 Oh, I think I see the problem.
14:34 art5005 You're placing a requisite on a file that you're trying to do a block-replace on.
14:35 art5005 I see why you'd logically do that, want to make sure it is there before you replace something.
14:35 art5005 Hrm.
14:35 mikecmpbll yeah, can confirm it's that requisite.
14:35 mikecmpbll not sure why that causes an issue. i can see how it's more self-referential than most requisites but i thought it's just making sure that the file.managed state runs first.
14:37 mikecmpbll seems to work if i change the name of the file.managed state
14:37 mikecmpbll change the key* and make the name explicit.
14:37 art5005 Yea, a bit wonky.
14:40 mikecmpbll thanks for your help! :)
14:42 Fabbe_ joined #salt
14:44 s_kunk joined #salt
14:45 dingus joined #salt
14:46 dingus Hello, anyone have experience jinja templating sqlite query results into a roles/init.sls file?
14:49 impi joined #salt
14:51 dendazen joined #salt
14:51 muxdaemon joined #salt
14:57 tapoxi joined #salt
14:58 seanz joined #salt
15:03 ronnix joined #salt
15:04 iplux joined #salt
15:10 XenophonF FYI - https://github.com/saltstack/salt/pull/40421
15:10 saltstackbot [#40421][OPEN] Return the same value for a non-existent user as on other platforms. | What does this PR do?...
15:11 XenophonF that fixes a bug in win_useradd that breaks users-formula
15:11 iplux hello! I am trying to provision via salt-cloud an ec2 instance with two interfaces and two IPs per interface. One interface and multiple IPs work fine (using SecondaryPrivateIpAddressCount) but when I add a second interface I get a 400 error from AWS
15:13 iplux my config: https://gist.github.com/anonymous/d35f1864182a89a4f8c5476c8e9f98cf
15:15 Neighbour Score_Under: Found (and fixed) the cause of my problem: https://github.com/saltstack/salt/pull/40422
15:15 saltstackbot [#40422][OPEN] salt/loader.py: Allow functools.partial functions to be loaded from m… | …odules....
15:15 Praematura joined #salt
15:16 podstava joined #salt
15:16 podstava hi
15:16 dxiri joined #salt
15:17 podstava can somebody tell me why I`m getting 504 Gateway error after sending request to salt api. But if i try some minutes later it works ok
15:19 sarcasticadmin joined #salt
15:20 jimklo joined #salt
15:24 Score_Under Neighbour: no love for `callable`?
15:26 onlyanegg joined #salt
15:27 tiwula joined #salt
15:28 it_dude joined #salt
15:30 sp0097 joined #salt
15:33 tharkun joined #salt
15:36 dingus Hello, anyone have experience jinja templating sqlite3 external pillar query results?
15:40 mpanetta joined #salt
15:41 mpanetta joined #salt
15:41 DarkKnightCZ joined #salt
15:42 DammitJim joined #salt
15:45 raspado joined #salt
15:46 jrgochan joined #salt
15:47 jrgochan Hello. I'm having some trouble with https://docs.saltstack.com/en/latest/topics/reactor/#a-complete-example
15:48 jrgochan I'm using it to have salt minions auto join during a kickstart build. It works most of the time, but sometimes the first salt-call state.highstate I run comes back with a "Minion failed to authenticate with the master, has the minion key been accepted?"
15:48 jrgochan Second one goes just fine though.
15:52 mikecmpbll https://github.com/saltstack/salt/issues/11900 hmm
15:52 saltstackbot [#11900][OPEN] salt.states.service fails to recognize init.d/sysv services on systemd systems | Problem/Example...
15:52 mikecmpbll this is rather frustrating.
15:55 mikecmpbll man. init systems really confuse me.
15:59 huddy joined #salt
16:00 djgerm joined #salt
16:04 dingus @jrgochan could it be a time delay for the key to be accepted?
16:05 dingus @jrgochan what happens if you high state, wait a minute, and run salt-key -L
16:05 shoemonkey joined #salt
16:17 leonkatz joined #salt
16:20 darioleidi joined #salt
16:21 SaucyElf joined #salt
16:21 schemanic_ joined #salt
16:23 aldevar left #salt
16:41 Praematura joined #salt
16:45 censorshipwreck joined #salt
16:54 dxiri Hi guys, quick question, I was under the impression that the state of a minion auto applied without me having to run state.apply
16:55 dxiri however, I just started using salt and states and it seems that I have to run state.apply if I want to apply the state to the virtual machine
16:55 dxiri is that on purpose or am I doing something wrong?
16:56 impi joined #salt
16:56 whytewolf that is on purpose. there is a scheduling service for setting up scheduled highstates
16:57 whytewolf https://docs.saltstack.com/en/latest/topics/jobs/#scheduling-jobs
16:58 pipps joined #salt
17:00 dingus http://stackoverflow.com/questions/43123823/salt-stack-grains-data-from-sqlite3-external-pillar
17:05 whytewolf dingus: so much to unpack here. first. if you run salt-call pillar.items on the minion do you see ANYTHING related to whats in your database?
17:05 bocaneri joined #salt
17:06 whytewolf dingus: your check that you did run, tells you nothing about your ext_pillar being setup correctly
17:07 it_dude joined #salt
17:11 LeProvokateur joined #salt
17:11 seth joined #salt
17:11 dingus thanks @whytewolf
17:12 dingus I do not see anything related to my database
17:12 theblazehen joined #salt
17:12 whytewolf then ext_pillar is not setup correctly.
17:12 leonkatz joined #salt
17:12 dingus Can you at a glance see what is wrong with my configuration in the master file?
17:12 woodtablet joined #salt
17:13 whytewolf most likely the database settings are incorrect. for reference. the check you ran looks to be checking the database on each minion. however the master config happens on the master.
17:14 dingus for testing purposes, I am running the minion on the master
17:14 dingus by setting master: localhost in /etc/salt/master
17:14 whytewolf you only have 1 minion?
17:14 whytewolf no problem with that.
17:14 dingus in production, the database will live on the master, and will provision several separate minions
17:16 whytewolf anyway. a. your query. has no section to target. you just select * from table; . the example of 'select col1,col2,col3 from table where minion_pattern like ?' would setup the database to allow each item in the database to select proper info for each minion instead of just everything
17:17 whytewolf try salt-call pillar.refresh
17:18 whytewolf then check the logs on the master see if there are any errors in the log
17:18 dingus is there documentation about targeting? what would be most useful would be a simple example...
17:18 whytewolf when it comes to ext_pillar all targetting is minion id
17:19 whytewolf which fills in ? in the query
17:19 dingus oh, ok
17:20 dingus does it make sense related to that requirement not being documented?
17:20 dingus *sorry, does it make sense to open a ticket related to that
17:20 whytewolf no
17:20 ChubYann joined #salt
17:20 abednarik joined #salt
17:20 Shirkdog joined #salt
17:22 dingus I mean that the example in https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.sqlite3.html does not say 'WHERE minion_pattern LIKE ?' is required
17:22 dingus also, how can
17:23 dingus sorry, nm
17:23 whytewolf well, it isn't required. but if not there all pillars will go to all minions. however it also doesn't say you need the ; which most likely might be what is throwing your query off
17:24 dingus ah
17:24 dingus so, just for clarification, is the WHERE statement not required if I am OK with sending ALL data to all minions?
17:24 whytewolf thats why i said to reference errors that might be in the master log
17:24 schemanic_ joined #salt
17:25 whytewolf yes, the where clause is not required. although kind of defeats the purpase of pillar at that point. might as well just assign grains to the minions as you have no determination about what goes where.
17:25 dingus thanks for your help again
17:26 dingus I have to run to a meeting but I will follow your guidance
17:31 nixjdm joined #salt
17:34 brakkisath joined #salt
17:40 brakkisa_ joined #salt
17:46 Shirkdog_ joined #salt
17:54 hacks_ joined #salt
17:54 bmcorser_ joined #salt
17:54 abele_ joined #salt
17:56 matti__ joined #salt
17:57 Faed joined #salt
17:57 Elijah__ joined #salt
17:57 Elijah__ joined #salt
17:57 SamYaple_ joined #salt
17:57 simonmcc_ joined #salt
17:59 stupidnic joined #salt
18:00 Twiglet joined #salt
18:00 berto- joined #salt
18:00 dijit joined #salt
18:00 evilrob joined #salt
18:00 arif-ali joined #salt
18:02 saintaquinas[m] joined #salt
18:03 SamYaple joined #salt
18:03 brakkisath joined #salt
18:06 shoemonkey joined #salt
18:07 brakkisa_ joined #salt
18:10 tom29739 joined #salt
18:11 abednarik joined #salt
18:25 swa_work joined #salt
18:27 megazord joined #salt
18:28 candyman88 joined #salt
18:28 leonkatz joined #salt
18:37 ahammond how do I tell salt-master that a minion has been re-keyed?
18:38 cscf ahammond, salt-key --delete minion_id && salt-key --accept minion_id
18:38 ahammond I've already replaced the key in /etc/salt/pki/master/minions/my_minion
18:39 ahammond salt-key sees the new key as being present and accepted.
18:39 cscf ahammond, that's a needlessly manual way of doing it
18:39 cscf ahammond, but I guess it should work.  What is not working?
18:40 ahammond cscf my suspicion is that salt-master has cached a copy of the old key and is not allowing the minion to connect with the new key
18:40 cscf ahammond, have you restarted the salt-master?
18:40 ahammond cscf no... is there no other way?
18:41 cscf ahammond, there might be, but unless you are running an environment far busier than mine, it's a small thing to do.
18:41 jip-etc joined #salt
18:41 cscf I mean the service, of course, not the whole machine
18:41 ahammond cscf makes sense. I think this will be an edge case, so... yeah, ok.
18:41 jip-etc trying to have a reactor restart a failed dockerng service.. in case well it fails.  Need advice.
18:41 cscf systemctl restart salt-master should take like, 1 second.
18:42 jip-etc have this setup on the minion, just not sure what to fire off in /srv/salt/reactor/restart-docker.sls    https://github.com/saltstack/salt/blob/develop/salt/engines/docker_events.py
18:43 mpoole left #salt
18:44 _JZ_ joined #salt
18:46 saintaquinas[m] joined #salt
18:49 armguy joined #salt
18:50 cyborg-one joined #salt
18:53 abednarik joined #salt
18:58 it_dude_ joined #salt
18:59 mpanetta joined #salt
19:00 debian112 hey guys quick question:
19:02 mikecmpbll joined #salt
19:03 it_dude joined #salt
19:03 Neighbour Score_Under: Hmm, that might be a more suitable approach..since both functions and partials (should) match `callable` :)
19:04 debian112 We are planning an upgrade from: 2015.5.3 to the latest
19:04 numkem joined #salt
19:04 debian112 can we do on upgrade, or should we do increments?
19:05 whytewolf upgrading should be fine. just remeber master first. also upgrade a dev enviroment first make sure there are not changes that affect your states
19:07 seanz joined #salt
19:08 debian112 so I should fine going from:2015.5.3 to 2016.11?
19:09 samodid joined #salt
19:10 seanz1 joined #salt
19:11 Edgan debian112: In general 2016.11 is very good. You could have regressions though.
19:13 Praematura joined #salt
19:20 sh123124213 joined #salt
19:20 seanz joined #salt
19:22 seanz1 joined #salt
19:23 numkem joined #salt
19:25 numkem joined #salt
19:36 abednarik joined #salt
19:43 renoirb joined #salt
19:44 abednarik joined #salt
19:55 mattl joined #salt
19:56 munhitsu_ joined #salt
19:57 KyleG joined #salt
19:57 KyleG joined #salt
19:58 ecdhe joined #salt
19:58 ecdhe joined #salt
20:01 ecdhe joined #salt
20:01 ecdhe joined #salt
20:06 ecdhe joined #salt
20:06 onsodi joined #salt
20:07 shoemonkey joined #salt
20:08 abednarik joined #salt
20:12 ecdhe joined #salt
20:12 ecdhe joined #salt
20:12 impi joined #salt
20:15 onsodi Getting a parsing a block mapping in line 3 column 1. Not sure how to fix that  https://gist.github.com/anonymous/fc30576804f66adf62d5f6efd265ff8e
20:17 canci joined #salt
20:18 DarkKnightCZ joined #salt
20:19 abednarik joined #salt
20:24 rburkholder joined #salt
20:37 pipps joined #salt
20:49 xet7 joined #salt
20:51 onsodi figured it out
20:58 sp0097 joined #salt
20:59 jrgochan @dingus: i gave it a minute, but perhaps that's too short. I'll try 10 minutes.
21:01 ecdhe joined #salt
21:03 ecdhe joined #salt
21:03 ecdhe joined #salt
21:12 irated joined #salt
21:12 irated joined #salt
21:23 ecdhe joined #salt
21:23 Trauma joined #salt
21:25 onsodi {% for server, hostinfo in salt['mine.get']('osfinger:Ubuntu-14.04', 'grains.item', expr_form='grain').items() %} Is there an easier way to get a list of minions than this?
21:26 hemebond onsodi: I used something similar to that. You might be able to use the grains cache instead of the Mine.
21:26 whytewolf not really. it is either use the mine. or setup a pillar you populate with the info. one requires manual intervention the other does not
21:27 renoirb joined #salt
21:28 hemebond At least not until the manage.alive, etc., functions work properly.
21:28 hemebond Oh wait, couldn't use those in a state.
21:28 whytewolf yeah
21:28 whytewolf thats runner
21:28 onsodi okay thanks
21:28 hemebond Would be useful for pillar though.
21:29 whytewolf although you could use those to generate pillars
21:29 ecdhe joined #salt
21:30 whytewolf i guess you could setup some sort of elabrate sdb that every minion checks iinfo ...
21:31 whytewolf but that could be combersome. and complicated to setup
21:31 hemebond The grains cache seems pretty good to me.
21:32 hemebond I've started using that instead of the Mine .
21:32 Trauma joined #salt
21:32 pipps joined #salt
21:32 whytewolf it's great if what you work with is grains
21:32 whytewolf if not ...
21:32 hemebond Yeah.
21:32 hemebond Most salt-mine examples are just grains anyway, e.g., IP addresses, etc.
21:32 whytewolf i don't use grains for ip addresses
21:33 hemebond You don't?
21:33 whytewolf [mainly because on openstack i have about 400 ip addresses on a box.
21:33 whytewolf ]
21:33 hemebond Oh, fun.
21:33 whytewolf yeah much simpler useing the network tools to get what i need
21:33 hemebond Oh, so you use the network modules to filter?
21:33 hemebond Right.
21:33 whytewolf yeap
21:36 ecdhe joined #salt
21:37 ninjada joined #salt
21:38 netcho joined #salt
21:38 ecdhe I'm greenfielding on a home network.  I'm going 100% ipv6 (no NAT!!!) and will use salt-cloud to spin up vms on local hardware.
21:38 ecdhe Is there a recommended or even a discouraged method of integrating with an IPAM package for a setup like this?
21:39 ecdhe Basically, when salt-cloud spins up a new node (or salt-master becomes aware of a new node) I could notify an IPAM that a new SLAAC address has been instantiated.
21:40 whytewolf well that really isn't covered by salt-cloud. salt-cloud pretty much just handleds the spin up of the instance. you could have a state in the minion that runs afterwords that registers it with your ipam
21:41 ecdhe I could also use the ISC DHCPd script hooks to notify IPAM of a new node.  That way there's no additional IPAM script needed on the minion (have to get DDNS setup anyway)
21:41 ecdhe Whatever means, I want to make sure I end up with cattle and not pets.
21:43 whytewolf yeah, basicly there is not horrificly wrong way except the one that is unstable.
21:43 ahrs I have a question about pillars. Say I have two pillars, pillar A.sls and pillar B.sls (both included in a top.sls). Can pillar B include a value from pillar A, e.g something along the lines of `myKey: {{ A.myvalue }}`
21:43 tapoxi joined #salt
21:44 whytewolf ahrs: so. yes and no. you could jinja include a.sls and then utut it into b. but there is no way to just say pillar.get with in pillar
21:46 ahrs whytewolf: *sigh*. I thought that might be the case my current "hack" is to do something like this, which works but I don't like it for obvious reasons: `{% set phpVersion = salt['cmd.shell']('cat /srv/pillar/php.sls | grep -E "phpVersion: " | sed "s/.*: //g" | sed "s/ //g"') %}`
21:46 whytewolf oh wow yeah that is hacky
21:48 whytewolf {% import_yaml "a.sls" as a %}
21:49 whytewolf ahrs: you might want to read through this https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html#salt.utils.jinja.SerializerExtension
21:50 whytewolf will give new ways of getting at that code
21:50 whytewolf that are less hacky
21:51 ahrs whytewolf: Thanks. I'm guessing this will speed things up a bit too thanks to any caching that is performed.
21:51 ninjada joined #salt
21:52 whytewolf most likely yes.
21:52 ninjada joined #salt
21:56 pipps joined #salt
22:00 sh123124213 joined #salt
22:01 ninjada joined #salt
22:02 Trauma joined #salt
22:03 pipps joined #salt
22:07 shoemonkey joined #salt
22:18 ninjada joined #salt
22:26 ashmckenzie joined #salt
22:27 druonysus joined #salt
22:31 jhauser joined #salt
22:34 pipps joined #salt
22:35 onsodi Having trouble with this state file. Trying to make it use salt-mine to get all connected minions, make directories and generate ssh keys into them.  https://gist.github.com/anonymous/6f32aa480ced2bd0b1ed2f8de2e0cee3
22:36 hemebond does the "type in" need [ ]?
22:36 hemebond around the list part?
22:36 hemebond or is that some fancy syntax I've not seen before
22:37 PatrolDoom joined #salt
22:39 onsodi that part should work and goes through a loop
22:39 hemebond So what's the problem?
22:42 SaucyElf joined #salt
22:42 pipps joined #salt
22:42 onsodi I believe the problem lies in the 5-10 lines. No directories are created when I run the state file
22:43 onsodi So I think it might be the salt.mine since it's my first time playing around with it
22:43 hemebond Can you paste your mine functions?
22:44 hemebond Since you're just using grains you could use the grain cache instead maybe.
22:44 hemebond I wait, that's master only.
22:44 onsodi {% for server, hostinfo in salt['mine.get']('osfinger:Ubuntu-16.04', 'grains.item', expr_form='grain').items() %}
22:44 hemebond I mean your mine_functions
22:45 hemebond https://docs.saltstack.com/en/latest/topics/mine/#mine-functions
22:49 onsodi oh did not set that up. Would it just be mine_functions: grains.items osfinger: [] host: []
22:49 hemebond It would be grains.items: []
22:49 hemebond That would give you all the grains.
22:50 hemebond You might be able to use grains.get: [osfinger]
22:50 hemebond But you'd need one for each grain you want.
22:51 hemebond And then you'd need an alias for each of those.
22:58 onsodi Is there any other setting I need to modify on the minion config besides adding mine_functions:?
22:58 hemebond If you
22:58 hemebond are doing the mine_functions via pillar you need to do a refresh_pillar and that should be it.
22:58 hemebond Then you just wait for the mine data to roll in.
22:59 PatrolDoom joined #salt
22:59 edgr joined #salt
23:01 whytewolf you can force the mine to roll in with mine.update on all the minions
23:02 onsodi Thank you for the help@hemebond and @whytewolf
23:14 st8less joined #salt
23:23 ninjada joined #salt
23:55 swa_work joined #salt

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