Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2018-05-04

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

All times shown according to UTC.

Time Nick Message
00:00 onslack joined #salt
00:29 stooj joined #salt
00:51 justanotheruser joined #salt
00:52 dendazen joined #salt
00:56 zerocoolback joined #salt
01:05 eseyman joined #salt
01:06 zerocoolback joined #salt
01:08 zerocoolback joined #salt
01:23 evle2 joined #salt
01:31 bluenemo joined #salt
01:57 ilbot3 joined #salt
01:57 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2017.7.5, 2018.3.0 <+> 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
02:20 shiranaihito joined #salt
02:26 zerocoolback joined #salt
02:26 zerocoolback joined #salt
02:27 zerocoolback joined #salt
02:36 JacobsLadd3r joined #salt
02:40 zulutango joined #salt
02:49 bluenemo joined #salt
02:50 ddg joined #salt
02:53 mrueg joined #salt
03:02 zhiwliu joined #salt
03:03 AvengerMoJo joined #salt
03:11 shiranaihito joined #salt
03:29 zhiwliu joined #salt
03:55 zerocoolback joined #salt
04:01 dxiri_ joined #salt
04:21 bluenemo joined #salt
04:21 17SAA3908 joined #salt
04:33 dvdmuckle joined #salt
04:42 stooj joined #salt
04:42 armyriad joined #salt
04:56 bluenemo joined #salt
05:03 StolenToast joined #salt
05:15 CeBe joined #salt
05:15 evilrob_ joined #salt
05:15 nahkiss joined #salt
05:16 nkuttler joined #salt
05:16 Armadillo joined #salt
05:16 eichiro joined #salt
05:16 echoe joined #salt
05:16 g3cko joined #salt
05:18 dmaphy joined #salt
05:20 exarkun joined #salt
05:20 ksa joined #salt
05:20 nledez joined #salt
05:20 copec joined #salt
05:21 LeProvokateur joined #salt
05:31 sauvin joined #salt
05:34 Rumbles joined #salt
05:40 zerocoolback joined #salt
06:01 inad922 joined #salt
06:22 ThomasJ joined #salt
06:24 cbosdonnat joined #salt
06:24 cbosdonnat joined #salt
06:25 Rubin joined #salt
06:38 bluenemo joined #salt
06:41 zerocoolback joined #salt
06:45 zerocoolback joined #salt
06:47 awerner joined #salt
06:49 briner_ joined #salt
06:58 Tucky joined #salt
07:00 Elsmorian joined #salt
07:10 Hybrid joined #salt
07:10 cliluw joined #salt
07:14 Pjusur joined #salt
07:14 pppingme joined #salt
07:17 ixxs left #salt
07:18 ixs joined #salt
07:23 CrummyGummy joined #salt
07:26 defsdoor joined #salt
07:26 inad922 joined #salt
07:26 orichards joined #salt
07:29 inad923 joined #salt
07:29 Ricardo1000 joined #salt
07:44 cliluw joined #salt
07:50 jrenner joined #salt
07:55 kukacz_ joined #salt
08:00 DanyC joined #salt
08:01 kukacz_ joined #salt
08:06 netcho joined #salt
08:06 netcho joined #salt
08:11 kukacz_ joined #salt
08:14 kukacz_ joined #salt
08:15 zerocoolback joined #salt
08:17 DanyC joined #salt
08:21 Rumbles joined #salt
08:23 netcho moin all
08:27 cliluw joined #salt
08:30 briner joined #salt
08:40 armyriad joined #salt
08:50 arlyon joined #salt
08:55 stooj joined #salt
09:51 zerocoolback joined #salt
10:24 Wuodan left #salt
11:00 arlyon joined #salt
11:25 CrummyGummy joined #salt
11:35 inad923 joined #salt
11:37 dendazen joined #salt
11:42 viccuad joined #salt
12:03 briner joined #salt
12:16 zerocoolback joined #salt
12:23 Nahual joined #salt
12:23 Kelsar joined #salt
12:26 mchlumsky joined #salt
12:26 bluenemo joined #salt
12:32 mchlumsky joined #salt
12:48 rollniak joined #salt
12:52 carlwgeorge left #salt
12:54 zerocoolback joined #salt
12:54 jdipierro joined #salt
12:54 AngryJohnnie joined #salt
13:07 cgiroua joined #salt
13:13 zerocoolback joined #salt
13:16 zerocoolback joined #salt
13:20 zerocool_ joined #salt
13:27 cgiroua joined #salt
13:38 racooper joined #salt
13:43 AngryJohnnie joined #salt
13:46 immune2iocane joined #salt
13:47 justanotheruser joined #salt
14:10 rollniak joined #salt
14:13 synical joined #salt
14:13 synical joined #salt
14:19 schemanic joined #salt
14:20 schemanic Hello. I have an archive.extracted state that I only want to have extracted when the state notices that there is something new to extract. Right now, it's extracting every time. Does anyone have any advice for that?
14:21 schemanic Oh. I should say that my state extracts to one directory and renames that directory later
14:21 schemanic so what's happening is that the target directory isn't there the next time the state would be called
14:22 dnull joined #salt
14:22 onslack <gtmanfred> yeah, that won’t happen, because it has nothing to compare to
14:22 onslack <gtmanfred> you have to extract it to where it is going to stay, if you want it to be idempotent
14:27 mavhq joined #salt
14:29 doubletwist in a state using jinja I can match a string, but how do I match multiple? like  if string = "foo" OR string = "bar" ?
14:31 onslack <gtmanfred> `{%- if string in ['foo', 'bar'] %}`
14:31 onslack <gtmanfred> just like python
14:32 doubletwist 'string in' doesn't match only the entire string though no? it would also match "myfoo" ?
14:32 onslack <gtmanfred> it would not match myfoo
14:32 onslack <gtmanfred> but you could use startswith
14:32 onslack <gtmanfred> or endswith
14:33 onslack <gtmanfred> yeah, you would have to do something specific for myfoo, you could do ‘string in “myfoo”’
14:33 onslack <gtmanfred> but you would then need to do something like {%- if ‘foo’ in string or ‘bar’ in string %}
14:33 onslack <gtmanfred> if you wanted to use substrings
14:35 doubletwist how is using {% if 'foo' in string %} different than {% if string == 'foo' %} ?
14:35 onslack <gtmanfred> because that would match ‘myfoo’
14:35 doubletwist which?
14:35 onslack <gtmanfred> and == wouldn’t
14:35 doubletwist ok
14:36 doubletwist thanks
14:36 onslack <gtmanfred> {%- if string in [‘foo’, ‘bar’] %} would only match foo and bar, not myfoo
14:36 doubletwist I see. Depends on the order
14:37 onslack <gtmanfred> yes, it is checking if the string is an element in the list, where for a ‘foo’ in string, it is checking if foo is a substring of string
14:37 dnull joined #salt
14:38 doubletwist But then also, if string=oo, it would match
14:38 onslack <gtmanfred> it would only match foo, it wouldn’t match a substring
14:38 onslack <gtmanfred> it depends on what you want to do
14:38 onslack <gtmanfred> if you are just looking for an equality, then yeah, do ==
14:39 doubletwist Yeah I'm looking for the entire string to match exactly
14:39 onslack <gtmanfred> you could also do {%- if string == ‘foo’ or string == ‘bar’ %}, but the in statement makes it easy to expand in the future
14:39 zer0def `is` would probably work, too, mostly due to how python handles strings
14:39 doubletwist The 'in' statement seems really confusing to me if it doesn't match a substring
14:40 onslack <gtmanfred> you should never use is when comparing strings
14:40 zer0def wouldn't they have the same identity?
14:40 onslack <gtmanfred> not always
14:40 onslack <gtmanfred> it depends on where they were defined  and how
14:40 onslack <gtmanfred> also unicode vs bytes strings
14:41 onslack <gtmanfred> is should only be used for static types, like True False and None
14:41 zer0def i'm guessing those rules don't apply to __eq__
14:41 zer0def ok, good to know
14:41 avgtechie joined #salt
14:41 onslack <gtmanfred> Here is an example of when you can hit this issue
14:41 onslack <gtmanfred> <https://github.com/saltstack/salt/issues/47086#issuecomment-386551103>
14:42 onslack <gtmanfred> <https://github.com/saltstack/salt/issues/46917>
14:42 dnull joined #salt
14:42 onslack <gtmanfred> Here is the fix <https://github.com/saltstack/salt/pull/46919>
14:54 zer0def ok, got it
14:55 simmel joined #salt
14:58 nixjdm joined #salt
14:59 tiwula joined #salt
15:18 dxiri joined #salt
15:28 crux-capacitor doubletwist: I understand the "if string in ['foo', 'bar']" to be saying, if string is in the array of strings, then do whatever
15:33 inad923 joined #salt
15:46 dezertol joined #salt
15:56 vexati0n so... it was my understanding that external minion data cache modules could be used to share the minion data cache between multiple masters. is that not how it is supposed to work?
15:57 vexati0n i have gotten the redis module to work, but every time a master writes to the cache, it erases everything previously written by another master
15:58 NEOhidra joined #salt
16:02 tiwula joined #salt
16:09 JacobsLadd3r joined #salt
16:28 Elsmorian joined #salt
16:32 OS-27110 joined #salt
16:40 jdipierro joined #salt
16:48 AngryJohnnie joined #salt
16:52 wavded joined #salt
16:55 shoogz joined #salt
16:59 o1e9 joined #salt
16:59 snath joined #salt
17:04 inad923 joined #salt
17:13 schemanic can anyone explain to me why archive.extracted just doesn't extract tarfiles entirely every time it's called?
17:15 onslack <gtmanfred> didn’t you say you were moving the files that it was extracting to somewhere else?
17:15 schemanic gtmanfred, yes but that was a different problem
17:15 schemanic for the past few weeks I've been having intermittent issues with archives staged on the s3 portion of my salt file system not extracting entirely when called to do so via state
17:17 schemanic yeah, when I run the state, it doesn't extract all the contents of the file
17:19 schemanic is it possible when archive.extracted is called that it could call an incomplete version of the file to the local minion cache?
17:23 morgana2313 joined #salt
17:24 schemanic the best that I have is that my file.rename state might be executing before the extraction is complete
17:30 morgana2313 Hello. Using saltstack 2017.7.5 state Z has a require_in for state L. However state L is executed last. Any ideas?
17:31 onslack <gtmanfred> yes, state L requires state Z
17:31 onslack <gtmanfred> so state z will have to be run before state L
17:31 onslack <gtmanfred> if you want it to be the other way, put the require in on stateL, or use require on state Z
17:31 arlyon joined #salt
17:32 schemanic Has no one seen archive.extracted do this? I swear what's happening is that I call the state on multiple minions via salt -C 'tgt_expression' state.apply myState and it fails to extract the whole tar archive to the minions
17:32 schemanic but if I call salt 'justoneminion' state.apply myState it works
17:35 JacobsLadd3r joined #salt
17:36 AstraLuma How do I use boto_route53.present to specify multiple records for the same host/type?
17:36 AstraLuma ie, I want multiple IPs for the same host
17:37 AstraLuma Setting a string `identifier` just throws an error, setting multiple IPs in the value separated by newlines (how it's done in the console) also fails.
17:44 MTecknology unless the place you're pulling the archive from is delivering a partial file and managing to not set anything off, there should be no difference between one minion doing things and more than one minion doing the same thing
17:49 doubletwist crux-capacitor: Ok I guess that makes more sense.
18:04 schemanic MTecknology, I don't know how I could test that aside from pulling the file myself and extracting it, which I have, and I'm confirming that it's got all the files I wan in it
18:04 schemanic MTecknology, if you look at my github issue I show that the state clearly isn't extracting the whole thing
18:04 schemanic https://github.com/saltstack/salt/issues/47477
18:07 MTecknology wouldn't that re-run the installation from scratch every single time that sls is called?
18:07 schemanic yes it would
18:07 MTecknology yuck
18:07 schemanic they guys writing it are changing it frequently
18:08 schemanic still, the point is that it's not properly doing it
18:08 AngryJohnnie joined #salt
18:10 arlyon joined #salt
18:13 DanyC joined #salt
18:25 Hybrid joined #salt
18:36 schemanic Is there a way to only extract an archive if the source file has changed?
18:37 zer0def you mean archive's source?
18:38 wavded joined #salt
18:38 zer0def (i presume simply slapping in a hash check is out of the question?)
18:38 schemanic yes. the archive contains a config file feeding a java process, so post-extract I have a require_in against the tomcat service, and I don't want to have tomcat getting restarted because we are extracting the archive unnecessarily
18:39 schemanic zer0def, I don't see how a hash check will do much good
18:39 schemanic I want the minion to not extract the file unless I've changed the file in the salt filesystem yes?
18:40 schemanic so are you telling me putting a hash check on it will accomplish this?
18:40 zer0def is the changed file used in some way on the minion?
18:40 schemanic yes
18:41 zer0def then have a `watch` or `onchanges` requisite on it
18:41 MTecknology Why don't you just wrap the whole thing into a script and use cmd.script?
18:43 zer0def (to be perfectly honest, it sure sounds like you're overcomplicating the issue for yourself, but that's potentially beside the point)
18:43 schemanic zer0def, it probably sounds that way because I'm switching back and forth between talking about separate issues I'm having, both of which have to do with archive.extracted
18:44 zer0def so the changing file is a part of the archive being extracted?
18:44 MTecknology it's using salt states as a scripting language..
18:46 schemanic right zer0def. The archive is a monitoring agent which needs to be launched from tomcat/java. Insde the archive is the config file for the agent. if the version of the agent changes, that means a new archive being downloaded and extracted, but only then should tomcat be restarted
18:46 schemanic it sounds like your onchanges suggestion is right
18:46 schemanic the files shouldn't change really
18:47 zer0def does $config_file need to be part of the archive?
18:47 schemanic I don't author it, so yes
18:47 zer0def (unless it's the entirety of $archive, in which case, it sorta blows my mind)
18:48 schemanic the company putting out the agent has the config file live relative to where the agent is extracted
18:48 schemanic so the order of operations is 1) extract 2) alter config file in extracted place
18:49 schemanic 3) kick tomcat
18:49 AngryJohnnie joined #salt
18:49 zer0def couldn't you just template the file then?
18:49 schemanic I am
18:50 zer0def in that case, yeah, i guess `watch` or `onchanges` on the `file` state in tomcat's state ought to do the trick
18:52 zer0def if `archive.extrated` is a concern, you'll either need a prereq which would trigger it or leverage some of the state's options and/or `unless`, `onlyif`, etc.
18:56 zer0def (i know nothing about how the file is sourced, so i'm leaving that part open-ended)
18:56 scooby2 joined #salt
18:57 schemanic Im trying to figure out where the onchanges needs to be
18:57 schemanic You said on the config file right?
18:57 zer0def assuming tomcat'
18:57 zer0def tomcat's state is the one needed to be restarted, onchanges defined in tomcat's state, pointing to the file state that changes
18:59 schemanic what if I just pass service: tomcat to onchanges on the config file, then slap a require on the config that the archive was extracted
19:01 zer0def actually, you probably require that file to exist before the service is running, so `watch` would be more appropriate than `onchanges`
19:01 zer0def (`watch` is basically `require`+`onchanges`)
19:01 ymasson joined #salt
19:02 schemanic I don't want to change the tomcat state. I want the config file state to trigger the tomcat restart
19:02 zer0def in that case, you just use a reverse requisite (ones suffixed with `_in`)
19:03 schemanic I have a listen_in on the config file now against the tomcat service
19:04 zer0def in that case you look to be set
19:06 schemanic I know why it got this way now
19:06 schemanic I couldn't get the archive to extract properly
19:07 onslack <gtmanfred> watch is different from require+onchanges, it runs the mod_watch function inside of the state module, instead of the specified one. and 90% of the usecases of watch, can be replaced with listen
19:07 schemanic so I would extract and rename it instead of trying to get it to extract where I wanted
19:08 zer0def yeah, gtmanfred's remark is also adequate, i'm just used to `watch` mostly because `listen` is relatively new
19:09 zer0def (or at least escaped my gaze when i was getting a hold on requisites)
19:11 schemanic okay I still have a problem - the archive is STILL getting extracted
19:11 schemanic even when it's already been extacted and there is no change
19:13 onslack <gtmanfred> listen has been around since 2014.7.0
19:13 onslack <gtmanfred> i wouldn’t call it new
19:13 zer0def yeah, i somehow never got to that part
19:15 zer0def schemanic: you could either use one of `archive.extracted`'s args (or `onlyif`/`unless`) or define a state as a archive's `prereq`, which would report changes whenever the actual source changes
19:19 jpsharp joined #salt
19:21 feliks joined #salt
19:25 dendazen joined #salt
19:38 DanyC joined #salt
19:52 jpsharp left #salt
19:55 hoonetorg hi 2018.3.0 shows diffs of file.managed in opposite way wht???
19:55 hoonetorg in test mode
19:55 onslack <gtmanfred> it will be fixed in 2018.3.1
19:56 onslack <gtmanfred> it is already fixed in git
20:02 hoonetorg see example here: https://gist.github.com/hoonetorg/f251d22a4bd8baba8d71fd39716e6cf9
20:02 hoonetorg i'm quite sure this is a new bug in 2018.3.0
20:03 feliks joined #salt
20:03 onslack <gtmanfred> yes, there have already been bugs opened about it
20:03 onslack <gtmanfred> it is fixed in 2018.3.1
20:03 onslack <gtmanfred> s/is/will be/
20:04 viq "it is fixed in the hopefully-soon-to-be-released 2018.3.1" ;)
20:05 onslack <gtmanfred> we are working on branching for 2017.7.6 right now, once that is done, we will be working on branching 2018.3.1
20:06 hoonetorg ok
20:06 hoonetorg now i get it gtmanfred, you are writing over slack
20:06 hoonetorg thx for the answer
20:07 gtmanfred np
20:34 DammitJim joined #salt
20:42 snath joined #salt
20:49 schemanic Hokay. I solved this in an entirely different way
20:49 schemanic or rather, with an additive way
20:52 doubletwist So What am I missing here? https://paste.fedoraproject.org/paste/AIlTPc1T9tH2EVoz7Pyy4A
20:53 doubletwist pillar.items shows the correct data in pillar. Is {{ pillar.get['pythonvenvroot'] }} not correct?
20:53 onslack <gtmanfred> pillar.get(‘pythonvenvroot’)
20:53 onslack <gtmanfred> not []
20:53 doubletwist oh
20:55 doubletwist Yup that did it. Thanks
20:57 doubletwist It's all a wall of parenthesis, brackets and curly braces. Gets hard for me to keep track of
20:59 wavded joined #salt
21:15 doubletwist So am I to take it that salt.states.virtualenv doesn't fully properly work with non-system pythoon?
21:15 doubletwist python
21:15 doubletwist It seems to work until I specify a requirements file [super basic, I know little about pip requirements.txt files]
21:16 doubletwist then I get an exception as it tries to install those pip modules and the error references the system python libs, even though python command and venv command are set to a packaged python3 install binaries
21:26 noah_h joined #salt
21:28 noah_h Hi! I'm interested in adding a feature which allows external pillar sources to be specified in the pillars `top.sls` file. That way you could load different external pillars based on minion grains and such. I was wondering how I can access the contents of the pillars `top.sls` file in a salt python module.
21:36 noah_h_mobile joined #salt
21:44 onslack <gtmanfred> <https://github.com/saltstack/salt/blob/develop/salt/pillar/__init__.py#L483>
21:47 noah_mobile joined #salt
21:52 Hybrid joined #salt
21:52 motherfsck joined #salt
21:53 noah_mobile joined #salt
21:59 arlyon joined #salt
21:59 gmacon joined #salt
22:00 exarkun joined #salt
22:06 noah_mobile joined #salt
22:07 pcgod_ joined #salt
22:17 arlyon joined #salt
22:19 stooj joined #salt
22:37 zulutango joined #salt
22:50 inetpro joined #salt
22:59 OS-27110 joined #salt
23:01 Hybrid joined #salt
23:29 sjohnsen joined #salt
23:47 eseyman joined #salt
23:54 shalkie joined #salt
23:55 OS-27110 joined #salt
23:59 dendazen joined #salt

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