Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2018-03-12

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

All times shown according to UTC.

Time Nick Message
00:12 thelocehiliosan joined #salt
00:42 zimablue joined #salt
00:43 zimablue hey, I can't get salt-cloud to specify a subnet
00:43 zimablue like it errors because it hasn't specified a subnet but won't allow me to set one
00:49 hemebond zimablue: Which provider?
00:50 zimablue ec2
00:50 hemebond Also, I'm unclear as to what "specify a subnet" means here.
00:50 zimablue like here, https://docs.saltstack.com/en/latest/topics/cloud/aws.html#specifying-interface-properties
00:51 zimablue I tried both methods of specifying it but doesn't seem to pass through
00:51 hemebond Can you paste what you have? Are you using SubnetId?
00:51 zimablue yeah, one sec
00:52 zimablue cloud.profiles: https://gist.github.com/FalseProtagonist/4b918908bebb865bafd1c0552cec410f
00:52 hemebond You have to specify the SubnetId under a device.
00:53 zimablue I tried that in the commented section, I thought the docs were saying it could be both way
00:53 zimablue sec I'll try again
00:56 zimablue same error with this config: https://gist.github.com/FalseProtagonist/4b918908bebb865bafd1c0552cec410f
00:57 hemebond Can you paste the full error message?
00:57 hemebond Anything more in the master logs?
00:57 hemebond Or the salt-cloud logs?
01:01 zimablue "No subnets found for the default VPC 'vpc-d3e8caba'
01:01 zimablue is the message from cmd line, nothing in the logs
01:01 hemebond Only difference I can see between your profile and mine is that I have that PrivateIpAddresses commented out.
01:01 zimablue I'll try commenting that out
01:01 zimablue could it be a provider diff?
01:01 hemebond Oh, a VPC message...
01:02 zimablue yeah but the message I think means that it's not getting the right subnet through
01:03 zimablue is your provider conf diff in a relevant way?
01:04 hemebond Hmm. A set a location.
01:05 hemebond There will be some differences since I used a customised creation method (i.e., passive, rather than active over SSH)
01:05 zimablue I should set a location?
01:06 hemebond Does your VPC have a public subnet?
01:06 zimablue I think it has a public subnet since it already has an instance deployed into it
01:06 zimablue a public one but not a default one
01:07 hemebond Was that instance created by salt-cloud?
01:07 zimablue no
01:07 zimablue I'll just make it default so I don't have to specify it and give up, just thought I might be doing something obviously wrong
01:07 zimablue thanks a lot for taking a look!
01:08 hemebond If you Google that message you'll see other people having a similar issue with other automations.
01:08 hemebond And it's apparently because of how your VPC is configured.
01:08 zimablue damn
01:08 zimablue sorry man I did google it, did you just google the message alone in quotes?
01:09 hemebond yip "No subnets found for the default VPC"
01:12 zimablue ok I'm going to try when I'm awake, thanks for all the help!
01:28 shiranaihito joined #salt
01:30 mk-fg joined #salt
01:30 mk-fg joined #salt
01:59 mk-fg joined #salt
01:59 mk-fg joined #salt
02:04 thelocehiliosan joined #salt
02:18 thelocehiliosan joined #salt
02:18 zerocoolback joined #salt
02:19 mk-fg joined #salt
02:19 mk-fg joined #salt
02:29 mk-fg joined #salt
02:29 mk-fg joined #salt
02:37 nixjdm joined #salt
02:55 ilbot3 joined #salt
02:55 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.9, 2017.7.4 <+> RC for 2018.3.0 is out, please test it! <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic, and https://saltstackcommunity.herokuapp.com (for slack) <+> We are volunteers and may not have immediate answers
03:21 mk-fg joined #salt
03:21 mk-fg joined #salt
03:32 amy_ joined #salt
03:52 JPT joined #salt
03:59 amy_ joined #salt
04:18 zerocoolback joined #salt
04:21 bluenemo joined #salt
04:22 armyriad joined #salt
04:47 armyriad joined #salt
05:07 masber joined #salt
05:07 zerocoolback joined #salt
05:08 zerocoolback joined #salt
05:09 zerocoolback joined #salt
05:10 zerocoolback joined #salt
05:11 zerocoolback joined #salt
05:30 ponyofdeath joined #salt
05:56 wongster80 joined #salt
06:00 evle joined #salt
06:03 bluenemo joined #salt
06:12 eekrano_ joined #salt
06:15 hohum how do I get the IP address off a specific interface?
06:15 hohum {{ salt['network.interfaces']()['eno1.483']['ipaddr'] }} doesn't work
06:22 hohum got it figured out
06:22 hohum thanks
06:22 hohum :D
06:23 masber joined #salt
06:26 tuxawy joined #salt
06:26 Ryan_Lane_ joined #salt
06:27 aerbax_ joined #salt
06:29 bbhoss_ joined #salt
06:29 jhill__ joined #salt
06:29 peterere1 joined #salt
06:29 Kelsar_ joined #salt
06:30 djinni` joined #salt
06:30 tuxawy joined #salt
06:30 mbologna1 joined #salt
06:33 ZombieTwiglet joined #salt
06:33 weylin- joined #salt
06:33 UForgotten_ joined #salt
06:33 Yamakaja_ joined #salt
06:33 Guest6051 joined #salt
06:34 dp_ joined #salt
06:35 KevinAn275773 joined #salt
06:35 rome_390 joined #salt
06:35 xer0x joined #salt
06:39 nledez joined #salt
06:40 Mogget joined #salt
06:40 darkalia joined #salt
06:42 Awesomecase joined #salt
06:42 rtr63gdh[m] joined #salt
06:42 systeem[m] joined #salt
06:46 masber joined #salt
06:57 v12aml joined #salt
07:13 colttt joined #salt
07:24 Tucky joined #salt
07:35 lkthomas hmm, pillar didn't decrypt properly
07:35 lkthomas how could I troubleshoot this ?
07:39 evle joined #salt
07:43 darioleidi joined #salt
07:55 rjc joined #salt
07:56 hemebond lkthomas: The master log has pillar details.
07:56 hemebond Put master into debug logging and try again.
07:56 xet7 joined #salt
07:59 cbosdonnat joined #salt
08:02 cbosdonnat Hi all
08:03 cbosdonnat in my PR I got these codeclimate errors: https://codeclimate.com/github/saltstack/salt/pull/46461#issues is there a way to have it ignore the functions having more than 4 arguments since I can't change that?
08:06 aldevar joined #salt
08:16 xet7 joined #salt
08:18 Hybrid joined #salt
08:18 Guest6051 left #salt
08:21 sjorge joined #salt
08:30 darioleidi joined #salt
08:36 lkthomas hemebond, found my stupid problem again, the key isn't import properly
08:36 lkthomas thanks
08:36 hemebond 👍
08:38 inad922 joined #salt
08:41 Ricardo1000 joined #salt
08:45 Pjusur joined #salt
08:50 hoonetorg joined #salt
08:57 cbosdonnat anyone knows what goes wrong with this? https://jenkins.saltstack.com/job/PR/job/salt-pr-rs-cent7-n/17118/console I can't see how my change is related to docker and how comes the requisite fails
08:58 bdrung_work joined #salt
08:58 cewood joined #salt
08:59 mikecmpbll joined #salt
09:00 jrenner joined #salt
09:13 mikecmpbll joined #salt
09:16 hemebond cbosdonnat: Where is the docker state?
09:17 hemebond This is not the full highstate, correct?
09:17 cbosdonnat hemebond, no idea... I just added a new engine and got that... note that this is my first PR to salt, I may be missing some bits and pieces
09:17 ventris left #salt
09:18 hemebond Oh, this is a test of your PR against the full Salt suite? Hmm.
09:18 hemebond Is it possible your PR is being tested with other changes/PRs?
09:19 cbosdonnat no idea
09:19 cbosdonnat I branched the develop branch and submitted that
09:20 hemebond 08:27:50 Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
09:20 hemebond So there is a docker state that is installing and trying to start Docker.
09:21 hemebond But it fails for some reason.
09:21 hemebond Are you adding a Docker engine?
09:21 hemebond Or anything related to Docker?
09:21 cbosdonnat no, the engine I'm adding is a libvirt client
09:21 cbosdonnat and has nothing related to docker
09:22 hemebond Then I think it's failing for some other reason.
09:22 hemebond Someone will probably find and fix the issue with the test suite/system.
09:24 pf_moore joined #salt
09:25 hemebond My guess is your PR is being tested with some other changes.
09:26 zulutango joined #salt
09:35 cbosdonnat ok
09:36 cbosdonnat and I wondered about the codeclimate review: there are things I can't change like the signature of libvirt callbacks, is there a way to silince codeclimate for those?
09:58 mike25de joined #salt
10:04 hemebond Pass ☺
10:22 ProT-0-TypE joined #salt
10:24 Shirkdog joined #salt
10:27 Mattch joined #salt
10:50 jhauser joined #salt
11:07 Udkkna joined #salt
11:21 aldevar left #salt
11:35 evle1 joined #salt
11:51 masber joined #salt
12:13 thelocehiliosan joined #salt
12:18 zerocoolback joined #salt
12:19 zerocool_ joined #salt
12:20 dev_tea joined #salt
12:32 inad922 joined #salt
12:35 aldevar joined #salt
12:36 aldevar left #salt
12:40 Score_Under joined #salt
12:41 Score_Under Is there a way to do (part of) what make does? I want to update a target file if the source file changes, but only if it changes.
12:42 Score_Under Currently we have a cmd.wait for that but if the command fails or is interrupted (which appears to have happened in at least one case) then the next call will not generate the new target file.
12:48 hoverbear joined #salt
12:49 hoverbear joined #salt
12:49 hoverbear joined #salt
12:49 hoverbear I'm quite fascinating how `file.managed` seems to not be able to handle files with strange characters in it
12:50 Score_Under python deals with files as unicode strings, unix deals with them as byte strings. It's a leaky abstraction.
12:51 hoverbear Yeah I'm confused why it thinkgs this file is ascii though (https://gist.github.com/anonymous/8f5da42eefcfed9187fa207fd44cb232)
13:01 hoverbear So basically the Python 3.6 salt can't manage files which aren't only ASCII? That's... Not so awesome.
13:06 shalkie joined #salt
13:11 ecdhe hoverbear: have you opened an issue on github?  I would bet this would be addressed fairly quickly.
13:11 hoverbear ecdhe: As far as I can tell this is already addressed: https://github.com/saltstack/salt/pull/45772, but I won't be able to use salt until next release even if it is
13:13 ecdhe hoverbear: I've had that too -- someone beat me to the issue, but I still had to wait a few weeks for the resolution to pass through the quality cycle.
13:14 ecdhe Most of my machines are in masterless mode, which doesn't get tested as often as the salt-master configurations, so I come across some issue once a year or so.
13:14 Naresh joined #salt
13:14 ecdhe s/often/thoroughly
13:14 hoverbear ecdhe: I mean, I feel like I should be a bit worried when a production release of a major software project can't support non-ASCII characters.
13:16 Nahual joined #salt
13:17 ecdhe I've got to admit, I only administrate my machine in ascii, I don't know if I have any utf-8 encoded instances of /etc/ssh/sshd_config, for instance.
13:19 hoverbear I need to be able to manage English, German, and Chinese related data, so the fact that I can't even put `▸•¬` etc in a file salt manages really, really worries me.
13:19 ecdhe hoverbear: the comment at https://github.com/saltstack/salt/pull/45772#issuecomment-362438498 makes it appear that changing your system locale would workaround this issue.
13:20 hoverbear ecdhe: Yyeah I have that set already
13:20 ingslovak joined #salt
13:25 thelocehiliosan joined #salt
13:29 edrocks joined #salt
13:29 hoverbear ecdhe: Hah. it's python 3 only
13:31 nixjdm joined #salt
13:34 yuhl joined #salt
13:50 racooper joined #salt
13:51 jrenner joined #salt
13:55 mikecmpbll joined #salt
13:59 tuxawy joined #salt
13:59 brokensyntax joined #salt
14:05 theloceh1liosan joined #salt
14:10 englishm_work joined #salt
14:10 pbandark joined #salt
14:15 cgiroua joined #salt
14:16 oida joined #salt
14:18 justan0theruser joined #salt
14:20 RF_ joined #salt
14:27 Armageddon joined #salt
14:27 edrocks joined #salt
14:28 Heartsbane joined #salt
14:28 Heartsbane joined #salt
14:31 feliks is it possible to create a list of states that would apply on a highstate per minion?
14:32 feliks without invoking them. i dont want to use `state.highstate test=True`
14:36 pcn feliks: state.show_highstate ?
14:41 RF_ Does anybody know how to accomplish this - I have two states 1) create an A record in Route53 for an instance using the instance's public IP using boto3_route53.rr_present; 2) Associate an EIP to the instance using boto_ec2.instance_present. I would like state #1 to be able to use the new EIP that's associated by state #2. Currently I am using salt.grains.get('ec2:public_ipv4') in state #1 to get the instance's
14:41 RF_ public IP. THe issue here is that since the states files get parsed in the begining of the 'salt-call --local' run, state #1 gets the "old" public IP even if it gets executed after state #2. How do I make sure state #1 gets the new public IP (EIP) after state #2 has been executed?
14:42 RF_ My goal is to be able to do both in one salt-call run on the minion
14:43 jholtom joined #salt
14:49 feliks pcn: thx. is it possible to make that listing less verbose?
14:52 pcn By default, I'm not so sure, but you could try something like --out json | jq
14:52 pcn Filtering it with jq should let you do what you want to
14:55 pcn RF_: There may be a better way, but have you looked at orchestration so you can set an EIP, loop until it is present, then run the rest of the state?
14:56 DammitJim joined #salt
15:01 onslack joined #salt
15:02 Cadmus joined #salt
15:03 msmith joined #salt
15:03 onslack <msmith> ok, thanks
15:07 RF_ pcn: Thanks! I haven't. We are using the masterless setup. Will orchestration, which I think runs on the master, work?
15:08 pcn To some extent: https://docs.saltstack.com/en/latest/topics/orchestrate/orchestrate_runner.html#masterless-orchestration
15:09 eekrano joined #salt
15:11 evle1 joined #salt
15:11 RF_ pcn: ok, let me take a look
15:15 CrummyGummy joined #salt
15:17 edrocks joined #salt
15:21 MTecknology nfuse the module, not the grain, and you should be able to get what you want
15:21 MTecknology RF_: use the **
15:24 RF_ MTecknology: which module?
15:25 MTecknology use a* module, I guess- I don't know anything about modules that interact with aws
15:25 MTecknology (nor do I want to..)
15:26 RF_ MTecknology: Oh I see. That's what I am going to try next. I just wanted to see if there is a certain to arrange things to archive what I wanted.
15:26 MTecknology there's also sdb..
15:26 onslack <msmith> that brings me back to my original point, it sounds like you'd need to use the output from one state as input for another, which is what the slots functionality in 2018 is for
15:27 onslack <msmith> or just change the 2nd state to a cmd.run that calls salt again :)
15:28 Cadmus Sanity check: cmd.run needs to happen as root, the unless has to be run as another user, just make the unless a 'su bob -c "check.sh"'?
15:28 RF_ MTecknology: but wouldn't the same issue still exist even if I use a customized module to get the public IP instead of using grains since it still gets parsed at the beginning of the salt-call run?
15:29 MTecknology RF_: Yup, I was wrong. Check out slots, though! I just looked it up and it looks pretty neat.
15:29 MTecknology https://docs.saltstack.com/en/develop/topics/slots/index.html
15:29 MTecknology msmith: +1
15:30 onslack <msmith> 2018 is being tested, it won't be much longer
15:30 MTecknology I'm sure sdb could also be used, but slots looks easier.
15:30 onslack <msmith> wouldn't the sdb write state be using the same stale input that's there now?
15:30 RF_ MTecknology: sweet! slots looks promising!
15:31 RF_ except it's new in 2018.3 :(
15:32 onslack <msmith> RF_: 2018.3.0 is in testing now, it won't be much longer
15:33 RF_ onslack: Great! Any idea on its release date?
15:33 MTecknology I guess the way I'm picturing sdb for that is pretty clunky and painful.
15:34 onslack <msmith> (onslack is the bot's name btw)
15:36 onslack <msmith> RF_: sadly not, it's in RC testing now so it's possible to install and test but there were still bugs being found when i last looked
15:37 onslack <msmith> i expect we'll see a release once all the testing is done and all the bugs fixed and automated tests pass. then we'll see 2018.3.1 to catch all the mainstream issues that come from the release :D
15:38 MTecknology heheh..
15:40 feliks pcn: thanks a lot. this is exactly what i needed. did take some time to learn the syntax though. this works for me now:
15:40 feliks salt '*' state.show_highstate --out json | jq '. | {(keys[0]): (. [] | keys)}'
15:40 onslack <msmith> 2017.7.4 was fairly quick from what i saw so it's going to vary based on what they find
15:41 feliks its still divided into multiple dicts but its close enough already ;)
15:42 oida joined #salt
15:48 eekrano joined #salt
15:49 jxs1 joined #salt
16:09 RF_ How do I direct my message to msmith since it's an ID behind a bot?
16:09 RF_ Normally I just type the id with a tab
16:09 MTecknology the same, without tab
16:09 babilen onslack does tab-complete
16:10 RF_ msmith: test
16:10 RF_ hmm
16:10 babilen Didn't Slack announce that they will stop supported their bridges?
16:10 MTecknology that seems kinda spammy..
16:10 babilen *supporting
16:10 MTecknology babilen: yup
16:10 MTecknology another reason slack sucks
16:10 RF_ sorry, I didn't mean to spam
16:11 onslack <msmith> we're not using the slack gateway, salt has its own
16:11 RF_ msmith: Thanks! Besides waiting for 2018.3.0, any idea what I can do to archive what I wanted with 2017.4?
16:12 onslack <msmith> as a workaround, make it into two calls. you can still call it once and have the 2nd state execute salt to run a 3rd
16:13 nixjdm joined #salt
16:13 onslack <msmith> that's slightly cleaner than moving the lot out to a script, and will be easier to bring back once you can use slots
16:13 babilen onslack: Do you mean that my little happy dance was premature? I had looked forward to no bridges
16:14 RF_ ok. I know two calls definitely will work without any changes to the existing states.
16:14 rivyn joined #salt
16:14 MTecknology babilen: it's the ability to connect to slack as if they were an IRC server that's going away.
16:14 babilen aye
16:14 onslack <msmith> but not salt's own irc gateway that uses the slack api
16:14 babilen I had hoped that onslack is using that technology internally
16:15 babilen *sigh*
16:15 babilen I guess there really is no way to get around it
16:15 onslack <msmith> while the community is split in two, no
16:16 MTecknology it kinda already is split, isn't it?
16:16 babilen There's also a mailing list
16:16 RF_ msmith: could you explain a bit more on "you can still call it once and have the 2nd state execute salt to run a 3rd"? I had thought you meant to just run salt-call twice consenquently.
16:16 babilen And a reddit
16:16 babilen *subreddit
16:16 onslack <msmith> RF_: insert a state in the middle that literally just uses cmd.run to execute salt-call
16:17 onslack <msmith> that way one run becomes two :D
16:17 RF_ msmith: I see :)
16:17 RF_ thanks!
16:18 onslack <msmith> the sticky bit will be making sure the 3rd state isn't included in the initial call
16:21 hoverbear So am I correct in guessing most people use Salt with Pyhton 2.7?
16:21 babilen You are
16:21 hoverbear That explains whyy 3.6 is so buggy then
16:22 babilen I am not aware of Python 3 packages for various platforms and installing from pip might not be to most people's liking
16:22 onslack <msmith> python3 support has been significantly improved with 2018.3, including new packages. that's one of the things i'm looking forward to for windows at least
16:22 hoverbear babilen: FreeBSD has official Python 3.6 packages but they aren't able to handle non-ASCII characters it seems. Can't manage a vimrc with `=tab:▸\ ,space:•,eol:¬` in it. :(
16:23 hoverbear I will try the pip package later I think
16:24 babilen hoverbear: heh .. Python 3 should be much better with that, but that sounds like a bug that should be fixed
16:24 onslack <msmith> or at least, an issue filed
16:25 hoverbear Yeah, I didn't have time to investigate it yet but here's the error from the master https://gist.github.com/anonymous/8f5da42eefcfed9187fa207fd44cb232
16:25 babilen Maybe just provide that in an issue on github?
16:25 hoverbear Looks like it's tryying to stream some data and not able to decode it
16:25 hoverbear babilen: I want to get a full repro but yeah :)
16:25 babilen It had to be there! :)
16:25 Score_Under "rt" and "rb" in fopen all those years ago are still coming back to bite us...
16:26 * babilen is not guilty of that!
16:26 hoverbear But the python 2.7 package wqorks fine xD
16:28 ozux joined #salt
16:31 tiwula joined #salt
16:36 ozux joined #salt
16:39 LeProvokateur joined #salt
16:47 motherfsck joined #salt
16:50 jcristau joined #salt
16:51 RF_ joined #salt
16:59 ozux__ joined #salt
16:59 ey3ba11 joined #salt
17:01 Cadmus What's the sensible salty way to set permission on a directory? I've got a zip which unpacks with stupid perms, unpack it then put a file.directory with the modes and recurse on?
17:02 Score_Under recurse is a hack imo (and can take some time), it's better if you can find a way to unpack the zip with the correct permissions in the first place - maybe repack it as a tar.xz with correct permissions
17:02 Score_Under but yeah otherwise if that's not an option, file.directory + recurse is the way to go
17:03 Cadmus Annoyingly I suspect you're right. And I can repack this, just gets a bit confusing when I do (vendor-supplied)
17:08 onslack <msmith> if recurse is too slow then there's nothing you from calling chmod -R :)
17:10 armyriad joined #salt
17:11 onslack <msmith> *stopping you
17:13 Score_Under Oh that's a bridge. I was wondering who on earth was being quoted there. /facepalm
17:16 RF_ msmith: I tried to insert a cmd.run state that calls for another salt-call, but got the following in output: The function "state.highstate" is running as PID 28260 and was started at 2018, Mar 12 17:12:56.910448
17:16 onslack <msmith> ah of course. the minion can only run one job at a time
17:17 RF_ I also tried 'salt-call --local saltutil.refresh_grains' but it didn't seem to help either
17:17 onslack <msmith> once the state has been rendered the variables don't change
17:17 RF_ right
17:19 onslack <msmith> the solutions increase in complexity at this point. the next one would be orchestration to call the 1st state, then a refresh of some type for the states that'll force a new render, then call the 2nd state
17:19 eekrano joined #salt
17:20 Score_Under I didn't scroll far up enough to read the question but if it involves some variable which becomes invalid at some point between templating and actually being run, isn't that usually solvable with a custom state?
17:20 Score_Under as in _states/xxxxx.py
17:21 onslack <msmith> my next option was custom state or module, yes
17:21 MTecknology Score_Under: he wants to run a state that updates an external service, which returns data, which is needed for a subsequent state.
17:21 edrocks joined #salt
17:21 onslack <msmith> RF_: depends how well you know python
17:21 Score_Under oh dear, that sounds like fun
17:22 MTecknology and we haven't reached March just yet, so he's stuck without slots... which apparently makes the problem trivial
17:22 RF_ msmith: I know python alright :)
17:22 BitBandit joined #salt
17:22 MTecknology (It's not officially March until 2018.3.0 is released.)
17:22 Score_Under is `{{ salt['state.single'](...) | yaml_encode }}` too hacky for everyone's tastes? :)
17:22 onslack <msmith> then yes, a python state would probably be your solution. forget jinja, just call the modules yourself and store the variables
17:23 RF_ msmith: ok. Let me go down that road :) Thanks for the help everyone!
17:23 onslack <msmith> Score_Under: that still executes at the point of render rather than point of execution
17:24 onslack <msmith> well, yes and no
17:24 onslack <msmith> now we're inverting it so that the original 1st state is being called by jinja so the 2nd state works. does it matter that it's applying something before you actually call `apply` ?
17:25 onslack <msmith> doesn't matter if python or jinja are doing the calling, it's still doing something at render
17:25 onslack <msmith> in which case custom module rather than custom state
17:31 MTecknology Score_Under: I now need to play with that myself... not because I need it, but because I wanna see it work.
17:32 motherfsck joined #salt
17:33 Score_Under I'm such a bad influence :D
17:34 onslack <msmith> i can imagine it may be possible to break things if renders occur in parallel at all, as two jobs can't be run at once
17:35 whytewolf only reason i would cation against that kind of setup in jinja. test=True still runs jinja so anything that runs in jinja will still run.
17:35 onslack <msmith> but if the render on one file finishes first then that's fine. just don't create an infinite loop
17:35 onslack <msmith> exactly. you're applying something at render time
17:35 MTecknology Score_Under: I recently learned that we get slots in 2018.3, which eliminates the problem entirely.
17:36 whytewolf well, least till we learn the shortcomings of slots.
17:37 onslack <msmith> pr's welcome... ;)
17:37 whytewolf lol exactly
17:37 onslack <msmith> if it's done cleverly then we can fix/extend with modules. i haven't looked at the implementation details
17:50 squig joined #salt
18:04 edrocks joined #salt
18:14 Deliant joined #salt
18:44 cewood joined #salt
18:52 LeProvokateur joined #salt
18:52 edrocks joined #salt
18:55 cro joined #salt
19:03 onslack <netcho> is pillar directory depth limited?
19:04 onslack <netcho> i example pillar.aws.qa.rds
19:05 onslack <netcho> cuz for some pillar files i cannot get values
19:13 ymasson joined #salt
19:18 eekrano joined #salt
19:20 cewood joined #salt
19:25 wongster80 joined #salt
19:40 RF_ msmith: So I made the second state a #py state and it worked, for the most part. Now the second states will get the public-ipv4 from the metadata dynamically and use that for creating the DNS record. There is another issue though - it seems that right after the EIP gets associated with the instance, the metadata public-ipv4 #py state gets is some random public IP (that's not the EIP). I haven't figured out why
19:40 RF_ yet, but I suspect there is a very short period between the new EIP being assocaited, and the instance metadata getting updated, a random public IP gets set in the metadata. I wonder if there is a way to artificially insert a delay between the two states?
19:43 RF_ the #py state: https://pastebin.com/ZVZ4EgkN
19:43 yuhl joined #salt
19:43 Rr4sT joined #salt
19:53 whytewolf cough cough module.run test.sleep couch couch
19:53 MTecknology time.sleep()? :P
19:54 whytewolf https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.test.html#salt.modules.test.sleep
19:54 ecdhe whytewolf: s/couch/cough  # hehe
19:54 whytewolf yeah ... stupid brain autocorrecting what was correct.
19:55 RF_ whytewolf: thank you!!
19:59 MTecknology I was thinking a py module.. time.sleep() is pretty silly in a state.
20:00 whytewolf well, if you need to pause between two states. time.sleep wouldn't do much execpt delay how long the render takes
20:00 RF_ MTecknology: I actually tried time.sleep() in #py and it turned out it just delayed the parsing of the state :)
20:00 MTecknology yup, that silliness :)
20:02 whytewolf well if it makes you feel better. test.sleep IS time.sleep in a module form
20:06 nixjdm_ joined #salt
20:11 thelocehiliosan joined #salt
20:11 j-saturne joined #salt
20:14 ingslovak joined #salt
20:18 Trauma joined #salt
20:22 yuhl joined #salt
20:22 nixjdm_ joined #salt
20:24 MTecknology whytewolf: something something.. didn't read.. something something
20:45 Zachary_DuBois joined #salt
21:00 whytewolf something something darkside something something complete
21:02 XenophonF can I use include/extend in Pillar data?
21:03 XenophonF hm, on second thought that's probably the wrong approach
21:04 Hybrid joined #salt
21:05 thelocehiliosan joined #salt
21:24 thelocehiliosan joined #salt
21:25 Hybrid joined #salt
21:28 MTecknology XenophonF: check out the different merge strategies
21:46 ey3ba11 joined #salt
21:47 pjs joined #salt
21:48 eekrano joined #salt
21:49 pmcg joined #salt
21:49 jrklein joined #salt
21:50 aviau joined #salt
21:50 thelocehiliosan joined #salt
21:50 sjl_ joined #salt
21:50 RF_ What did I do wrong with module.run and test.sleep? https://pastebin.com/y1FT5Yf6
21:51 RF_ I keep getting "Module function add_a_delay is not available"
21:51 Sketch joined #salt
21:52 robawt joined #salt
21:53 joshin joined #salt
21:53 Boulet joined #salt
21:53 darkalia joined #salt
21:54 nledez joined #salt
21:57 motherfsck joined #salt
21:58 pcn joined #salt
22:24 RF_ msmith: I don't think rewriting the state file as #py works. #py state still gets rendered way before it gets executed, so I am still having the same issue as using the jinja state file.
22:26 RF_ It gets rendered before the associate_eip state runs
22:27 RF_ https://pastebin.com/3Gn4M1hf
22:27 hemebond RF_: Which version of Salt?
22:27 kojiro joined #salt
22:28 RF_ 2017.7.4
22:28 hemebond Oh, fixed it?
22:28 whytewolf RF_: that syntax is the new module.run syntax. look at the bottom of the module.run manual for what needs to be added to the minion config in order for it to work
22:28 kojiro Hello! I have a state that uses the py renderer, and I would like to add a log message to it. Is there a dunder (__salt__?) method to do that?
22:30 RF_ hemebond: sorry, fixed what?
22:30 hemebond I thought you'd fixed your issue.
22:30 RF_ whytewolf: I ended up using cmd.run just for the testing purpose :)
22:30 hemebond whytewolf has just pointed you to the solution.
22:31 RF_ hemebond: nope. It turned out the issue is still the same - #py states gets rendered before state #1.
22:32 RF_ kojiro: yes. use salt.log.info(), or whatever log level you need.
22:32 whytewolf kojiro: you mean like https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.logmod.html#module-salt.modules.logmod
22:32 kojiro that seems perfect
22:32 * kojiro tries
22:43 pbandark joined #salt
22:51 masber joined #salt
23:12 RF_ joined #salt
23:13 Hybrid joined #salt
23:19 thelocehiliosan joined #salt
23:20 aviau joined #salt
23:32 RF__ joined #salt
23:49 XenophonF MTecknology: yeah i was overthinking this and just needed to assign the Pillar SLS to the minion
23:49 XenophonF thanks for the pointer though :)

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