Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-12-26

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

All times shown according to UTC.

Time Nick Message
00:00 saltslackbridge joined #salt
00:02 _KaszpiR_ Pomidora stalt events are just for evnets, not data streams
00:03 saltslackbridge <randy> This is where things like StackStorm come in handy
00:10 CampusD is there a way on salt-call or scheduled job to assign a JID?
00:11 CampusD I seem to get "req" as JID and would like to make them unique like the jobs that come from the master
00:58 major joined #salt
01:17 kettlewe_ joined #salt
02:03 Pomidora Thanks guys
02:14 kettlewell joined #salt
02:16 kettlewell joined #salt
02:32 armyriad joined #salt
02:42 nomeed joined #salt
02:57 ilbot3 joined #salt
02:57 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, and https://saltstackcommunity.herokuapp.com (for slack) <+> We are volunteers and may not have immediate answers
03:20 rem5_ joined #salt
03:34 shripadr joined #salt
03:39 PR_2012 joined #salt
03:47 evle joined #salt
03:58 rem5_ joined #salt
05:28 threwahway joined #salt
05:32 shiranaihito joined #salt
06:00 shripadr joined #salt
06:09 shripadr_ joined #salt
06:30 justanotheruser joined #salt
06:33 prometheus_falli joined #salt
07:00 moy left #salt
07:22 Rr4sT joined #salt
07:30 Lionel_Debroux joined #salt
07:35 sh123124213 joined #salt
07:37 Ricardo1000 joined #salt
07:44 zerocoolback joined #salt
08:20 om2 joined #salt
08:29 Hybrid joined #salt
08:42 pualj joined #salt
08:46 shripadr joined #salt
08:48 Hybrid joined #salt
09:24 ScottBeebiWan joined #salt
09:25 ScottBeebiWan left #salt
09:26 ScottBeebiWan joined #salt
09:26 ScottBeebiWan hi
09:26 ScottBeebiWan what is this channel about
09:27 ScottBeebiWan ok
09:27 ScottBeebiWan left #salt
09:27 ereslibre joined #salt
09:29 ereslibre hello, do you know if it's possible on the context of an orchestration to run a command on a specific minion and use that output in the template of the orch sls file? this is something similar to what I'm trying to achieve: https://pastebin.com/iUzmHxuZ
09:29 ereslibre the `cmd.run` should be executed in the minion
09:30 ereslibre because I guess that the rendering happens on the master, so the `cmd.run` in this case wouldn't be executed in the right context
09:36 Hybrid joined #salt
09:48 dmaphy joined #salt
09:51 magnus1 joined #salt
09:55 Hybrid joined #salt
10:04 babilen ereslibre: Just run a state with grains.append from the orchestration
10:04 babilen You can pass some_grain as inline pillar
10:08 ereslibre babilen: the problem is that the value to be set/appended to the grain is the output of a command executed on that minion
10:11 ereslibre nvm, I will move some logic from orchestration to the highstate and I can safely set grains there on the right context
10:11 ereslibre thank you :)
10:17 babilen ereslibre: I suggested calling a state on the minion from the orchestration .. that state would execute on the minion, so you can also run a command there
10:20 mikecmpbll joined #salt
10:22 ereslibre babilen: yes, that would work, thanks!
10:43 threwahway_ joined #salt
10:57 threwahway joined #salt
10:59 fgimian joined #salt
11:23 fgimian joined #salt
11:25 sjorge joined #salt
12:16 mikecmpbll joined #salt
12:27 mk-fg joined #salt
12:27 mk-fg joined #salt
12:27 zerocoolback joined #salt
12:28 shripadr_ joined #salt
13:01 rem5_ joined #salt
13:26 threwahway_ joined #salt
13:27 mikecmpbll joined #salt
13:33 threwahway joined #salt
13:35 Hybrid joined #salt
13:41 shripadr joined #salt
13:52 Hybrid joined #salt
14:04 threwahway_ joined #salt
14:22 ouemt joined #salt
14:23 mikecmpbll joined #salt
15:03 hatifnatt joined #salt
15:04 RandyT joined #salt
15:04 RandyT joined #salt
15:11 mikecmpbll joined #salt
15:11 justanotheruser joined #salt
15:14 zer0def joined #salt
15:19 zer0def joined #salt
15:27 mikecmpbll joined #salt
15:31 mikecmpbll joined #salt
15:37 hatifnatt Hi, is there any good / portable way to check is package installed? pkg.installed will install package if it doesn't presented in system, but I only need to test without actual installation.
15:38 hatifnatt I found this https://github.com/saltstack/salt/issues/39744 feature request it's closed but there is no real solution.
15:44 jholtom joined #salt
16:09 mikecmpbll joined #salt
16:11 mikecmpbll joined #salt
16:13 scbunn joined #salt
16:23 cyteen joined #salt
16:27 tiwula joined #salt
16:33 mikecmpbll joined #salt
16:45 saltslackbridge <james> pkg.version will do that I think hatifnatt
17:02 justanotheruser joined #salt
17:03 evle joined #salt
17:05 hatifnatt saltslackbridge: salt.version work somehow, I'm currently already using it, but it is execution module, so you need to manually create some wrapper code around it.
17:19 Hybrid joined #salt
17:22 shoogz joined #salt
17:24 shoogz joined #salt
17:25 shoogz joined #salt
17:35 bluenemo joined #salt
17:39 klaas left #salt
17:46 onlyanegg joined #salt
17:51 cyborg-one joined #salt
17:53 cyborg-one left #salt
17:54 bluenemo joined #salt
17:58 MTecknology hatifnatt: I use pkg.version for that kinda check in my ferm templates
18:01 bluenemo joined #salt
18:07 bluenemo joined #salt
18:10 bluenemo joined #salt
18:14 bluenemo joined #salt
18:16 tiwula joined #salt
18:18 cyteen joined #salt
18:37 pipps joined #salt
18:48 ymasson joined #salt
18:54 sh123124213 so, I had my custom modules to _modules dir inside base rootfs
18:55 sh123124213 the same files were downloaded to the minion twice
18:55 sh123124213 in /var/cache/salt/minion, one in extmods dir and one in base
18:56 sh123124213 I though I woudl use extmods but it doesn't work for me
18:56 sh123124213 extmods option on the master
19:02 whytewolf you ean extension_modules not extmods right?
19:06 sh123124213 extension_modules: /root/salt_extmods
19:07 sh123124213 its suppose to be the same right ?
19:07 sh123124213 whytewolf:
19:07 whytewolf yes. also what are you expecting that option does?
19:10 sh123124213 I assumed that you don't add those custom modules to roofs _modules dir and add them to the new path
19:10 whytewolf that is not what it does
19:11 whytewolf it installs the module for the master to use.
19:11 whytewolf in that location
19:11 whytewolf it still needs them in the roofs
19:11 whytewolf so that minions can instal them
19:12 whytewolf in fact /var/cache/salt/minion sounds like you have a minion on the master that is installing the modules also
19:18 sh123124213 waste then, I though I would avoid having that module downloaded twice
19:18 pipps joined #salt
19:26 bluenemo joined #salt
19:26 Neighbour sh123124213: both the salt-master configuration options extension_modules and module_dirs are to provide the salt-master with extra directories for custom modules. These do not synchronize to the minions. Use the _modules and _states directories in your configured file_roots for that
19:29 sh123124213 Neighbour: got it, I wanted to answer you back on the previous conversation we had. I tested and it seems I can directly send command from any server knowing the root key in cache dir
19:30 sh123124213 I wouldn't imagine that this key can be brute forced but might as well be an option since you already know the algo this is generated with.
19:30 sh123124213 I'm wondering what commands can I send from the minion and if it would accept targeting other minions
19:31 sh123124213 saw some code and it seems fun is disabled but didn't go into detail
19:31 pipps joined #salt
19:33 oida joined #salt
19:42 swa_work joined #salt
20:02 hatifnatt MTecknology: If you do not mind, how exactly your check looks like?
20:09 pipps joined #salt
20:19 MTecknology what*
20:19 MTecknology {% if salt.pkg.version('foo') %}
20:22 MTecknology or salt['pkg.version']('foo') if you prefer
20:25 RandyT joined #salt
20:26 RandyT joined #salt
20:35 Neighbour sh123124213: Hmm, interesting. Could you go a bit more into detail here? What command did you send? How did you send it? Which root key do you mean?
20:36 sh123124213 ls -lta /var/cache/salt/master/.root_key
20:36 sh123124213 you just need to sent a serialized payload
20:37 aldevar joined #salt
20:38 sh123124213 Neighbour : https://gist.github.com/tsaridas/168f0178c67a2e0caa65497675209ddf
20:49 hatifnatt MTecknology: thanks I'm using similar construction. But if you need to "require" that check it's necessary to create some dummy test state. I think something like pkg.is_installed which return result True/False would be userful.
20:49 MTecknology hatifnatt: If you require it be present, then you have a state you depend on that ensures it's installed
20:51 hatifnatt MTecknology: sometimes I only need to check is package 'A' installed before installing package 'B' without forcing installation of 'A'.
20:52 MTecknology that sounds like flakey logic, but easily covered by the test
21:42 pipps joined #salt
22:00 dfinn joined #salt
22:10 vexati0n can someone help me understand the /salt/minions/*/start/ event ? The docs say the event is generated whenever a minion initiates an auth... but I have minions that have gone on and offline regularly (normal behavior) every day, but haven't generated a start event for weeks.
22:14 vexati0n also, i've set
22:14 vexati0n also I've set presence_events to True, but when the salt/presence/present event fires, only the master is listed even though about 200 other minions are online at any given moment
22:19 pipps joined #salt
22:31 pipps joined #salt
22:33 MTecknology where did you set presence_events?
22:36 pipps joined #salt
22:38 vexati0n in the master config file
22:38 vexati0n and that part is working obviously, because otherwise the master would not be generating presence events at all
22:43 whytewolf iirc start events only happen after a minion is restarted. also it is not anytime a minion auths other wise they would be sending all the bloody time. as minions reauth a lot even when already connected [anytime the master key rotate the minions reauth]
22:43 whytewolf not sure about presence events never seen them in action
22:44 whytewolf also no s in minion it is salt/minion/*/start
22:46 whytewolf looks like presence_events might be a tcp only transport thing. least from the minor bit i have seen in the code so far
22:47 pipps joined #salt
22:50 whytewolf oh nevermind. looked closer tcp transport only handleds it differently.
22:51 vexati0n yeah i added the s from memory. the config is correct, tho. The docs say it is generated "when a minion connects to the master", which is ambiguous to say the least, but there are minions I know for a fact that have been rebooted, put to sleep, hibernated, woken up, unplugged from the network, etc. multiple times in the weeks since the last time they generated a start event.
22:52 whytewolf odd, then they should have generated a start event most defintly
22:52 MTecknology how do you know for certain the start event was never sent?
22:52 vexati0n because i have the master write a log entry every time a start even fires
22:53 MTecknology are you 100% certain there are no typos?
22:53 vexati0n yeah, it is writing to that log file all day long
22:53 vexati0n there are plenty of other entries, but apparently not all minions generate them
22:54 vexati0n anyway that was more a curiosity for me, the really annoying issue is with the presence events
22:55 * MTecknology is struggling with his deploy script. http://dpaste.com/2M4HH46  Why does installing openvpn cause apt to think the kernel should be removed
22:56 whytewolf security?
22:56 vexati0n wow that's super weird
22:56 whytewolf can't have a security problem if you have no kernel
22:56 vexati0n ^^
22:57 vexati0n are you sure it's openvpn causing it and not resolvconf?
22:57 vexati0n maybe that kernel would rather die than have to share a system with resolvconf
22:58 MTecknology I'm not sure which, no
22:58 MTecknology I'm ruling out a previous mass removal in the script at the moment
22:58 vexati0n it's strange either way
22:58 whytewolf it could be any of the aditional packages doing it also
23:00 vexati0n is that your actual running kernel?
23:00 whytewolf it's removeing linux-image-amd64 so yeah.
23:00 whytewolf also initramfs-tools
23:01 hatifnatt and what about OS and it's version?
23:01 MTecknology This is just my bootstrap script on a DO VPS, add salt repo, apt update, dist-upgrade, apt install opvn resolveconf
23:01 MTecknology debian 9.3 amd64
23:02 pipps joined #salt
23:05 MTecknology it's the resolvconf package, not openvpn
23:05 hatifnatt can't reproduce on debian 9.2
23:09 pipps joined #salt
23:10 MTecknology I mighta found the fuckup
23:13 justanotheruser joined #salt
23:13 MTecknology yarp... I was sticking in debian 8 repos and then expecting it to work
23:28 MTecknology I wonder... what's the best way to push an IP address into an inventory management system?
23:29 MTecknology salt-call cloud.profile returns a json version of the address, should I have a script that reads that -out=json and pushed the address or should the created VM push that data or?...
23:38 pipps joined #salt
23:44 justanotheruser joined #salt
23:46 pipps joined #salt
23:51 pipps99 joined #salt
23:55 pipps joined #salt

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