Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2015-11-03

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

All times shown according to UTC.

Time Nick Message
00:01 otter768 joined #salt
00:03 ashirogl joined #salt
00:04 sgargan joined #salt
00:07 zmalone joined #salt
00:08 ajw0100 joined #salt
00:11 jaybocc2 joined #salt
00:12 jaybocc2 does anyone know how to pass in pillar data to be overridden in https://docs.saltstack.com/en/2015.5/ref/clients/index.html#salt.client.LocalClient.cmd
00:15 zmalone joined #salt
00:16 gtmanfred yeah, just pass an arg with pillar={} i think
00:16 gtmanfred or put it under kwarg={'pillar': {}}
00:19 MadHatter42 joined #salt
00:19 MadHatter42 joined #salt
00:24 msx joined #salt
00:24 ashirogl1 joined #salt
00:28 falenn joined #salt
00:33 baweaver joined #salt
00:33 druonysus joined #salt
00:36 breakingmatter joined #salt
00:39 evle joined #salt
00:40 ajw0100 joined #salt
00:49 MadHatter42 joined #salt
00:54 fusionx86 joined #salt
00:54 bhosmer_ joined #salt
01:01 aqua^c joined #salt
01:01 lemur joined #salt
01:01 ajw0100_ joined #salt
01:06 Singularo joined #salt
01:08 PeterO joined #salt
01:10 zmalone joined #salt
01:15 dthom91 joined #salt
01:16 aqua^c joined #salt
01:18 ldelossa Hey guys, how do yo ugo about updating a minion hostname
01:19 ldelossa and then having salt reflect that change
01:19 ldelossa do I need to regen keys?
01:20 jaybocc2 on the salt master you can just rename the minion's key
01:20 armguy joined #salt
01:20 ldelossa via command or in the pki folder?
01:20 jaybocc2 i don't know of any official salt way to do it
01:21 jaybocc2 just move/rename the file in the pki folder
01:21 zmalone I'd probably do it by changing the minion id in the salt config on the minion
01:22 zmalone (after the host name was changed in the proper manner for your platform, because that's os specific)
01:22 zmalone then removing the "old" key on the master and accepting the new one
01:22 ldelossa I don't edit my minion id in the config
01:23 hemebond I don't think the hostname matters to Salt.
01:23 ldelossa It doesn't right
01:23 jaybocc2 ^ it doesn't
01:23 ldelossa it gets it from teh ssh key
01:23 jaybocc2 i pre-seed my minion keys
01:23 hemebond If you update the minion_id, then delete and re-create the key that should be fine.
01:23 ldelossa I'm thinking about doing this also
01:23 ldelossa I'm having trouble with bootstraping
01:23 ldelossa and the keys not being there
01:23 hemebond You might be able to rename the key on the master.
01:23 ldelossa which minion_id
01:24 hemebond /etc/salt/minion_id
01:24 ldelossa What can I do if I hav ea minion with no keys in /etc/salt/pki/minion/
01:24 ldelossa It seems that everytime I run git develop with the bootstrap
01:24 ldelossa no keys are placed in tehre
01:24 ldelossa and my logs are just stuck at "setting up minion"
01:25 hemebond Those are created automatically.
01:25 hemebond Can your minion contact the master?
01:25 ldelossa I know, but they aren't lol
01:25 ldelossa Yeah no problem
01:25 ldelossa confirmed with tcpdump
01:25 hemebond Anything in the master logs?
01:25 ldelossa sudo sh install_salt.sh git develop
01:25 ldelossa its that
01:25 hemebond Can you run the minion in debug?
01:25 ldelossa it never drops the .pem and .pub on the minion
01:25 ldelossa yes, logs just straight stop
01:25 ldelossa and hang out
01:25 ldelossa tcpdump show no traffic toward master at all
01:26 hemebond I think the keys are created when the minion talks to the master, not on install.
01:26 ldelossa hmm
01:26 jaybocc2 salt-key --gen-keys=$(hostname) --gen-key-dir=/etc/salt/pki/minion/
01:26 ldelossa can I force this?
01:26 dthom91 joined #salt
01:26 jaybocc2 have you tried installing a stable release?
01:27 ldelossa My modules depend in teh firewall module and selinux module
01:27 ldelossa which apprently aren't present in teh stable release
01:27 ldelossa but the stable realse works fine
01:27 ldelossa release*
01:27 hemebond oh. so could be a bug with the bootstrap.
01:27 ldelossa could be yes
01:27 hemebond Can you run the minion in debug?
01:27 ldelossa don't see anyone else reporting it though
01:28 hemebond Run it in the foreground with debugging on.
01:28 jaybocc2 https://github.com/saltstack/salt/issues/28499
01:28 ldelossa well let me try this salt-key thing jaybocc2 is doing
01:28 jaybocc2 known bug
01:28 jaybocc2 lol by you
01:28 jaybocc2 ;)
01:28 ldelossa hahahahahahah
01:28 ldelossa yup
01:28 ldelossa I was just going to say
01:28 ldelossa Does anyone want to be a total doll and try it out?
01:28 ldelossa maybe in a cotainer or something
01:29 aqua^c joined #salt
01:30 ldelossa Oh, and it works if I install stable
01:30 ldelossa and then devel ontop
01:30 ldelossa USUALLY
01:30 ldelossa it's kinda sketchy
01:31 whatapain can you have the same minion name in a salt-cloud map that is used in another provider?
01:31 whatapain like, digitalocean and ec2 having the same minion names
01:31 hemebond whatapain: Will that try and create a minion with the same name?
01:33 whatapain hemebond: yea, i guess i didn't realize if you deploy something to one provider salt-cloud seems to check all the other providers to see if there's a minion of the same name
01:33 whatapain makes sense
01:33 whatapain i'm not using a central salt-master so in my mind there wasn't any conflict but i can see that being an issue if you use a single master
01:33 workthrick I'm building a list of packages to install based on external data, and want to include that in my salt states. How do I best do that?
01:33 jaybocc2 whats your source of external data?
01:33 hemebond workthrick: pillar
01:34 jaybocc2 you'll want to look at external pillars
01:34 workthrick hemebond: right, and how do I reference that afterwards?
01:34 lynxman joined #salt
01:34 jaybocc2 just like a normal pillar
01:34 hemebond salt['pillar.get']('blah')
01:34 workthrick ie. how do I pass the list to pkg.installed: ?
01:35 workthrick hemebond: so pkg.installed: {{salt['pillar.get']('requirements')}} ?
01:35 hemebond You would need a jinja loop
01:35 workthrick right
01:35 jaybocc2 https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html
01:36 jaybocc2 https://docs.saltstack.com/en/latest/topics/tutorials/pillar.html
01:37 zmalone joined #salt
01:37 larsfronius joined #salt
01:38 jaybocc2 ldelossa: i would but don't have time before i gotta catch a train sorry
01:38 workthrick OK, I'll give that a spin, thanks
01:39 ldelossa all good - thanks tho
01:41 huwenfeng joined #salt
01:41 ldelossa I mean pretty consistent work aroudn for me is just to install stable
01:41 ldelossa then git develop on top
01:41 ldelossa to ge the packages I need for firewall modules and all taht
01:43 hemebond I could test in a few hours.
01:45 falenn joined #salt
01:47 ldelossa Sounds good I'm about to get out of hte office, would you mind updating the issue when you find out
01:47 ldelossa https://github.com/saltstack/salt/issues/28499
01:48 fsteinel_ joined #salt
01:50 breakingmatter joined #salt
01:53 yexingok joined #salt
01:53 aidalgol joined #salt
01:53 yexingok joined #salt
01:54 falenn joined #salt
01:54 dthom91 joined #salt
01:56 jqce joined #salt
02:05 opensource_ninja joined #salt
02:07 ajw0100 joined #salt
02:14 hasues joined #salt
02:17 hasues left #salt
02:19 quasiben1 joined #salt
02:21 druonysus joined #salt
02:25 jaybocc2 joined #salt
02:27 aparsons joined #salt
02:29 otter768 joined #salt
02:32 blast_hardcheese joined #salt
02:39 JDiPierro joined #salt
02:42 dthom91 joined #salt
02:45 colegatron joined #salt
02:50 huwenfeng hello, anywhere to see a diagram about the architecture of Saltstack, and the communication between each processes?
02:51 breakingmatter joined #salt
02:51 huwenfeng https://docs.saltstack.com/en/latest/topics/development/architecture.html is hard to follow and it do not tell me which process ifs controlled by which options in the configure file.
02:51 huwenfeng readlly hard to get the big picture.
02:52 evle joined #salt
02:54 bhosmer joined #salt
03:00 ajw0100 joined #salt
03:00 dthom91 joined #salt
03:01 shalkie joined #salt
03:05 zmalone joined #salt
03:06 iggy huwenfeng: https://docs.saltstack.com/en/getstarted/ no help?
03:07 huwenfeng iggy: like this : 6) The message to the minions is encrypted and sent to the Publisher via IPC on publish_pull.ipc.     which process send this message? not explained....
03:08 iggy salt-master
03:09 nitay joined #salt
03:10 nitay anyone know how to use salt-cloud to launch ec2 instances with dedicated tenancy
03:12 iggy nitay: you'll probably have to add support for that yourself
03:12 nitay iggy: how would i do that?
03:12 huwenfeng iggy: maybe it is  EventPublished of salt-master,
03:13 nitay its funny cause the module seems to have the call - https://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.ec2.html#salt.cloud.clouds.ec2.get_tenancy - but the provider doesnt have the option
03:14 ALLmightySPIFF joined #salt
03:18 RandyT nitay: boto appears to have tenancy
03:18 RandyT https://github.com/boto/boto/commit/b6a6dabe654dc1e63dc43326b6eff7414484bf91
03:18 RandyT it may just work to add tenancy: parameter to the provider?
03:19 nitay i trie dthat didnt work
03:19 RandyT or perhaps the profile.
03:19 nitay lemme try the profile
03:19 RandyT it does say that it requires vpc deployment which would require the whole profile definition of vpc, subnet, etc.
03:20 nitay is there an example of that somewhere?
03:20 nitay RandyT: im not sure i get what all the required params are
03:21 RandyT let me grab an example that I am using...
03:21 RandyT not doing tenancy yet, but definitely on the roadmap
03:22 RandyT nitay: https://gist.github.com/rterbush/5129af671d65e9f710da
03:22 RandyT that is basically my profile config.
03:22 RandyT not in a place I can try this easily, but I would think you could add a tenancy: prameter to that..
03:23 nitay oh i see the tenancy is under network_interfaces then?
03:23 nitay i put it at top level
03:24 RandyT could be, but I would intuitively associate it at same level of availability_zone...
03:24 RandyT given the vpc requirement though, it might fall in network settings as you suggest
03:24 otter768 joined #salt
03:27 favadi joined #salt
03:30 favadi joined #salt
03:42 geomyidae_ joined #salt
03:45 jaybocc2 joined #salt
03:54 aparsons joined #salt
03:57 jqce joined #salt
04:03 falenn joined #salt
04:16 evle2 joined #salt
04:23 malinoff joined #salt
04:23 racooper joined #salt
04:30 ramteid joined #salt
04:38 ageorgop joined #salt
04:45 mehakkahlon joined #salt
04:51 breakingmatter joined #salt
04:54 ashirogl joined #salt
04:55 bhosmer_ joined #salt
05:02 hoonetorg joined #salt
05:11 nitay joined #salt
05:20 ashirogl1 joined #salt
05:23 racooper joined #salt
05:26 PeterO joined #salt
05:36 rdas joined #salt
05:39 sunkist joined #salt
05:39 larsfronius joined #salt
05:53 breakingmatter joined #salt
05:54 jaybocc2 joined #salt
05:56 jqce joined #salt
06:04 evle3 joined #salt
06:10 twiedenbein joined #salt
06:16 otter768 joined #salt
06:19 jaybocc2 joined #salt
06:25 vishalb joined #salt
06:25 ALLmightySPIFF joined #salt
06:47 linjan__ joined #salt
06:51 auzty joined #salt
06:54 breakingmatter joined #salt
06:56 bhosmer_ joined #salt
06:58 adelcast joined #salt
07:08 ajw0100 joined #salt
07:11 colttt joined #salt
07:13 Lionel_Debroux joined #salt
07:23 av___ joined #salt
07:34 seweryn joined #salt
07:40 larsfronius joined #salt
07:49 nitay left #salt
07:51 mehakkah_ joined #salt
07:52 AndreasLutro joined #salt
07:52 rubendv joined #salt
07:52 rubendv joined #salt
07:53 impi joined #salt
07:55 Stijn_ joined #salt
07:56 Stijn_ Is it possible to install a windows service and run it under a different user?
07:56 jqce joined #salt
07:57 yuhlw joined #salt
07:59 felskrone joined #salt
08:00 KermitTheFragger joined #salt
08:05 ITChap joined #salt
08:06 eseyman joined #salt
08:23 kawa2014 joined #salt
08:27 toanju joined #salt
08:31 Gabemo joined #salt
08:34 edulix joined #salt
08:39 Pallando joined #salt
08:39 meanieotter joined #salt
08:43 bmcorser_ joined #salt
08:44 Rumbles joined #salt
08:45 bmcorser_ where do i place runners?
08:45 bmcorser_ salt/_runners like salt/_modules?
08:45 colegatron joined #salt
08:47 bmcorser joined #salt
08:47 AndreasLutro bmcorser: probably this https://docs.saltstack.com/en/latest/ref/configuration/master.html#std:conf_master-runner_dirs
08:48 catpig joined #salt
08:48 bmcorser it says set "additional" dirs
08:48 bmcorser with a default of `[]` i would assume there aren't any runners directories by default?
08:49 bmcorser ah yes
08:49 bmcorser i see
08:49 AndreasLutro right, didn't notice that
08:49 AndreasLutro I'm not sure then, I'd just try it out
08:52 hemebond ldelossa: Same error on Debian Jessie; though it seems to have generated the initial keys and contacted the master without any problem. It's only when running the regen_keys command you listed.
08:52 ubikite joined #salt
08:53 ubikite joined #salt
08:55 breakingmatter joined #salt
08:56 cnpdev joined #salt
08:57 felskrone joined #salt
08:57 bhosmer joined #salt
08:58 big_area joined #salt
09:06 s_kunk joined #salt
09:09 keimlink joined #salt
09:13 trapha joined #salt
09:14 thefish joined #salt
09:15 zer0def joined #salt
09:16 chris__ joined #salt
09:18 linjan__ joined #salt
09:19 kawa2014 joined #salt
09:19 human01d joined #salt
09:20 thalleralexander joined #salt
09:35 human01d how is it possible to execute sls file with jinja templates and look at the output before sending it to minions?
09:37 AndreasLutro human01d: state.show_sls is the closest you'll get I think
09:38 jaybocc2 joined #salt
09:40 ggoZ joined #salt
09:43 human01d AndreasLutro: ty, it is much better then debug log on the minion :)
09:44 larsfronius joined #salt
09:44 Segfault_ when using pkg.latest, sometimes the package is not upgraded. This happens when the package manager in ubuntu says that the package has been "kept back", probably because of new dependencies
09:45 Segfault_ is there a way to get around this with pkg.latest and install the new version with new dependencies?
09:45 Segfault_ specifically I'm trying to keep salt-minion up to date on my minions, and the depenencies for salt-minion change with pretty much every version
09:45 AndreasLutro iirc kept back means someone's done apt-get hold on the package
09:46 AndreasLutro if you ssh in and apt-get install, does that work or do you get the same message/
09:46 AndreasLutro ?
09:46 Segfault_ if I do "apt-get install" I don't get the message, I only get the message during "apt-get upgrade"
09:47 sgargan joined #salt
09:48 larsfron_ joined #salt
09:48 AndreasLutro odd
09:49 Segfault_ this is the salt-master trying to update the local salt-minion: http://hastebin.com/nataxewihe.mel
09:50 Segfault_ You can see the formula, that there is indeed a new package available and that the formula does nothing
09:52 AndreasLutro Segfault_: what's the output of salt 'minion' pkg.version salt-minion, and the same command but pkg.latest_version ?
09:54 Segfault_ AndreasLutro: Just what you would expect: http://hastebin.com/lupoqebeye.avrasm
09:54 AndreasLutro try pkg.install salt-minion
09:55 AndreasLutro if that does nothing the problem is in that module function
09:55 AndreasLutro brb lunch
09:55 Segfault_ Thanks, I'll try that. Lunch time here too
09:55 babilen Segfault_: You want dist-upgrade
09:55 babilen (in salt and on the command line)
09:56 Segfault_ I don't want to update every package on the system, I want saltstacks pkg.latest to keep the package updated as it is supposed to
09:56 babilen Use pkg.install refresh=True then
09:56 VSpike Anyone know what's the state of 32 bit Ubuntu packages in the official repo?
09:57 babilen Oh, have they been uploaded?
09:57 Segfault_ this will eventually be executed on production systems, I generally avoid running dist-upgrade on those as it tends to break stuff
09:57 fii-fi joined #salt
09:57 VSpike babilen: Not sure.. last time I checked a lot of important deps were missing from the 32 bit repos
09:57 babilen Segfault_: It shouldn't break stuff as it simply allows for package removals or installations (not only updates)
09:58 jqce joined #salt
09:58 fii-fi whytewolf: thanks for helping out with our VPC questions last night.
09:59 babilen Segfault_: But if you want to explicitly upgrade a few selected packages you need "apt-get install $PKG" (or pkg.install) -- I'd also advise against upgrades as part of your highstate, but that's more of a personal preference in that I like highstates to be idempotent
09:59 fii-fi Its all working now
09:59 fii-fi left #salt
09:59 babilen VSpike: That was the last I heard too. FWIW, I'm not using those packages before I have seen the scripts that generate them.
09:59 bmcorser cmd.run doesn't seem to be running as the user i specify
10:00 babilen bmcorser: Why do you think so?
10:00 bmcorser for example `salt minion cmd.run whoami user=abc` will return `minion: root`
10:00 Segfault_ thanks, there are only a few packages that are installed using pkg.latest. I control the repository of the server, so when I upload a new package version I expect my minions to upgrade their packages
10:00 Segfault_ I mostly do pkg.installed, but salt-master, salt-minion, zabbix-agent and a few other packages should be updated to the latest version at all times
10:01 bmcorser i am expecting something like `sudo -u abc whoami` which would return `abc`
10:02 babilen Segfault_: You want support for --with-new-pkgs in salt then I guess
10:04 trapha I'm getting the following error when compiling a salt state: http://pastebin.com/HQdmVkG3
10:05 babilen bmcorser: "salt 'foo' 'id' runas='someuser'" works fine here .. Please note that the *execution module* function takes "runas" as opposed to "user" as argument (cf. https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cmdmod.html#salt.modules.cmdmod.run )
10:06 VSpike babilen: what packages are you using, then? or, how are you installing?
10:06 babilen Repasted trapha's paste at https://www.refheap.com/111316
10:07 babilen VSpike: I'm still on 2015.5 and I use joehh's packages from debian.saltstack.com
10:07 VSpike ahh, ok
10:07 trapha babilen, yes, I tried that, but it's the same error
10:07 babilen I've seen too many packaging related problems with the new and automagically created packages that I really want to see the code that generates them before I deploy them
10:08 trapha babilen, repasting again
10:08 babilen trapha: Tried what?
10:08 VSpike seems a bit wierd to pull in tornado as an experimental transport and then allow it to get stitched into the code to the extend it's not optional. But there may well be sound reasons for it
10:09 trapha babilen, https://www.refheap.com/111317
10:09 VSpike babilen: it's usually my requirement for Windows support that pushes me onto newer version in an attempt to get fixes for critical problems. Usually to find new, different critical Windows-only problems :/
10:09 babilen trapha: First and foremost: You seem to be missing a "%}" in line 5 and I also believe that you want that to be something like "{% do client_hosts.append(host) %}"
10:09 trapha so you need the "do" statement?
10:10 babilen VSpike: Sure, I'd *love* to upgrade, but I simply don't trust their packages yet
10:10 Segfault_ I find that a bit misleading, as the documentation is pretty clear about how it shoud work: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.latest
10:10 babilen trapha: You are after side-effects there aren't you?
10:10 trapha babilen, that worked :)
10:11 babilen Segfault_: The package would upgrade, but much like "apt-get upgrade" it wouldn't do so if you have to install packages during that process. This is why I mentioned "--with-new-pkgs" which you would have to pass to "apt-get upgrade" too.
10:12 babilen Segfault_: In this particular case it should just call "pkg.install" anyway and simply do so iff a newer package version is available.
10:12 babilen I agree that pkg.latest should just install the newest version, don't get me wrong
10:12 babilen Segfault_: Which version of salt are you using?
10:13 babilen trapha: http://jinja.pocoo.org/docs/dev/templates/#expression-statement
10:14 VSpike babilen: do you think joehh is likely to package any newer versions?
10:14 babilen I have no idea, but I would hope that he continues packaging new versions for Debian itself.
10:14 babilen In a way I would *much* rather install his packages from the official repositories
10:15 dgutu joined #salt
10:16 Segfault_ babilen: I'm just migrating from 2015.5.3 to 2015.8.1, I was hoping pkg.latest would take care of this for me the moment I made the new version available in the repositories
10:18 giantlock joined #salt
10:18 bmcorser babilen: thanks, that works
10:22 trapha babilen, thanks!
10:22 trapha quite useful
10:22 babilen Segfault_: Salt just seems to run pkg.install which should behave the way you want.
10:23 thalleralexander joined #salt
10:24 babilen Segfault_: Could you paste actual output from the state run? Preferably the debug output you get when you run "salt-call -ldebug state.sls $YOUR_STATE" on the minion. I'd also appreciate it if you could use one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, http://dpaste.de, … (or anything != pastebin.com)
10:24 babilen Include "salt-call --versions-report" (minion) and "salt --versions-report" (master)
10:26 kawa2014 joined #salt
10:38 jaybocc2 joined #salt
10:44 pjs joined #salt
10:48 rotbeard joined #salt
10:54 daemonkeeper I have a state like this configuring users and SSH keys: http://paste.debian.net/320264/. After upgrading to 2015.8.1 salt complains "    Invalid requisite type 'user.present' in state 'foobar', in SLS 'noc.users.users'. Requisite types must not contain dots, did you mean 'user'?". This worked fine before. I wonder now, is my state wrong and was always wrong and it only worked by accident, or is this a regression?
10:54 babilen It was always wrong
10:55 kawa2014 joined #salt
10:55 daemonkeeper And - user: foobar is correct?
10:57 breakingmatter joined #salt
10:57 babilen Indeed
10:58 bhosmer joined #salt
10:58 daemonkeeper How does that work? Why don't I need to state the module I want to check?
10:58 babilen You state the module, but not the function
10:58 daemonkeeper So it only checks for changes done by the module?
10:59 babilen It looks for changes in the state identified by 'foobar' and if that state has changes the requisite is triggered
10:59 Segfault_ babilen: sorry, had lunch. Running "salt 'minion' pkg.install salt-minion" works, so it's clearly different from using pkg.latest.
11:00 Segfault_ I starting to suspect that there's something weird going on in the code that compares package versions
11:00 shiriru joined #salt
11:01 babilen Segfault_: Can't rule that out
11:01 markm joined #salt
11:05 bdrung_work joined #salt
11:06 Segfault_ babilen: http://hastebin.com/obogalibur.sm
11:08 cswang joined #salt
11:08 babilen Segfault_: "salt-call -ldebug state.sls $YOUR_STATE" would be infinitesimally more informative ;)
11:08 Segfault_ I'll try that too, one moment
11:08 babilen (on the minion that is)
11:10 daemonkeeper Thanks babilen
11:10 babilen And you probably want "- refresh: True" in your pkg.latest state
11:10 babilen daemonkeeper: Did that work? It also means that multiple states are being conflated if you group them under the same id (and refer to that id rather than a unique - name: ...) in your requisite)
11:12 Segfault_ babilen: Here's the output of salt-call -ldebug state.sls saltstack.minion: http://hastebin.com/oxobaniyug.vhdl
11:13 Segfault_ I'll try adding refresh: true to the state
11:13 Segfault_ although as you can see from the log it does run "apt-get update -q"
11:13 daemonkeeper babilen: It runs through at least.
11:14 babilen daemonkeeper: That's an improvement :)
11:14 babilen Segfault_: Yeah, I though of expect it to do that either way ;)
11:15 fii-fi joined #salt
11:16 bdrung_work daemonkeeper, long time no see ;)
11:16 fii-fi Morning
11:19 fii-fi Seems like trying to create a route in VPC doesn't recognise both vpc_name or vpc_id
11:19 fii-fi https://paste.fedoraproject.org/286362/49452144/
11:21 fii-fi anyone encountered this or is there a way round it ?
11:34 ggoZ1 joined #salt
11:37 babilen Segfault_: Could you show me the output of "apt-cache -q policy salt-minion" on a not-yet-upgraded minion?
11:39 jaybocc2 joined #salt
11:43 Segfault_ sorry, just ran "salt '*' pkg.install salt-minion". But I did check that, the package with the newest version has the highest priority. I've explicitly set the priority in /etc/apt/preferences.
11:44 quasiben joined #salt
11:45 Segfault_ I think I did something like this "Package *", "Pin: release o=Saltstack" with "Pin-Priority: 700"
11:45 Segfault_ apt-cache policy shows that the latest package has the correct priority
11:49 quasiben joined #salt
11:50 thalleralexander joined #salt
11:52 deus_ex joined #salt
11:53 babilen Segfault_: Do you have a minion left that hasn't been upgraded?
11:55 favadi joined #salt
11:57 jqce joined #salt
11:57 trph joined #salt
12:00 trph how can jinja use functions available in python?
12:00 trph like int() and round(), for example
12:01 AndreasLutro can't
12:07 rubendv how can I censor parts of certain commands in the salt output/logs?
12:11 yexingok joined #salt
12:17 AndreasLutro I don't think you can rubendv - what are you doing that requires it?
12:17 rubendv username and password combinations being passed on the command line
12:18 rubendv as part of an orchestration state
12:18 AndreasLutro if there's not an existing salt module for whatever the command is doing you could write a custom module
12:19 rubenb rubendv: Writing a custom module or lowering the log_level.
12:20 rubendv ok thanks
12:22 rubenb Is it a 'cmd.run' command?
12:24 rubenb rubendv: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cmdmod.html#salt.modules.cmdmod.run << see the output_loglevel. If I'm reading this correctly, you could add a '- output_loglevel: quiet' to the sls.
12:27 AirOnSkin joined #salt
12:29 stevej99 joined #salt
12:30 Arendtsen joined #salt
12:30 alvinstarr joined #salt
12:34 NightMonkey joined #salt
12:34 yidhra_ joined #salt
12:34 jeblair joined #salt
12:35 hacfi joined #salt
12:35 ws2k3 joined #salt
12:35 Knuta joined #salt
12:36 Arendtsen joined #salt
12:36 dec joined #salt
12:36 oravirt joined #salt
12:38 Ph-x joined #salt
12:40 jaybocc2 joined #salt
12:41 fii-fi Anyone here to help with an AWS VPC subnet question please ?
12:47 Norrland fii-fi: dont ask about asking. But probably AWS VPC specific questions are a bit off topic in here.
12:47 fii-fi Norrland: Why is that ?
12:48 fii-fi https://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_vpc.html
12:48 fii-fi Question relates to creating a routing table using salt
12:48 fii-fi so why should I not ask ?
12:48 fii-fi am I in the wrong IRC ?
12:51 Norrland fii-fi: from your first question "Anyone here to help with an AWS VPC subnet question please ?". Maybe rephrase your question a bit to make it easier for us to help you.
12:51 fii-fi sure
12:53 fii-fi anyway - any idea why the routing table doesn't recognise the VPC-NAME ?
12:53 fii-fi https://paste.fedoraproject.org/286400/65551751/
12:55 fii-fi Norrland: maybe you missed my earlier posts
12:55 fii-fi (11:16:32) fii-fi: Morning
12:55 fii-fi (11:19:23) fii-fi: Seems like trying to create a route in VPC doesn't recognise both vpc_name or vpc_id
12:55 fii-fi (11:19:24) fii-fi: https://paste.fedoraproject.org/286362/49452144/
12:55 fii-fi (11:21:06) thalleralexander left the room (quit: Ping timeout: 240 seconds).
12:55 fii-fi (11:21:30) fii-fi: anyone encountered this or is there a way round it ?
12:55 Norrland fii-fi: could be
12:55 mosu joined #salt
12:55 fii-fi anyway - just need help with this
12:56 Hazelesque Hi there...
12:56 Hazelesque I see that I can put grains in /etc/salt/grains as a yaml file...
12:56 Hazelesque I see that there is also a GRAINS_DIRS configuration option...
12:56 Hazelesque https://docs.saltstack.com/en/latest/ref/configuration/minion.html#grains-dirs
12:56 fii-fi whytewolf is normally helpful but I don't think he's here
12:57 Hazelesque is that directory for customs grains modules (in the python sense)? or for text files?
12:57 bastion1704 joined #salt
12:58 Hazelesque basically, we run salt side by side with CFEngine, and our own spaghetti of home-grown scripts
12:58 bhosmer joined #salt
12:58 Shirkdog joined #salt
12:58 Hazelesque and we have a home-grown "enc" (External Node Classifier) of sorts
12:59 Hazelesque that is written in Python, does some "magic" (involving regexes to parse the hostname, and reading some special .ini files) to work out what kind of host it is on
12:59 edulix joined #salt
13:00 Hazelesque and then spits out a bunch of flags and key:value pairs in some special CFEngine format
13:00 Hazelesque I'd like to expose that information to Salt as well
13:00 Hazelesque to use for targeting in salt commands etc
13:00 AndreasLutro Hazelesque: have you looked into custom grains? https://docs.saltstack.com/en/latest/topics/targeting/grains.html#writing-grains
13:01 Hazelesque I was thinking of having our home-grown ENC generate a .yaml file, and having Salt read it in somehow...
13:01 AndreasLutro custom pillars could also be an option unless you need to match in pillar/top.sls
13:01 baoboa joined #salt
13:02 Hazelesque AndreasLutro: I have looked at that briefly... we have a very, uh, minimal salt install here... we currently use it just for remote command execution and for interrogating hosts... so we have literally nothing in /srv/salt
13:02 Hazelesque we just drop an /etc/salt/minion file on the hosts that points it at the master
13:03 Hazelesque and the master is pretty much as-shipped
13:03 subsignal joined #salt
13:04 Hazelesque to my knowledge, we don't run "highstate"
13:04 Hazelesque as we have no states configured
13:05 AndreasLutro you don't need to run highstates for /srv/salt/_grains/ to work
13:05 Hazelesque AndreasLutro: ah, OK... I saw the language "The default path would be /srv/salt/_grains. Custom grains will be distributed to the minions when state.highstate is run, or by executing the saltutil.sync_grains or saltutil.sync_all functions." in the documentation
13:05 Hazelesque /should/ I be defining them on the master and then syncing them?
13:06 Hazelesque or should I just use our existing configuration management system (cfengine3) to drop files in /srv/salt/_grains on all hosts?
13:06 AndreasLutro /srv/salt/_grains/ is on the master
13:07 AndreasLutro not sure if you can do the same on the minion
13:07 AndreasLutro but in any case no reason not to do it on the master, makes it easier to keep them in sync
13:07 Hazelesque AndreasLutro: how does that interact with the grains-dirs config setting in the minion config? https://docs.saltstack.com/en/latest/ref/configuration/minion.html#grains-dirs
13:08 AndreasLutro hmm, not sure
13:08 AndreasLutro I suspect grains_dirs expects yaml files
13:08 AndreasLutro but that's just a guess
13:09 Hazelesque AndreasLutro: basically our current infra, we have a python script (/var/cfengine/modules/enc) that conses up a dict of stuff (like {'client': 'xyzcoffee', role: 'mysql', region: 'london'}) based on parsing the hostname (obtained with socket.get_fqdn()) with regexes... and it then spits it out in key-value format for cfengine to parse... it wouldn't be that hard for me to make it write out a .yaml file too...
13:10 Hazelesque it's horrible, and I /really/ want to replace it with salt pillars or something... but for now, this is what we have
13:10 Hazelesque and it's what our cfengine policy uses to decide what configuration to apply to what hosts
13:11 Hazelesque and I'd like to be able to target individual hosts based on the same things
13:11 AndreasLutro Hazelesque does each minion have access to the cfengine script?
13:11 Hazelesque (N.B. it actually does more than this...)
13:12 AndreasLutro or only the master
13:12 Hazelesque that script is installed on each and every machine ("minion") and is currently called by CFEngine... which then parses the crap it produces on stdout
13:12 Hazelesque so, yes, Salt could definitely execute it
13:12 AndreasLutro I would try writing a custom grain for it
13:12 Hazelesque or I could modify the script to spit out a copy in YAML to a file on disk somewhere
13:12 AndreasLutro but hard for me to predict if it'll work
13:13 Hazelesque OK
13:13 Hazelesque so. uh, custom grains... these are normally bundles together with states and custom modules and other jazz in /srv/salt on the master, and then distributed out to the minions?
13:14 AndreasLutro yeah
13:14 Hazelesque "distributed" in the sense that the files get copied?
13:14 AndreasLutro I'm not sure exactly how the distribution works but yeah
13:14 Hazelesque or in the sense that the code is run, and the data produced is sent to the minions?
13:14 AndreasLutro nah the grain python code files are copied somehow and executed on deman
13:14 AndreasLutro d
13:14 AndreasLutro on the minion
13:15 Hazelesque OK, so the code definitely executes on the minions, I could reasonably assume that I could open files on the local host, do socket.get_fqdn(), whatever and it would be running on the minion, not on the master ("on behalf of" the minion)?
13:16 AndreasLutro indeed
13:16 Hazelesque OK
13:17 dthom91 joined #salt
13:18 Hazelesque AndreasLutro: and, if I create custom grains in /srv/salt/_grains... will those just magically end up on the minions? (assuming a setup where all I have done is installed salt from RPMs, and set the IP address of the salt master in /etc/salt/minion on each minion)
13:18 teebes joined #salt
13:18 AndreasLutro like the docs say you have to call that sync module function
13:18 Hazelesque or do I in fact need to take one of the steps mentioned in the documentation -- configuring "highstate" runs, or using saltutil.sync_*
13:18 Hazelesque ah, OK
13:19 favadi joined #salt
13:20 dthom911 joined #salt
13:20 tmclaugh[work] joined #salt
13:20 Hazelesque AndreasLutro: thanks, I'll give this a shot! :)
13:21 Hazelesque apologies for the newb questions, am still used to the CFEngine way of doing things, and have barely scratched the surface of Saltstack -- mostly using it for remote execution atm :)
13:21 AndreasLutro no worries
13:21 AndreasLutro but I recommend spinning up some local VMs and just trying stuff out
13:21 Hazelesque mm, yeah
13:22 gerhardq1x joined #salt
13:22 BogdanR joined #salt
13:22 Pallando joined #salt
13:22 dwfreed joined #salt
13:22 Hazelesque tbh, right now, what I really want to do is just set a single grain on hosts that have had a specific maintenance script run on them...
13:23 Hazelesque so I could just use
13:23 Hazelesque salt-call grains.set 'blahblahblah'
13:23 tzero joined #salt
13:23 Hazelesque at the end of the script
13:23 Hazelesque but since I already have a way of setting "flags" (touching files in a special directory, which my ENC script then sets as "classes" in CFEngine)...
13:23 Hazelesque it seems like a good opportunity to do it properly
13:24 amcorreia joined #salt
13:24 Hazelesque and thus keeping the two in sync
13:25 Hazelesque AndreasLutro: oh, one last thing... I notice it's common for people to keep their states, pillars, modules and such in version control (e.g. Git, Mercurial, etc)... should I keep all of /srv/salt in one repo? or one repo for /srv/salt/states (?), one repo for /srv/salt/pillars (?), one for modules, one for grains, ...?
13:26 AndreasLutro do whatever suits you best
13:26 Hazelesque ah, hm
13:26 babilen Hazelesque: I'd recommend to use GitFS -- https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html
13:26 Hazelesque the problem is I have no idea what suits us best! haha
13:27 Hazelesque babilen: ah, i.e. not using an on-disk FS on the master at all, but having the master serve files from Git?
13:27 babilen And just organise your repositories how you see fit. Using a separate repositories for top files is advisable if you plan to use environments
13:27 Hazelesque s/on-disk FS/& for the files from /srv/salt
13:27 babilen Indeed
13:28 Hazelesque babilen: OK, so, "states" define kinda recipes for how to do a thing (how to install apache, how to configure a vhost, how to install ntp, ...)?
13:28 babilen You might also want to configure your master (and minions) with https://github.com/saltstack-formulas/salt-formula/
13:28 Hazelesque and "top files" define which states get run on what minions, with what options?
13:29 babilen Just which states (or rather SLS files) are being targeted to which minion
13:30 Hazelesque babilen: so, uh... would an SLS file be "install apache" or "set up web server for XYZ coffee"? or would I have a "generic apache" SLS and a "Xyz Coffee Co Website" SLS that imports/calls the former somehow, with just the xyzcoffee one being in the top file?
13:30 babilen You also have execution modules which contain the functions you run interactively on the master (or minion). States (not SLS files, but the pkg.installed kind) are implemented on top of execution modules and simply add logic on top of it. That allows them to check if they have been achieved already and act accordingly if they haven't
13:31 babilen Hazelesque: Well, that is a tricky question. The general trend is to define generic formulas (SLS files) that work on every platform and allow the user to configure the service in question however he/she sees fit.
13:31 babilen You find examples of these formulas on https://github.com/saltstack-formulas
13:32 favadi joined #salt
13:32 babilen They are being configured with data from the "pillar" which are essentially Python dictionaries that are made available to minions
13:32 Hazelesque babilen: so, execution modules are things like "pkg.version blargh", "pkg.upgrade blargh version=1.2.3", ... and states implement the whole "convergent, desired-state configuration" paradigm that Mark Burgess et al came up with -- i.e. check if X is true, if not, take action to make it true?
13:32 babilen exactly
13:33 Hazelesque cool :)
13:33 babilen https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.aptpkg.html#salt.modules.aptpkg.install vs https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html#salt.states.pkg.installed
13:33 babilen (and pkg.installed would use pkg.install internally to actually install the package)
13:34 Hazelesque (makes sense, saves duplication)
13:34 lporras joined #salt
13:34 Hazelesque out of interest....
13:34 Hazelesque is there a concensus on how to manage software patching?
13:34 Hazelesque e.g. do you pin versions of packages in states, then change the version that are pinned?
13:34 Hazelesque or, have e.g. yum-cron run everywhere and just always install the latest?
13:35 favadi joined #salt
13:35 Hazelesque or, e.g. have yum-cron (or some other auto-updater), but then use something like Red Hat Satellite content views to "gatekeep" which packages are allowed on dev, test, prod servers?
13:36 Hazelesque or never do in place upgrades, and just use image-building tools like packer, veewee, diskimage-builder... and throw away VMs and replace them periodically?
13:36 Hazelesque and are there any of these approaches that salt is particularly good at? or is patch management fully none of salt's business?
13:37 illern_ joined #salt
13:37 jvz joined #salt
13:37 murrdoc joined #salt
13:38 DammitJim joined #salt
13:41 jaybocc2 joined #salt
13:42 mik__R joined #salt
13:44 yuhlw joined #salt
13:46 jvz Hello. I keep getting a SaltReqTimeoutError when trying to run a salt state on a minion, even if I run it with a timeout of -t 240. The minion is running over a very slow connection. Any help would be appreciated.
13:48 aphor joined #salt
13:48 babilen jvz: I'd use salt-ssh for that, apparently the connection is too slow/lossy to enable proper communication between the minion and master
13:48 aphor GM #salt
13:49 jvz Ok thank you @babilen! I will try that
13:49 edrocks joined #salt
13:49 breakingmatter joined #salt
13:50 furrowedbrow joined #salt
13:51 ggoZ joined #salt
13:56 ventris_ joined #salt
13:58 jqce joined #salt
14:00 JDiPierro joined #salt
14:00 ventris joined #salt
14:05 aparsons joined #salt
14:06 pyropoptrt joined #salt
14:07 mik__R joined #salt
14:07 penguin_dan joined #salt
14:12 hasues joined #salt
14:12 hasues left #salt
14:12 jvz Is it possible to use salt-ssh to target a NATted minion behind a firewall somewhere over the internet?
14:12 mpanetta joined #salt
14:12 aphor jvz: that would require some kind of ssh routing logic, which sounds problematic to me.
14:12 aphor jvz: the whole point of NAT is the assumption that NAT hosts are NOT peers on the Internet, and cannot receive incoming traffic from Internet peers.
14:12 trph what does "mapping values not allowed here" mean? http://paste.debian.net/320453/
14:13 lothiraldan joined #salt
14:13 aphor trph: in YAML syntax a  "- key: value" is a mapping, like a Dict().
14:14 anotherZero joined #salt
14:15 aphor trph: in your case I think you forgot the colon after "pkg.installed"
14:16 teryx510 joined #salt
14:17 aphor trph: like this http://paste.debian.net/320455/
14:17 favadi joined #salt
14:17 aphor trph: then fix indentation like this http://paste.debian.net/320456/
14:18 trph aphor, already fixed it
14:18 trph thanks allot
14:18 teebes joined #salt
14:18 aphor trph: http://yaml.org/ <-- worth a quick read.
14:19 TooLmaN joined #salt
14:19 aphor the indentation isn't strictly required, but is conventional style in Salt AFAICT.
14:19 otter768 joined #salt
14:21 racooper joined #salt
14:22 numkem joined #salt
14:23 jvz aphor: Thank you. I will try a reverse ssh tunnel
14:23 quix joined #salt
14:25 aphor jvz: make sure you mention IPv6 would have made this easy ;)
14:28 murrdoc joined #salt
14:29 cpowell joined #salt
14:29 murrdoc joined #salt
14:30 bmcorser is there a way to send files from outside salt:// to the minion?
14:30 murrdoc depends
14:30 murrdoc http ?
14:30 mehakkahlon joined #salt
14:30 bmcorser i wanted to use file.recurse or so
14:30 murrdoc depends on the source
14:31 trph left #salt
14:31 trph joined #salt
14:31 bmcorser what do you mean?
14:31 bmcorser like where on the master?
14:31 bmcorser > source
14:32 aphor bmcorser: maybe you should consider a separate Artifactory (or workalike) box?
14:32 bmcorser i am hacking it at the moment by making a tempdir inside salt:// and using file.recurse on that
14:33 bmcorser artifactory .. !? i don't see the relevance
14:34 aphor bmcorser: offload the bulk data distribution from salt master to another box.
14:34 bmcorser ah right
14:34 bmcorser it's not in great bulk
14:35 bmcorser specifically i need to copy front end assets down to minions
14:35 aphor bmcorser: until you get a lot of minions pulling it in parallel..
14:35 aphor bmcorser: do the assets live in a repo or a build slave?
14:38 bmcorser aphor: build slave
14:39 bmcorser (which also happens to be salt master)
14:40 fii-fi anyone around to help with an issue while using salt to create a routing_table in aws please ?
14:40 fii-fi doesn't seem to recognise either the vpc_name or vpc_id
14:41 aphor bmcorser: I'm working on something similar.
14:41 bmcorser oh cool
14:41 jvz \help
14:41 fii-fi Getting a Failed to create route table: VPC Salt-VPC does not exist.. error
14:41 bmcorser aphor: you might be interested in this: https://github.com/bmcorser/git-tags-py
14:41 fii-fi help plz ....we're almost there
14:42 jaybocc2 joined #salt
14:42 bmcorser sorry fii-fi i can't help :(
14:42 aphor bmcorser: I think I'm going to have the build slave emit an event, and run a reactor on a repo box (which could be on the salt master host) to rsync built artifacts to an archive all the minions can pull from. Then my build slaves are disposable.
14:42 fii-fi bmcorser: thanks
14:43 bmcorser aphor: sounds quite sophisticated
14:44 bmcorser i'd love to be able to use rsync ... since i'm using this for deployment of incremental development changes, it's a perfect use case
14:45 Tyrm joined #salt
14:55 bmcorser we're not quiet there on continuous integration, i'll be triggering the build/deploy pipeline manually
14:55 colegatron joined #salt
14:55 colegatron I am not sure if my previous lines were sent after my disconnection
14:55 colegatron I have a pillar with a cfg variable that holds all configuration for my apps.
14:55 colegatron and it is loaded as the first pillar for all (*) minions
14:55 colegatron on a application pillar (loaded after) I try to do {% set cfg = salt['pillar.get']('cfg', '') %} to have the cfg variable available and then use it to populate some values on the app pillar with it
14:55 mage_ joined #salt
14:55 colegatron is that not possible or maybe there is some other way to import the cfg variable into the application pillar?
14:55 cpowell joined #salt
14:55 Rumbles joined #salt
14:55 Ashok joined #salt
14:55 usernkey joined #salt
14:55 mik__R joined #salt
14:55 dthom91 joined #salt
14:55 usernkey hi folks
14:55 dthom911 joined #salt
14:55 dyasny joined #salt
14:55 usernkey I have some issue and I would like to share it with you :)
14:55 usernkey [root@salt-master02 states]# salt --version salt 2015.5.5 (Lithium)
14:55 usernkey [ERROR   ] Unable to checkout branch prod:prod: 'git checkout origin/prod:prod' returned exit status 1: error: pathspec 'origin/prod:prod' did not m... known to git
14:55 akitada joined #salt
14:55 usernkey ext_pillar:   - git: prod:prod file:///root/repos/pillar
14:55 kawa2014 joined #salt
14:55 usernkey seems this does not work anymore
14:55 zmalone joined #salt
14:55 usernkey I just migrate the same conf and same salt version from Centos 6 to Centos 7
14:56 usernkey installed from epel repo
14:56 usernkey weird
14:56 thalleralexander joined #salt
14:56 SheetiS joined #salt
14:57 usernkey any clue ?
14:58 _JZ_ joined #salt
14:58 usernkey [root@salt-master02 pillar]# pwd /root/repos/pillar
14:58 usernkey [root@salt-master02 pillar]# git branch * prod
14:59 usernkey [root@salt-master02 pillar]# cat top.sls prod: ############# GLOBAL PILLARS #####################################   '*':   - global
14:59 usernkey sorry
14:59 bhosmer joined #salt
14:59 usernkey [root@salt-master02 pillar]# cat top.sls
14:59 usernkey prod:
14:59 usernkey ############# GLOBAL PILLARS #####################################
15:00 usernkey '*':
15:00 aphor usernkey: please use a pastebin
15:00 Norrland usernkey: hastebin
15:00 usernkey - global
15:00 Norrland left #salt
15:00 aphor usernkey: also, maybe you should ask about git errors in #git
15:01 aphor usernkey: https://en.wikipedia.org/wiki/Pastebin
15:01 usernkey http://pastebin.com/JrVR63dx
15:03 I joined #salt
15:03 usernkey I do not think is git related as if I change the prod:prod with just prod in the master conf it works I just loose the maping
15:08 catpig joined #salt
15:09 bhosmer joined #salt
15:11 debian112 joined #salt
15:12 timoguin_ joined #salt
15:12 aphor usernkey: are you using gitfs?
15:12 kaptk2 joined #salt
15:13 andrew_v joined #salt
15:14 usernkey yes
15:14 jeffpatton1971 joined #salt
15:15 usernkey http://pastebin.com/PbL8LQqe
15:16 usernkey here my master conf
15:20 Pixcell joined #salt
15:20 Pixcell Hello, Does someone knows where it is written that minions running on windows will always use win_pkg for pkg.installed and pkg.removed, even if another package provider is provided in the .sls file ?
15:21 bastion1704 joined #salt
15:21 Pixcell (I can successfully call my custom package provider list_pkgs function, or any other, except install and remove)
15:22 aphor usernkey: you have a "prod" environment in your top.sls and this will make gitfs look for a "prod" branch of your gitfs roots.
15:23 aphor usernkey: gitfs is complaining that it can't check out origin/prod:prod
15:28 CheKoLyN joined #salt
15:28 usernkey as I was following the doc on the wiki
15:28 usernkey https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.git_pillar.html
15:28 usernkey and it was working correctly (not complainin at least :) ) on CentOS 6
15:37 sunkist joined #salt
15:37 giantlock joined #salt
15:38 quix joined #salt
15:39 jaybocc2 joined #salt
15:39 usernkey so If I had another env example dev in the top.sls and I have a branc called dev the mapping is automatic right ?
15:39 usernkey h
15:40 bdrung_work hi. i found various typos. in which branch should i fix them? develop or 2015.8?
15:45 pullphinger joined #salt
15:48 dthom911 joined #salt
15:49 breakingmatter joined #salt
15:51 fii-fi Anyone available to help with a question re: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.boto_vpc.html
15:51 fii-fi plzzzzz
15:52 fii-fi https://github.com/saltstack/salt/issues/28523
15:52 penguin_dan joined #salt
15:53 Brew joined #salt
15:53 dfinn joined #salt
15:57 jqce joined #salt
15:57 conan_the_destro joined #salt
16:00 rm_jorge joined #salt
16:00 PeterO joined #salt
16:02 zsoftich2 joined #salt
16:02 Pixcell Hello, Could someone show me how does salt decide which package provider to use ? Even when I specify another 'provider' in my SLS file, it still uses win_pkg for the install and remove functions
16:03 dthom91 joined #salt
16:03 dthom911 joined #salt
16:07 sdm24 joined #salt
16:11 SpeeR joined #salt
16:12 bastion1704 joined #salt
16:13 JDiPierro Does anyone have a separate pillar repo for vagrant-specific pillar data? We do at my company and I despise having to update separate pillar repos.. Everybody else doesn't care and says it's proving out that we can swap out pillars and have everything work..
16:13 jeffpatton1971 joined #salt
16:14 johtso joined #salt
16:15 thefish joined #salt
16:15 jhauser joined #salt
16:18 jakehilton joined #salt
16:20 otter768 joined #salt
16:21 jakehilton trying to do a base install of a salt master on ubuntu 14.04.3.. added the official salt stack repo but it's getting dependency failures.
16:21 jakehilton salt-master : Depends: sysv-rc (>= 2.88dsf-24) but 2.88dsf-13.10ubuntu11.1 is to be installed or                         file-rc (>= 0.8.16) but it is not installable                Depends: salt-common (= 2015.8.1+ds-1) but it is not going to be installed                Depends: python-crypto (>= 2.6.1) but 2.4.1-1ubuntu0.1 is to be installed                Depends: python-msgpack but it is not installable                Depends:
16:21 jakehilton any help would be much appreciated.
16:22 teebes joined #salt
16:23 oznah try to do some simple pattern matching in jinja. having a hard time. basically, trying to pull ipv4 grain and if ip starts with x then do something if ip starts with y then do something else. is this possible?
16:24 oznah i can match on a specific ip, but i really just care about the first octet of the ip.
16:25 fii-fi joined #salt
16:25 beautivile joined #salt
16:25 zsoftich2 oznah: you can use cidr to pull addresses...dunno if that helps
16:25 zsoftich2 https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.network.html#salt.modules.network.ip_addrs
16:26 oznah ie. {% if '1.2.3.4' in grains['pv4'] %} works, but I want to be able to do {% if "1.*" in grains['ipv4'] %}
16:27 jaybocc2 joined #salt
16:27 fredvd joined #salt
16:29 oznah zsoftich2: how would that help with the match?
16:29 edulix joined #salt
16:29 zsoftich2 {% if salt['network.ip_addrs'](cidr='1.0.0.0/8') %}
16:29 whytewolf oznah: cause you can give it a cidr to do matching. such as 1.0.0.0/8
16:30 alemeno22 joined #salt
16:30 jakehilton_ joined #salt
16:30 zsoftich2 it returns a list of address that match the subnet...and an empty list evals to False
16:30 fii-fi whytewolf:  Can you please help us with https://github.com/saltstack/salt/issues/28523 ?
16:31 leev salt.modules.network.ip_in_subnet(ip_addr, cidr)
16:31 leev Returns True if given IP is within specified subnet, otherwise False.
16:31 oznah whytewolf: now i understand thanks. I'll test this out and see how it goes
16:32 whytewolf fii-fi: not really. I don't work with the boto states.
16:32 fii-fi whytewolf: np . thanks
16:35 morissette joined #salt
16:35 morissette Is there anyway to just get the stdout only of a cmd.script?
16:35 PeterO joined #salt
16:36 sdm24 oznah: you can also do {% if grains['ipv4'][0].startswith('1.') %}
16:36 morissette http://pastie.org/private/5fnua0a0j9m4hjji8lrkqg
16:38 beautivile joined #salt
16:39 sdm24 morissette: as far as I know, you can only use cmd.run_stdout, I don't think there is an equivalent for scripts
16:39 btorch hmm I'm getting this error "[CRITICAL] Could not deserialize msgpack message" when trying to a "salt-run jobs.list_jobs" .. seems like the jid is related to a highstate running on the master itself which is also a minion
16:39 morissette yeah i tried cmd.run_stdout
16:40 btorch anyone know how I can kill or remove that job ?
16:40 morissette guess I'll just a build a parser
16:40 sdm24 morissette: one work around would be to have 2 module calls, one to file.managed a script over, another to cmd.run_stdout it
16:41 sdm24 btorch: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.kill_job
16:41 btorch jobs.active doesn't show me anything active
16:42 btorch sdm24: thanks
16:42 sdm24 it could also be the job ran, for some reason it couldn't deserialize (I get that message too, once every while, don't know why), and salt moved on
16:42 sdm24 what happens if you salt-run jobs.list_job <jid> for it?
16:43 ajw0100 joined #salt
16:44 btorch sdm24: says that data failed to copile
16:44 btorch sdm24: sorry no, that was for lookup_jid one
16:46 btorch sdm24: hmm I wonder if this is still running the saltutil.sync_all , but I ran that like 30min ago
16:47 scoates joined #salt
16:48 btorch that seems strange though cause the jid keeps on changing and seems stuck on master
16:50 btorch would the saltutil.sync_all be calling the mine.update function ?
16:51 Adobeman joined #salt
16:53 mullein hi Adobeman!
16:54 sdm24 btorch: i had a lot of those errors because I changed a minion's files in /var/cache/salt/master/minions, for a minion that did not exist (long story)
16:54 sdm24 deleting the offending fake-minion's folder took care of it
16:58 penguin_dan joined #salt
16:59 sdm24 with the fake minion, I copied over another minions files, and replaced all instances of the first minion's name with the second in data.p and mine.p, but that included accidently changing a pillar value in data.p
16:59 btorch yeah right now I'm unsure what's going on, I think this sync_all is still runnig but I can't be sure
16:59 sdm24 I'm not sure exactly which element broke it
16:59 sdm24 but I couldn't target on grains at all, and the log was filled with "could not deserialize" messages
16:59 btorch I'm thinking about shutting down salt and moving /var/cache/salt/master out of the way
16:59 sdm24 I tried to create the fake minion because I have a gitfs environment mounted to salt://somefile, and I keep getting [Warning] messages in the log that "no files were found in minionfs cache for minion ID 'somefile'"
16:59 btorch don't think that will make a difference on the minions though if there are jobs running there
16:59 sdm24 btorch: I would stop the salt-master service first
16:59 sdm24 and then delete the cache
16:59 sdm24 btorch: but the master can't deserialize the info being sent to the minions, is at least my understanding of the issue
17:00 sunkist joined #salt
17:00 writtenoff joined #salt
17:01 fii-fi Can anyone help with https://github.com/saltstack/salt/issues/28523#issuecomment-153394551 please ?
17:02 Bryson joined #salt
17:02 jalbretsen joined #salt
17:03 sdm24 fii-fi: add "- require: \n   - boto_vpc: 'Ensure VPC exists'. Let me write up a gist
17:03 btorch ok I think that list_jobs is what is causing jobs to get replaied
17:04 fii-fi sdm24: thanks
17:04 darix joined #salt
17:04 ageorgop joined #salt
17:05 sdm24 https://gist.github.com/sdm24/a189ba0b218d2d8ff06b
17:05 sdm24 check out https://docs.saltstack.com/en/latest/ref/states/requisites.html#require for more info and examples
17:06 sdm24 fii-fi: but basically, the first part will run, and the other parts will only run if the first succeeds
17:06 mpanetta joined #salt
17:11 malinoff joined #salt
17:12 jeffspeff joined #salt
17:14 jeffpatton1971 my search-fu isn't working today, is there a state for installing a package via wget?
17:14 jeffpatton1971 all i'm getting is info on the saltstack bootstrapper
17:15 JDiPierro joined #salt
17:17 malinoff joined #salt
17:17 fii-fi sdm24: https://paste.fedoraproject.org/286512/46570770/
17:17 fii-fi still the same
17:17 ggoZ joined #salt
17:18 sdm24 does the first step create the VPC table?
17:18 fii-fi sdm4:Failed to create route table: VPC Salt-VPC does not exist..
17:18 fii-fi sdm4: yeah
17:19 ggoZ joined #salt
17:19 fii-fi sdm4: problem seems to the vpc_name. Its just not picking it up
17:19 sdm24 are you running test=True? Because then it would say it would create the VPC, so it moves on to step 2, which tries to update teh VPC but can't because it wasn't actually created
17:19 sdm24 I don't use/know boto VPC, so I can't help there, sorry
17:20 szhem joined #salt
17:21 fii-fi sdm4: https://paste.fedoraproject.org/286516/14465712/
17:21 fii-fi sdm4: thanks anyway
17:21 impi joined #salt
17:22 sdm24 fii-fi: no problem, it seems like its an error with the boto_vpc.route_table_present state. Not sure if its a code issue on their end or what
17:22 Fiber^ joined #salt
17:22 penguin_dan joined #salt
17:24 sdm24 fii-fi: you might want to try the execution module https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.boto_vpc.html. You can call it in a state using the "module.run" state
17:25 fii-fi sdm24: yeah tried that earlier
17:26 jeffspeff looking at the example "salt -G 'os:CentOS' test.ping" how would i match all minions that aren't CentOS? salt -G 'os!:CentOS' test.ping   ??
17:26 malinoff joined #salt
17:27 sdm24 jeffspeff: use a compound matcher. "salt -C "* and not G@os:CentOS"
17:27 sdm24 https://docs.saltstack.com/en/latest/topics/targeting/compound.html
17:28 jeffspeff sdm24, thank you
17:28 malinoff joined #salt
17:28 sdm24 you're welcome
17:29 Xangria joined #salt
17:29 Xangria left #salt
17:29 masterkorp Hello
17:33 lothiraldan joined #salt
17:34 ageorgop joined #salt
17:34 baweaver joined #salt
17:35 fii-fi *sigh*
17:35 fii-fi is there a problem ????
17:35 RedundancyD joined #salt
17:35 masterkorp nah
17:35 masterkorp salt is awesome
17:35 fii-fi for real ....
17:36 fii-fi How can I hate reactors  events
17:36 fii-fi salt-cloud ,,,,
17:36 RedundancyD tough question for you salt exprots. I use salt for managing my servers but was thinking of using it for my lab machines.  Problem is they are triple boot.
17:36 fii-fi Just need help with https://docs.saltstack.com/en/latest/ref/states/requisites.html#require
17:37 RedundancyD would one host be able to have the same key but behave differently based on grains. Or would getting the keys configure be the problem.
17:38 fii-fi Having a blast with openswan + salt-cloud
17:38 fii-fi Just need to fix this ....
17:38 mephx joined #salt
17:42 bhosmer joined #salt
17:43 Ahlee Are you supposed to be able to target individual nodes in syndic environments?
17:43 Ahlee salt \* test.ping returns the 5 expected nodes from the master of master, but i can't target individual nodes from teh master of master
17:43 sdm24 fii-fi: if a state file doesn't have any "- require:" or any other requisites, the states will by default run in the order they are listed. I'm not sure exactly what is causing your problem (could just be bad python code for the state module), but I would update your ticket
17:44 whytewolf RedundancyD: Theoreticly: having the same keys in the minion would be fine [since they are the same minion] and the grains would line up with the OS. however you might run into caching issues on the master
17:46 iggy *will
17:48 penguin_dan joined #salt
17:49 breakingmatter joined #salt
17:53 mapu joined #salt
17:53 herlo joined #salt
17:54 herlo left #salt
17:54 Ahlee somebody with syndic experience please wake up
17:56 dthom91 joined #salt
17:57 fii-fi sdm24: really appreciate your help
17:57 fii-fi sdm24: thanks
17:57 sdm24 fii-fi: no problem, its a slow day at work haha. Happy to help
17:58 timoguin_ joined #salt
17:58 fii-fi sdm24: off now
17:58 fii-fi later !
17:58 sdm24 take it easy
17:59 whatapain joined #salt
18:00 Jimlad joined #salt
18:07 aparsons joined #salt
18:07 snarfy joined #salt
18:08 beautivile wondering if someone here has an answer to my current issue, I am attempting to set multiple cron entries for a user from a single state and keep getting "Too many functions declared in state 'cron' in SLS 'XXX'".  Any help or suggestion of a best practice as to how to do this is appreciated.  https://gist.github.com/beautivile/07abdc0706c78665af43
18:10 iggy Ahlee: I'm going to go ahead and blame whatever ancient version of Salt you're on now
18:11 wryfi joined #salt
18:11 bhosmer__ joined #salt
18:12 wryfi is there a way for an external pillar to know what environment it's being called from?
18:12 JDiPierro joined #salt
18:16 andrew_v joined #salt
18:21 otter768 joined #salt
18:23 oznah zsoftich2: thanks for your help earlier. network_ip_addrs worked like a champ
18:24 baweaver joined #salt
18:25 dthom911 joined #salt
18:26 murrdoc wryfi:  salt['config.get']('environment')
18:27 writtenoff joined #salt
18:27 iggy will that only work if environment is set in the config file? (vs targeted via the top file)
18:28 murrdoc config reads __opts__
18:28 wryfi murrdoc: thanks. iggy: good question.
18:28 murrdoc no ?
18:29 iggy I'm not sure, and don't have the time to rtfs... just something that jumped out at me
18:29 iggy should be easy enough to test
18:29 wryfi i think murrdoc is right, but yeah
18:29 murrdoc murrdoc is always right
18:30 murrdoc its what murrdoc believes
18:30 murrdoc its what keeps the murrdoc going
18:30 wryfi heh.
18:30 murrdoc its what keeps the world going round
18:30 wryfi how do i import salt in my ext_pillar?
18:30 murrdoc mebbe
18:30 wryfi just `import salt`?
18:30 murrdoc in the state file ?
18:31 murrdoc salt is available in jinja
18:31 wryfi no, i'm writing an external pillar
18:31 murrdoc in python yaeh import salt, import salt.utils
18:31 wryfi https://docs.saltstack.com/en/latest/topics/development/external_pillars.html
18:31 wryfi gotcha
18:35 wryfi hmm, i'm not sure where to look in the python salt module to find the calling environment
18:35 ajw0100 joined #salt
18:35 Ahlee iggy: latest, we're prepping our upgrade at last
18:37 * wryfi bets environment is actually in the __opts__ dict passed to ext_pillar
18:37 Ahlee __salt__ should have it
18:38 Ahlee in ext_pillars
18:39 * impi is away: Away
18:40 whatapain i love salt-cloud
18:41 snarfy joined #salt
18:43 ageorgop joined #salt
18:43 cberndt joined #salt
18:44 kofi_ray joined #salt
18:45 dthom911 joined #salt
18:46 jeffpatton1971 joined #salt
18:47 fii_fi joined #salt
18:47 fii_fi Anyone had the chance to look at this please ? https://github.com/saltstack/salt/issues/28523
18:51 breakingmatter joined #salt
18:51 pogotech joined #salt
18:53 wryfi Ahlee: bless you, somehow i overlooked __salt__ in the docs
18:55 ashirogl joined #salt
18:59 evle1 joined #salt
19:04 ashirogl1 joined #salt
19:05 dthom911 joined #salt
19:07 penguin_dan joined #salt
19:08 druonysus joined #salt
19:11 jaybocc2 joined #salt
19:12 dthom911 joined #salt
19:12 alemeno22_ joined #salt
19:15 dthom91 joined #salt
19:19 forrest joined #salt
19:20 denys joined #salt
19:21 edulix joined #salt
19:23 fii_fi please any boto guys here ???
19:23 fii_fi https://github.com/saltstack/salt/issues/28523
19:24 quix joined #salt
19:24 fii_fi could it be related to this ?
19:24 fii_fi https://github.com/saltstack/salt/issues?utf8=%E2%9C%93&amp;q=28534
19:24 pogotech left #salt
19:24 fii_fi we've spent a whole day in this ....
19:28 nofxrok joined #salt
19:32 sdm24 fii_fi: have you tried VPC_id? It seems like VPC_name won't really be added until 2015.8.2, since it missed the release window for 8.1
19:33 ajw0100 joined #salt
19:33 alemeno22 joined #salt
19:34 Rumbles joined #salt
19:36 toanju joined #salt
19:36 baweaver joined #salt
19:36 fii_fi sdm24: tried all of that mate !
19:36 fii_fi sdm24: been battling this all day
19:38 sdm24 fii_fi: dang, sorry I can't help more. I know (and hate) trying to fix some minor thing all day
19:38 fii_fi sdm24: tell me about it ....
19:39 sdm24 fii_fi: One thing you can try, if you have a testing environment, is to download the development branch version and try it there
19:41 fii_fi sdm24: sure. will try that now
19:43 morissette Can you have a service name be thing|otherthing?
19:45 hal58th morissette Maybe you can do a "onlyif" and do a test if /etc/init.d/thing exists. The do that again for another state for otherthing
19:45 morissette fair enough
19:46 hal58th morissette: I had to set up my only if like this... test -e /etc/init.d/thing && /bin/true || /bin/false
19:47 hal58th To get around the python shell limits
19:47 morissette Awesome; thanks!
19:47 hal58th welcome, that will save you an hour :)
19:48 morissette Maybe you've come across my next problem
19:49 morissette http://pastie.org/private/fiipyuhbiusj6ymkh6owq
19:49 morissette If I just require /usr/bin/salt-minion and /etc/init.d/salt-minion - do you think it will just all work lol
19:50 morissette some were installed via repo and yum where i had to rely on pip for others
19:50 morissette and pip doesn't install it as a service
19:50 jhauser joined #salt
19:51 NotBobDole joined #salt
19:52 sdm24 morissette: do you mean in a state .sls file? you would have to require the other states that use /usr/bin/salt-minion and /etc/init.d/salt-minion
19:53 morissette sdm24, yes
19:53 sdm24 https://docs.saltstack.com/en/latest/ref/states/requisites.html
19:53 morissette like this: http://pastie.org/private/scg0swf4xxfufvsoytknw
19:53 morissette mainly just add salt-minions-user-bin and etc-init as file.managed
19:53 sdm24 morissette: oh, yeah if you use "onlyif", you can do a command, like described above
19:54 ajw0100 joined #salt
19:56 sdm24 morissette: yeah, then just a - require: \n  - file: etc-init
19:59 morissette sdm24, I was thinking: http://pastie.org/private/ocnh1vpgzxb5xlaynqitw
20:01 sdm24 that looks good. Anytime /etc/salt/minion changes, salt-minion will restart
20:01 sdm24 which I assume is what you want
20:01 morissette indeed
20:02 morissette Is there a way to get a summary of a highstate run?
20:02 morissette vs per host
20:03 GreatSnoopy joined #salt
20:03 sdm24 morissette: you might want to put the /usr/bin and /etc/init.d file.managed states at the top, so they will run first. As it stands now, your state will first copy /etc/salt/minion, then try to start salt, but the service isnt in /etc/init.d yet
20:03 cyborg-one joined #salt
20:03 sdm24 morissette: add --summary to the end: "salt '*' state.highstate --summary"
20:03 giantlock joined #salt
20:04 penguin_dan joined #salt
20:04 morissette ahh good to know
20:04 morissette so it works top-down
20:04 sdm24 yep, except for requisites (like watch)
20:04 sdm24 and you can manually set an order with "- order:"
20:05 cberndt joined #salt
20:06 sdm24 https://docs.saltstack.com/en/latest/ref/states/ordering.html if you want more info
20:06 cberndt joined #salt
20:07 morissette appreciate it a lot; only a few days in so still learning tons
20:07 cberndt joined #salt
20:07 morissette so is it best practice to be as explicit as possible in your sls?
20:08 morissette I.E. I just set what I needed and not user:, group: etc
20:08 jhauser joined #salt
20:13 edulix joined #salt
20:16 forrest sdm24, Did digitalocean email you about a shirt?
20:17 colegatron Hello. There is some tutorial/doc/book/post about how to manage multiple configurations for applications (developers code), applications config (tomcats/logstash/db's/etc) using a CM software (saltstack preferred)?
20:18 colegatron I would like to find a workflow where developers apps code comming from different repositories and server-apps configs for those devapps and multiple environments (dev/prod/test) go as smooth as possible
20:18 Ahlee lovely, 2014.1.13 got installed
20:18 Ahlee i hate debian sometimes
20:19 forrest colegatron, That's a bit outside the scope of just a Salt tutorial as it goes into how your devs store code, as well as using continual integration systems. I can't think of anything off the top of my head that covers all of them, you'd probably want to go through the salt tutorial for salt stuff, then other tutorials for those components and hook them up
20:19 colegatron forrest, it is not about salt/CM itself. My issue is with the general management of all the code, configs and environments.
20:20 sdm24 forrest: I haven't heard anything from them, not even for signing up :( have you?
20:20 forrest colegatron, Store the code in repos, set up hooks to deploy/run salt after finishing CI checks, and there you go.
20:21 forrest sdm24, You should have gotten an email when you signed up. I heard from them earlier today. I would tweet at them, or email them. Did you put in the wrong email? lol
20:21 forrest or maybe it got marked as spam somehow?
20:23 fii_fi left #salt
20:23 ai joined #salt
20:24 sdm24 forrest: I entered twice just to be sure haha. I might've gotten it today, haven't checked that email yet
20:24 forrest sdm24, Maybe they excluded you for signing up twice, lol
20:24 ai2 joined #salt
20:25 colegatron forrest, every app is in its own repo. I would like to know about use cases that needs orchestrate/coordinate multiple services in real time (frontal web servers, multiple db engines (and its db's), search engines, etc) (and then all of that, but in multiple environments).
20:27 forrest colegatron, Hmm, well there is documentation regarding using orchestrate to achieve that kind of stuff: https://docs.saltstack.com/en/latest/topics/tutorials/states_pt5.html
20:27 forrest but I can't think of any use cases that a person has posted about.
20:28 iggy forrest: they did me
20:28 forrest iggy, link?
20:28 forrest iggy, Oh you mean the email
20:28 forrest iggy, I thought you meant an orchestration example
20:28 bhosmer joined #salt
20:28 iggy yes, hacktoberfest
20:30 forrest iggy, Nice
20:31 ai2 hi. Is it possible to use pkg.installed on Windows to get a specific package version installed? If so how?  I have been able to do that with pkg.install, but not with the state module/function pkg.installed.
20:31 hemebond ai2: There is win_pkg, but look at Chocolatey instead.
20:32 dthom91 joined #salt
20:33 thekabal joined #salt
20:34 thekabal Hello, on a Debian Wheezy machine, when trying to install Salt, I get: salt-minion : Depends: python-zmq (>= 13.1.0) but 2.2.0-1 is to be installed ; E: Unable to correct problems, you have held broken packages.
20:34 tanta_g joined #salt
20:34 ai homebond: Thank you. Could you tell me difference between using Chocolatey and win_pkg. Pros/cons?
20:34 teebes joined #salt
20:34 kulty joined #salt
20:34 openfly sounds like you need a python zeromq package that meets version requirements.
20:36 forrest thekabal, Yep, ++ on what openfly said.
20:36 morissette thekabal, http://pastie.org/10527494 - build from source
20:36 thekabal Ok, I tried to use https://repo.saltstack.com/#debian, but it doesn’t seem to have packages for amd64
20:38 forrest I don't think the saltstack repo has the zmq packages
20:38 forrest unless they've started including them now
20:39 zmalone forrest: I believe they are there on repo.saltstack.com?
20:40 whytewolf thekabal: you said this was wheezy? IIRC repo.saltstack.com doesn't have any wheezy packages
20:40 zmalone https://repo.saltstack.com/apt/ubuntu/ubuntu14/2015.8/ | grep zeromq
20:40 thekabal Yes, wheezy.
20:40 morissette thekabal, http://pastie.org/10527494 - build from source
20:40 zmalone somehow they are named zeromq3_4.0.4, which seems like a terrible name
20:40 forrest zmalone, Bleh, I didn't realize they were storing everything there now.
20:40 morissette and or ^
20:40 forrest zmalone, look buddy, we don't want to use the version to actually REPRESENT the version okay??
20:40 zmalone and I believe leads to terrible conflicts on most platforms, as it overrides 0mq 3 packages from the os with 0mq 4, and chaos ensues
20:41 forrest zmalone, Yes it's bullshit
20:41 whatapain when i do a salt '*' pillar.items i can see the pillar data that i'm looking for but if i do a salt '*' pillar.get item:value it doesn't return anything, if i do a salt-call pillar.get item:value it returns the correct item.  is this normal behavoir?
20:41 forrest zmalone, The packagers should seriously be ashamed of that crap
20:41 * thekabal laughs
20:41 forrest what's the other package that does this...
20:41 thekabal Ok, hmm. I’ve used the packages for all the other systems and I’d really prefer not to have one special butterfly
20:41 forrest jdk? There's definitely another rage inducing one that broke salt, because they put the version, then a SECOND version
20:42 forrest thekabal, Can't you just get an updated release from the main ubuntu repos? I don't feel like many poeple are building zmq by hand.
20:42 thekabal forrest, not Ubuntu, Debian Wheezy.
20:42 hemebond whatapain: I push double-quotes around "dict:stuff:here" and it worked.
20:42 forrest thekabal, Same thing ;)
20:42 jhauser joined #salt
20:43 hemebond whatapain: salt 'manager.dbp.local' pillar.get "tftp:preseed:path"
20:43 forrest thekabal, Seriously you shouldn't need to package that, if it's not working or there is a conflict because of some zmq naming crap, they need to fix it. That shit is packaging fails 101.
20:43 whatapain hemebond: no go, same issue
20:43 aidalgol joined #salt
20:43 thekabal forrest, Very much no. Ubuntu is based on Debian, but is NOT the same. Lots of differences, at least at the sys admin level.
20:43 hemebond whatapain: You have a master, yeah?
20:43 sdm24 joined #salt
20:43 forrest thekabal, I know, I'm just being a dick.
20:43 thekabal And agreed, this is packaging fail. :)
20:43 DanyC joined #salt
20:44 forrest Packaging screw ups really make me angry because it is NOT that hard.
20:44 whatapain hemebond: yup, pillar.items shows everything correctly and the minion is responding correctly with pillar.get, just not the master
20:44 ageorgop and this is why i run my own repo ...
20:45 Ahlee I'm seeing the same thing with jessie, actually. Add saltstack's repo, but 2015.x doensn't come through
20:46 ageorgop using 3rd party repos in productions always bites me in the ass.  I've been slowly ripping out all he ppa nonsense in our code
20:46 zmalone Ahlee: how are you adding them?
20:46 colegatron joined #salt
20:46 Ahlee zmalone: https://docs.saltstack.com/en/latest/topics/installation/debian.html
20:47 zmalone Okay, I was going to warn that pkgrepo.managed can misbehave on debuntu, but those instructions don't use it
20:47 baweaver joined #salt
20:47 hemebond whatapain: Not sure what to tell you. Should work fine. Does it at least print out the minion IDs?
20:47 whatapain hemebond: https://gist.github.com/mshirley/65f2c2e83520c2d17535
20:48 thekabal Allright, I’m trying to build from source.
20:48 snarfy joined #salt
20:49 hemebond whatapain: Is it a debian server?
20:49 hemebond er, minion
20:49 whatapain hemebond: centos minion which is why it's responding with the correct .rpm
20:49 hemebond No...
20:49 hemebond Right
20:49 whatapain it's just that the master can't seem to do a pillar.get for that key
20:49 thekabal Sigh. Huge mess, a pile of dependencies not met (libc6, libsodium, msgpack-python, etc)
20:50 thekabal Even with zeromq built from source
20:50 hemebond whatapain: I wonder if it has something to do with the use of grains...
20:50 hemebond whatapain: What if you remove the if else Jinja stuff?
20:51 whatapain hemebond: same issue
20:51 zsoftich1 joined #salt
20:51 hemebond whatapain: Putting quotes around "pkg_files:kafka" doesn't help?
20:51 thekabal Thanks anyways folks, have a lovely day!
20:51 zmalone thekabal: I *think* the saltstack people plan on opening up their new packaging system on their github account eventually
20:51 whatapain hemebond: nope
20:52 whatapain hemebond: not a big deal at the moment as long as the minion is getting the right information i guess
20:52 hemebond whatapain: Is there a command to make the minion update/broadcast its grains?
20:53 hemebond whatapain: https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.sync_grains
20:53 hemebond whatapain: probably irrelevant.
20:53 whatapain hemebond: got it, salt 'minion.localdomain' saltutil.refresh_pillar
20:53 whatapain hemebond: i was doing saltutil.sync_all but it doesn't do pillars :)
20:54 hemebond whatapain: Ah, good catch.
20:54 hemebond whatapain: Bit annoying that pillar.items worked.
20:54 whatapain agreed
20:54 whatapain and that the minion got the correct info as well
20:54 whatapain so weird
20:55 DanyC all, anyone able to help me out understanding why i should use salt-cloud vs boto/ masterless (how Ryan does) on AWS?
20:55 hemebond whatapain: I can maybe see it being an issue if the template was modified.
20:56 sunkist joined #salt
20:57 ageorgop thekabal: are you saying the wheezy packages are just hosed?   I honestly think salt should look into doing something like omnibus so the dependency hell can be minimized.  This is my biggest grip with these newer config management tools.  the dependencies just get out of control
20:57 Ahlee nice, 2014.1.7 must have had a bug in syndic
20:57 edulix joined #salt
20:57 Ahlee 2015.8.1 seems to work much beteter
20:57 Ahlee eh, close enough
20:58 morissette Most important sls of all time: http://pastie.org/private/g0l5bxkaludam1vgjesow
20:58 alemeno22_ joined #salt
21:00 hemebond morissette: http://pastie.org/10527535 FIFY
21:00 nofxrok joined #salt
21:00 whytewolf DanyC: well. I'm not to familure with Ryan's setup as I'm not in AWS. so I can't speak from experence. but there is 2 pieces currently missing from masterless. mine and reactors. if you don't need those then by all means use the masterless setup ryan puts forth. as it is open ended and no worry about how many servers you are running.
21:00 morissette eww what is windows
21:01 murrdoc its ironic morissette
21:01 murrdoc its ironic
21:01 morissette murrdoc, isn't it?
21:01 murrdoc dont u think
21:01 morissette I really do think
21:02 murrdoc its like calling chef
21:02 murrdoc from your salt master
21:02 morissette It's like 10,000 spoons when all you need is a knife
21:02 morissette or writing manifests as a chef to maintain your states
21:04 murrdoc ok u win
21:04 murrdoc this round
21:04 murrdoc until next time morissette
21:04 morissette awww
21:04 morissette I guess I really should be working
21:05 morissette ....
21:05 Tyrm_ joined #salt
21:05 alemeno22 left #salt
21:09 penguin_dan joined #salt
21:09 hayer joined #salt
21:10 DanyC whytewolf: i see, i need to think about cause for scaling i can easily use Cloudwatch api and do stuff with it...hard to pick
21:13 trph joined #salt
21:16 TooLmaN joined #salt
21:17 dthom91 joined #salt
21:17 baweaver joined #salt
21:18 snarfy joined #salt
21:21 whatapain what's best practice around statefiles and using module.function vs module: - function?
21:21 whatapain i know it doesn't really matter but is there good rule of thumb?
21:21 hemebond whatapain: use module.function where you can
21:22 whatapain k
21:22 hal58th i didn't even know there was a difference
21:22 hemebond whatapain: I think it recommends module.function in the docs/tutorial.
21:22 conan_the_destro joined #salt
21:23 whatapain Notice that we use two similar ways of denoting that a file is managed by Salt. In the /etc/ssh/sshd_config state section above, we use the file.managed state declaration whereas with the /etc/ssh/banner state section, we use the file state declaration and add a managed attribute to that state declaration. Both ways produce an identical result; the first way -- using file.managed -- is merely a shortcut
21:23 whatapain i like shortcuts :)
21:23 whatapain i think it's more readable too
21:24 linjan__ joined #salt
21:24 zmalone huh
21:24 zmalone https://launchpad.net/ubuntu/+source/zeromq3/4.0.5+dfsg-3ubuntu1~gcc5.1
21:24 hemebond whatapain:  Yeah, I think there's another page that recommends it for readability.
21:24 zmalone I guess it's a debian / ubuntu bit of insanity, and not just saltstack
21:24 whytewolf whatapain: it is a shortcut. the only place they have a true style guide is in the formula writing in which they say to use the shortcut method since it is easier to read. and is more in line with how the cli works
21:25 whytewolf well, they don't mention the cli bit. but i do
21:27 dynamicudpate joined #salt
21:29 ashirogl joined #salt
21:29 fii_fi joined #salt
21:30 fii_fi jfindaly : https://github.com/saltstack/salt/issues/28523
21:30 fii_fi Please don't close this
21:30 fii_fi we've already tried the requisites
21:30 fii_fi we just need this resolved
21:30 fii_fi thats all
21:31 sdm24 joined #salt
21:34 wryfi does anyone know what happens if you specify the same environment more than once in your top file?
21:34 wryfi e.g. if you have two 'base' sections - do they get merged? error?
21:34 hal58th try it
21:36 fii_fi hoepfully someone can help with this
21:36 fii_fi https://github.com/saltstack/salt/issues/28523#issuecomment-153394551
21:38 fii_fi jfindlay: Hi Justin, Please don't resolve this based on the assumption that thedrow's suggestion hasn't been tried out already. We discussed this is some detail with some of the guys in the IRC and they concluded it could be a bug. If requisites are required then one would assume this will be mentioned in the documentation.All we ask for is some assistance with this and if there are further steps involved. then the documentatio
21:41 hemebond fii_fi: What's the issue?
21:41 jfindlay fii_fi: your included state file does not use any requisites, so I think that that is the first place to start
21:42 wryfi ahem, for those following along, it breaks
21:42 hemebond Looks like a bug in boto module or something?
21:42 hemebond wryfi: Sounds about right :-D how were you declaring them twice?
21:43 hemebond wryfi: file_roots?
21:43 hemebond Oh, top.sls
21:43 fii_fi jfindlay:  you think we haven't tried that already ? have you ?
21:43 jfindlay fii_fi: also, the issue is not closed.  I haven't followed your irc conversation and am generally unfamiliar with the boto states
21:44 fii_fi jfindlay:  so leave it for someone else than
21:44 fii_fi we've spent an entire day on this....
21:44 hemebond Yeah, not closed, just tagged and added to a milestone.
21:44 zmalone jfindlay didn't close your ticket, he marked it "blocked", which presumably means "This user is blocked"
21:44 zmalone or that there's another bug preventing it from working, I don't know how they use it
21:45 fii_fi blocked ?
21:45 fii_fi for what reason ?
21:45 jfindlay https://docs.saltstack.com/en/latest/topics/development/labels.html#milestones
21:45 zmalone not blocked from the ticket, that your work, or the progress of the ticket, is blocked from moving further
21:45 hemebond fii_fi: It means the milestone is blocked. Which means your bug has to be resolved before the milestone can be completed.
21:45 fii_fi all we need is help with this
21:45 whytewolf https://docs.saltstack.com/en/latest/topics/development/labels.html#github-labels-and-milestones
21:46 fii_fi we're trying to migrate from ***** to salt on aws
21:46 zmalone fii_fi: saltstack offers paid support if you need help on a time schedule
21:46 fii_fi np
21:46 whytewolf blocked: "The issue is waiting on actions by parties outside of SaltStack, such as receiving more information from the submitter or resolution of an upstream issue. "
21:46 jfindlay fii_fi: it is blocked because the way the issue stands now, we need some more information.  At this point, I'd say that that is your sls file with the requisites that you say you have tried
21:46 sdm24 Can I use a require or something similiar in a reactor?
21:46 jfindlay and the result of a state run on that sls file
21:46 fii_fi this is bullshit
21:47 fii_fi I'll use terraform
21:47 fii_fi forget this
21:47 sdm24 I want salt to update the fileserver on a git push, and then run a state to push out the new files (via pillar opts, I can get the state working)
21:47 hemebond LOL
21:47 zer0def joined #salt
21:48 hal58th sdm24 you probably want reactor to trigger an orchestration state and then requires are used in orchestration. They just had a youtube about this
21:49 sdm24 hal58th: ok cool
21:49 hal58th sdm24: https://www.youtube.com/watch?v=qBYqo4lhwV4
21:49 sdm24 awesome thanks
21:49 hal58th welcome man
21:50 __number5__ joined #salt
21:52 sdm24 hal58th: I'm not sure if thats what I want, because I want the master to update the fileserver, and then send a state command to other minions
21:52 sdm24 I'll keep digging into it though, maybe it is what i want
21:52 nofxroky joined #salt
21:53 hemebond sdm24: So like, a git hook that tells the master to do a git pull and the master then runs highstate on some minions?
21:53 hal58th reactor to orchestration sls file. That file has git pull command and then a require to that for function state.highstate to all minions
21:54 sdm24 oh ok, I haven't used orchestration, so I'm not entirely sure. Hemebond: thats what I want. but salt-run fileserver.update, not git pull
21:55 sdm24 I have a post-receive hook that fires an event to the master, and the master successfully updates fileserver and runs the state, but it does them simultaneously, so gitfs does not finish updating, and teh new files aren't pushed out
21:55 whatapain if i define a package name in a pillar how can i reference that pillar when doing something like pkg.remove on the cli?
21:55 refnode joined #salt
21:56 hemebond sdm24: Can you post the sls? hal58th says you can just add a require in there.
21:57 geekatcmu Is there a reasonable way to prevent a particular runner from being called more than once in a single highstate?
21:57 sdm24 sure, and maybe you can haha, I was asking if it was possible
21:57 hemebond whatapain: Probably by doing a little bash thing with backticks.
21:57 hemebond So somehow running the pillar get inside the line for the pkg.remove
21:57 fii_fi left #salt
21:58 geekatcmu In this case, I have a runner referenced in a map file that is used to procure data from the master.  Naturally, that map is referenced from multiple places.
21:58 whatapain hemebond: something like salt '*' pkg.remove '\{{ pillar['common_pkgs']['java']\}}' ?
21:58 sdm24 https://gist.github.com/sdm24/d749dc90651787802171
21:59 hemebond whatapain: I don't think that works. I was thinking ... salt '*' pkg.remove `salt '*' pillar.get "common_pkgs:java"`
21:59 whatapain hemebond: oooooh, gotcha
21:59 hemebond whatapain:  But it's unlikely to return just the package name.
21:59 whatapain yea, then i'd have to grep out the stuff i don't want
21:59 hemebond So you will need to check the salt cli for formatting options.
21:59 hal58th whatapain, let me post my thing
22:00 hal58th whatapain: https://gist.github.com/hal58th/d1ede0414ddefb32f350
22:01 Tyrm joined #salt
22:01 seweryn joined #salt
22:01 whatapain hal58th: nice, thx
22:01 mik__R joined #salt
22:01 hal58th welcome
22:03 nkuttler joined #salt
22:06 whytewolf whatapain: salt '*' cmd.run 'salt-call pkg.remove {{salt.pillar.get("common_pkgs:java"}}' template=jinja
22:07 whytewolf whatapain: check with echo first of coarse
22:09 penguin_dan joined #salt
22:09 whytewolf little easyer to read then parsing json output on the backend
22:09 whatapain whytewolf: oh yea, much cleaner
22:10 DanyC joined #salt
22:12 hal58th whytewolf: I tried to get that to work and it never did. Guess I should have asked in IRC
22:13 whytewolf hal58th: I only learned about it by trying to prove a use case for pillar to a bunch of windows devs that were doing EVERYTHING through cmd.run
22:15 hal58th it still pipes it out on two lines instead of giving me the direct value though... Any way to fix that whytewolf?
22:16 hal58th hmmm nm, user error
22:16 whytewolf hehe okay
22:16 MadHatter42 joined #salt
22:17 hal58th I was using salt-call and didn't realize "local" means local output and not pillar local
22:17 whytewolf ahhh yeah
22:17 zer0def joined #salt
22:18 hal58th well this is going to up my effeciency greatly. thanks
22:18 whytewolf no problem. glad I could help
22:19 sdm24 hal58th, hemebond: thanks for the help, I'm testing my orchestrate state now
22:19 miked510 joined #salt
22:20 miked510 joined #salt
22:25 ajw0100 joined #salt
22:25 whytewolf ... huh. I never really paid attention to states.saltmod. I really should have.
22:27 ekristen joined #salt
22:27 opensource_ninja joined #salt
22:32 penguin_dan joined #salt
22:36 dthom91 joined #salt
22:38 keimlink joined #salt
22:41 armguy joined #salt
22:41 baweaver joined #salt
22:45 whatapain man, salt rocks
22:46 aurynn It does. Is.
22:46 sdm24 when it works, its awesome haha
22:47 whatapain :)
22:47 larsfronius joined #salt
22:48 aurynn if it doesn't work, just hold your tongue differently. ;)
22:52 forrest Yeah, I've been looking for gigs recently and the difficulty in finding a place that uses Salt is pretty bad.
22:52 breakingmatter joined #salt
22:52 forrest No one understands why, so I keep having to write examples for them to understand why I like salt so much
22:53 aurynn Salt doesn't have a lot of mindshare yet
22:53 forrest Yeah. I did an interview recently where they were using Chef, and I asked if they'd move to salt.
22:53 forrest They weren't interested.
22:54 whytewolf I feel like i have been living a lie. I didn't know until now that orchestrate state files could pass perfecttly well through state.sls [and most likely highstate] when the target for state.sls is the master
22:54 clintberry joined #salt
22:55 whytewolf forrest: I sometimes feel I should have passed on the possition i am in now cause they don't use salt. but then it was a 23K pay increase. and I was leaving a company in the middle of a merger.
22:56 forrest whytewolf, You're using chef now right?
22:56 forrest At some point you just have to bite the bullet, I'd consider a chef shop, but it would have to be a DAMN good shop
22:56 whytewolf they use puppet here. but I don't touch it.
22:56 forrest But I also quit my job, so I probably shouldn't be too picky
22:56 forrest Puppet...
22:57 forrest whytewolf, Is puppet still awful?
22:57 forrest I haven't used it in almost 3 years now after they screwed me TWICE
22:57 whytewolf forrest: from what I see of it. yes
22:57 forrest okay, I've looked over the syntax a few times, and it doesn't seem to have changed at all
22:57 hemebond forrest: It's not that nice. Works okay.
22:57 hemebond forrest: Obviously I prefer Salt too.
22:58 whytewolf last time i actually used puppet was for a home project. put it on a few of my machines. and the defaults changed some things that I wasn't happy about but i moved on. then a little while later it started eating it's own keys. and I said forget it after that
22:58 forrest hemebond, Gotcha, how many lines of puppet code do you have? I've considered offering a 'move from puppet/chef to salt' service for my consulting stuff until I find a job, lol
22:58 whatapain what does RIoT mean in reference to github issues?
22:58 eliasp forrest: where are you located?
22:59 forrest eliasp, Seattle
22:59 forrest Only looking for remote gigs currently, last gig was remote and I just can't do the commute into downtown again
22:59 eliasp forrest: ok, totally different corner of the world then ;-/
22:59 hemebond Lines? Not sure. It's not a big project.
22:59 forrest eliasp, Hah, yep :) you're in Germany right? I can't remember. I think we discussed this before.
22:59 zmalone given that chef is located in seattle, I'd imagine you have a bit of an uphill battle finding salt work there.  Salt is pretty regional.
23:00 forrest zmalone, I'm mostly looking for remote gigs, so it shouldn't really matter too much. I hate commuting
23:00 eliasp forrest: yeah, Germany … might be, 1,5y ago or so ;)
23:00 forrest eliasp, Yep, I think I was ranting about the lack of finding an actual pretzel that had been cooked in the last few hours when I visited.
23:01 whytewolf whatapain: https://docs.saltstack.com/en/develop/topics/development/labels.html#functional-group
23:01 eliasp hehe, exactly… as a proper Swabian/Bavarian Breze(n|l) needs to be at most 40 minutes old ;)
23:01 forrest zmalone, I really like that I didn't have to commute for my last job and a lot of companies don't understand why I'm not willing to add 600 hours/year to my commute to downtown Seattle.
23:02 forrest eliasp, Yeah, fresh is best. I make my own occasionally minus the lye.
23:02 forrest There are surprisingly a lot of self proclaimed 'python' shops using chef
23:03 forrest which is super weird to me
23:03 eliasp yeah, read your Twitter rant about it… that's really weird
23:03 eliasp did they just never hear of Salt?
23:03 forrest Hah, yep.
23:03 forrest I honestly don't know
23:03 forrest Salt is a few years old at this point
23:03 forrest I mean I know Ansible is trash for actual config management, but still
23:03 forrest you think when a python config management tool was available you'd switch, it's not THAT hard.
23:04 Phtes joined #salt
23:04 geekatcmu Eh.
23:04 hemebond forrest: Have you used Ansible?
23:04 forrest hemebond, Yes
23:05 geekatcmu If I were allready a Puppet/Chef shop, I would be unlikely to switch to salt unless there was some compelling breakage.
23:05 forrest geekatcmu, Even if you were a Python shop? That's mostly my surprise
23:06 hemebond geekatcmu: We don't have breakage but the workflow is poor using Puppet. I'd love to switch to Salt.
23:06 geekatcmu even if I were a Python shop.
23:06 forrest Maybe I've just written too much salt at this point, but how many lines would it take to justify not writing it for me? It would have to be at least 5-10k
23:06 geekatcmu Unless your infrastructure is trivial, switching CM products is a hell of a lot of hard work, and that's money.
23:06 whytewolf I have to agree with geekatcmu. it is hard to adopt a new product when there is already an existing product doing the job. even if the new product fits the ethos of the enviroment better
23:06 zmalone They are all DSLs, I think the quality of the DSL and the functionality / reliability of the feature set is what is most important.
23:07 zmalone The surrounding ecosystem is a close second, and if you are in a TDD shop, it's hard to convince yourself that salt is worth abandoning that for.
23:07 hemebond I've never thought of Salt as having a DSL; which is part of the reason I like it.
23:08 geekatcmu I've been a Python guy for <mumble> years.  I loathe Ruby.  But if we were already running Puppet here I'd be calling us fools for spinning up a switch-to-salt project.
23:08 eliasp yeah, Salt just wants structured data as input… no matter where they come from
23:08 forrest whytewolf, I think it really depends on how good a job the existing product is doing. A lot of people I spoke to are constantly fighting with their config management, lots of lost hours.
23:08 geekatcmu Right.  We are abandoning cfengine2 in favor of salt because it no longer meets our needs.
23:09 forrest geekatcmu, Woah, that's quite a change. When was the last patch to cfengine2?
23:09 forrest I thought they dumped it for chef a while ago
23:09 hemebond Isn't there a cf3?
23:10 geekatcmu yes, there's a cf3.
23:10 geekatcmu We implemented cf2 about a decade ago.
23:11 geekatcmu And only ever used it for the 20k identical boxes.  The other 5k boxes were all lovingly handcrafted bespoke works of art.
23:11 forrest lol
23:11 forrest 'art'
23:11 whytewolf lol
23:11 geekatcmu precisely
23:11 zmalone hemebond: cf3 is a different language that is inspired by cf2.  It wasn't really open source up front though, and it required rewriting your config, which is why most people moved to puppet or chef at that time
23:11 geekatcmu This is not my first rodeo in the "retrofit" event.
23:12 zmalone They published an open source version, but some functions would be gutted, and be noops, and you could complete them yourself
23:12 zmalone I'd hope that was fixed by now, I have not looked at it in 4 or 5 years
23:12 zmalone It's backed by the same company / people though
23:12 forrest Yeah the Chef/Cfengine team is nice enough
23:12 eliasp that's a horrible way to promote the next version of a product
23:13 zmalone chef and cfengine are unrelated
23:13 forrest eliasp, Better than the puppet way 'oh by the way all your shit is broken on the next patch, rewrite it all to work'
23:13 forrest 'oh you just rewrote everything? Yeah we changed the structure for this next patch, rewrite it again'
23:13 eliasp ;)
23:13 forrest zmalone, I thought the cfengine guys did chef, or were owned by the same company at least.
23:13 zmalone No relation at all
23:14 forrest oh weird
23:14 zmalone cfengine is an execution engine written in c, chef is a ruby dsl
23:14 forrest zmalone, Yeah I knew that much, I guess I never properly researched the origin of cfengine at all.
23:15 zmalone they are both inspired by Mark Burgess' research into idempotency, self healing configs, etc., but dr burgess runs cfengine
23:15 zmalone chef is a much later product
23:15 zmalone https://en.wikipedia.org/wiki/Mark_Burgess_(computer_scientist) is worth being familiar with, no matter which configuration or orchestration tool you use
23:16 forrest zmalone, Yeah I remember Chef was made later, but I thought that they went from cfengine -> chef, wasn't aware it was different gigs, good to know.
23:16 sdm24 does anyone know any "tricks" to speed up a file.recurse that has to go through a bunch of files/directories to only find a couple changes?
23:17 geekatcmu "use a tarball and a hash file"
23:17 keimlink joined #salt
23:17 justanotheruser joined #salt
23:18 geekatcmu and mount the tarball directly via FUSE so no one can screw with your nice, pristine filesystem.
23:18 eliasp sdm24: https://github.com/saltstack/salt/issues/25654
23:18 sdm24 basically, we have files for a bunch of apps in git, and when a new change is made in git, the salt master will update the fileserver, and push out any changes with file.recurse to some minions
23:19 sdm24 could we tar it after the git update, then push it across and untar it?
23:19 forrest sdm24, Why are you not using the git state?
23:19 eliasp sdm24: depending on your git server, you can even pull a zip directly from it without any additional step
23:20 eliasp forrest: git.latest exposes .git to the Minion which might be not wanted
23:20 forrest eliasp, yeah that's fair, just git.latest, then remove the file afterwards ;)
23:20 sdm24 forrest: could the git state work on a minion, with an event?
23:21 forrest sdm24, Hmm, I would imagine it could, I haven't tried it though.
23:21 sdm24 I don't want to pull the git into /srv/salt directly
23:22 forrest sdm24, ? You can set the checkout dir
23:22 sdm24 forrest: plus, each server only gets some of the files/folder
23:22 forrest sdm24, I see, can you not break up the repos on a per project/app basis to alleviate some of that?
23:23 forrest I think eliasp's solution is the best within your current structure, but if you have the chance to change it, more repos which are pulled to the associated system would be a good way to go to future proof things
23:23 sdm24 nah, that makes it too complicated for the people working on the apps. Some files go to all servers, some to only 1-2
23:23 sdm24 and it would make it more complicated for them to have to change 1 line in 1 file 4 times for each repo
23:24 sdm24 I'll look into the git zip though, thanks
23:24 sdm24 Will salt say when files are changed when its unzipped though? I need a service to restart if any files change
23:25 sdm24 and with the zip, I'm not sure I can get the fine-grain selection I need. oh well
23:25 sdm24 I'll play around with it though, thanks
23:25 msx joined #salt
23:26 forrest Hmm, I don't think you'll be able to manage files from within the zip like that
23:27 sdm24 its not terrible now, about 90 seconds or so to finally update. Since we are using events, luckily it all happens behind the scenes and doesn't slow down anything
23:27 forrest It would be cool if the git state supported selective checkouts via archive: http://stackoverflow.com/questions/2466735/how-to-checkout-only-one-file-from-git-repository
23:28 sdm24 that would be great, since all the folders to copy are set in pillars
23:29 forrest sdm24, https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.git.html#salt.modules.git.archive Looks like the module already supports it
23:29 forrest you could do a module.run
23:29 forrest I haven't used git archive AT ALL, so I'm not sure how it works for specific directories being checked out.
23:29 forrest I've only seen single files.
23:29 sdm24 yeah
23:30 sdm24 sounds like "path" will work, thanks
23:30 forrest sdm24, For sure.
23:31 sdm24 now will running that {% for app in pillar['apps'] %} be faster (or possible) to do as one long call, or to run a call for each app
23:31 forrest sdm24, I have no idea, I look forward to seeing your results though! ;)
23:31 sdm24 yeah I need to wrap my head around it haha
23:34 murrdoc run into it
23:34 murrdoc its the only way
23:38 ALLmightySPIFF joined #salt
23:39 sdm24 oh git.archive won't archive a remote repo
23:39 forrest aww
23:39 forrest You should file an issue
23:39 forrest For that, and to get it into state.
23:39 forrest I guess you could do a cmd.run of git archive, lol
23:40 sdm24 haha theres always a way
23:40 s_kunk joined #salt
23:41 sdm24 I'm probably just gonna stick with what I have. It seems like all the ways to maybe speed things up become much more complicated and introduce too many points of failure
23:41 bfoxwell joined #salt
23:41 forrest sdm24, Yep definitely a concern. Did you try installing that package from the link eliasp provided?
23:42 forrest You could profile it to confirm whether it's a salt dir walking issue, or just the number of files it has to scan and where that slowness is coming from then file an issue to fix that up
23:42 sdm24 yeah, I have msgpack-python, but not msgpack-pure installed, dunno if that would fix it
23:42 forrest might be worth a shot, I don't know
23:42 baweaver joined #salt
23:43 sdm24 forrest: the directories all take different lengths, with some taking ~20 seconds for the top level directories, and theres about 15-20 directories
23:43 forrest how many files are in the dirs?
23:45 sdm24 4955
23:46 sdm24 thats for one of the servers, im trying to find the full number in git by searching salt's cache
23:51 whatapain whytewolf: thx for the label info
23:52 sdm24 9853 total
23:52 whytewolf whatapain: no problem
23:52 sdm24 Also, I'm out for the day, ill be back tomorrow
23:52 forrest later
23:52 sdm24 oh and forrest, I checked my email and theres the info for the shirt. woohoo
23:53 dthom91 joined #salt
23:53 forrest Awesome!

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