Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-02-06

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

All times shown according to UTC.

Time Nick Message
00:02 bbrelin1 Does anyone know if saltstack has a virtualbox driver?
00:06 honestly bbrelin1: https://docs.saltstack.com/en/latest/topics/cloud/virtualbox.html
00:20 jeffspeff joined #salt
00:26 eThaD joined #salt
00:30 FiveBrother-Prof joined #salt
00:33 justan0theruser joined #salt
00:36 prg3 joined #salt
00:38 alvinstarr joined #salt
00:39 sh123124213 joined #salt
00:39 jesusaur joined #salt
00:43 eThaD joined #salt
00:43 scsinutz joined #salt
00:49 gnomethrower hey guys
00:49 gnomethrower having issues where a Ubuntu 14.04 minion creates my home directories inside home directories
00:49 gnomethrower https://gist.github.com/Zorlin/fd411a5064acc9dd2117f64f72d216cc
00:49 gnomethrower it creates, for example, /home/yoda/home/yoda
00:51 gnomethrower FWIW, running salt 2015.8.0 (Beryllium)
00:52 scsinutz joined #salt
01:25 eThaD joined #salt
01:36 jas02 joined #salt
01:38 gnomethrower also I can't seem to install a minion on 14.04
01:38 gnomethrower https://gist.github.com/Zorlin/5a3d3a5791c302562195b4fc889bc79b
01:40 sh123124213 joined #salt
01:43 rabelais left #salt
01:46 eThaD joined #salt
01:51 netcho joined #salt
02:01 lasseknudsen joined #salt
02:04 karlthane joined #salt
02:07 brd gnomethrower: wow, those versions are so old
02:08 swa_work joined #salt
02:08 gnomethrower brd: Yep, but that's what we have :)
02:08 gnomethrower Never mind minion install, that was because I was using 32-bit by accident
02:08 gnomethrower so that's fine. Issue with recursed homedirs still a problem though
02:09 brd gnomethrower: I can't imagine working on stuff so old
02:09 gnomethrower I can't replicate it with latest Salt (Carbon) against a fresh U14.04 machine, leading me to believe it's probably an issue with the older Salt
02:09 gnomethrower i'm going to spin up an old salt master and see if I can replicate it with that
02:10 catpigger joined #salt
02:18 scsinutz joined #salt
02:28 scsinutz joined #salt
02:28 eThaD joined #salt
02:37 jas02 joined #salt
02:46 justanotheruser joined #salt
02:54 evle joined #salt
02:59 Tanta joined #salt
03:10 eThaD joined #salt
03:11 alvinstarr joined #salt
03:27 ksoviero Is there any equivalent of the pillar `- ignore_missing: True` option in states?
03:31 eThaD joined #salt
03:33 yuhl___ joined #salt
03:37 c4rc4s joined #salt
03:38 jas02 joined #salt
03:41 sh123124213 joined #salt
03:46 JPT joined #salt
04:00 justan0theruser joined #salt
04:06 scsinutz joined #salt
04:07 XenophonF since when did usermod not let you modify the home directory of a running daemon?
04:13 eThaD joined #salt
04:28 prg3 joined #salt
04:29 MTecknology XenophonF: it let's you?!
04:30 * MTecknology is pretty high, but not high enough for that
04:30 scsinutz joined #salt
04:38 DEger joined #salt
04:55 eThaD joined #salt
05:00 scsinutz joined #salt
05:13 preludedrew joined #salt
05:15 gnomethrower I have confirmed that the issue I was seeing with nested/recursive home directories was fixed by going from 2015.08.0 to 2015.08.13
05:15 gnomethrower if anyone else asks, it's fixed in newer Salt ;)
05:15 gnomethrower not sure of the specific patch level that fixed it, but there you go
05:16 eThaD joined #salt
05:20 danemacmillan joined #salt
05:26 fracklen joined #salt
05:40 jas02 joined #salt
05:43 sh123124213 joined #salt
05:47 cyborg-one joined #salt
05:58 eThaD joined #salt
06:02 ivanjaros joined #salt
06:19 eThaD joined #salt
06:23 sh123124213 joined #salt
06:50 prg3 joined #salt
06:57 ivanjaros3916 joined #salt
07:01 eThaD joined #salt
07:05 DEger joined #salt
07:08 colttt joined #salt
07:39 fracklen joined #salt
07:41 jas02 joined #salt
07:42 scristian joined #salt
07:43 eThaD joined #salt
07:56 darioleidi joined #salt
07:58 Droom joined #salt
07:59 Droom Can I make one of the state in a sls file dependent on the execution of a previous state ?
07:59 Droom like in this file http://pastebin.com/BrwMS4kx
08:00 Droom can i somehow trigger second_highstate only if first_highstate has been executed succesfully ?
08:04 eThaD joined #salt
08:07 viccuad joined #salt
08:16 ronnix joined #salt
08:17 fracklen joined #salt
08:19 eThaD joined #salt
08:21 fracklen joined #salt
08:22 jhauser joined #salt
08:31 o1e9 joined #salt
08:32 toanju joined #salt
08:33 fracklen joined #salt
08:42 jas02 joined #salt
08:43 JohnnyRun joined #salt
08:50 xet7 joined #salt
08:51 teclator joined #salt
09:02 LexEither joined #salt
09:12 mikecmpbll joined #salt
09:23 sh123124213 joined #salt
09:28 KaczuH joined #salt
09:36 losh joined #salt
09:39 s_kunk joined #salt
09:44 jas02 joined #salt
09:47 kamil_ joined #salt
09:51 CrummyGummy joined #salt
09:52 Mattch joined #salt
09:55 ozux joined #salt
09:56 barmaley joined #salt
10:01 fracklen joined #salt
10:14 alekhya joined #salt
10:17 alekhya Hi,Is there any tool for linting .sls files which include jinja2 templates
10:18 AndreasLutro no
10:28 alekhya I want to lint my salt files which uses jinja templates.I uesd yamllint but it is giving error for jinja syntax.Any suggestion on this?
10:29 diagnostuck joined #salt
10:32 k_sze[work] joined #salt
10:40 fracklen joined #salt
10:42 fracklen joined #salt
10:45 jas02 joined #salt
10:49 s_kunk joined #salt
10:51 CrummyGummy Hi, is it possible to handle Mysql slave settings in saltstack. The mysql-formula doesn't seem to make provision for it.
10:51 darioleidi joined #salt
10:52 CrummyGummy Nmind, probably a dumb question
10:56 sh123124213 joined #salt
10:58 Cadmus joined #salt
11:00 bbrelin1 Hi.  My Ubuntu 16.04 version of salt says that it's at 2015.8.8 (Beryllium) which seems rather down-revved.  Is there a new apt package for Salt?
11:00 Cadmus bbrelin1: Try adding Salts own apt repo https://repo.saltstack.com/#ubuntu
11:08 fracklen joined #salt
11:09 fracklen joined #salt
11:14 babilen CrummyGummy: Did you figure it out?
11:19 fracklen joined #salt
11:23 CrummyGummy babilen: No, turns the master_host and master_user etc aren't in the config file so not sure where to go from here.
11:24 babilen CrummyGummy: In which configuration file? I always configured it with "CHANGE MASTER TO ..." tbh
11:25 babilen The formula allows you to configure whatever configuration file you want
11:25 CrummyGummy The formula only sets configuration file settings. Not the "CHANGE MASTER TO" command line call.
11:26 babilen Yes, exactly
11:26 babilen I wasn't aware that you could configure it in the configuration file
11:26 babilen I guess you can't and you therefore can't configure this with the formula
11:27 babilen Sorry, should have realised what you are asking earlier
11:27 babilen You can use mysql.query to run queries if you like
11:27 CrummyGummy I was hoping some salt magic would sort that out. Just MASTER_USER and MASTER_PASSWORD. The rest are configured on the mysql import.
11:27 CrummyGummy Ah well, minor I guess...
11:27 babilen Well "salt magic" can only do what you would do manually :)
11:31 eThaD joined #salt
11:33 CrummyGummy ok, just so I'm clear. The idea then is to apply the state, then login and run "change master.."
11:36 abednarik joined #salt
11:37 impi joined #salt
11:38 diagnostuck joined #salt
11:46 jas02 joined #salt
11:51 stduolc joined #salt
11:53 stduolc hi, I'm new to saltstack, now I try to configure the minion for the ubuntu os, I set the master to hostname: master, It's work fine on other centos system, but not work on this ubuntu system. the log told me the dns lookup for 'master' failed. why?
11:54 babilen CrummyGummy: You could run that query with salt -- https://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_query.html
11:55 babilen stduolc: Sounds as if your "master: SOME_HOST_OR_IP" entry is wrong in /etc/salt/minion
11:55 babilen (unless your DNS server resolves "master" to the correct IP)
11:56 daxroc Can  I read the contents of a file into a context passed into another state? In my example I'm making a http request and need to provide that request content to another file.managed context  what's teh best way to do this?
11:56 toanju joined #salt
11:57 stduolc babilen: yes, I think so, but the conf file work fine on other centos system. the centos can find the master's ip.
11:57 stduolc babilen: yes, the dns resolves to the master ip correctly, because other centos minion work fine.
11:57 babilen stduolc: Why would it try to resolve "master" though? Could you paste your minion config (the uncommented bits) and the exact error you get to one of http://paste.debian.net, https://gist.github.com, http://sprunge.us, … ?
11:57 babilen (feel free to redact sensitive information)
11:58 eThaD joined #salt
11:58 stduolc babilen: ok
11:58 babilen Okay, so what do you have in /etc/resolv.conf on the Ubuntun minion? What does "nslookup master" give you on that box?
12:00 lasseknudsen joined #salt
12:02 eThaD_ joined #salt
12:04 evle joined #salt
12:04 stduolc babilen: this is the /etc/salt/minion file http://paste.debian.net/913003
12:04 stduolc babilen: the uncommented line just is the - master: master
12:06 eThaD joined #salt
12:06 stduolc babilen: this is the resolv.conf http://paste.debian.net/913005/
12:07 babilen And can you resolve "master" on that minion?
12:08 stduolc babilen: I try to nslookup master , no result for the master domain
12:08 stduolc no
12:08 babilen Can you resolve other names?
12:08 stduolc but I cannot resolve "master" on other centos minion
12:08 babilen Which of those nameservers can resolve "master" ?
12:09 stduolc yes, on ubuntu, I can resolve other domain, like www.debian.net
12:09 eThaD joined #salt
12:09 babilen I mean .. salt can't guess the IP address of "master", so you'd have to be able to resolve it on the minion
12:09 babilen So, I guess, you have to adapt your resolv.conf, nameserver configuration or provide an IP or hostname the minion can work with
12:10 mschiff Beside the highstate I am scheduling a long running job via schedule pillar and "function: state.sls" (with cron: ...). But when this job is running wsalt refuses to run other state runs like "salt-call state.sls foo" on the command line with "The function "state.sls" is running as PID 7953 ..."
12:10 mschiff How can this be solved?
12:11 mschiff I am not running to run the *same* state here ...
12:11 amcorreia joined #salt
12:11 mschiff trying
12:11 babilen Wait for the first one to stop
12:11 stduolc yes, I set the master: master.domian.com on ubuntu, It's work
12:11 daxroc How can I read http contents into a variable using salt?
12:12 stduolc babilen: If I just set to the hostname, It's not work.
12:12 mschiff babilen: The job runs very long and blocks all other states while running. I wonder if this can be solved somehow so that other states can be executed...
12:12 babilen mschiff: "concurrent=True" / "queue=True"
12:12 babilen I wouldn't necessarily use concurrent
12:13 babilen mschiff: See https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html for documentation
12:14 babilen daxroc: Make a call with https://docs.saltstack.com/en/latest/topics/tutorials/http.html and save it in a variable?
12:16 djinni` joined #salt
12:16 babilen stduolc: master.domian.com is not the same as "master" -- I guess you have "search domian.conf" in your resolv.conf on CentOS
12:16 babilen err
12:16 babilen "search domian.com" naturally
12:17 babilen My suggestion would be to configure "master: master.domian.com" in /etc/salt/minion
12:17 stduolc babilen: yes, u are right, the resolv.conf is different on CentOS
12:17 mschiff babilen: thanks, thats what I was looking for. SO I have to run salt-call with "concurrent=1". Would be nice to have some setting in minion config which sets concurrency level for different states, so that starting the ame state again would be refused, but starting other states will work...
12:22 inad922 joined #salt
12:24 toanju joined #salt
12:27 lasseknudsen2 joined #salt
12:27 CrummyGummy babilen: Thanks
12:41 CrummyGummy Any idea how I can get the last portion of an IP address from a grain, so the 112 in this 10.3.0.112?
12:41 _Cyclone_ joined #salt
12:41 CrummyGummy it's fairly unique so I want to use it as a server id.
12:46 bakins joined #salt
12:52 diagnostuck joined #salt
12:54 armguy joined #salt
12:55 gableroux joined #salt
13:06 numkem joined #salt
13:08 ozux joined #salt
13:11 kjsaihs joined #salt
13:11 eThaD joined #salt
13:12 DEger joined #salt
13:14 kjsaihs i am struggling to make salt use a password in order to edit a mysql database. I am only getting: MySQL Error 1045: Access denied for user 'root'@'localhost' (using password: NO)
13:15 Cadmus left #salt
13:15 kjsaihs any hints what i am missing?
13:16 sh123124213 is there anyway to add a new salt rootfs fileserver without restarting master ?
13:42 gladia2r joined #salt
13:43 haam3r CrummyGummy: Have you tried .split?
13:45 ssplatt joined #salt
13:45 CrummyGummy haam3r: No, thanks for the tip :)
13:46 haam3r CrummyGummy: This seems to work: {% set ip = salt['grains.get']('ipv4')[0].split('.')[3] %}
13:47 gladia2r heya, can anyone advise how would I negate IF, for two statements? tried these but no go: https://gist.github.com/gladia2r/608a27680f7ae4f657022907008c6756
13:49 CrummyGummy haam3r: Thanks. I'll give that a shot.
13:56 eThaD joined #salt
14:00 haam3r gladia2r: Did you try the python way? Something like: {% if ( 'blue' not in grains['type'] ) and ( 'yellow' not in grains['type'] ) %}
14:07 gladia2r aha! that seems to help - thanks haam3r
14:09 impi joined #salt
14:13 XenophonF sh123124213: you have to restart the master if you change the master configuration
14:14 diagnostuck joined #salt
14:21 fracklen joined #salt
14:26 austin_ joined #salt
14:27 austin_ is there any way to truly tell if a new minion is attempting to authenticate ?
14:29 austin_ i see `salt/key` ... does this only happen when a minion is attempting to authn for the first time ?
14:33 armguy joined #salt
14:37 babilen austin_: Those fire when you have accepted a key
14:37 babilen (for example)
14:37 babilen What are you after?
14:37 austin_ right
14:37 austin_ so the issue is i need to know when a "new minion" is coming online
14:38 babilen Whatfor?
14:38 austin_ which means we would use the reactor system to create an entry in another system (legacy system that is)
14:38 austin_ its just an idea
14:38 austin_ i'm not thrilled about the idea
14:39 austin_ because i think we are putting the cart before the horse but i need to review this way of approaching it
14:39 babilen And "coming online" means what exactly? Would it be okay to perform this for those minions for which you have accepted keys?
14:39 austin_ ok let me give a little more context
14:40 austin_ a lifecycle mgmt system like say foreman would provision a new instance
14:40 austin_ metal or virtual
14:40 austin_ whatever
14:40 babilen In which case salt/key and a check on data['act'] == 'accept' would be what you want, but a bit more context would be appreciated
14:40 ronnix joined #salt
14:40 austin_ that would include a process to bootstrap a minion on that newly minted instance
14:40 austin_ however, we need to also update a legacy system with information
14:41 austin_ so the thought was, when say `salt/key` comes across the event bus, we could fire off a request to update that legacy system with some data
14:42 austin_ but right. data['act'] == 'accept' being key there
14:42 _JZ_ joined #salt
14:42 austin_ the legacy system can handle upserting so that shouldn't be an issue if its already there
14:43 austin_ a 200 but "already present" kinda thing
14:43 austin_ so does salt/key data['act'] only happen once for a new minion  that is not accepted ?
14:44 babilen It does only happen when you accept the minion key
14:45 austin_ ok ok.
14:45 babilen So should match your usecase from what I can tell
14:45 babilen It can't be guaranteed that a minion is accepted, removed and accepted again
14:45 austin_ right
14:45 babilen *is not
14:46 babilen So you might see the same minion multiple times (if that's something you want to monitor or treat as error is another question)
14:46 austin_ right
14:46 babilen But that only happens if somebody/something explicitly removed the minion beforehand
14:46 austin_ we could wrap some error handling but still not a huge fan of this approach
14:46 babilen Why not?
14:47 austin_ some internal reasons to *what* this legacy system is
14:47 austin_ it is essentially a meta data service about our fleet
14:47 babilen How can we help you to find a better solution?
14:47 austin_ personally, it should happen *before* a new instance
14:48 ALLmightySPIFF joined #salt
14:50 edrocks joined #salt
14:50 austin_ babilen: anyway, thanks for thinking with me :)
14:51 austin_ i think i have what i need to create my proposal.
14:52 nickabbey joined #salt
14:53 fracklen joined #salt
14:56 PatrolDoom joined #salt
14:56 babilen austin_: Feel free to come back if you like to brainstorm other ideas .. from a salt perspective hooking into salt/key is a valid approach
14:56 austin_ well, let me ask you this, is there any way for the minion to fire that event after salt\key accep t?
14:57 austin_ i'd feel much better about a custom event we monitor
14:57 babilen Only if you remove the minion and add it again
14:57 austin_ sorry not that event. a custom event is what i meant to say
14:58 babilen You mean: Is there a way for the minion to fire a custom event when it is added?
14:58 austin_ yea so `salt-call event.send 'some/custom/event' {'data' : 'goes here' }`
14:58 austin_ essentially reacting to the accepted key
14:58 austin_ because i could probably wrap some logic around this
14:59 babilen Yes, but you would, once again, fire the state that fires your custom event based on salt/key
14:59 austin_ hmmm...
14:59 austin_ seems to be getting overly complex
14:59 austin_ was just a thought :)
14:59 babilen I don't see what it buys you, you already have an event for "key was accepted"
15:01 austin_ right
15:01 austin_ thats kinda what i'm thinking
15:03 fracklen joined #salt
15:03 austin_ it was more of a thought around a custom event that i would control versus a salt one ... but really idk if its needed
15:04 racooper joined #salt
15:06 Tanta joined #salt
15:08 babilen austin_: I'd argue that it doesn't matter what the event is called, but that it is fired under the right circumstances
15:09 austin_ yes
15:09 austin_ exactly
15:10 austin_ and keeping those to only that right time. mutliple fires gets me nervous ... how can this go bad
15:11 abednarik joined #salt
15:15 ozux joined #salt
15:16 alvinstarr joined #salt
15:17 hackel joined #salt
15:18 mpanetta joined #salt
15:20 mpanetta joined #salt
15:21 Inveracity joined #salt
15:23 diagnostuck joined #salt
15:29 alex80 joined #salt
15:32 debian112 joined #salt
15:32 alex80 hi, is it possible to have, at any time, a list of all minions that have a failed state ?
15:33 benner_ sometimes I'm getting 500 on salt-api by doing POST /run. any ideas where to start to address the problem?
15:35 brousch__ joined #salt
15:38 eThaD joined #salt
15:41 daxroc I'm creating a file from a http call and want to read the contents of this file into a following file.managed state context variable. Is this possible ? are there alternatives ?
15:43 oida joined #salt
15:43 danemacm1 joined #salt
15:43 jken joined #salt
15:45 keltim joined #salt
15:46 danemacm1 joined #salt
15:46 keltim I'm using cmd.shell to set a jinja variable to the output of a shell script, and even though the script works and the variable works fine, I keep seeing this in the logs: [salt.loaded.int.module.cmdmod][ERROR   ] Command '/usr/local/sbin/my-ptr' failed with return code: 1
15:46 keltim it's definitely NOT failing with 1, at least not in the shell it isn't
15:48 sarcasticadmin joined #salt
15:49 denys joined #salt
15:52 debian112 joined #salt
15:53 tercenya joined #salt
15:58 amagawdd joined #salt
15:59 DEger joined #salt
16:04 stduolc joined #salt
16:04 bowhunter joined #salt
16:05 danemacmillan joined #salt
16:05 daxroc wow - love jinja2/salt indirection : set myvar = salt['file.grep']('/tmp/myfile.txt', '')['stdout']  ...
16:08 keltim yes I am doing "{% set ptr_value = salt['cmd.shell']('/usr/local/sbin/my-ptr') %}" but I do get that error. Is something wrong with what I'm doing there?
16:09 keltim though I wish we had access to python's netaddr via jinja as ansible does
16:09 keltim so I wouldn't have to do dumb stuff like that just to get my ptr
16:11 teclator joined #salt
16:17 eThaD joined #salt
16:20 diagnostuck joined #salt
16:21 ivanjaros joined #salt
16:23 rlatimore joined #salt
16:26 yuhl___ joined #salt
16:27 jas02 joined #salt
16:29 nickabbey joined #salt
16:32 wangofett joined #salt
16:34 fracklen joined #salt
16:39 heaje joined #salt
16:42 bd joined #salt
16:42 impi joined #salt
16:43 ekristen joined #salt
16:45 inad922 joined #salt
16:50 gableroux joined #salt
16:50 colegatron joined #salt
16:52 whiteinge benner_: check the log files for the master (and for the api if you're on a recent version). if you don't see anything there then put `debug: True` into your `rest_cherrypy` config and make the request again to see the traceback.
16:53 fracklen joined #salt
16:54 Heartsbane joined #salt
16:54 Heartsbane joined #salt
16:57 abednarik joined #salt
16:58 djgerm joined #salt
17:00 overyander joined #salt
17:03 AnalogLifestyle joined #salt
17:09 gableroux joined #salt
17:09 rlatimore joined #salt
17:09 bowhunter joined #salt
17:11 rburkholder joined #salt
17:16 eThaD joined #salt
17:20 hlub it takes more than two minutes for salt-ssh to run any task.
17:21 diagnostuck joined #salt
17:21 hlub pillar.get for example
17:21 amagawdd joined #salt
17:21 sh123124213 joined #salt
17:23 hlub the version is 2016.11.2
17:23 babilen It's part of the workplace relaxation program
17:23 babilen Which step is taking so long?
17:24 abednarik joined #salt
17:26 ALLmightySPIFF joined #salt
17:27 brd hlub: dns timeout would be my guess
17:27 brd hlub: does ssh to the same client also take a long time?
17:28 hlub ssh itself works just fine
17:28 hlub didn't run salt-ssh with debug logging yet
17:28 hlub it'll take a while :P
17:29 brd hah :)
17:29 babilen Might want to paste the (redacted) debug log to one og http://paste.debian.net, https://gist.github.com, http://sprunge.us, …
17:30 sh123124213 joined #salt
17:30 ksoviero joined #salt
17:30 ksoviero Is there a states equivalent to the ignore_missing attribute in pillars?
17:30 woodtablet joined #salt
17:30 nickabbey joined #salt
17:31 orianbsilva joined #salt
17:31 babilen ksoviero: https://github.com/saltstack/salt/issues/20010#issuecomment-226653419 should be easily adapted
17:31 saltstackbot [#20010][OPEN] Include State only if it exists | Hi,...
17:31 babilen Or look into cp.list_master
17:33 babilen https://github.com/saltstack/salt/issues/39186 would be the issue that discusses your usecase
17:33 saltstackbot [#39186][OPEN] Add support for 'ignore_missing: True' option to states | Description of Issue/Question...
17:33 jas02 joined #salt
17:33 ksoviero babilen: Ya, that's what we're doing now, but after finding out about the ignore_missing option in pillars, I thought maybe there was an equivalent for states.
17:33 babilen Ah, you reported that one .. could have saved me some time
17:34 ksoviero babilen: Ya, was about to mention that.
17:36 hlub babilen: I'm wondering does salt-ssh fetch all of the gitfs remotes always before doing anything else..
17:36 ozux joined #salt
17:37 hlub it seems so, because I get some update lock warnings every now and then.
17:38 edrocks joined #salt
17:38 hlub and I futher know that our self-hosted git repos are being served quite slowly..
17:39 whytewolf hlub: yes, salt-ssh does a refresh of gitfs before compressing the working componets together and scping the files to the node being updated.
17:39 bbrelin1 Hello all.  I'm having a bit of difficulty wrapping my head around the saltstack state namespace.
17:40 whytewolf bbrelin1: what kind of difficulties?
17:40 hlub oh, I hopoe it is possible to skip that.
17:40 bbrelin1 If I have a directory structure that looks like /srv/salt/base/[dev|qa]/[webserver|dbserver] I'm not quite understanding how to set up the top.sls files.
17:40 bbrelin1 for each different directory.
17:40 woodtablet joined #salt
17:40 whytewolf bbrelin1: depends on your file_roots
17:41 bbrelin1 file_roots = /srv/salt/base
17:41 hlub those remotes are updated every minute anyway afaik.
17:42 bbrelin1 so, in my top.sls file, would I just have something that looks like : base: <cr> -dev <cr>-webserver<cr>-dbserver?
17:42 bbrelin1 And then have an init.sls file for each webserver/dbserver directory?
17:42 whytewolf um no
17:43 scsinutz joined #salt
17:43 bbrelin1 I'm trying to figure out the right way to do a complex namespace heirarchy in saltstack
17:45 whytewolf bbrelin1: given your example would be more like this https://gist.github.com/whytewolf/7565d54263d6e384ba9b76ae958af79e
17:45 bbrelin1 Ah, the '.' is the delimiter...
17:45 bbrelin1 Thanks
17:46 ksoviero Is there a way to see what a compiled version of a top file would look for a given host? I want to make sure my jinja is being parsed the say I think it is.
17:46 bbrelin1 And then you put an init.sls in each webserver and dbserver directory...
17:46 whytewolf ksoviero: state.show_top
17:46 whytewolf bbrelin1: yes
17:46 bbrelin1 Thanks whytewolf.
17:46 bbrelin1 Appreciate the assist.
17:47 whytewolf you could also have other files so you could have dev.webserver.remove with remove being a remove.sls file
17:47 bbrelin1 BTW, is the file init.sls mandatory, or is the name just a convention?
17:47 whytewolf init.sls is not mandatory
17:47 abednarik joined #salt
17:48 whytewolf only if you want to refer to the directory structure. [so if you want dev.webserver then dev/webserver/init.sls]
17:48 bbrelin1 Thanks.
17:49 ksoviero whytewolf: That's not quite what I was hoping for. I was hoping for the actual text that jinja returns after compiling the top file.
17:49 sp0097 joined #salt
17:50 whytewolf oh, well you can use cp.get_template on a minion to render the template
17:50 inad922 joined #salt
17:51 ksoviero whytewolf: ah, much better. thanks!
17:52 bbrelin1 So, could I for example, do something like this:  top.sls has a 'base' <cr> -qa<cr>-dev<cr>. then the init.sls for dev has something like:  base: <cr> -webserver<cr> -dbserver<cr>?
17:52 bbrelin1 And so on down?
17:52 armyriad joined #salt
17:53 whytewolf well, no. only the top file is formmatted like calls. an init like that would ned to be includes
17:53 XenophonF joined #salt
17:53 whytewolf and would still need to reference dev.webserver and dev.dbserver
17:54 bbrelin1 So, the init.sls file for say, dev would need an include: <cr> -dev.webserver <cr> -dev.dbserver<cr> ?
17:54 whytewolf if you wanted to go that route. yes
17:55 bbrelin1 Is this a bad way to do it?
17:55 bbrelin1 or sub-optimal?
17:55 ksoviero bbrelin1: you could also just do include:\n  - dev.*
17:55 bbrelin1 ok.
17:55 bbrelin1 thanks
17:55 whytewolf honestly it isn't a way i would do it. I tend to like using tools like show_top which lets me see exactly what the top file has.
17:56 bbrelin1 is show_top part of the salt distro?
17:56 bbrelin1 Or a third party app?
17:57 bbrelin1 I'm just thinking about larger and more complex deployments where you have lots of different environments or depts with a large hierarchy.
17:57 bbrelin1 What the right way of approaching this is.
17:58 whytewolf the right way is how ever it works best for you
17:58 bbrelin1 :-)
17:58 bbrelin1 ok.
17:59 whytewolf and show_top is part of the state.show_* tools
17:59 whytewolf https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html#salt.modules.state.show_top
18:00 hlub oh, then there is a TemplateNotFound, when using salt-ssh and a jinja include. The same command executes well with salt and cp.list_master lists the 'missing' file properly.
18:01 whytewolf hlub: there is a work around for that. since salt trys to make best guess for things that should be included but doesn't get things like jinja includes.
18:01 nickabbey joined #salt
18:02 hlub I thought it would just copy the whole thing :O
18:02 whytewolf https://github.com/saltstack/salt/issues/9878
18:02 saltstackbot [#9878][MERGED] salt-ssh jinja TemplateNotFound  | I believe I found an issue with salt-ssh when using jinja map template files....
18:02 whytewolf no, on state trees that are gigs that would be a bad idea
18:03 tehsu is use_keystoneauth required with saltcloud 11.2?
18:04 hlub similarly good idea than checking all the git remotes first every time. :>
18:06 ALLmightySPIFF joined #salt
18:07 whytewolf tehsu: i think the setting is needed, but it can be set to false. gtmanfred might need to chime in for this.
18:07 tehsu yeah, reading the releasenotes, not sure which version is for rackspace
18:07 ekristen whytewolf: I sorta tracked down the weird pillar problem from Friday opened a ticket https://github.com/saltstack/salt/issues/39192
18:07 saltstackbot [#39192][OPEN] ext_pillar: git_pillar using the new syntax not working properly (sort of?) | Description of Issue/Question...
18:08 gtmanfred tehsu: set it to false, you only need it set to true if you want to use keystonev3
18:08 tehsu ok thx
18:08 ekristen there is some weird weird stuff happening with git_pillar that’s for sure
18:08 gtmanfred https://github.com/saltstack/salt/pull/39079
18:08 saltstackbot [#39079][MERGED] use_keystoneauth should default to False if not specified | Tests written?...
18:08 tehsu ty
18:09 scsinutz joined #salt
18:09 gtmanfred you can use keystoneauth if you want, but it isn't required for a lot of things, it just uses keystoneauth directly to create the auth session, instead of using the novaclient authentication which doesn't support v3
18:09 whytewolf ekristen: kewlies.
18:10 whytewolf gtmanfred: can't wait till we have something better then novaclient :P
18:10 gtmanfred me too
18:10 gtmanfred Supposedly i am going to get time to do that for the Oxygen release
18:10 gtmanfred but it got scrapped for Nitrogen :(
18:10 gtmanfred we are focusing on having full python3 support for nitrogen
18:10 whytewolf oh man :( openstack takes a backseat again
18:11 gtmanfred whytewolf: we finally have a customer asking for more stuff with it, so it should actually get into oxygen
18:12 whytewolf ahhh. kewl.
18:13 wangofett I, for one, welcome the full python3 support <3
18:13 whytewolf well least it isn't slated for Bismuth
18:13 beardedeagle joined #salt
18:14 whytewolf python3 support would be nice. can't wait for all the breackage that is going to introduct with utf stupport changing the way strings are done
18:14 whytewolf ...
18:14 whytewolf *breakage, introduce.
18:15 wangofett Hm. Actually I don't know if that will do very much, aside from within saltstack itself
18:15 wangofett Probably the worst places would be in some people's modules
18:15 whytewolf sorry was being sarcastic. it actually shouldn't do much damage. in fact should help with some issues out there with other langs
18:16 wangofett Ah, you forgot the </sarcasm> tag ;)
18:16 Edgan joined #salt
18:16 whytewolf that i did
18:16 wangofett I think that Salt is the only python2 product that I use right now...
18:17 spiette joined #salt
18:17 whytewolf well, I'm centos so i still have yum to contend with... really can't wait till redhat/centos move to dnf
18:17 diagnostuck joined #salt
18:20 Sketch what's wrong with yum?
18:20 Sketch i don't notice much difference with dnf in practice
18:20 whytewolf Sketch: there isn't much different. except dnf actually supports python3
18:21 Sketch ah
18:21 Sketch dnf seems to break just as much as yum for me ;)
18:22 Trauma joined #salt
18:22 whytewolf lol, well they are all still based on the crappy rpmdb so. till that is fixed they will break
18:23 whytewolf although dnf is supposed to have better dependency solving. so when it works should be better at figurring out dependencies
18:26 hlub thinking of commenting something about gentoo here :)
18:27 whytewolf i stopped using gentoo almost 10 years ago. i really can't say much about it
18:28 hlub I should stop it too
18:28 s_kunk joined #salt
18:29 hlub well, I tried salt-ssh and the extra_filerefs workaround but no, it does not work. :(
18:30 hlub I think I should stop trying salt-ssh too.
18:30 * whytewolf shrugs.
18:30 whytewolf i have heard of 2 valid use cases for salt-ssh. 1. used for installing a salt-minion. 2. used for testing states
18:31 whytewolf i have other methods of both. so never bothered with it
18:32 ekristen The combination I’ve found to be the most beneficial is using packer.io + salt-masterless to build by images, using terraform and terraform provisioning to bootstrap the grains and roles on my servers and then anything that can’t be baked into the image is done once the minion comes online with the master
18:32 hlub I was planning to use it to install stuff on a client's machine, which really is not maintained by us. Anyway, the whole situation is awful, because I think no one is maintaining it.
18:33 whytewolf it is maintained other wise i know a few people that would be in here in a hurry complaining about it breaking. unforchantly i am not one of them
18:35 jas02 joined #salt
18:35 ksoviero Who is in charge of updating the documentation?
18:35 hlub everyone
18:36 whytewolf if you see something, PR something
18:36 ksoviero Oh, the docs are managed in git?
18:36 beardedeagle yes
18:36 ksoviero cool
18:37 whytewolf ksoviero: https://docs.saltstack.com/en/latest/topics/development/hacking.html#editing-and-previewing-the-documentation
18:38 ksoviero whytewolf: cool, am I also allowed to help on the code side? I'd like to add support for ignore_missing to states.
18:39 beardedeagle yes
18:39 whytewolf ksoviero: yes, salt is an opensource project
18:39 ksoviero whytewolf: yes, but some open source project are more open than others.
18:39 whytewolf ksoviero: https://github.com/saltstack/salt
18:40 whytewolf but yeah, they fully support PR's and a lot of bugs have been fied by OSS devs helping out
18:40 whytewolf *fixed
18:42 impi joined #salt
18:45 tracphil joined #salt
18:47 whytewolf ahhh huh, didn't know about ignore_missing before this. although your bug looks like a duplicate of https://github.com/saltstack/salt/issues/16687
18:47 saltstackbot [#16687][OPEN] Add module/function and top.sls syntax to check for sls existence | Currently, if I want to conditionally include an sls file, if the file exists, I need to do some ugly jinja magic:...
18:47 whytewolf which is the bug that first created the ignore_missing for pillar
18:48 whytewolf states was planned for it but they only got to the pillar at that time
18:49 nickabbey joined #salt
18:53 ChubYann joined #salt
18:56 ksoviero whytewolf: Ya, we need the ability to ignore non-existant states, I will probably add that feature.
18:57 ronnix joined #salt
18:58 viccuad joined #salt
18:59 ivanjaros joined #salt
19:00 cmarzullo if a state is non-existant. . . wouldn't it be ignored already?
19:00 cmarzullo I mean. it doesn't exist.
19:00 ssplatt joined #salt
19:01 ksoviero cmarzullo: not like that. let's say you have a top file that includes host-specific states, well if you don't have a state file for every since host, then it will throw an error when you try to run apply. Pillars has a feature to ignore it called "ignore_missing"
19:02 ksoviero *single
19:02 MTecknology !dunder
19:03 MTecknology iggy: it's broken!
19:03 LostSoul joined #salt
19:05 wangofett joined #salt
19:07 MTecknology How can I import a custom module from inside of a custom grain?
19:07 degorenko joined #salt
19:13 orionx joined #salt
19:15 MTecknology no __pillar__ from custom grains either, eh?... this is gonna be tough
19:16 edrocks joined #salt
19:18 diagnostuck joined #salt
19:20 druonysus_ joined #salt
19:28 nomadlogic joined #salt
19:28 DammitJim joined #salt
19:29 * MTecknology grumbles
19:30 nomadlogic I'm having an issue with salt-stack and freebsd, specifically installing packages on freebsd client
19:30 filippos joined #salt
19:30 * MTecknology is trying to write a custom grain to help repair lots of broken logic, but it needs to pull in some of that broken logic in order to exist, which means finding a way to use a custom module that pulls and parses pillar data.
19:30 * MTecknology should have brought vodka to drop in his coffee
19:31 nomadlogic i can install a list of packages fine, but subsequent run's report errors since the packages are already installed
19:31 nomadlogic the error is:
19:31 MTecknology nomadlogic: why don't you toss your states on dpaste?
19:31 ksoviero MTecknology: what are you, a little girl? It's Bourbon or nothin'! ;)
19:31 * nomadlogic nods, doing that now :)
19:31 ssplatt joined #salt
19:32 wangofett joined #salt
19:32 MTecknology ksoviero: ah, that sounds much less disgusting.
19:32 wangofett joined #salt
19:33 nomadlogic https://gist.github.com/nomadlogic/78b072cdde38da56524f08068a85bfe5
19:34 nixjdm joined #salt
19:34 MTecknology nomadlogic: -l debug
19:34 Eugene joined #salt
19:34 MTecknology also... nginx > *
19:34 whytewolf humm wonder if the version is throwing it off.
19:36 ksoviero MTecknology: do you want to start a flame war? cause that is how you start a flame war. :D
19:36 jas02 joined #salt
19:36 cmarzullo working a compression company it's pretty important that we use tabs.
19:36 xet7 joined #salt
19:37 ssplatt <space><space><space><space><space>
19:37 Praematura joined #salt
19:43 MTecknology My mind is struggling to follow this logic... http://dpaste.com/0EPF50S
19:43 dyasny joined #salt
19:44 Eugene Yup, thats some mud.
19:45 cmarzullo seems yuky
19:45 MTecknology that node_cfg is it's own bottle of nightmares
19:45 nomadlogic whytewolf: thought i was getting that same error w/o version appended - let me test a simplified saltstate w/o version
19:46 MTecknology I haven't looked, but there might be -version:
19:47 whytewolf he is using pkgs: so would need to be - <pkg>: <version>
19:47 nomadlogic hrm, removing the version bit does not cause the error
19:48 * nomadlogic scratches head - though that threw an error previously
19:49 nomadlogic ah i see
19:49 whytewolf nomadlogic: the issue might be that the freebsd system is reporting that apache24 is installed. but you were searching for apache24-2.4.25_1. versions and package names are always iffy
19:50 nomadlogic whytewolf - that is it, thanks for taking a look!
19:50 nomadlogic this seems to work as expected:
19:50 nomadlogic apache24: 2.4.25_1
19:50 ksoviero joined #salt
19:55 nickabbey joined #salt
20:06 toanju joined #salt
20:06 Trauma joined #salt
20:08 nomadlogic fwiw: it looks like potentially "," and/or "_" chars in version string cause issues
20:08 nomadlogic but placing quotes around it seems to fix things
20:09 nomadlogic for example foo: 1.2,3 bad foo: "1.2.,3" good
20:11 snarfy^ joined #salt
20:14 cyborg-one joined #salt
20:18 diagnostuck joined #salt
20:23 jhauser joined #salt
20:23 PatrolDoom joined #salt
20:26 nickabbey joined #salt
20:26 scsinutz joined #salt
20:28 PatrolDoom joined #salt
20:28 jas02 joined #salt
20:28 aboe joined #salt
20:29 shanathon joined #salt
20:30 shanathon does anyone have a resource or any tips to guide me on how to use salt to auto-join windows boxes to a domain in AWS? the first challenge I would seem to run into is not knowing the local admin and password until the box is launched in order to use the relevant salt module.
20:31 ekristen basepi: hi! how goes? been a while.
20:31 shanathon i.e "SALT.MODULES.WIN_SYSTEM"
20:35 ranomore joined #salt
20:46 viq joined #salt
21:00 shanathon joined #salt
21:00 shanathon sorry got disconnected earlier. can someone let me know if I missed a response?
21:00 edrocks joined #salt
21:02 ssplatt shanathon: i have no idea, but i’d guess using the API and a webhook
21:02 shanathon ok thank you
21:03 ssplatt what’s your hangup tho? on the windows side or on the salt side?
21:04 ssplatt i’d guess there’s some way to kick off a powershell script to have machines join in
21:05 shanathon really just been given the task by my boss to see if Salt could tackle this. I found the relevant salt module, but that assumes you know the local admin username and password already and i dont think that will be the case.
21:05 shanathon yes i think i am going to look into the powershell scripts next
21:10 nickabbey joined #salt
21:18 eThaD joined #salt
21:22 austin_ is it possible to send a message to a specific master id if you have an active/active setup
21:23 viccuad joined #salt
21:26 austin_ i guess the issue is... how do you handle active/active masters with reactors ?
21:26 austin_ you only need one to execute
21:26 Tanta joined #salt
21:27 antpa joined #salt
21:29 gableroux joined #salt
21:29 gtmanfred the event should only be sent to one master, but i do not believe you can choose which one to send it to
21:31 austin_ gtmanfred: the current thought is my syndic master would accept a key
21:31 austin_ salt/key fires
21:32 austin_ however, that syndi cmaster is connected to 4 MoMs
21:32 austin_ active/active/active/active
21:32 gtmanfred are events passed up to the MOM? i thought the connection was only one way
21:32 gtmanfred and it can only pass down, and no events get passed up to the mom
21:32 diagnostuck joined #salt
21:33 austin_ i thought it was the other way (tbh i didnt check)
21:33 austin_ so the syndic would never pass the salt/key upstream
21:33 gtmanfred yeah, i am pretty sure the event does not get passed up to the mom
21:33 gtmanfred right
21:33 austin_ ok ok ok
21:33 austin_ so in theory, i would call out to send another event to a random MoM for reactor matching
21:34 gtmanfred yeah, your minion on the syndic master would need to be connected to the Mom, and pass the events up
21:34 gtmanfred and you would need reactor states to do that
21:34 austin_ syndic would match on salt/key data['act
21:34 austin_ oops
21:34 austin_ salt/key data['act'] == 'accept'
21:34 Heartsbane joined #salt
21:34 Heartsbane joined #salt
21:35 jas02 joined #salt
21:35 austin_ so in this case, minion1 connects to sydnic1. syndic1 approves key. salt/key is seen and matched on syndic1. that reactor would send an event upstream to MoM1 which would have a reactor monitoring for an event to do something
21:36 gtmanfred that might work
21:37 austin_ i hope so
21:37 austin_ or i'm sol
21:37 austin_ ha
21:39 antpa Does anyone have experience with the php formula?  It was working great when I was running php5.6 but I'm having issues with a php-memcached and php-imagick after upgrading to php7.
21:40 abednarik joined #salt
21:50 chadhs joined #salt
21:51 uncool joined #salt
21:52 gableroux joined #salt
21:52 Derailed joined #salt
21:53 orianbsilva joined #salt
21:55 scsinutz joined #salt
22:01 juanito_ joined #salt
22:08 stooj joined #salt
22:09 djgerm is there a formula for setting a whole butt load of grains against minions that anybody here recommends?
22:10 fracklen joined #salt
22:17 amagawdd joined #salt
22:19 scsinutz joined #salt
22:24 XenophonF joined #salt
22:37 whytewolf bbrelin1: just saw your message on salt-users... and apperently there was information i was missing when talking to you earlyer
22:37 whytewolf had no idea you were trying to work with enviroments
22:37 whytewolf you didn't give that info
22:38 druonysus_ joined #salt
22:40 beardedeagle @djgerm: is this something you can just write a custom grain module for instead?
22:45 djgerm My thought was to write a state that iterates through some pillar data/grabs existing grains that applies a bunch of new grains to stuff.
22:46 onmeac joined #salt
22:46 whytewolf okay, help me out here. if you have the data in pillar. why does it need to be pushed to grains?
22:48 masber joined #salt
22:49 juanito joined #salt
22:58 ozux__ joined #salt
23:17 keltim it doesn't ... most people keep minion info in grains and env specific data in pillar
23:25 Trauma_ joined #salt
23:25 dh__ joined #salt
23:26 orion___ joined #salt
23:26 Shirkdog_ joined #salt
23:27 igormarnat__ joined #salt
23:27 bmcorser_ joined #salt
23:27 czchen_ joined #salt
23:27 doriftoshoes_ joined #salt
23:27 denys_ joined #salt
23:27 futuredale[uf]_ joined #salt
23:28 Rubin_ joined #salt
23:29 iggy_ joined #salt
23:29 n1x0n_ joined #salt
23:29 mrud_ joined #salt
23:29 pietdv_ joined #salt
23:30 Hipikat_ joined #salt
23:31 yuhl____ joined #salt
23:32 rodr1c joined #salt
23:32 rodr1c joined #salt
23:32 simonmcc_ joined #salt
23:32 brucewang joined #salt
23:32 coldbrew- joined #salt
23:33 smkelly_ joined #salt
23:33 ThomasJ|d joined #salt
23:33 vaelen_ joined #salt
23:33 jacksontj_ joined #salt
23:33 rideh- joined #salt
23:33 LeProvokateur_ joined #salt
23:33 jerrcs- joined #salt
23:33 Derailed_ joined #salt
23:35 llua joined #salt
23:35 pocketprotector joined #salt
23:37 alex80 joined #salt
23:37 jas02 joined #salt
23:38 Savemech joined #salt
23:39 tom29739 joined #salt
23:40 ThomasJ|m joined #salt
23:40 chutzpah joined #salt
23:40 armguy joined #salt
23:41 Horgix joined #salt
23:41 schinken joined #salt
23:41 joehh joined #salt
23:42 izibi joined #salt
23:42 sarlalia1 joined #salt
23:42 rhand joined #salt
23:45 djgerm *thinking* …. yeah, did I over complicate things?? haha… uh maybe… so let's see I need the grains so that I can apply some other states (like installing datadog agent and getting tags all happy in datadog so that things Just work®)
23:53 madhadron joined #salt
23:54 MTecknology djgerm: so you want states to create grains from pillar so that states can check pillar values via grains?
23:55 abednarik joined #salt
23:56 tom29739 joined #salt
23:58 ssplatt joined #salt
23:58 madhadron Is anyone here familiar with the ec2 autoscale reactor code?

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