Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-05-20

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

All times shown according to UTC.

Time Nick Message
00:06 mosen joined #salt
00:06 rem5 joined #salt
00:09 drawsmcgraw joined #salt
00:12 ageorgop joined #salt
00:16 berserk joined #salt
00:17 anotherZero I'll try +
00:18 kevinquinnyo why isnt this working: salt some-tgt mod_random.get_str length=46
00:18 rgrinberg joined #salt
00:18 kevinquinnyo it says 'mod_random.get_str' is not available.
00:19 iggy usually when you see mod_* you take the mod_ part off
00:19 iggy it's to keep there from being clashes with upstream and/or popular python modules
00:19 kevinquinnyo ohhhh
00:19 iggy but the salt loader loads things using their virtual name
00:19 mosen hiya saltines
00:19 kevinquinnyo right
00:20 kevinquinnyo ok thanks
00:20 kevinquinnyo sigh... i knew that actually, in fact i've used that module before -- just saw it in my code
00:20 kevinquinnyo must be time for a beer
00:23 Nahual joined #salt
00:24 ageorgop joined #salt
00:25 devster31 what are the default options enabled for jinja templating in salt? like lstrip_blocks and such
00:25 johnkeates joined #salt
00:27 devster31 ok, found it, none, issue #8333
00:29 rem5 joined #salt
00:47 nZac joined #salt
00:50 drawsmcgraw left #salt
00:52 cyborg-one joined #salt
00:52 Vaelatern How may I possibly expidite the inclusion of the code to support Void Linux's runit and package manager?
00:53 moloney joined #salt
00:55 moloney I have a state where I do "mine.send" and then later it does "mine.get".  It seems like I can't get the mine data back in the same highstate run (it is there on the next high state run). I tried add "mine.update" after the send but that didnt' help.
00:58 justanotheruser joined #salt
00:59 amcorreia joined #salt
01:00 flowstate joined #salt
01:05 edrocks joined #salt
01:10 iceyao joined #salt
01:18 quasiben joined #salt
01:23 Lionel_Debroux joined #salt
01:23 berserk joined #salt
01:24 berserk joined #salt
01:26 UtahDave Vaelatern: Do you have the code you need for Void Linux?
01:28 UtahDave Vaelatern: I'd say the first step would be to open an issue on Github making the request. There are a few things in Salt that check for info about the OS, like grains, package manager, service, etc
01:28 Vaelatern It's on master
01:28 Vaelatern It's PRed and accepted already
01:29 Vaelatern master or develop, I forget
01:29 UtahDave Oh, ok. Let me see.
01:29 UtahDave develop
01:29 Vaelatern Not tagged for any release
01:30 UtahDave It looks like it didn't make it in time for the upcoming 2016.3 release
01:30 UtahDave so it will be in the following "Carbon" release.
01:32 UtahDave I was just checking out the Void web site. Looks pretty cool!
01:33 bshelton229 joined #salt
01:33 Vaelatern It really is
01:34 Vaelatern I'm just wondering what else I can do to help test that code and make sure everything is shipshape with that code
01:35 UtahDave I'll see if can install void and run some tests on it in the next couple of days
01:35 UtahDave it would be good to have that well tested before it lands in a full release
01:36 tristianc joined #salt
01:36 Vaelatern Absolutely, I just have not tested it from outside yet. Still trying to get my OpenBSD states working
01:37 UtahDave Vaelatern: on the live current dowload page,  is the "lxde" version an lxd image? or something else entirely?
01:38 Vaelatern It is a version which boots you into a GUI with lxd
01:38 UtahDave to act as an lxd host?
01:38 Vaelatern No, lxdm, a desktop environment
01:38 UtahDave ah, ok.
01:39 UtahDave That makes sense since there's a cinnamon and mate and others there
01:39 k_sze[work] joined #salt
01:40 UtahDave ok, I've got the isos.  I'll play with that tonigt
01:40 UtahDave I have to head out to a user group now
01:40 Vaelatern What is lxd?
01:46 subsignal joined #salt
01:46 UtahDave lxd is the new stuff Canonical has been building around lxc (linux containers)
01:46 Vaelatern We don't have that packaged (yet)
01:46 UtahDave They've done most of the work for lxd on Ubuntu, but others are working on incorporating it.
01:46 UtahDave are you a project lead for Void?
01:46 Vaelatern I'm one of the 15 contributors. xtraeme is the project lead
01:46 hrumph i started to look into use of containers
01:46 hrumph i'm not a fan
01:46 hrumph may if you are google or something
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! | Latest Versions: 2015.5.10, 2015.8.9, 2016.3.0rc3 | 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:52 nZac joined #salt
01:58 catpigger joined #salt
01:58 iggy hrumph: that's how I feel about docker... lxd is different
01:59 iggy it's system containerization vs application containerization
01:59 flowstate joined #salt
02:03 iceyao_ joined #salt
02:05 iceyao__ joined #salt
02:19 auzty joined #salt
02:24 hrumph iggy ok good point. docker is really the only one i looked into before saying "no way"
02:25 hrumph my basic gripe was that you basically didn't have an environment any more other than your libraries
02:26 hrumph so it's like crippling everything for some small gains in portability and security
02:28 hrumph ok i've never looked at lxd at all to be fai
02:28 hrumph it looks like its resolved many of the gripes i had
02:29 hrumph i guess i have to take a fresh look at containers
02:31 hrumph iggy ok thanks for showing me lxd its definitely different from what i remember when all i knew about was docker
02:31 hrumph i'll have to rethink my position on containers
02:38 writtenoff joined #salt
02:39 iceyao joined #salt
02:41 rem5 joined #salt
02:49 flebel_ joined #salt
02:53 iceyao joined #salt
02:54 faeroe joined #salt
02:58 faeroe joined #salt
02:59 flowstate joined #salt
03:04 beelzebob I'm using cmd_batch in the localclient in a script, e.g.: returns = local.cmd_batch(...
03:04 faeroe joined #salt
03:04 beelzebob and looking over returns: for ret in returns:
03:05 beelzebob this is great, I can check return values, neat!
03:05 beelzebob but if something goes wrong, and I want to abort the batch...
03:05 beelzebob I can call returns.close(), and it works
03:05 beelzebob however, there are remaining jobs that I never see the return value
03:06 brianfeister joined #salt
03:07 beelzebob so, calling close() on the generater does stop the batch from progressing - but I can't get the return values for things already sent.  Is there any way I can get these values?
03:07 edrocks joined #salt
03:07 zenlot joined #salt
03:07 beelzebob I really want to tell the generator "stop sending anything new, but wait and give me what you get back"
03:08 anotherZero Ok, guys -- remind me how to run a command if a file.managed is modified
03:12 berserk joined #salt
03:26 racooper joined #salt
03:28 iggy cmd.wait with a watch on the file
03:29 iceyao joined #salt
03:30 favadi joined #salt
03:53 nZac joined #salt
03:58 flowstate joined #salt
04:11 lompik joined #salt
04:17 dezertol joined #salt
04:24 brianfeister joined #salt
04:24 synical joined #salt
04:25 Laogeodritt joined #salt
04:25 mosen joined #salt
04:28 Ayo joined #salt
04:41 faeroe joined #salt
04:45 faeroe joined #salt
04:46 viq joined #salt
04:54 nZac joined #salt
04:55 rdas joined #salt
04:56 jerredbell joined #salt
04:58 flowstate joined #salt
05:05 ivanjaros joined #salt
05:09 edrocks joined #salt
05:20 jxm_ joined #salt
05:21 difm joined #salt
05:21 UtahDave joined #salt
05:23 iceyao joined #salt
05:29 garphy joined #salt
05:32 felskrone joined #salt
05:37 auzty joined #salt
05:43 impi joined #salt
05:47 dmaiocchi joined #salt
05:48 cyborg-one joined #salt
05:49 av_ joined #salt
05:55 dmaiocchi joined #salt
05:58 flowstate joined #salt
06:04 auzty joined #salt
06:11 dfinn joined #salt
06:17 ravenx joined #salt
06:20 brianfeister joined #salt
06:21 Sylvain31 joined #salt
06:25 writteno1 joined #salt
06:26 ivanjaros joined #salt
06:27 ageorgop joined #salt
06:27 cwright joined #salt
06:28 wangofett joined #salt
06:28 isntall_ joined #salt
06:28 isntall_ joined #salt
06:28 inire joined #salt
06:28 sarlalian joined #salt
06:29 patrek joined #salt
06:29 justanotheruser joined #salt
06:29 SamYaple joined #salt
06:30 _W_ joined #salt
06:30 jb1498 joined #salt
06:31 TOoSmOotH joined #salt
06:32 opdude_ joined #salt
06:33 duncanmv joined #salt
06:36 auzty joined #salt
06:39 iceyao joined #salt
06:43 Sylvain31 morning #salt, freehugs for Jinja!
06:46 fracklen joined #salt
06:46 ravenx salt is giving me a head ache:  i think that when i have more than 1 salt variable (via jinja templating) in your salt state. you need to pass in all of them via the command line
06:47 ravenx you can't just pass one and let the other variables be resolved via pillars
06:50 Sylvain31 ravenx: example?
06:51 ravenx let me get an example:
06:53 KermitTheFragger joined #salt
06:55 nZac joined #salt
06:56 ravenx Sylvain31: here is what i mean: https://paste.debian.net/687858/
06:56 ravenx i only want to pass in one value, and let the pillars handle the rest.
06:57 ravenx i only want to have one 'mutable' pillar data.  the rest of them should be populated by jinja.  i am only using this as an example, cuz i have many more variables, not just 'make'.
06:57 toanju joined #salt
06:59 flowstate joined #salt
07:01 ravenx in short, some days i want salt to check out the branch i want to build and deploy. and have salt handle the rest of the building, deploying, starting of supervisor, etc.
07:01 Elsmorian joined #salt
07:02 UtahDave ravenx: try changing the top level pillar variable. I think you may be overwriting 'admin'
07:03 ravenx the 'admin' in 'admin:git_branch'?
07:04 dfinn1 joined #salt
07:04 iceyao_ joined #salt
07:05 Sylvain31 salt 'vi2' state.apply admin pillar='{"admin":{"git_branch": "stable"} }'
07:05 Sylvain31 yep overwrite not merge, right?
07:05 Sylvain31 properties admin:make gone
07:06 Sylvain31 there is a merge example here, I think it's what you need
07:07 danduk82 joined #salt
07:07 danduk82 left #salt
07:07 danduk82 joined #salt
07:07 Sylvain31 https://github.com/saltstack-formulas/mysql-formula/blob/master/mysql/config.sls#L2
07:08 Sylvain31 not sure, but it merge pillar and an config file in yaml
07:08 jhauser joined #salt
07:09 Sylvain31 also in .sls you should use salt['pillar.get'] … I'm seeking for the link~
07:09 Sylvain31 …
07:11 schinken I wrote a salt state to deploy icinga2. I know want to deploy agents to my hosts - but I need to generate a SSL certificate for each host. Is this possible within a salt state?
07:11 danduk82 Hello everybody. I am getting some problems when trying to sync custom grains to minions. I followed the doc, such as doing "salt '*' saltutil.sync_grains", or "saltutil.sync_all"; I get the response which lists my grains (saved in /srv/salt/_grains), but when I try to use or list them (grains.ls) they do not appear. Strangely, the modules work seamlessly. I'm I maybe missing some step? (I also tried to highstate a few times before an
07:12 edrocks joined #salt
07:13 dgutu joined #salt
07:13 Sylvain31 ravenx: this one: http://www.tmartin.io/articles/2014/salt-improving-jinja-usage/
07:13 danduk82 Neither are they listed on the salt master
07:15 ravenx Sylvain31: gonna give that a shot
07:16 iceyao joined #salt
07:16 Sylvain31 ravenx: it talk about pillar.get which seems to be a jinja exstension, that may help you.
07:17 ravenx Sylvain31: hmm...but in my jinja on that paste i showed ya, i am using the pillar.get
07:17 dezertol joined #salt
07:18 ravenx also, what do you mean admin:amake gone, that part sorta confused me
07:19 Sylvain31 ravenx: assign value to a dictionary a top key, may destroy the tree under, do you see what I mean?
07:19 ravenx not quite :(
07:20 ravenx perhaps you could use my debian paste as an example?
07:22 keimlink joined #salt
07:23 manji joined #salt
07:23 Sylvain31 https://paste.debian.net/687872/
07:23 Sylvain31 in pure python
07:24 ravenx ah okay
07:24 Sylvain31 if I reset a properties in a dic, all other are gone
07:24 ravenx so you'/re solution is to pass in both the git_branch AND the make variable?
07:24 Sylvain31 that may be what happened to your pillar except if salt auto merge dic
07:24 ravenx however, i would only like to set the git_branch variable and have the 'make' be resolved from pillars
07:25 ravenx cuz in my pillars i have 'make' defined as 'make: build-deploy'
07:25 ravenx in a sense, shouldn't it be that when i go:  state.sls admin pillar='{"admin":{"git_branch": "stable"} }'
07:25 ravenx that only git_branch gets changed, and make's value is 'gotten' from pillars?
07:26 Sylvain31 I'm not sure, you have to test, a simple example. I made a supposition…
07:28 kshlm joined #salt
07:28 Sylvain31 to debug yaml I found that trick for now:ssh db0 "salt-call -ldebug state.show_sls  mysql.user 2>&1" | less
07:29 Sylvain31 it calls a state on the mininon from the master with debug, you'll get the yaml generated
07:29 jijiki joined #salt
07:29 ravenx you need ssh to debug yaml?
07:29 ravenx p+p
07:29 Sylvain31 you can have two ssh terminal of course ;)
07:30 Sylvain31 I'm lazy and try to do not switch…
07:30 Sylvain31 db0 is my mininon hostname
07:30 UtahDave left #salt
07:31 Sylvain31 The idea was to stop a yaml rendering not to execute sls, I don't find how to get it for now.
07:32 josuebrunel joined #salt
07:34 Sylvain31 also for lazyness, it has the advantage to share bash history…
07:35 avozza joined #salt
07:37 babilen Sylvain31: salt 'db0' cmd.run "salt-call -ldebug state.show_sls  mysql.user 2>&1" ;)
07:37 babilen Err, probably without the I/O redirection
07:39 Sylvain31 babilen: it's copy paste of my command. So what?
07:40 babilen It wouldn't require you to configure key-based login from your master to your minion
07:40 CeBe joined #salt
07:40 Sylvain31 ho, it's from master?
07:40 flowstate joined #salt
07:41 babilen It's not meant entirely serious, but I simply found the "Use salt to call salt-call on the minion" to be funny
07:41 Sylvain31 babilen: ssh key was populated before salt-bootstrab was even run on the minion. ssh is my swiss army knife
07:42 Humsie joined #salt
07:43 Sylvain31 yes funny. I may find the way to stop rendering at yaml stage. It's done on the minion right?
07:43 babilen So you run that from your workstation rather than your master then?
07:43 Sylvain31 nope, I'm working on the master directly
07:44 babilen ravenx: Haven't we established that pillars passed on the command are, as of now, not being merged with normal pillars and that behaviour would change in on of the next releases?
07:45 babilen Sylvain31: Ah, yeah ... I typically can't login to my minions from my master using SSH. Anyway ...
07:47 Sylvain31 babilen: I'm a Dinosaur, in 2010 we developped show ssh/python/perl/ruby script to perform remote configuration on more than 100 server, I got some sequel…
07:48 Sylvain31 show ~ some
07:49 nmadhok joined #salt
07:51 Sylvain31 babilen: cmd.run don't need 2>&1 ;)
07:54 Humsie joined #salt
07:54 ravenx babilen: 'merge' is the behavbior that i want right?
07:54 ravenx babilen: or rather, the behavior that i have described?
07:57 babilen Sylvain31: Yeah, that's what I was referring to with "I/O redirection"
07:57 babilen ravenx: Exactly .. didn't I discuss this with you?
07:57 babilen (and found the commit in which this behaviour is changed)
07:58 ravenx babilen: ah, yeah you did.
07:58 ravenx babilen: will the salt-master release change this, or a salt-minion release change this?
07:58 flowstate joined #salt
07:59 babilen There are no independent releases for the master and minion
07:59 ravenx ah okay so the next one will
07:59 iggy there is actually a fair amount of documentation on pillar merging
07:59 iggy damn, was scrolled up
07:59 ravenx iggy: apparently the one function i want isnt' working.
07:59 babilen iggy: Yeah, but it doesn't merge in pillars passed on the command line at this time
07:59 babilen https://github.com/saltstack/salt/issues/18429
07:59 saltstackbot [#18429]title: Pillars passed from command-line override pillar subtrees instead of merging | assuming a pillar containing:...
08:00 babilen Fixed in https://github.com/saltstack/salt/pull/32288 which hasn't made it into a release yet
08:00 saltstackbot [#32288]title: use dictupdate.merge instead of dict.update to merge CLI pillar overrides | Fixes #18429.
08:00 babilen ravenx: I thought you'd simply patch your master manually for now?
08:00 iggy oh, I'm running from git, lucky me
08:00 ravenx when you mean merge: it is the behavior of "passing in one, changing said jinja value, and the rest are retrieved from pillar" no?
08:00 ravenx babilen: i got sidetracked that day :)
08:01 babilen ravenx: It means that the pillar values you pass on the command line do not completely replace the value(s) that were there before, but that they are, in fact, merged
08:01 babilen ravenx: Ah, okay. It's just that I thought we'd "solved" that problem already and I was wondering why you are still struggling with it.
08:04 dfinn joined #salt
08:05 SheetiS joined #salt
08:05 dezertol joined #salt
08:05 ravenx babilen: ah so in this case, the way i was doing it, is i'm passing in only ONE value.  and salt (because it hasn't been fixed) is only registering that one value and does not know how to get the rest
08:06 ravenx so it merges the only one passed in, and the rest stay empty?
08:09 brianfeister joined #salt
08:12 dariusjs joined #salt
08:12 ravenx joined #salt
08:20 s_kunk joined #salt
08:20 lero joined #salt
08:25 giannello joined #salt
08:26 izrail joined #salt
08:26 rsanting joined #salt
08:27 babilen Hmm, I'm seeing "State 'pip.installed' was not found in SLS ...." errors today. This is probably related to https://github.com/saltstack/salt/pull/33180/files or some earlier pip "fixes" introduced in 2015.8.10
08:27 saltstackbot [#33180]title: Pip fix | ### What does this PR do?...
08:27 babilen (seeing this on wheezy)
08:28 babilen Has anybody else noticed this behaviour?
08:30 dkrae joined #salt
08:31 babilen Works fine on jessie with a newer pip version :-(
08:32 brianfeister joined #salt
08:36 mhug left #salt
08:37 danduk82 Hello, can anybody help me understanding why, if my minions (and master) have the custom _grains deployed in their cache, I can't use them=
08:37 danduk82 ?
08:37 danduk82 even grains.ls does not show them
08:37 danduk82 but ls /var/cache/salt/minion/files/base/_grains/ shows their present
08:38 babilen danduk82: What happens if you try? Could you paste an example grain, the procedure you use for deploying them and the result of calling them to a pastebin such as one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, … ?
08:38 danduk82 salt version : salt 2015.8.8.2 (Beryllium)
08:38 danduk82 yep, one second
08:39 ravenx babilen: btw isn't salt 8.9 released already
08:40 babilen I think they cut 2015.8.10 due to https://github.com/saltstack/salt/pull/33180
08:40 saltstackbot [#33180]title: Pip fix | ### What does this PR do?...
08:40 babilen And I'm suffering
08:41 danduk82 @babilen: here is the ouput: http://paste.debian.net/687911/
08:42 babilen danduk82: So, what's the problem?
08:42 danduk82 I should see also ec2_tags in the grains.ls shouldn't I?
08:43 babilen ravenx: Planned to do some nice development work and now I have to figure out how they broke pip.installed on older pip versions. Hope that it doesn't take me too long to come up with a proper bug report.
08:43 babilen danduk82: So ec2_tags is the actual problem?
08:43 danduk82 If I run "salt 'test' grains.item ec2_tags" I only get an empty string
08:43 danduk82 no also the other _grains are not shown
08:43 danduk82 or usable
08:44 danduk82 I might do something wrong, I guess
08:44 babilen Pick one and we focus on that. It doesn't make sense to try to debug them all the same time.
08:44 babilen My gut feeling is that the grain is missing some dependencies on the minion
08:44 danduk82 let's do it with ec2_tags. I cloned salt-contrib for that (git@github.com:saltstack/salt-contrib.git)
08:45 babilen But to summarise: *Some* custom grains work on your minion, while others don't?
08:45 danduk82 it might also miss it on the master
08:45 ravenx i was also wondering if the pillar merge fix is aimed for 8.10?
08:45 danduk82 no, I tried to write a very stupid grain, but it also does not work. I can re-try and send you the ouptut
08:45 N-Mi joined #salt
08:45 N-Mi joined #salt
08:46 AndreasLutro sooo what's the difference between 2015.8.9 and 2015.8.10 ?
08:46 babilen ravenx: It probably is
08:46 babilen AndreasLutro: The pip fix
08:46 jopecko_ joined #salt
08:46 aqua^c_ joined #salt
08:46 babilen https://github.com/saltstack/salt/issues/33376#issuecomment-220494456
08:46 saltstackbot [#33376]title: pip state broken in 2015.8.9 with pip <6.0 | ### Description...
08:47 danduk82 wait, I am upgrading to 2015.8.10
08:47 garphy joined #salt
08:48 AndreasLutro right
08:48 ravenx babilen: thanks :)
08:48 babilen AndreadLutro: And guess what doesn't work for me with pip 1.1 on wheezy? ;)
08:48 ravenx babilen: you recommend me filing the progblem i'm having under the issue you linked me the other day?
08:49 babilen ravenx: Isn't "your problem" (not exactly sure what you refer to here) solved with .10 ? Which issue do you mean?
08:50 ravenx babilen: the pillars passed in command line not merging properly?
08:50 babilen Isnt' that solved now?
08:51 ravenx let me look for that ticket, hang on.
08:51 babilen Why don't you try it?
08:51 ravenx i can't, since i don't even know which version it is :|
08:52 babilen Your salt installation?
08:52 babilen "salt-master --version"
08:54 ravenx salt-master 2015.8.8.2 (Beryllium)
08:54 ravenx ah, this: https://github.com/saltstack/salt/issues/18429
08:54 saltstackbot [#18429]title: Pillars passed from command-line override pillar subtrees instead of merging | assuming a pillar containing:...
08:55 babilen ravenx: How did you install that version?
08:55 nZac joined #salt
08:55 ravenx via the repo, i picked a major version.
08:56 danduk82 @babilen: I have tried changing the version. This does still not work, I have also created a "testing.py" grain. Here is the pastebin: http://paste.debian.net/687923/
08:58 slav0nic joined #salt
08:58 punkoivan joined #salt
08:58 babilen ravenx: So, are there new packages for .10 already?
08:58 atmosx Hello, I have a few hosts which haved "Denied Keys". I updated the keys, now I can ping and run command but these host still appear in "salt-key -l den", how do I remove them?
08:58 zenlot6 joined #salt
08:58 ravenx babilen: i'll check.  however, it's not enough to update salt-master to .10 right?  the minions also have to be .10?
08:58 JohnnyRun hi all. I'm using salt-cloud with vmware maps. Other times it worked OK, but now it does not set hostname and ip (/etc/salt/minion  is fine). I'm running --keep-tmp -l debug. May you suggest me how to debug this?
08:58 babilen ravenx: Why don't you try it?
08:59 ravenx babilen: i won't be able to roll back if it breaks right? :(
08:59 Elsmorian joined #salt
09:00 duncanmv joined #salt
09:01 Sylvain31 /away -all
09:01 babilen ravenx: Try it in a VM?
09:02 ravenx sounds good
09:08 Sylvain31 can I call a salt module from salt state?
09:09 dmaiocchi joined #salt
09:09 Sylvain31 I would like to call mysql.query
09:09 ravenx yes
09:09 ravenx using module.run
09:10 babilen Sylvain31: You can, https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html#salt.states.module.run
09:10 Sylvain31 sounds good…
09:11 Sylvain31 ;)
09:11 auzty joined #salt
09:11 babilen Are you trying to implement your DROP USER LIKE bit?
09:13 Sylvain31 mysql_destroy_user yes. more for fun, and for becoming an Jinja, I guess, than after so much fight you should upgrade to some next level, no?
09:13 edrocks joined #salt
09:16 babilen I would strongly recommend to implement that in the mysql_user state and mysql execution module, rather than writing salt states for that.
09:17 babilen A simple mysql_user.absent: - name: "bob%" - some_good_option_name_like_by_query_or_so: True
09:17 dmaiocchi joined #salt
09:18 Sylvain31 not followed. sorry.
09:21 manji joined #salt
09:22 manji joined #salt
09:22 Sylvain31 babilen: I think I got it. But if I manage to undersand module.run, I should be able to perform it inside my state. what you are speaking about it going outside the formula, right? into the python module code? or can I ship code within the formula too?
09:23 zenlot joined #salt
09:33 danduk82 @babilen, sorry, I might be incapable, but I really don't get my problem with grains. If I modify the grain "testing.py", and re-sync grains. It is listed in the salt output. So this means it is synched. But I really can't get it : "salt 'test' grains.ls" does not list it, and "salt 'test' grains.item testing" does not show anything. I have setup file_root to /srv/salt, created the folder _grains, put some stuff in it.
09:33 danduk82 I am following this doc: https://docs.saltstack.com/en/latest/topics/targeting/grains.html
09:34 danduk82 neither does "salt-call --local grains.item testing" on the master show anything
09:34 danduk82 and re-run highstate a few times "just in case"
09:37 Sylvain31 mysql_destroy_user sls macro: for experimenting… http://paste.debian.net/687958
09:38 babilen Sylvain31: Yes, I am referring to adapting the state and execution modules to your needs (and to submit that online). You can ship new versions of state and execution modules in _states and _modules respectively (also in the formula)
09:38 babilen IMHO this shouldn't be implemented in a SLS, but natively in the module (if at all)
09:39 babilen danduk82: Could you paste your grain?
09:40 danduk82 here it is: http://paste.debian.net/687969/
09:42 sfxandy joined #salt
09:42 babilen danduk82: So, what does "salt 'test' grains.get mystupidgrain" give you?
09:43 sfxandy hi all.  need a bit of help from the unoffical Salt brain trust!!
09:44 danduk82 Ah, this return true
09:44 babilen danduk82: So it is working
09:44 danduk82 ok I didn't get this
09:44 sfxandy regarding salt-api, I hit the /login REST URL and get an auth token back.  however in subsequent calls to other REST URLs i.e. /minions, I get nothing.  I am passing in the auth token via the X-Auth-Token header and am not getting any errors
09:45 babilen The grains dictionary is top-level. It *is* the actual grains dictionary (which is then merged). The name of your custom grain or function in there has no meaning apart from allowing you to structure the codebase and doesn't introduce namespaces.
09:45 babilen danduk82: ^
09:48 danduk82 great thanks
09:48 danduk82 Now I have to debug the ec2_tags grain
09:49 danduk82 I see with -ldebug that there are a few import problems, I try fixing this
09:53 dfinn joined #salt
09:58 rsanting question about the SALT.STATES.IPTABLES module. When i change a rule the new one gets added but the old one doesn't get deleted. Is there a way to make it so that salt removes all firewall rules that it doesn't have in it's current statefiles?
09:58 rsanting without flushing iptables with every run because that gives attackers a tiny open window to attack every 30 minutes
09:59 babilen danduk82: That's what I was referring to as "dependency problems" earlier. If a module, grain or state doesn't work or isn't present it is typically because it lacks one of its depencies (such as a Python library or tool)
10:02 rem5_ joined #salt
10:02 danduk82 @babilen, I see thanks. I had to install also python-boto and not only python-botocore. Now I have a few problems with instance role, but I am managing this on AWS side. I hope to solve this before lunch...
10:03 babilen danduk82: Well, I spend my morning debugging https://github.com/saltstack/salt/issues/33393
10:03 saltstackbot [#33393]title: pip.installed does not work with ancient pip versions | # Summary...
10:03 babilen (and managed before lunch)
10:07 danduk82 congratulations, this seems to be also a quite nasty bug too
10:09 Sylvain31 babilen: I found: https://github.com/saltstack-formulas/postgres-formula/blob/master/_states/postgres_tablespace.py are _state and _module handled automaticaly? or they must be declared inside /etc/salt/master ? there's no mention in the doc, or I missed it.
10:10 babilen Sylvain31: If you have _states,_modules,_grains,_.... in the top level in file_roots they are handled automatically, yeah
10:12 Sylvain31 babilen: is it written somewhere?
10:12 babilen Sylvain31: You mean documented?
10:12 Sylvain31 lol
10:12 Sylvain31 Yes documented. ;D
10:13 babilen I guess
10:13 babilen _modules is documented in the execution modules documentation, but I seem to remember that there is a general document that discusses all the _FOO directories.
10:14 fredvd joined #salt
10:14 Sylvain31 ok… I found: https://docs.saltstack.com/en/latest/ref/modules/
10:16 Sylvain31 but it's not obvious that it could apply automatically to any formula as weel may be in file_roots: properties…
10:17 N-Mi joined #salt
10:17 N-Mi joined #salt
10:17 babilen It just has to be in file_roots .. I would *not* recommend to ship forked versions of standard execution modules in formulas though (a nightmare to maintain multiple, different, forks all over the place)
10:18 babilen You can test it that way and maybe even ship a fork in your setup, but the general idea was: Implement the functionality you are missing in the execution module and submit it to Saltstack
10:19 Sylvain31 no mention in file_roots: a bit here: but I wont have catch it, if you've spoke about _module first… https://docs.saltstack.com/en/latest/ref/configuration/master.html#fileserver-limit-traversal
10:20 babilen That's unrelated
10:23 Sylvain31 ho. it speaks about "special Salt directories" is that what they are _module and _state, special Salt directories?
10:23 babilen Yes, those are, in places, referred to as "special [Salt] directories"
10:25 inad922 joined #salt
10:28 fracklen joined #salt
10:29 Sylvain31 OK… hum, I need more practice. See you later, thanks for your patience and advices…
10:29 devster31 I'm getting salt '*' file.user_to_uid root -> 'file.user_to_uid' is not available. since the update yesterday, what am I missing?
10:36 fracklen joined #salt
10:38 tracphil joined #salt
10:43 Miouge joined #salt
10:44 fracklen joined #salt
10:44 ntr0py joined #salt
10:48 Miouge joined #salt
10:49 dendazen joined #salt
10:52 MadHatter42 joined #salt
10:54 myraft joined #salt
10:56 mage_ any idea how could I copy a file from minion A to minion B ?
10:56 nZac joined #salt
10:57 fracklen joined #salt
11:02 devster31 mage_: I believe you can copy it to master and then serve it to minion B, if I recall correctly
11:04 amcorreia joined #salt
11:05 babilen AndreasLutro: hehe .. 2015.8.10 doesn't even contain that fix. It was merged into 2015.5 rather than 2015.8 --- https://github.com/saltstack/salt/pull/33383#issuecomment-220577467
11:05 saltstackbot [#33383]title: maintain the fallabck because I am totally sick of this crap | ### What does this PR do?...
11:05 babilen jfindlay: ^
11:08 fracklen joined #salt
11:10 quasiben joined #salt
11:16 edrocks joined #salt
11:22 garphy joined #salt
11:24 lero joined #salt
11:24 AndreasLutro nice
11:41 dfinn joined #salt
11:42 dgutu joined #salt
11:51 Qlawy joined #salt
11:52 Qlawy hi Guys Im trying to use pkg.installed with list of few packages but it constantly returns me an error that: Requisite declaration in SLS is not formed as a signle key dictionary :/
11:52 Qlawy http://wklej.org/hash/363a0593b6f/
11:53 Qlawy it only works when I specify only one package per pkg.installed :/
11:53 Qlawy for example: nova-api: pkg.installed: []
11:53 Qlawy I have no idea what I am doing wrong ;/
11:57 nZac joined #salt
11:57 babilen Qlawy: The error is somewhere else (presumably in your requisites). Could you paste the entire SLS and the exact error message?
11:58 Qlawy babilen: give me a sec
11:58 babilen My guess is that you have a require: - pkg: nova-api (or so) somewhere, rather than a require: - pkg: nova-packages
11:58 rem5 joined #salt
11:59 Qlawy Error message: http://wklej.org/hash/44e5b60e3a6/ and sls file http://wklej.org/hash/dae7284bb6b/
12:00 Qlawy I think I see now
12:00 Qlawy line 29
12:00 babilen No, line 41 is missing the pkg:
12:00 babilen (you want that to look like line 29)
12:01 Qlawy let me confirm
12:01 babilen And I'd recommend to use salt['network.ip_addrs'](cidr=YOUR_CIDR) rather than hardcoding a specific interface in your SLS
12:02 babilen What would you do if you have the address you want on eth1 or if the name of eth0 changes due to https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ ?
12:02 babilen *is on eth1
12:02 Qlawy babilen: hmm, thanks for idea :)
12:05 danduk82 @babilen: thanks for helping me debugging the stuff with grains this morning, now it works with all boto-related stuff.
12:05 iceyao joined #salt
12:06 Qlawy babilen: great! Worked
12:06 Qlawy now I will check that cidr advice :)
12:10 jad_jay joined #salt
12:11 jad_jay hello all
12:11 jad_jay I'm in trouble with the state module hosts
12:12 jad_jay I don't understand how to use it in the top.sls or in the init.sls
12:12 jad_jay What I need is to have all my minion's hosts file updated with all the minion and master in it
12:12 babilen Qlawy: We define mine function aliases (of network.ip_addrs) for all private network cidrs and for all actual networks in our infrastructure. That way it is easy to get the address you want for any minion ...
12:13 babilen (the address in an actual network not on a specific interface)
12:13 babilen https://en.wikipedia.org/wiki/Private_network#Private_IPv4_address_spaces + our own networks
12:13 saltstackbot [WIKIPEDIA] Private network#Private IPv4 address spaces | "In the Internet addressing architecture, a private network is a network that uses private IP address space, following the standards set by RFC 1918 for Internet Protocol Version 4 (IPv4), and RFC 4193 for Internet Protocol Version 6 (IPv6). These addresses are commonly used for home, office, and enterprise..."
12:14 DammitJim joined #salt
12:14 Qlawy babilen: even if it will not work as I expected it is not so big deal ;) But anywas thank you very much!
12:15 tracphil joined #salt
12:17 babilen Qlawy: Well, we had a customer who had hardcoded interface names in *many* places and it was a lot of work to ensure that the "right" network address is on the "expected" interface.
12:18 babilen Ever since we had to tinker with that I am weary to reference actual interfaces, rather than networks if that is what I *really* care about
12:19 TooLmaN joined #salt
12:25 WKNiGHT joined #salt
12:28 Qlawy babilen: I had to add [0] and it works great! Thanks!
12:28 babilen sure
12:28 Qlawy babilen: really understand your concern :)
12:30 rbjorklin joined #salt
12:39 bluenemo joined #salt
12:39 rem5 joined #salt
12:41 toastedpenguin joined #salt
12:45 rem5 joined #salt
12:45 toastedpenguin joined #salt
12:46 toastedpenguin joined #salt
12:46 nZac joined #salt
12:46 gh34 joined #salt
12:50 akhter joined #salt
12:54 dendazen joined #salt
12:54 catpig joined #salt
12:55 kus joined #salt
12:58 MadHatter42 joined #salt
13:02 rem5 joined #salt
13:03 metalseargolid joined #salt
13:05 metalseargolid How can I run a salt command on several minions, but only run the command on one minion at a time?
13:06 babilen -b1 might work
13:06 babilen (batch mode)
13:06 squishypebble joined #salt
13:07 metalseargolid squishypebble: awesome, thanks!@
13:07 mapu joined #salt
13:08 babilen Batch mode also allows you to specify a percentage of minions (e.g. 25%) on which a state run will be executed at any given time
13:08 babilen May I ask why you need this?
13:11 metalseargolid i have a clustered service that needs to be restarted in a rolling fashion
13:12 numkem joined #salt
13:12 babilen Right, yeah .. that makes sense. Be aware that batch mode runs manage.up (i.e. pings the instances) and decides based on that. If not all return you might miss some. You might want to ping them manually beforehand or double check "salt-run manage.up"
13:13 metalseargolid word, thanks for the advice
13:13 babilen I use this most often for dealing with load balanced services that I don't want to disappear at the exact same moment
13:13 hoonetorg what is difference between 2015.8.9 and 2015.8.10 (in el7 repo)???
13:14 hoonetorg see no release notes and tag for it
13:14 babilen Maybe this behaviour changed in the meantime, but we got burned by this early last year as we found out that not all minions had been "dealt with"
13:14 babilen hoonetorg: I believe there is none.
13:14 hoonetorg babilen: thx
13:14 metalseargolid babilen: also a good use case. in either event it's just useful to know how to do without having to write fancy logic in a python script
13:15 babilen hoonetorg: https://github.com/saltstack/salt/issues/33376#issuecomment-220494456 + https://github.com/saltstack/salt/pull/33383#issuecomment-220577467
13:15 saltstackbot [#33383]title: maintain the fallabck because I am totally sick of this crap | ### What does this PR do?...
13:16 babilen Not entirely sure what *really* happens, but the 2015.8 branch is waiting for https://github.com/saltstack/salt/pull/33381 I believe
13:16 saltstackbot [#33381]title: [2015.8] Merge forward from 2015.5 to 2015.8 | No conflicts.
13:16 babilen I guess we'll find out one Utah wakes up
13:16 babilen *once
13:16 rem5 joined #salt
13:17 mierst_ joined #salt
13:18 Sylvain31 babilen: I summed up our morning exchange: https://github.com/saltstack-formulas/mysql-formula/issues/119#issuecomment-220602822
13:18 saltstackbot [#119]title: remove  a mysql user  functionality | Add a functionality to remove a database user:...
13:18 edrocks joined #salt
13:18 teryx510 joined #salt
13:19 hoonetorg babilen; so this changed: some minor fixes on pip and yaml renderer and some doc
13:20 babilen Sylvain31: The "DROP USER LIKE" was never meant as an actual query (you had the actual query earlier)
13:20 hoonetorg which was forgotten to merge from 2015.5
13:20 babilen Apparently
13:20 babilen I have no idea if there are any genuine changes in the .10 package (compared to .9)
13:20 hoonetorg :)
13:20 hoonetorg k
13:20 kus joined #salt
13:20 babilen I'm curious, but I haven't managed to figure it out :)
13:21 Sylvain31 babilen: I do say that this query doesn't exists, do you understand something else?
13:21 babilen (or rather: I wasted so much time on this already that I decided to just get on with life and see what happens once the guys at Saltstack wake up)
13:21 ivanjaros joined #salt
13:21 babilen Sylvain31: No, no.. Just wanted this to be clear
13:22 Sylvain31 babilen: May I corrrect something to be more obvious?
13:22 babilen Sylvain31: Nah, it's fine :)
13:23 babilen hoonetorg: I'm sure that Tom will be thrilled .. (given that his commit already has "maintain the fallabck because I am totally sick of this crap" as message already)
13:24 hoonetorg yeah i think this was an urgent and necessary commit ;)
13:25 subsignal joined #salt
13:25 Sylvain31 babilen: OK, don't hesitate for suggestion if I'm not clear. I wont have time to developp the python code. I gonna open a ticket for suggestion on salt main code? That was what you suggested?
13:26 babilen Sylvain31: It would be one way, yeah
13:26 babilen I'm not actually convinced of the usefulness of that feature (I prefer to be explicit)
13:26 babilen But you obviously do and that is enough to convince me :)
13:26 Sylvain31 babilen: Not me either, but I used to do:
13:27 babilen Sylvain31: I mean you could also just use https://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_query.html to run a suitable query
13:28 Sylvain31 DELETE every_user WHERE not root; GRANT every_user; FLUSH PRIVILES; in a single transaction, works fine and almost transparent…
13:29 babilen That's not a query I would want to run against any production DB :D
13:29 babilen (assuming you filled in the gaps)
13:29 dfinn joined #salt
13:29 Sylvain31 babilen: if all user are managed, it works!
13:29 babilen It's okay .. I tried to help with the salt side and if you need this then you need this
13:30 hoonetorg babilen: the commit "maintain the fallabck because I am totally sick of this crap" is not in 2015.8.10
13:31 hoonetorg so it will make it into 2015.8.11 probably ?
13:31 hoonetorg s/?/!/
13:31 flowstate joined #salt
13:31 Sylvain31 babilen: this just the algorithm (written in the jinja (so lovely)) to handle deletion within user.sls which become really unreadable. If everything tend to be managed by salt recreating all the user is quicker an safer…
13:32 Sylvain31 would be a pain to write it in jinja
13:33 racooper joined #salt
13:33 Sylvain31 I may try to write a palyndrome algorithm in https://en.wikipedia.org/wiki/Brainfuck it will be a vaccation! :-P
13:33 saltstackbot [WIKIPEDIA] Brainfuck | "Brainfuck is an esoteric programming language created in 1993 by Urban Müller, and notable for its extreme minimalism.The language consists of only eight simple commands and an instruction pointer. While it is fully Turing-complete, it is not intended for practical use, but to challenge and amuse programmers..."
13:34 hoonetorg babilen: and somebody else asked himself my question: https://github.com/saltstack/salt/issues/33392
13:34 saltstackbot [#33392]title: Where's the changelog and tag for 2015.8.10 ? | I just found out that there are new deb packages for SaltStack in the official repo and I couldn't find changelog, and neither *tags* in the git repo!?...
13:35 zenlot6 joined #salt
13:36 devster31 I'm trying to use this map file: https://bpaste.net/show/a835d3e9fefd but the output of salt-call cp.get_template /test/map.jinja /dev/stdout is empty on a CentOS 7 machine
13:37 austinpapp good morning all.
13:38 austinpapp i have a situation where i run some scripts on a minion. however, i've noticed that 2 minions are running after i apply the state
13:38 austinpapp is this normal behavior ?
13:39 mpanetta joined #salt
13:39 edrocks joined #salt
13:39 perfectsine joined #salt
13:43 Tanta joined #salt
13:43 AndreasLutro austinpapp: define "instances"? it's normal to see two salt-minion threads in `ps aux` for example
13:44 austinpapp AndreasLutro: two of: /usr/bin/python2.6 /usr/bin/salt-minion -d
13:44 austinpapp but if this is threading out... no problem :)
13:45 AndreasLutro use `ps auxf` to see if it's a subprocess/thread or not
13:45 austinpapp 1 sec. not to keep that off again.
13:45 perfectsine joined #salt
13:48 keimlink joined #salt
13:49 babilen hoonetorg: Yeah, the fact that that commit is not in 2015.8 is exactly the issue and I believe that this is due to it having been erroneously merged into 2015.5 or not having been merged into 2015.8 from there (as in https://github.com/saltstack/salt/pull/33381)
13:49 saltstackbot [#33381]title: [2015.8] Merge forward from 2015.5 to 2015.8 | No conflicts.
13:49 babilen I am not actually sure if thatch meant to merge into 2015.5 to begin with
13:51 blw0rm joined #salt
13:51 dyasny joined #salt
13:53 _JZ_ joined #salt
13:55 austinpapp here is what i see:
13:55 austinpapp root      59194      1  0 09:47 ?        00:00:00 /usr/bin/python2.6 /usr/bin/salt-minion -d
13:55 austinpapp root      61083      1  0 09:50 ?        00:00:00 /usr/bin/python2.6 /usr/bin/salt-minion -d
13:55 teryx5101 joined #salt
13:56 austinpapp hold on. i need some pastebin action here
13:57 austinpapp http://pastebin.com/zf5H86PP
13:59 austinpapp so my orch run is just sitting here... all states have actually been called
14:00 austinpapp and i've noticed that if i kill one of those minions, it then finishes
14:00 jerredbell joined #salt
14:01 snc joined #salt
14:02 masterkorp joined #salt
14:02 masterkorp hello everyone
14:04 aagbds joined #salt
14:04 kawa2014 joined #salt
14:04 AndreasLutro austinpapp: yeah that's not normal, but I can't tell you why it's like that, probably something with your init system
14:05 austinpapp AndreasLutro: ok thanks. btw, RHEL6.6
14:05 avozza joined #salt
14:06 bearonis joined #salt
14:06 austinpapp also salt-minion 2015.5.8 (Lithium)
14:08 krymzon joined #salt
14:08 andrew_v joined #salt
14:10 masterkorp I am having a problem with a gitfs remote
14:11 dfinn joined #salt
14:15 babilen AndreasLutro: What isn't normal?
14:15 DammitJim if I want to change a value in a conf file (i.e. the LOGIN_TIMEOUT in the /etc/login.defs)
14:15 babilen .. you'd best manage the entire file
14:16 DammitJim what should I use? up to this point, I've been using file.managed and replace the file from files
14:16 mierst joined #salt
14:16 DammitJim the reason why I ask is because right now we are in transition due to upgrades to samba due to the badlock security problem
14:16 DammitJim nevermind
14:16 DammitJim I think I just answered my own question LOL
14:16 babilen AndreasLutro: Do you have salt code for managing InfluxDB users, databases and authentication already?
14:20 knine joined #salt
14:24 Miouge joined #salt
14:26 kaptk2 joined #salt
14:28 viq joined #salt
14:32 subsignal joined #salt
14:34 subsigna_ joined #salt
14:38 flowstate joined #salt
14:43 kimmell joined #salt
14:43 Miouge joined #salt
14:43 tapoxi joined #salt
14:44 kimmell hello! I was wondering if anyone could point me to documentation on how to configure secure communication channels using 3rd party PKI certificates
14:47 Miouge joined #salt
14:48 kimmell or if it is even possible
14:50 babilen kimmell: How is that related to salt?
14:51 lorengordon joined #salt
14:51 kimmell i'm talking about security the communication channels between minion-master
14:52 babilen It's already secure, isn't it?
14:52 kimmell i have a requirement to secure all network communications and, when possible, using signed SSL certificates
14:53 kimmell from what I'm reading the encryption may not actually be SSL so this may be not applicable
14:53 kimmell i just need to understand the protocol and encryption mechanism better
14:53 babilen Why does it have to be?
14:56 kimmell this is just a requirement that my organization has.
14:57 babilen So you can't use *anything* that doesn't allow for SSL certificates? Are you guys not using SSH?
14:59 kimmell yes we use SSH. My point is only that IF it uses PKI certificates that CAN be replaced with signed certificates then we MUST do that. If it's simply not supported by the protocol, such as with SSH, it's ok
14:59 kimmell So I'm just asking if it is possible and, if it is, how can I achieve it
14:59 babilen Salt uses AES encryption over 0mq .. for that it uses its libnacl bindings for libsodium
15:00 babilen There is a new transport (cf. https://docs.saltstack.com/en/latest/topics/transports/tcp.html) but that uses the same crypto AFAIR
15:00 nZac joined #salt
15:01 onlyanegg joined #salt
15:01 babilen The keys are cycled daily and on specific events (cf. rotate_aes_key and ping_on_rotate master settings)
15:02 berserk joined #salt
15:02 babilen I have no idea if you can get salt to use SSL certs .. you could try the mailing list, but it is definitely a rather uncommon requirement
15:04 kimmell thanks for your input, babilen!
15:04 tapoxi joined #salt
15:04 berserk_ joined #salt
15:07 babilen kimmell: No problem. Let me know if you figure out that you can actually use SSL certs, but I wouldn't count on it.
15:07 ripe joined #salt
15:07 mohae joined #salt
15:08 salt_nasty I'm trying to dynamically populate a list of host names in a managed file template, by using salt mine to find all other minions that match a specific grain value, and outputting the host grain value for each matching minion. Does anybody know of any good examples they could point me in the direction of?
15:08 manji joined #salt
15:09 salt_nasty I'm not getting any errors, but an getting no output at all. I'm at a total loss
15:09 babilen That's normal
15:10 babilen Could you paste your template, mine configuration (the pillars you defined) and some commands and their output that might shed light on the issue (e.g. a mine.get call, a highstate run, ...) on one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, … ?
15:11 babilen Also: Why do you match on grain?
15:11 dfinn joined #salt
15:12 babilen Did you run mine.update and similar commands?
15:13 UtahDave joined #salt
15:13 babilen UtahDave: Hey, good morning!
15:14 babilen Could you shed some light on what happened with 2015.8.10 ? I've been trying to figure that out all day @:)
15:14 salt_nasty Sure, will paste in a sec.. I match on grain because I'm finding all hosts that match a specific value in the 'role' grain
15:14 babilen Ah, role grain .. my favourite anti-pattern
15:15 salt_nasty heh, if there is a better way, I'm all ears. I'm totally new to this, putting together a POC to spin up test environments and configure them on demand
15:16 salt_nasty i have run mine.update, refreshed my pillar (this is where I'm setting the mine function), i've run mine.get, and i've set the mine interval to 5 on my test minions
15:16 babilen salt_nasty: I dislike grains for that as grains are totally insecure and cumbersome to manage (how are you assigning grains to minions?). Minions can lie about them so you can't trust their value (which might or might not be a problem)
15:17 UtahDave hey, babilen!
15:17 babilen salt_nasty: Could you show me some output, configuration and the template you are trying to fill?
15:17 kus joined #salt
15:18 salt_nasty i'm managing grain values via a map file in salt cloud. when a vm is brought up, the map file also applies grain values for each host. they are pretty static
15:18 jY i'm getting strange issues since I updated to the lastes 2015.5.10 and also the latest 2016 rc where the salt master seems to just stop working and nodes pause with [DEBUG   ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'mc-img-archive-backfill_68e6f4f5.domain.com', 'tcp://10.120.0.10:4506')
15:18 babilen UtahDave: Sorry for jumping on you like that right after joining, but ever since I ran into problems with pip this morning I'm trying to figure out what went wrong with 2015.8.10 and what changed in the packages
15:18 fracklen joined #salt
15:19 fracklen_ joined #salt
15:20 salt_nasty babilen: info is coming, i'm dropping it in refheap now
15:21 babilen UtahDave: Ah, Tom replied and a followup_2015.8.9 branch appeared. Let's wait a little :)
15:22 anotherZero joined #salt
15:22 UtahDave babilen: Yeah, they're putting together the release notes right now
15:22 UtahDave jY: I saw that last night when testing develop, too
15:22 UtahDave jY: what OS?
15:23 jY UtahDave: centos7
15:23 flowstate joined #salt
15:28 babilen UtahDave: pip seems to be a bit of a nightmare for you guys now, doesn't it? (cf. https://github.com/saltstack/salt/issues/33393)
15:28 saltstackbot [#33393]title: pip.installed does not work with ancient pip versions | # Summary...
15:29 UtahDave babilen: yeah. that was apparently the reason for the .10 release
15:32 nmadhok joined #salt
15:32 babilen No, that was https://github.com/saltstack/salt/issues/33376 -- https://github.com/saltstack/salt/issues/33393 is a different issue I ran into this morning. I fixed it in (https://github.com/saltstack/salt/pull/33396) but then Tom's patch for the first issue breaks pip_state for pip 1.1 again.
15:32 saltstackbot [#33396]title: Issue 33393 | ### What does this PR do?...
15:32 babilen It's a mess
15:34 UtahDave it broke again?  ok I'll point him to the issue you opened.
15:35 babilen Well, that issue must have been present since 2015.8.4, but I only just ran into it this morning. Fixed it and it worked. Upgraded my vagrant box to .10 and it broke again
15:35 babilen (my issue that is)
15:35 babilen I'm happy to work on this a little more this evening, but will head home now.
15:35 UtahDave ok, I was about to ask if .10 fixed it, but no it didn't
15:36 brianfeister joined #salt
15:36 babilen No, .10 fixes the issue for pip 1.2 - 8.0 (or so), while I am running into problems with pip 1.1 on wheezy. .4 introduced a version check based on pip.__version__ that wasn't yet present in pip 1.1.
15:37 babilen Fixing my issue worked with my PR, but then the fix in .10 (i.e. #33383) broke pip 1.1 again
15:38 UtahDave Do you have a PR that will fix it on the 2015.8 branch?
15:38 babilen I have https://github.com/saltstack/salt/pull/33396 against 2015.8. That one fixes *my* issue.
15:38 saltstackbot [#33396]title: Issue 33393 | ### What does this PR do?...
15:39 UtahDave I guess Salt only worked back to pip 1.5 before
15:39 babilen The problem is that the *other* fix breaks it again
15:39 babilen (the one Tom came up with yesterday)
15:39 salt_nasty babilen: mine function in pillar & template file: https://www.refheap.com/119327
15:39 salt_nasty an example of why i'm trying to do this (this file is a nightmare to manage): https://www.refheap.com/119326
15:40 manji joined #salt
15:41 salt_nasty i actually had a stack overflow post on this (http://goo.gl/O251CF), and I think UtahDave had taken a look at it
15:41 babilen salt_nasty: I'm heading home now, but I'd look at the output of "salt 'foominion' mine.get 'roles:price' network.ip_addrs expr_from='grain'
15:41 babilen Are you sure its 'grain' and not 'grains' ?
15:42 salt_nasty you guys have me thinking... maybe i'm over engineering this
15:42 salt_nasty yeah i think it is 'grain', i'll give it a shot with 'grains' too though
15:42 UtahDave salt_nasty: Yeah, I don't think you need to use pillars in your situation
15:42 UtahDave I may have an example ,just a sec
15:42 edrocks joined #salt
15:42 babilen salt_nasty: It is 'grain', sorry for that
15:43 salt_nasty babilen: np
15:43 babilen salt_nasty: What does that salt call give you?
15:43 hasues joined #salt
15:44 salt_nasty I get nothing back - blank value
15:44 hasues left #salt
15:45 babilen salt_nasty: How about "salt -G 'roles:price' test.ping" ?
15:45 dmaiocchi joined #salt
15:45 salt_nasty that works - i get my 3 hosts that match the price roles grain
15:45 salt_nasty all return True
15:46 masterkorp the gitfs its not cloning the repository correctly
15:46 babilen salt_nasty: Okay, how about "salt 'one_of_those_minion_ids' mine.get network.ip_addrs" ?
15:46 UtahDave salt_nasty: https://gist.github.com/UtahDave/0a5b4c2a947d3fae465140dfa1341ec1
15:46 UtahDave masterkorp: what are you seeing?
15:46 salt_nasty babilen: same thing as the other mine.get, just the minion id and empty output
15:47 GreatSnoopy joined #salt
15:47 masterkorp UtahDave: hello, by exploring /var/cache/salt/master/gitfs/refs/base the formula directory is empty
15:48 squishypebble joined #salt
15:49 UtahDave masterkorp: yeah, that's how it's supposed to work.
15:49 babilen salt_nasty: Could you show me the output of "salt 'someminion' pillar.get mine_functions" ?
15:49 masterkorp UtahDave: well the other gitfs formulas are there
15:50 masterkorp execpt that one
15:50 ripe joined #salt
15:50 masterkorp that only has a state name
15:51 UtahDave really? I thought we did bare clones
15:51 masterkorp yeah but it aint cloned right
15:51 jad_jay I don't understand how to use it in the top.sls or in the init.sls
15:51 * jad_jay slaps himself
15:52 jad_jay sorry for that
15:52 UtahDave jY: I had that happen to me last night, but I just tested again against 2015.5.10 and develop and it seems to be working. I'm not sure why.  I did make sure to do a git clean -fxd in my repo and delete the salt scripts from the bin directory before reinstalling this time
15:52 ripe left #salt
15:52 UtahDave masterkorp: what happens if you nuke that directory and let it try again?
15:52 salt_nasty babilen: https://www.refheap.com/119328
15:53 jY UtahDave: ok i'll give the latest a go
15:53 danduk82 quit
15:53 UtahDave jad_jay: init.sls just allows you to use the directory as the sls name instead of init.sls
15:53 masterkorp UtahDave: i did better: i ran  salt-run fileserver.clear_cache backend=git
15:53 danduk82 left #salt
15:54 UtahDave jY: I ran python -c "import site; site.getsitepackages()"  to get a list of the site-packages directories on my system and made sure anything with "salt" in the name was deleted
15:55 UtahDave I also deleted all the salt scripts in /usr/local/bin/salt*   to make sure I got fresh scripts.
15:55 UtahDave masterkorp: did that fix it?
15:55 babilen salt_nasty: Ah, your grains.item is wrong ... if you want multiple you have to define different mine_function aliases
15:55 masterkorp UtahDave: and not the refs folder is not appearing :(
15:55 masterkorp *and now
15:56 babilen salt_nasty: You can't just list "- host" and "- role" as that are two different mine_functions
15:57 salt_nasty babilen: shoot, i was following this ticket which must not be correct: https://github.com/saltstack/salt/issues/24699
15:57 saltstackbot [#24699]title: Salt-mine & grain.get | Hello,...
15:58 babilen salt_nasty: I honestly don't know .. I'd simplify mine_functions as much as possible and get the manual mine.get working. Do not forget to always run saltutil.refresh_pillars and mine.update against the minion when making changes.
15:59 babilen salt_nasty: I've been at it a bit too long today :)
15:59 orion__ joined #salt
15:59 salt_nasty babilen: ok, cool. thanks for the help, have a good one!
16:00 rem5 joined #salt
16:00 myraft hi all, quick question - I want to copy TGZ file from master and untar to minion. I used archive.extrated, but not working
16:01 zmalone joined #salt
16:03 masterkorp UtahDave: Ok, i needed to stop everything
16:03 masterkorp wiped /var/cache/salt/master
16:03 masterkorp and start
16:03 masterkorp and finnaly the refs are connect
16:06 UtahDave masterkorp: ok
16:06 UtahDave myraft: can you pastebin your sls file as well as the exact CLI command you ran and the output you received?
16:06 masterkorp but weirdly that state was totally wrong
16:06 UtahDave myraft: also what version of Salt you're running on your minion?
16:06 masterkorp it had a bunch of folder that never existed
16:07 UtahDave masterkorp: Yeah, that's really odd.
16:07 jad_jay UtahDave, In fact my real pb is with the hosts state module
16:07 jad_jay I don't understand how to use it.
16:08 myraft UtahDave: http://pastebin.com/CmA96tdC
16:08 UtahDave jad_jay: can you pastebin your sls file?
16:08 jad_jay UtahDave, no sorry I can't too much things to drop
16:09 babilen UtahDave: I tested again and it appears as if my PR applied to 2015.8.10 works on wheezy.
16:09 jad_jay UtahDave, I can't understand how to update my minion's hosts file with all minions address in there
16:10 onlyanegg joined #salt
16:10 myraft UtahDave: this is my salt-minion version : salt-minion 2015.8.8 (Beryllium)
16:11 UtahDave myraft: I don't think you can have a local source
16:12 myraft did not know that -
16:12 myraft let me see what other way I can address this.
16:12 UtahDave jad_jay: you can have all the minions put their ip address in the salt mine, and then in your host sls file you can pull those ip addresses from the salt mine
16:13 UtahDave or query live using the peer interface.  but that's slower. I'd recommend using the salt mine for that
16:13 UtahDave myraft: can you put that archive on your salt master?
16:13 UtahDave myraft: if you look at the docs for the archive.extracted state you can see the source argument uses the same semantics as the file.managed state.
16:13 jY UtahDave: still pausing
16:14 amcorreia joined #salt
16:14 jY now randomly at [INFO    ] Caching directory u'_grains/' for environment 'base'
16:14 UtahDave jY: that's so weird. I know I ran into that last night, but now I can't reproduce it on the exact same box
16:14 myraft UtahDave: I have in on my saltmaster
16:15 UtahDave myraft: Oh, ok.  Minions can only pull down files from the salt master from the salt master's file_roots.  Which by default is in    /srv/salt
16:15 rbjorkli1 joined #salt
16:15 nZac joined #salt
16:16 rem5 joined #salt
16:16 UtahDave myraft: If you file is on your master at   /srv/salt/cool_stuff/myarchive.tgz     then in your sls file you would reference is like this:   - source: salt://cool_stuff/myarchive.tgz
16:17 myraft UtahDave: thanks - let me try it like that for now.
16:17 Ayo joined #salt
16:19 masterkorp left #salt
16:27 cmek joined #salt
16:28 rem5 joined #salt
16:28 cmek this might be a silly question, but how do I match by pillar in my pillar top.sls file? :)
16:30 cmek I don't think my pillar data used to match is available when salt processes the top pillar file
16:30 cmek but is there any way to make it work?
16:30 cmek the use case is to have roles/environments/whatever info used for targeting in pillar, since it's not recommended to keep those in grains
16:31 keimlink joined #salt
16:32 sjmh joined #salt
16:35 babilen cmek: You can't match by pillar in pillars .. you could use pillarstack or external pillars however to do that
16:35 babilen (which would be rendered first or in the specified order)
16:36 fracklen joined #salt
16:36 rihannon joined #salt
16:36 Brew joined #salt
16:37 sjmh so, is there a way to keep a gpg-encrypted value secret until it's actually rendered and put onto a system?  I know you can do gpg-pillars, but from what I'm reading, that just really keeps the secret encrypted in source-control
16:37 izaki joined #salt
16:38 rojem joined #salt
16:39 cmek babilen: i thought so. I'll have a look at using an external one, thanks!
16:42 fleaz joined #salt
16:42 sjmh hm, if I kept a value in sdb:// that's encrypted, which goes first, the sdb:// pulling in the value, or the gpg renderer unencrypting that value.
16:43 lorengordon joined #salt
16:48 writtenoff joined #salt
16:48 majikman joined #salt
16:48 dmaiocchi joined #salt
16:52 myraft I can curl from command line (with -o -k parameters), but when I run it from cmd:  -run in SS, does not work.  Just shows result is false.
16:53 sjmh myraft : can you put up a gist of what you're trying to do?
16:54 kus joined #salt
16:55 myraft sjmh: http://pastebin.com/XsWUf6U7
16:56 atmosx Hello, following the documentation for archive.extracted, I noticed that if the file exists, it doesn't get update: https://docs.saltstack.com/en/develop/ref/states/all/salt.states.archive.html
16:56 myraft atmosx: I am dealing with archive problems to -
16:57 atmosx myraft do you manage to handle updates? If I delete the flie, it works as expected, but I can't handle updates
16:57 sjmh myraft : that doesn't look formatted right..
16:57 Fiber^ joined #salt
16:58 myraft sjmh, it didn't complain about the formatting, just says result: failed
16:58 SpeeR joined #salt
16:58 sjmh myraft : I'm not super great with states, but shouldn't it be something like this?
16:58 sjmh https://gist.github.com/sjmh/562f5686b0c44816e4423a4fa737dc0e
16:58 sjmh i don't think the run goes on a separate line
16:59 rem5 joined #salt
16:59 atmosx myraft why not use - source: https://bintray.com/artifact/download/scrapinghub/misc/log-courier-1.8.2-21-amd64.tgz ?
16:59 zmalone It looks like zeromq didn't get updated in 2015.8.9 or 2015.8.10, given https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-7202 and https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-9721 , that's disappointing.
17:00 atmosx well forget that binary, that's mine but... you get the idea
17:00 myraft sjmh, :  changed to cmd.run , same exact result.
17:00 atmosx myraft nevermind, I'm reading now the history log
17:00 myraft atmosx, : did not get what your are saying.
17:00 sjmh myraft : do you have a http_proxy/https_proxy setup on that minion?
17:01 myraft no -
17:02 atmosx myraft I proposed a syntax diff than cmd.run but I saw that you started from there and ended up using cmd.run :-)
17:04 perfectsine joined #salt
17:04 tristianc joined #salt
17:05 sjmh myraft : have you tried enabling debug logging and see if it provides anymore info?
17:06 nZac_ joined #salt
17:07 fracklen joined #salt
17:08 SpeeR if I have a gitfs_remotes of ssh://git@bitbucket.domain.io:7999/sysops/salt-states.git:
17:08 SpeeR and inside that repo I have a directory structure service/sumo.sls
17:08 SpeeR shouldn't I be able to run salt "*' state.sls server.sumo
17:08 jxcl joined #salt
17:08 SpeeR service.sumo
17:09 atmosx sjmh thanks made! Debug gave me a clue! :D
17:09 SpeeR or do I need to clone that repo to my roots?
17:09 izaki joined #salt
17:10 sjmh SpeeR : It depends on where you're mounting the gitfs to
17:11 mierst joined #salt
17:11 orion joined #salt
17:12 sjmh SpeeR : what happens if you run 'salt someminion cp.list_master'
17:12 sjmh where does it show the state?
17:13 atmosx Can someone help me with this? https://gist.github.com/atmosx/9f2c340f03ea82722bfc5a1923b4f4ef not sure what exactly am I suppose to do, source is defined there, do I need to define contents somehow?
17:13 SpeeR I only have 1 minion at the moment
17:13 SpeeR salt "minion01" cp.list_master
17:13 SpeeR minion01:
17:15 myraft sjmh, let me try debug. Do you mean on the minion ? Since it is started with a daemon, will have stop and restart manually.
17:15 sjmh myraft - I'd probably do it on both the master and the minion, but yeah
17:15 myraft aye
17:15 sjmh SpeeR : so nothing comes back?
17:15 SpeeR nope, no return
17:17 SpeeR so my understanding, is using gitfs, it would create a cache on the master,
17:17 sjmh have you defined your file_roots and fileserver_backend ?
17:17 sjmh it does
17:17 dstokes joined #salt
17:17 SpeeR file_roots:
17:17 SpeeR base:
17:17 SpeeR - /srv/salt/
17:18 sjmh SpeeR :  please try and use gist.github.com or pastebin or something.  :) people generally frown upon c&p into the channel.
17:18 SpeeR ahh ok sorry
17:18 sjmh no worries
17:18 myraft will drop out for a bit.... will ask more questions later. thanks guys.
17:18 SpeeR yeh, fileserver_backend is -git then -root
17:18 sjmh root or roots?
17:18 SpeeR roots
17:19 sjmh Do you have any files in /srv/salt?  If not, can you put something temp there and see if the minion can see it?
17:19 SpeeR ohh yeh, good idea
17:20 salty_solution joined #salt
17:20 salty_solution Where do the logs get stuffed after after a salt run?
17:20 sjmh I just want to narrow down the problem to either the minion not being able to see the fileserver at, vs a possible misconfig in your gitfs that's preventing the repo
17:20 avozza joined #salt
17:21 sjmh salty_solution - the logs of the job go into /var/cache/salt/master/jobs
17:21 salty_solution thanks sjmh
17:21 sjmh unless you have a returner or master job cache setup
17:21 sjmh salty_solution : it's generally easier to get the logs of the job via the 'salt-run jobs.print_job <jid>' command tho
17:22 punkoivan joined #salt
17:23 johnkeates joined #salt
17:23 SpeeR OK, I just setup a quick stats to update resolv.conf, and it was successfull
17:24 sjmh so, your minion can see the fileserver fine, just sounds like your gitfs isn't syncing your repo.
17:24 sjmh have you checked the master log?  generally, you'll see gitfs errors in there about failures to sync repos down
17:24 SpeeR let me see if I can get the log, it's running on a bitbucket appliance
17:24 sjmh also, take a look at /var/cache/salt/master/gitfs
17:24 salty_solution Oh sweet even better thanks sjmh
17:25 sjmh SpeeR : /var/cache/salt/master/gitfs is where it syncs the repos to
17:26 SpeeR hmm, the repo info is there, but not files have been copied over
17:26 SpeeR so I suspect something in the authentication/syncing
17:28 sjmh SpeeR : look in the 'refs' subdir in that dir
17:28 aw110f joined #salt
17:28 sjmh if nothing is in there, i'd guess your repo isn't syncing
17:28 sjmh you should see some errors in the master's log for why it's not happening though
17:28 SpeeR yeh, empty heads and tags dir's
17:29 sjmh you have your salt master running on a bitbucket appliance?
17:29 SpeeR nope
17:29 sjmh or did you think I meant that by logs :)
17:29 sjmh check the salt-master log file is what I mant
17:29 SpeeR ohh I thought you meant the git side of the logs
17:29 cnk joined #salt
17:30 sjmh naw
17:31 knetter joined #salt
17:33 SpeeR OK, so the problem is in my ext_pillar using git
17:33 SpeeR it was throwing this Failed to load ext_pillar git: 'dict' object has no attribute 'strip'
17:34 SpeeR once I commented that out, the cache loaded properly
17:34 knetter how would one go about forcing windows minions use query the sls files in "salt-winrepo-ng" and not "salt-winrepo-ng_git" when installing packages?
17:35 av_ joined #salt
17:37 SpeeR thanks for your help sjmh I'll start checking out the ext_pillar problem now,
17:37 sjmh SpeeR sure
17:41 ageorgop joined #salt
17:41 izaki joined #salt
17:44 tapoxi what is master_tops?
17:45 tapoxi documentation is a little confusing
17:45 UtahDave tapoxi: programmatic top file.  kind of like external pillar
17:46 tapoxi @UtahDave so like an ENC in Puppet?
17:48 UtahDave I'm not terribly familiar with puppet, but I believe so
17:49 sjmh enc = external node classifier.  basically a mechanism for puppet to request which classes/states apply to a node
17:49 sjmh so yeah, master_tops
17:50 sjmh allows you to query a remote source that would return what states apply to a minion
17:50 Miouge joined #salt
17:50 s_kunk joined #salt
17:52 noraatepernos joined #salt
17:52 UtahDave thanks, sjmh!
17:52 fracklen joined #salt
17:53 noraatepernos I can’t seem to figure out whether a pillar sls can reference a pillar value.  I wanted to keep sensitive stuff in sensitive.sls and not commit it to github.
17:53 noraatepernos But I still have a pillar/settings.sls that I want to use {{ pillar[‘sensitive’][‘etc’] }}
17:55 avozza joined #salt
17:56 UtahDave noraatepernos: you can't have a pillar value refer to another pillar value, but you can have regular pillar files and external pillar in github at the same time
17:56 UtahDave it will all get overlayed into the same data structure
17:58 noraatepernos UtahDave: Thanks
18:01 zenlot6 joined #salt
18:06 babilen joined #salt
18:07 mowntan joined #salt
18:08 nZac joined #salt
18:13 danslimmon joined #salt
18:13 rem5 joined #salt
18:14 rb joined #salt
18:15 bearonis joined #salt
18:15 danslimmon Alright so I'm trying to use saltify to bring an EC2 instance of mine under salt control, but `salt-cloud -p saltify-profile minionname` fails and says there's already an instance with that minion name under the EC2 driver
18:15 danslimmon And I'm like "Well yeah. That's the host I want to saltify."
18:16 danslimmon Here, here's the output from the salt-cloud command: https://gist.github.com/danslimmon/4d886a8964f7616979c1b48ea27c3907
18:16 danslimmon What am I missing? Is this the wrong use-case for saltify?
18:18 DanyC joined #salt
18:18 perfectsine joined #salt
18:18 DanyC hi all, anyone knows a way from the state file to retrieve the master IP ? i couldn't find a grain which pulls the master info
18:19 nZac joined #salt
18:22 babilen DanyC: The "master" grain should be usable for that. If you haven't set it to an IP you can use to figure out the master IP via the salt mine.
18:25 DanyC babilen: much thanks ! i couldn't spot it, should have read it few times before asking
18:26 cableninja is there a 'how to use' guide for salt + gitfs? I was told to get it setup and working for our setup. I've found configuration guides (and got it configured), but I dont know how to test its use / if its working
18:27 tapoxi joined #salt
18:29 brianfeister joined #salt
18:29 babilen cableninja: You put something in your repo, run "salt-run fileserver.update" and then "salt 'someminion' cp.list_master" and check if its there
18:30 babilen I mean ... the best test is to use it, isn't it?
18:31 cableninja 'put something in your repo' < - like what? write an sls to apply something?
18:31 cableninja I guess I just dont understand its use
18:31 cableninja or how its supposed to be use
18:31 babilen cableninja: You literally put in GitFS what you'd otherwise have in /srv/salt
18:31 babilen Do you know how to use that?
18:33 cableninja I've never used gitfs before, but I guess that makes sense
18:33 babilen But you put states in /srv/salt before, haven't you?
18:33 babilen (and _modules, _grains, _states, ... )
18:33 cableninja yeah
18:34 babilen So, exactly the same thing. The only difference is the datasource (filesystem vs git)
18:35 cableninja and in your example above 'cp.list_master' is list_master a specific file (that I need to change accordingly) or is that a specific command?
18:35 cableninja sorry for the dumb-ish questions
18:35 Miouge joined #salt
18:35 babilen No, that's https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cp.html#salt.modules.cp.list_master
18:35 nZac joined #salt
18:35 babilen (which lists all files on the master which would, hopefully, include those coming from GitFS)
18:35 cableninja oh I see
18:35 babilen Well, all files in file_roots
18:36 cableninja bleh what the hell is wrong with the saltstack docs page
18:36 babilen Why?
18:36 cableninja every time I pull it up it auto reloads every 2 seconds
18:36 babilen What is wrong with it?
18:36 babilen Hmm, not for me. Are you using some arcane browser?
18:36 cableninja firefox
18:36 mierst joined #salt
18:37 babilen Not really arcane .. I'm on chromium, but I wouldn't expect any issues with FF either
18:37 cableninja yeah I dunno wtf
18:38 robawt joined #salt
18:40 pas_ joined #salt
18:41 fracklen joined #salt
18:42 cableninja babilen, I keep getting this: [ERROR   ] Exception 'authentication required but no callback set' caught while fetching gitfs remote ssh://git@my.gitrepo.com:7999/devopsusa/salt-fs.git
18:42 cableninja during salt-run fileserver.update
18:42 cableninja I was seeing this yesterday in the logs, and was trying to resolve it, but was unable to find any solutions
18:43 babilen Which user does salt run as?
18:43 AndreasLutro cableninja: last time I checked that means you have a version of pygit2/libgit2 incompatible with salt
18:44 AndreasLutro we use libgit2 0.23.4 and pygit2 0.23.1 in production so I can vouch for those versions working with 2015.8
18:45 cableninja salt-master 2015.5.3 | libgit2 and pygit2 are 0.24
18:45 cableninja there wasnt really a good proper table of which were supported in which versions
18:46 AndreasLutro no there isn't
18:46 AndreasLutro but your salt master is outdated
18:46 cableninja I know
18:46 AndreasLutro if you upgrade it they might have added 0.24 compatibility
18:46 cableninja because the 8.x versions werent working
18:46 cableninja I had to downgrade
18:46 cableninja maybe I need to try a diff pygit version
18:47 AndreasLutro or get to the root cause of whatever was preventing you from upgrading
18:47 cableninja salt would complain it couldnt reach the minions
18:47 rylnd joined #salt
18:47 cableninja even with master being the same version
18:48 cableninja as soon as I downgraded it all worked fine again
18:48 rylnd hey guys, can anyone tell me how i call ip.build_interface from the bash console correctly? in which format do i have to pass on the <settings>? thx.
18:48 drawsmcgraw joined #salt
18:49 Guest21198 has anyone else seen salt.pillar.get_pillar thrown an error about being unable to fetch the latest changes from the remote repository?
18:50 Guest21198 it's saying "'git fetch' returned exit status 128: fatal: index file smaller than expected"
18:50 * XenophonF renames himself from Guest21198
18:51 XenophonF i'm not sure how to fix this other than to shutdown the master and nuke the directory that contains the pillar repo
18:51 AndreasLutro corrupt index file? I'd just remove it but report it if you can reproduce it
18:51 XenophonF ok
18:51 XenophonF here goes
18:53 honestly 1
18:53 honestly whoops, sorry 'bout that
18:53 andrew_v joined #salt
18:55 edrocks joined #salt
18:57 XenophonF cleaning out the contents of /var/cache/salt/master/pillar_gitfs seemed to fix things
18:57 avozza joined #salt
19:04 devster31 is there an equivalent for {{ ansible_managed }} in salt?
19:06 Tanta try: // Managed by Salt
19:12 lorengordon joined #salt
19:13 babilen devster31: Headers such as https://github.com/saltstack-formulas/influxdb-formula/blob/master/influxdb/files/influxdb.config.jinja#L3 are pretty common
19:13 iggy XenophonF: did you change anything with the gitfs config recently? I've seen weird stuff like that happen sometimes
19:19 dstokes joined #salt
19:20 devster31 babilen: what's the {{ source }} ?
19:21 mierst joined #salt
19:22 keltim joined #salt
19:22 babilen The salt:// path to the source file
19:23 devster31 thanks
19:23 devster31 that looks good
19:23 Raslilo_ joined #salt
19:27 Raslilo_ greetings
19:29 brianfeister joined #salt
19:30 flowstate joined #salt
19:37 devster31 I can't find again a page on the salt docs that showed the order in which salt states are generated, there was a line like Jinja -> YAML -> somethingsomething
19:45 babilen devster31: https://docs.saltstack.com/en/latest/ref/renderers/ ?
19:45 dstokes joined #salt
19:46 SpeeR sjmh I was still having some issues, however I'm pretty sure I've narrowed it down to pygit2 once I changed it to gitpython, everything worked
19:47 SpeeR was getting this in my logs, and it appears to be an unfixed bug in pygit2...  pygit2: disable cleaning of stale refs for authenticated remotes
19:48 salt_nasty @UtahDave and babilen: thanks again guys, i figured out my mine function issue w/ your input... i'm going to update stack overflow w/ an example for future reference
19:49 babilen salt_nasty: Perfect! What did the trick in the end?
19:49 salt_nasty i'm also going to simplify our states and try to get away from relying too heavily on grains
19:50 salt_nasty i think the issue was with trying to target individual grain values. i'm not sure exactly what it was because there was no error, but once i tried returning all grain values, i was able to get what i needed
19:51 babilen Yeah, a grains.items mine_function is probably what you wanted
19:51 babilen But it turned out to be the targeting? So once you switched to targeting by, say, ID it started working?
19:52 cableninja_ joined #salt
19:54 devster31 babilen: not that, I was looking for this: https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#know-the-evaluation-and-execution-order evaluation and execution order
19:56 salt_nasty yep, grains.items was what i needed... example: https://www.refheap.com/119337
19:58 sjmh SpeeR : that error is due to a fact that pygit2 won't remove repositories from your local cache if you delete the repository, only if you're using authorization tho
19:58 sjmh er, authenticated remotes, that is
19:59 babilen devster31: right
20:03 jenastar joined #salt
20:07 mr_chris left #salt
20:07 Aleks3Y joined #salt
20:07 Ayo joined #salt
20:10 rojem joined #salt
20:14 edrocks joined #salt
20:16 noraatepernos joined #salt
20:17 numkem joined #salt
20:21 devster31 https://bpaste.net/show/b09091134a4b any better way to merge dictionaries in jinja=
20:21 devster31 ?
20:23 mierst joined #salt
20:24 bltmiller joined #salt
20:26 bltmiller is there any way from command line to do a regex on node groups? example, I have 2 node groups: app-dev and app-prd. it doesn't seem like I can target both groups with something like `salt -N 'app-*' test.ping`
20:27 bltmiller my hostnames are random strings, so nodegroups are the only thing I can really rely on in my environment. maybe the solution is to create a meta node group that contains both app-dev and app-prd?
20:27 brotatochip joined #salt
20:27 babilen devster31: utils.dictupdate
20:30 cableninja__ joined #salt
20:30 devster31 salt['utils.dictupdate'] ? can't find the reference
20:30 kevinquinnyo i'm trying to emulate git clone --depth=1 --branch=STABLE git://github.com/phpmyadmin/phpmyadmin.git with salt.states.git
20:30 kevinquinnyo i've tried using the 'branch' keyword, is that not what i think it is
20:31 cableninja whats the 'go to' use for salt + gitfs? pygit is being a total pain
20:31 kevinquinnyo the problem is that phpmyadmin has a lot of commits, so it takes forever to clone it normally
20:32 flowstate joined #salt
20:33 josuebrunel joined #salt
20:33 flowstate joined #salt
20:35 AndreasLutro cableninja: fetching states/pillars from git, obviously
20:38 ecdhe joined #salt
20:41 cableninja AndreasLutro, sorry, I meant module used; (IE: pygit, GitPython, etc)
20:47 tristianc_ joined #salt
20:49 onlyanegg joined #salt
20:51 AndrewPashkin joined #salt
20:53 rojem joined #salt
20:53 babilen devster31: https://docs.saltstack.com/en/develop/ref/modules/all/salt.modules.defaults.html#salt.modules.defaults.merge (you want to copy the Python module to _modules)
20:53 babilen It's only in develop
20:54 babilen https://github.com/saltstack/salt/blob/develop/salt/modules/defaults.py
20:55 babilen cableninja: use gitpython
20:56 iggy devster31: {% do repo.update({....}) %}
20:57 iggy repo.update() doesn't return a new dict, it modifies repo in place
20:57 babilen It doesn't recursively merge them though
20:58 babilen (as opposed to defaulta.merge)
20:58 babilen defaults.merge
20:59 lorengordon joined #salt
21:03 dstokes joined #salt
21:04 Bico_Fino joined #salt
21:05 flowstate joined #salt
21:05 DanyC joined #salt
21:05 iggy true, I guess I was more pointing out why his _repo was turning out blank
21:06 DanyC hi all, anyone is familiar with saltify driver ?
21:07 Bico_Fino Hello all, I have a state that copy a file to a server, is working fine. How I can add on this same state a script that run only on salt-master with grains parameters?(the script is like test.py —hostname hostname —ip ip
21:07 brotatochip joined #salt
21:08 heaje joined #salt
21:08 barmaley joined #salt
21:08 DanyC i spun up a VM using vmware driver, deleted the salt-key, also rm -rf/var/cache/salt/master/minions/<minion> but when i run salt-cloud using saltify driver i get the message "already running". Any idea why this behaviour ?
21:11 MadHatter42 joined #salt
21:13 barmaley_ joined #salt
21:15 dezertol joined #salt
21:16 tmclaugh[work] joined #salt
21:16 bltmiller joined #salt
21:20 hrumph hi guys
21:20 hrumph i'm wondering how I can save data from states to look at later in in follow-up states
21:20 hrumph ok first question
21:20 hrumph can i write to pillar data in a state? if so I assume that the changes are local only. Is this correct?
21:21 nZac joined #salt
21:27 nmadhok joined #salt
21:28 hrumph ok i really don't know. i'm wondering what the best mechanism is for saving global data in a state run which can be used in a final state
21:32 sfxandy joined #salt
21:35 hrumph https://github.com/saltstack/salt/issues/33413
21:35 saltstackbot [#33413]title: Want to know how to save global data in states which can be refered to in follow-up states | ### Description of Issue/Question...
21:37 brianfeister joined #salt
21:42 DanyC question: running salt-key -d <key name> shouldn't delete the master minion cache too? If not, what command should i run to delete the master local cache ?
21:43 jfindlay babilen, AndreasLutro: anything merged into 2015.5 will be merged forward
21:44 kevinquinnyo https://github.com/saltstack/salt/blob/develop/salt/states/composer.py in the update function here, it mentions dir, but it doesn't seem to be an actual keyword.  Is it only possible to pass it as the first arg?
21:45 Miouge joined #salt
21:52 Bico_Fino How do I call a reactor state from normal state?
21:53 kevinquinnyo Bico_Fino: fire an event
21:53 kevinquinnyo i think that's the only way
21:53 jfindlay kevinquinnyo: unless there's an arg name preceded by `**`, the function cannot accept arbitrary keywords
21:53 Bico_Fino kevinquinnyo: don’t need pass user/password right?
21:53 jfindlay `**kwargs` for example
21:54 kevinquinnyo yeah the docs just seem to indicate that you should be able to pass dir as a keyword arg unless i read it wrong
21:54 jfindlay kevinquinnyo: actually, it looks like name==dir
21:54 kevinquinnyo right
21:54 kevinquinnyo but then my state has to be named a directory
21:54 jfindlay so the documentation should be updated
21:54 jfindlay hmm
21:54 kevinquinnyo not a big deal
21:55 jfindlay the id is still a free parameter :)
21:55 kevinquinnyo but it seems like everything else allows you to nbame the state arbitrarily and pass in a keyword arg
21:55 jfindlay yeah, that does seem common for some states
21:56 kevinquinnyo Bico_Fino: no password necessary - the minions or the salt master can fire events
21:56 jfindlay but in my experience (not exhaustive) state names are typically the main actionable thing, like for cmd.run the name is the command you want to run
21:56 kevinquinnyo now you would probably have a password if you were triggering the reactor via salt-api remotely
21:56 Bico_Fino kevinquinnyo: let me try. Thanks for the suggestion!
21:57 kevinquinnyo jfindlay: yeah i just never do that
21:57 kevinquinnyo i like the state id to be verbose
21:57 kevinquinnyo like 'Make sure that {0} is executable'.format(filename)
21:57 kevinquinnyo and pass the chmod +x command or whatever as the name keyword argument
21:57 onlyanegg joined #salt
21:58 babilen kevinquinnyo: That's the ID, not the "- name: ..." argument.
21:58 jfindlay so the id is like a description and the name is the slug?
21:58 babilen (even though salt uses the ID as - name argument if you don't specify it)
21:59 kevinquinnyo right
21:59 jfindlay I wonder if a universal description argument would be useful
21:59 kevinquinnyo that would be cool i think
21:59 kevinquinnyo optional description
21:59 kevinquinnyo especially when using something like --output=terse
22:00 jfindlay if you put it into a comment near the state, it wouldn't be carried through the state system
22:09 colegatron joined #salt
22:18 brotatochip joined #salt
22:28 oida joined #salt
22:35 mowntan joined #salt
22:36 zenlot joined #salt
22:45 hrumph jfindlay, is the answer to my question to use the __salt__ dictionary?
22:46 hrumph https://github.com/saltstack/salt/issues/33413
22:46 saltstackbot [#33413]title: Want to know how to save global data in states which can be refered to in follow-up states | ### Description of Issue/Question...
22:46 jfindlay hrumph: are you asking a programmatic question about a custom state module?
22:47 hrumph jfindlay, it won't be custom if you guys eventually accept my work
22:47 jfindlay if so, I guess you could put information into `__context__`
22:47 hrumph jfindlay, but i need to understand salt better
22:47 hrumph ok thanks jfindlay i'll google for that
22:48 jfindlay I don't know much about it, but if you're talking about python code I think that may be what you're asking
22:48 anotherZero joined #salt
22:48 hrumph ok thanks i'll close the issue
22:49 jfindlay sure
22:50 hrumph jfindlay, it may actually make sense to use __salt__ and overwrite a function when the situation changes
22:50 babilen hrumph: No, don't close it. Salt needs some defined ways in which to write information during a state run that can be referenced later on... I mean, sure, you can output to databases or whatnot, but none of that is intuitive or obvious necessarily
22:50 jfindlay I would also argue that if you're relying on complex thing coming in through `__context__` you ought to see if there's a simpler way to do it as one of the nice things about salt is that the infrastructure you're automating itself should be the source of the data you need to the extent it makes sense
22:51 jfindlay hrumph: I advise against that as `__salt__` is (re)generated by the salt loader and could change at any time
22:51 hrumph jfindlay, ok
22:51 babilen What kind of information is this about?
22:51 hrumph babilen, use of __context__ seems pretty clean to me. I missed the part of the docs where its described
22:52 jfindlay https://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html#context
22:53 hrumph babilen, i'll hold off closing though until i'm supercertain that everything is right
22:53 cableninja joined #salt
22:54 jfindlay hrumph: did you see my long comment about querying infrastructure for information?  'infrastructure is information'
22:54 hrumph jfindlay, i don't think i read that par i'll scroll up
22:54 debian112 left #salt
22:54 hrumph jfindlay, can you repost?
22:55 jfindlay 16:50:51      @jfindlay | I would also argue that if you're relying on complex thing coming in through `__context__` you ought to see if there's a simpler way to do it as one of the nice things about salt is that the infrastructure you're automating itself should be the  Ã¢â€â€š beardo
22:55 jfindlay | source of the data you need to the extent it makes sense
22:55 jfindlay g2g
22:55 hrumph jfindlay, ok i'll describe the scenario
22:56 hrumph jfindlay, i'll describe it some other time when you are here
22:56 dstokes_ joined #salt
22:57 hrumph jfindlay, unless you have another minute or two
22:57 flowstate joined #salt
22:58 keimlink joined #salt
23:10 bltmiller joined #salt
23:13 WKNiGHT joined #salt
23:16 dstokes joined #salt
23:16 lero joined #salt
23:17 Biopandemic joined #salt
23:17 cyborg-one joined #salt
23:18 brianfeister joined #salt
23:20 west575_ joined #salt
23:21 UtahDave joined #salt
23:22 brotatochip joined #salt
23:26 Nahual joined #salt
23:27 dstokes joined #salt
23:27 rgrinberg joined #salt
23:31 dstokes_ joined #salt
23:32 cableninja_ joined #salt
23:37 dezertol joined #salt
23:38 theproxy joined #salt
23:41 fracklen joined #salt
23:45 theproxy joined #salt
23:48 dezertol joined #salt
23:49 brotatochip joined #salt
23:51 brotatochip joined #salt
23:55 cilkay joined #salt
23:58 flowstate joined #salt
23:59 kus joined #salt

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