Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-10-28

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

All times shown according to UTC.

Time Nick Message
00:07 ashmckenzie joined #salt
00:10 MTecknology iggy: it's their sports and finance that keeps them running; they have a good segment of that market, but they haven't really figured out how to monetize it well
00:14 johnj joined #salt
00:15 `mist joined #salt
00:16 `mist heya fellas how do i run a part of a state but only if a file changes
00:16 `mist for example, when editing a file i need to stop a docker, add/edit the file, start the docker
00:17 `mist This is my current attempt https://thepasteb.in/p/P1hvELrM1q2Cl
00:18 `mist but this will always stop the docker. Also it doesn't seem to add the file...
00:21 `mist something like this i imagine:
00:21 `mist https://thepasteb.in/p/Y6hk2yJQ5mrU7 however this would try and run something on the host
00:21 `mist and i want to run a part of a state
00:22 felskrone joined #salt
00:51 vishvendra1 joined #salt
00:55 dxiri joined #salt
00:57 vishvendra1 joined #salt
00:57 pipps joined #salt
00:58 dxiri joined #salt
01:00 mechleg joined #salt
01:15 johnj joined #salt
01:21 nomeed joined #salt
01:31 vishvendra1 joined #salt
01:39 vishvendra1 joined #salt
01:54 vishvendra joined #salt
01:56 ilbot3 joined #salt
01:56 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.11.8, 2017.7.2 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers
02:13 nomeed joined #salt
02:13 `mist joined #salt
02:15 c4rc4s joined #salt
02:16 johnj joined #salt
02:17 vishvendra1 joined #salt
02:36 vishvendra1 joined #salt
03:01 ivanjaros joined #salt
03:04 `mist joined #salt
03:17 johnj joined #salt
03:39 swa_work joined #salt
03:45 XenophonF maybe use an onchanges requisite in the docker_container state?  I dunno
03:47 XenophonF do you have to stop the container before editing the file?
03:48 XenophonF i'd simplify things a lot
03:49 XenophonF get rid of the docker_container.stopped state
03:49 XenophonF and I'd have the docker_container.running state watch the docker_image, user, and file states
03:50 XenophonF according to TFM, docker_container.running's watch_action kwarg defaults to 'force' which "trigger[s] a rebuild of the container"
03:50 XenophonF https://docs.saltstack.com/en/latest/ref/states/all/salt.states.docker_container.html#salt.states.docker_container.running
03:51 XenophonF to really, really simplify it, I'd put everything under one state ID and use the name kwarg to set image, account, and file names as appropriate, but that's just me :)
03:52 XenophonF hth
03:56 justanotheruser joined #salt
03:59 justanotheruser joined #salt
04:18 johnj joined #salt
04:25 ahrs joined #salt
04:38 lompik joined #salt
05:03 felskrone joined #salt
05:08 frgau joined #salt
05:09 mavhq joined #salt
05:10 miruoy joined #salt
05:19 johnj joined #salt
05:20 jfelchner joined #salt
05:21 evle joined #salt
06:04 LocaMocha joined #salt
06:20 johnj joined #salt
06:20 MTecknology XenophonF: you should probably show joins/parts. :P
06:21 MTecknology oh, nevermind. I didn't see they came back.
07:07 Naresh joined #salt
07:14 felskrone joined #salt
07:18 felskrone1 joined #salt
07:21 johnj joined #salt
07:23 zer0def joined #salt
07:39 HTTP_____GK1wmSU joined #salt
07:40 HTTP_____GK1wmSU left #salt
07:54 kshlm joined #salt
08:13 HTTP_____GK1wmSU joined #salt
08:22 johnj joined #salt
08:28 HTTP_____GK1wmSU joined #salt
08:41 chowmeined joined #salt
09:23 johnj joined #salt
09:25 mnichie joined #salt
09:31 chowmeined joined #salt
09:33 MNichie joined #salt
09:44 fracklen joined #salt
09:45 fracklen joined #salt
09:47 nomeed joined #salt
09:50 `mist XenophonF: i have no idea on how to use kwards but sounds like a good way to go. Maybe a bit too advanced for me atm. Just trying to pick up the basics before heading to saltconf
09:50 `mist kwargs*
09:52 fracklen_ joined #salt
09:53 `mist If you haev the time i would really appreciate the state rewritten as you describe and i will use that as a stepping stone and/or template for future states =)
09:58 fracklen joined #salt
10:20 mikecmpbll joined #salt
10:24 johnj joined #salt
10:38 mavhq joined #salt
10:41 mavhq joined #salt
10:41 Miouge joined #salt
10:50 HTTP_____GK1wmSU joined #salt
10:51 mavhq joined #salt
10:57 HTTP_____GK1wmSU joined #salt
10:58 HTTP_____GK1wmSU left #salt
11:01 nomeed joined #salt
11:05 Miouge joined #salt
11:18 HTTP_____GK1wmSU joined #salt
11:23 HTTP_____GK1wmSU joined #salt
11:25 johnj joined #salt
11:40 MNichie joined #salt
11:48 HTTP_____GK1wmSU joined #salt
11:49 HTTP_____GK1wmSU left #salt
11:52 HTTP_____GK1wmSU joined #salt
11:54 XenophonF `mist: I don't use Docker but here's an example of what I mean - https://github.com/irtnog/salt-states/blob/development/vault/init.sls
12:03 HTTP_____GK1wmSU joined #salt
12:06 cyborg-one joined #salt
12:09 aviau joined #salt
12:18 MNichie Has anyone ever seen msgPack/IPC get a UTF-8 error before?
12:19 MNichie My salt instance has seeming broke randomly and any salt command fails on the first message through IPC
12:26 johnj joined #salt
12:28 XenophonF what error _exactly_?
12:30 XenophonF and which version of salt, etc.?
12:31 XenophonF there are a couple of old bugs related to UTF8 and msgpack, according to DDG
12:31 XenophonF but they were fixed a while ago
12:35 MNichie UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 22: invalid start byte
12:35 MNichie Not exactly a helpful exception
12:35 XenophonF what command are you running?
12:36 MNichie salt 'anything' test.ping
12:36 MNichie the command also does not matter
12:37 MNichie Tried updating everything, removing/readding the minions
12:37 MNichie In the process of nuking salt and all the caches to see if a fresh pull will get past the error
12:41 XenophonF which operating systems, and which version of Salt?
12:42 MNichie https://pastebin.com/EXRCQsg5
12:42 MNichie That might be more helpful
12:43 MNichie Ubuntu 16.04, not  sure about the exact version as I just removed it :/
12:53 MNichie well purging the salt-* packages worked, not real sure why though since all the same config files and minions are the same
12:54 MNichie Before this I manually wiped /var/cache/salt/ then restarted all the services and got the same result, do you know if there is another cache somewhere?
13:06 XenophonF I just went through this myself.
13:07 XenophonF No I don't know of another cache.
13:07 XenophonF oh you're running salt under python3
13:07 XenophonF i encourage you to file bug reports
13:08 XenophonF or ask on the mailing list
13:08 XenophonF python3 support is experimental
13:09 MNichie huh, was not aware of that
13:10 Trauma joined #salt
13:10 MNichie kinda wish I didn't blow it away now
13:27 johnj joined #salt
13:42 nomeed Does someone had the error message "Failed to cache https://domain.com: strings are not supported for this option". I am getting this error with archive.extracted, file.managed states. Modules which can use http urls as sources. Salt version is 2017.7.2
14:22 * nomeed facepalms
14:23 nomeed salt is using tornado for setting proxy configuration
14:23 nomeed and tornado does not like having the proxy_port set as a string
14:24 mavhq joined #salt
14:28 johnj joined #salt
14:47 _aeris_ left #salt
15:12 mpanetta joined #salt
15:29 tracphil joined #salt
15:29 johnj joined #salt
15:30 `mist XenophonF: http://paste.ubuntu.com/25837335/
15:30 `mist i think i did what you suggested but it's not working     ID 'couchpotato' in SLS 'dockers.couchpotato' contains multiple state declarations of the same type
15:31 `mist it seems to be due to the fact that i have a stop, add file, then running
15:35 tracphil joined #salt
16:10 jas02 joined #salt
16:17 Miouge joined #salt
16:24 sjorge joined #salt
16:25 cyborg-one joined #salt
16:30 johnj joined #salt
16:30 mavhq joined #salt
16:42 jas02 joined #salt
16:42 jas02 joined #salt
16:44 Hybrid joined #salt
16:46 Trauma joined #salt
16:54 Aikar is the salt sls files have a specific file type that IDE's can understand? syntax hilighting is off when mixing {% into stuff
17:18 babilen Aikar: It's a mixture of YAML and jinja2/Python, so you'd need a syntax highlighter that can understand both. Emacs does with a mixed major mode, but not sure about others.
17:25 maestropandy joined #salt
17:26 maestropandy left #salt
17:26 jas02 joined #salt
17:31 johnj_ joined #salt
17:32 tiwula joined #salt
17:33 whytewolf `mist: your file.managed is indented wrong. you either need to move it to the left. or drop the state id it has and add a - name:
17:35 whytewolf second from what i understand you need to stop the docker container if the file needs changing. lookup a requisites called prereq
17:36 laertus joined #salt
17:39 jas02_ joined #salt
17:45 jas02 joined #salt
18:01 gmoro joined #salt
18:07 yuhl joined #salt
18:12 jas02 joined #salt
18:30 jas02 joined #salt
18:32 johnj_ joined #salt
18:42 jas02 joined #salt
18:53 o1e9 joined #salt
19:00 jas02 joined #salt
19:05 johnkeates joined #salt
19:19 jas02 joined #salt
19:23 c4rc4s joined #salt
19:25 c4rc4s joined #salt
19:28 bryan joined #salt
19:29 Miouge joined #salt
19:33 johnj_ joined #salt
19:37 jas02 joined #salt
19:52 fredvd joined #salt
20:00 aldevar joined #salt
20:02 GnuLxUsr joined #salt
20:19 GnuLxUsr joined #salt
20:34 johnj_ joined #salt
20:48 aldevar left #salt
20:55 Miouge joined #salt
21:05 MNichie joined #salt
21:08 tiwula joined #salt
21:19 jas02 joined #salt
21:19 Miouge joined #salt
21:22 `mist thanks for the tips whytewolf, i'll try that
21:23 jas02 joined #salt
21:27 nixjdm joined #salt
21:27 `mist i'm not understanding the prereq requisite, i've fixed the indent and added a name
21:29 `mist Invalid requisite type 'docker_container.stopped' in state 'couchpotato', in SLS 'dockers.couchpotato'. Requisite types must not contain dots, did you mean 'docker_container'?
21:35 cyborg-one joined #salt
21:35 Hybrid joined #salt
21:35 johnj_ joined #salt
21:37 `mist so this is my current version http://paste.ubuntu.com/25839807/ but it to does not work. the prereq ahs me confuzzled
21:44 yuhl joined #salt
21:53 MNichie joined #salt
21:53 whytewolf `mist: just like every other rew out there. prereq requires the state module as the identifier. so cmd: should be docker_container: but honestly it goes on the docker_container and should be set to file: couchpotato
21:56 whytewolf also. don't use - names if you only have 1 item there.
21:56 whytewolf you want - name
21:57 whytewolf - names creates more states based on what is passed to it.
22:06 Armag3ddon joined #salt
22:07 `mist errrr i got the names bit
22:07 `mist whytewolf: i dont understand how prereq: file: couchpotato stops a container?
22:07 whytewolf ok
22:08 whytewolf as is it will always run and should shutdown the container
22:08 whytewolf if that is a state module
22:08 Armageddon joined #salt
22:09 `mist its supposed to shut down the container, put the file in place, then start the container
22:09 `mist thats the goal
22:09 fracklen joined #salt
22:10 `mist current version: http://paste.ubuntu.com/25840043/
22:11 whytewolf `mist: you have prereq backwords
22:11 whytewolf prereq goes on the state that should be the prereq
22:13 `mist http://paste.ubuntu.com/25840062/ like this then?
22:13 whytewolf yes
22:14 `mist thats confusing haha
22:15 whytewolf not if you understand you are putting it on the module that actually has the changes to it's behavour
22:17 whytewolf like this it will order it in front of the file.managed. and if file.manage reports that it will change. it will run the stop contaner. before any changes to the file happen
22:17 whytewolf changes include putting the file in place to begin with
22:18 whytewolf it also makes it so that if the file isn't changing it won't stop the container because that could disrupt functionality
22:20 `mist it seems to be behaving exactly like i wanted
22:20 `mist thank you whytewolf
22:21 whytewolf np :)
22:27 `mist i dont wish to be greedy whytewolf... but is there any other way to write the sysctl state than whats listed in the example? =)
22:27 `mist i'm referring to https://docs.saltstack.com/en/latest/ref/states/all/salt.states.sysctl.html
22:27 whytewolf whats wrong with what is listed?
22:28 `mist it complained about the state not being a list
22:28 `mist so i did this http://paste.ubuntu.com/25840149/
22:29 whytewolf `mist: this would be a good reason for - names
22:30 `mist so sysctl.present: -names: -a:1 -b:2
22:32 whytewolf https://gist.github.com/whytewolf/df03f86ef19cd1ef39f35b714748ec25
22:32 whytewolf only other way around this would be rewriting the state module to accept it the way you want.
22:33 whytewolf adding say a - values option that takes them as a list of dicts.
22:34 `mist ok i moved that part out
22:34 `mist my transmission state is not playing ball though
22:35 whytewolf the user.present?
22:35 `mist no... its the prereq again
22:36 `mist it really looks correct... it stops, adds the file, then starts
22:36 `mist but once the docker is up and running, it overwrites the config
22:36 whytewolf thats not good since the file is going to change
22:36 `mist transmission loads config to memory and then writes it to disk again on exit
22:36 johnj_ joined #salt
22:37 `mist thats why i wanted this whole "stop-config-start" to begin with
22:37 whytewolf that is bad design on transmission part.
22:37 `mist i agree
22:37 whytewolf not really a way around that
22:37 whytewolf since the file is always going to change
22:39 `mist arghhhhhhhh yes because it gets reordered
22:39 `mist stupid transmission why they do that....
22:39 `mist thanks obama
22:41 hammer065 joined #salt
22:46 `mist okay whytewolf, last one for tonight =D if you're up for it http://paste.ubuntu.com/25840253/
22:48 whytewolf file a bug report here with enough detail: https://github.com/saltstack/salt/issues
22:48 `mist wohoo i broke the bank ;)
22:50 `mist alright i give up for today, thanks for everything whytewolf. You've been wonderful. I'll submit a bug report tomorrow
22:50 whytewolf no problem.
22:52 Armageddon joined #salt
23:07 jeblair joined #salt
23:08 NeoXiD joined #salt
23:37 johnj_ joined #salt
23:42 zulutango joined #salt

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