Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2017-06-29

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

All times shown according to UTC.

Time Nick Message
00:01 edrocks joined #salt
00:18 nethershaw joined #salt
00:29 onlyanegg joined #salt
00:31 drewbert joined #salt
00:32 drewbert Can anyone tell me which config directive to change so that my minion doesn't attempt to create /var/cache/salt/minion/extmods
00:35 aneeshusa joined #salt
00:38 drewbert tried setting module_dirs to [] in both the minion and the master to no avail
00:40 drewbert cache_dir is also set to /persist
00:40 drewbert cachedir*
00:40 onlyanegg joined #salt
00:45 fritz09 joined #salt
00:48 cgiroua joined #salt
01:07 Pyro_ joined #salt
01:09 Pyro_ joined #salt
01:11 cro joined #salt
01:13 f3rno joined #salt
01:14 Nahual joined #salt
01:19 aneeshusa joined #salt
01:25 f3rno joined #salt
01:28 Praematura_ joined #salt
01:47 jimklo_ joined #salt
01:48 ilbot3 joined #salt
01:48 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2016.3.6, 2016.11.6 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic <+> We are volunteers and may not have immediate answers <+> The call for speakers for SaltConf17 is now open: http://tinyurl.com/SaltConf17
01:48 mils joined #salt
01:54 ashmckenzie joined #salt
01:55 broccolistem joined #salt
01:55 broccolistem left #salt
02:01 edrocks joined #salt
02:13 swills joined #salt
02:36 Praematura joined #salt
02:38 zerocoolback joined #salt
02:38 dxiri joined #salt
02:39 Pyro_ joined #salt
02:48 Pyro_ joined #salt
02:49 asyncsec joined #salt
02:53 onlyanegg joined #salt
02:53 f3rno joined #salt
02:55 asyncsec_ joined #salt
02:56 dxiri joined #salt
02:57 fracklen joined #salt
02:58 jauz_ joined #salt
03:15 dxiri joined #salt
03:19 donmichelangelo joined #salt
03:24 tobstone joined #salt
03:41 tobstone joined #salt
03:42 dxiri joined #salt
04:03 edrocks joined #salt
04:03 vishvendra joined #salt
04:03 dxiri joined #salt
04:10 Praematura joined #salt
04:14 onlyanegg joined #salt
04:17 dxiri joined #salt
04:31 fracklen joined #salt
04:36 sweetboss joined #salt
04:47 dxiri joined #salt
05:06 preludedrew joined #salt
05:26 vishvendra Is there any way to download salt enterprise? After registration salt team is not responding or not providing the download link...
05:26 Ricardo1000 joined #salt
05:27 whytewolf if you just registered you might have to wait till tomorrow. it is currently late in Utah where they are located.
05:31 darioleidi joined #salt
05:35 onlyanegg joined #salt
05:35 cyteen joined #salt
05:48 fracklen joined #salt
05:51 MTecknology vishvendra: I ended up waiting a month and never did get it..
05:53 vishvendra MTecknology: If this is the response in evolution period, Then I don't know what kind of support they are providing during subscription period?
05:54 Eugene joined #salt
05:59 mariusv joined #salt
05:59 mariusv joined #salt
06:05 edrocks joined #salt
06:05 jhauser joined #salt
06:07 colttt joined #salt
06:08 Ricardo1000 joined #salt
06:09 felskrone joined #salt
06:11 mushyplant75 joined #salt
06:12 absolutejam morning
06:12 absolutejam any reason that  {% set files = salt['file.find']("/srv/salt/assemble/fragments/", type="f", name="*", print="name") %} is returning an empty list?
06:12 absolutejam eventhough there are files in that folder
06:12 absolutejam calling the state with salt-call --local
06:16 MTecknology vishvendra: As flawed as that opinion is, I admit to having shared it. I don't personally have a need for it, I just wanted to see if it was something I could recommend to clients
06:17 mushyplant75 left #salt
06:19 impi joined #salt
06:28 miruoy joined #salt
06:28 vishvendra MTecknology: same here..
06:29 zulutango joined #salt
06:31 oyvindmo joined #salt
06:34 scarcry joined #salt
06:35 fracklen joined #salt
06:36 Guest73_ joined #salt
06:43 scelestic gtmanfred: thanks, i'll look into that
06:54 scarcry joined #salt
07:10 aldevar joined #salt
07:13 JohnnyRun joined #salt
07:18 LeProvokateur joined #salt
07:19 hemebond Wouldn't the "evaluation" period be supported entirely differently to a paid subscription? Or have I not followed the conversation correctly.
07:20 hemebond (or is that really supposed to be "evolution"?)
07:20 asterisc joined #salt
07:21 coredumb I've tested the enterprise version that's been deployed as a POC by a saltstack partner, but hadn't had to deal directly with saltstack support though
07:23 hemebond Is it good?
07:27 coredumb hemebond: honestly?
07:28 hemebond Of course :-)
07:28 coredumb The only thing I found useful is the job reporting accessible directly in the interface
07:28 hemebond That would be a big pull for many companies.
07:29 hemebond That seems to be one of the first things people try out saltpad for.
07:29 coredumb yes but it's fairly easy to implement it yourself
07:29 hemebond If you have the time and resources, sure.
07:29 coredumb at the enterprise pricepoint you could easily recruit someone to do it
07:29 coredumb it's hella expensive
07:30 coredumb Rest of the interface is OK
07:31 coredumb but feels like not really useful
07:31 hemebond At what scale do you use Salt?
07:31 coredumb like the state editor and the likes
07:31 Hybrid joined #salt
07:31 hemebond ooo an editor
07:31 coredumb yeah
07:31 coredumb but can only edit local files...
07:32 coredumb there goes your gitfs
07:32 coredumb seemed limited for the pricepoint
07:32 ronnix joined #salt
07:32 coredumb hemebond: I'm currently replcaing my actual config management platform with salt
07:32 hemebond Me too :-)
07:32 coredumb so we've priced for ~500 minions
07:33 hemebond Oooo
07:33 hemebond That's far more than me.
07:45 absolutejam anyone here who can explain an accumulator/file.accumulated?
07:46 absolutejam I'm completely lost
07:48 OliverUK joined #salt
07:49 OliverUK Is there a generic state that will apply no changes that I can put in my top file that would apply to all minions, just so that I don't get errors for the minions that don't have any states to apply yet?
07:50 absolutejam could you just do a cmd.run or a module.run?
07:50 absolutejam not sure if they'd respond with changes
07:50 absolutejam cmd.run can use `stateful` argument
07:50 absolutejam feels a bit hacky though
07:57 OliverUK Thanks
07:58 fracklen joined #salt
08:00 mikecmpbll joined #salt
08:02 Rumbles joined #salt
08:04 JohnnyRun joined #salt
08:06 babilen OliverUK: https://docs.saltstack.com/en/2016.3/ref/states/all/salt.states.test.html#salt.states.test.fail_without_changes
08:06 babilen Ah, you want https://docs.saltstack.com/en/2016.3/ref/states/all/salt.states.test.html#salt.states.test.succeed_without_changes if you don't want it to fail obviously
08:08 pbandark joined #salt
08:08 babilen absolutejam: What are you trying to do?
08:08 MasterNayru_ joined #salt
08:09 nku hm, i get a checksum mismatch for http://repo.saltstack.com/apt/debian/8/amd64/2016.11/pool/main/z/zeromq3/libzmq3_4.0.5+dfsg-3_amd64.deb
08:10 nku could be our proxy i guess
08:16 absolutejam babilen: merge some files
08:16 babilen absolutejam: Where are those files, what creates them and how do they need to be merged?
08:17 absolutejam I'm trying to port over an Ansible playbook and I'm currently using 'assemble' which basically merges files based on their name
08:17 babilen So basically a "cat foo* > bar" ?
08:17 absolutejam yeah, but it has some logic
08:17 babilen And the files are local on the minion?
08:18 absolutejam they're on the salt master
08:18 babilen What creates them?
08:18 absolutejam they're created statically
08:19 absolutejam the idea is, I have a 'fileservers.conf', 'dbservers.conf' and I want to merge them all depending upon what groups the minion is part of
08:19 babilen So a poor mans conf.d ?
08:19 absolutejam I'll need to probably change how the information is pulled (probably grains)
08:19 absolutejam Exactly that
08:19 babilen How do you create those files?
08:19 absolutejam The software doesn't support conf.d but I need to make a single config file
08:19 absolutejam in vim ;)
08:20 absolutejam 2 mins, gotta go into a meeting
08:20 absolutejam I'll be back shortly
08:20 babilen What I would do in salt is to create three pillar files with that information and then reference the pillar in a file.managed state. Pillars are merged and you can easily target different information to different minions.
08:22 OliverUK babilen: Thanks for that, pretty much what I wanted :-)
08:22 babilen absolutejam: Alternatively three file.append states, but that feels hacky and doesn't scale well
08:22 babilen OliverUK: Great :)
08:25 babilen absolutejam: You can also use a single file.append state with multiple sources. That would probably be closest to assemble in Ansible even though it doesn't reference local files (but then you'd face the problems of managing the interim files on the minions first)
08:32 N-Mi joined #salt
08:32 N-Mi joined #salt
08:33 xet7 joined #salt
08:36 vishvendra joined #salt
08:36 Mattch joined #salt
08:51 cyteen joined #salt
08:51 twooster joined #salt
08:54 twooster Hey. Quick question. Is there any way to get the current salt env in an extmod? I can access `__env__` in a template and pass it thru to my module func, but it'd be nice not to.
08:55 swa_work joined #salt
08:57 fracklen joined #salt
08:57 twooster joined #salt
09:05 ssplatt joined #salt
09:13 ProT-0-TypE joined #salt
09:14 puzzlingWeirdo joined #salt
09:23 onmeac joined #salt
09:24 fracklen joined #salt
09:28 _KaszpiR_ joined #salt
09:37 Praematura joined #salt
09:40 twooster joined #salt
09:43 absolutejam babilen: Sorry, back now
09:43 absolutejam I tried using file.find execution module in jinja
09:43 absolutejam then using file.append
09:43 absolutejam but the file.find module didn't work with salt:// paths
09:44 babilen That doesn't sound very idiomatic
09:44 babilen You have to clearly differentiate between the master side and the minion side
09:45 absolutejam well, if I could file.find all the files in a directory, I could merge them all with file.append
09:45 babilen Salt is a lot more declarative and data driven than the "And then I do ..." approach of Ansible
09:46 babilen Sure, but why have those files in the first place? And don't you have to decide on a minion type basis which bits of the configuration you want to have?
09:46 absolutejam which provides its own difficulties
09:46 babilen What does?
09:46 absolutejam Well I want a central repo that generates a config to minions
09:46 babilen Sure
09:48 absolutejam Even if I could use file.managed and template a file that just loops over fragments, I'm not sure how to get these file fragments into it
09:48 absolutejam and storing them in Pillar is just plain clunky
09:50 divyach joined #salt
09:52 absolutejam Come to think of it, if I did use Pillar, it seems like that'd be the most effective method, I just don't want to store large text in yaml
09:53 absolutejam because of the structured nature, it's easy to iterate over and run logic against (eg. if the pillar key = a group the minion is a member of)
10:08 babilen absolutejam: You could just target multiple SLSs to the same host .. pillars are merged automatically and intelligently
10:09 edrocks joined #salt
10:09 babilen You could also have a state that selects the sources: entries of file.append based on some logic
10:09 babilen The downside is that you have to be explicit as to which data you want to target where
10:10 babilen So you don't have a "I copy file foo here and it'll end up there", but then that doesn't really work anyway if you want to have logic about the content of those files
10:10 babilen (so host type foo gets file A, B and D, while type bar gets B, C and D
10:10 babilen )
10:11 hemebond "intelligently" wot?
10:11 babilen I would personally find it much nicer if I had composable data blocks that can be targeted to minions using compound matchers .. the question how to save that data is obviously important, but there are a variety of options
10:11 absolutejam I don't mind the matching part, I feel like that could be quite simple
10:12 babilen hemebond: Things get merged
10:12 hemebond I concur.
10:12 babilen If that really is intelligent is, as you rightly noticed, a matter of debate :)
10:13 hemebond That it is :-)
10:13 babilen I just meant: It's not blindly overwriting keys and earlier data
10:13 absolutejam the problem is, finding the file or data source that the content is pulling from
10:13 hemebond Define "blindly"?
10:13 babilen absolutejam: If you could be more specific as to what you actually want to do it might be easier to help
10:14 babilen hemebond: ...
10:14 absolutejam I guess I need to look at it more of, 'how should I do this with Salt' than 'How can I force this Ansible shaped block into a Salt shaped hole'
10:14 babilen Yeah
10:14 absolutejam Currently, I have a conf.d in a central location that holds '10_webservers.conf', '20_dbservers.conf', etc.
10:14 hemebond babilen: As far as I know there isn't really an order to the merging of pillars except in a few cases.
10:15 hemebond So I don't think you can guarantee the merge result in some cases.
10:15 absolutejam And in Ansible, I first create a list of these files, then I see if one of the host's groups matches one of the files (via. regex, because of the 10_ and .conf around the file name)
10:15 absolutejam then I smush all the relevant ones together to form a singel file
10:16 babilen How do you model "host groups" in Salt?
10:16 absolutejam I haven't even hit that part yet, haha
10:16 absolutejam Not sure whether I'd put them in a node group or add a pillar of 'role' or whatever
10:17 absolutejam but that data will be available in my states either way, right
10:17 absolutejam At least I know pillar data is
10:17 asterisc joined #salt
10:17 absolutejam So I could have pillar data of role: webserver targetting *web* minions
10:17 babilen http://paste.debian.net/973877/ would be one approach
10:18 absolutejam I think I could do what I need to do if the file.accumulated had a 'file' field instead of 'text'
10:18 babilen file.append is doing that
10:18 absolutejam The issue is, this means I have to statically define every config file
10:19 absolutejam The reason it works well at the minute is because I wrote a dynamic inventory in Ansible that adds the hosts to groups based on their OU, as well as allowing me to group hosts based on statically defined groups
10:19 absolutejam I could easily do this with a grain in Salt
10:19 absolutejam But I would like to drop files into this central store and it dynamically match the value of a pillar, grain, whatever to the file name
10:20 hemebond Doesn't really sounds that difficult unless you try to shoe-horn an existing process into Salt.
10:20 babilen You can list the content of the master with cp.list_master, but I dislike this "I drop a file into foo and it automatically ..." approaches
10:21 absolutejam Why?
10:21 juke joined #salt
10:21 juke hi
10:21 absolutejam By having it this way, I can drop a new file in, have a beacon run and it will check against my minions if they need the new config file
10:22 babilen Because it's not explicit enough and feels as if you conflate targeting of data with the keys of data you need
10:22 absolutejam (assuming the file matches a group/grain/pillar/whatever I decide on the minion)
10:22 babilen As soon as you require the same data in two types you end up with horrors such as 10_dbwebsaltserver and whatnot
10:22 babilen And if you want to define exceptions it gets even messier
10:22 juke in salt rest api documentation, there is a saltdev user/pass, where can i found/change credentials ?
10:23 absolutejam there's never really any overlap, at least in current form
10:23 absolutejam 10_webservers
10:23 absolutejam 20_dbservers
10:23 lorengordon absolutejam: you could maybe piece files together using {{ import_text "file" }}, also
10:23 absolutejam the files are iterated and merged onto the host depending on what gruops it is part of
10:23 absolutejam thsoe are bad examples
10:23 absolutejam how about, 10_domain1, 100_fileserver, 200_eastoffice
10:23 babilen lorengordon: Yes, import_text is a nice approch for getting the data where you want it
10:24 absolutejam now, a minion that is part of fileserver and eastoffice will get those 2 files merged into a config file, ignoring 10_domain1
10:24 lorengordon https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html
10:26 absolutejam I've got no qualms with any of the templating, appending, etc.
10:26 absolutejam it's just grabbing a list of files from a directory I couldn't do
10:26 absolutejam If I moved into pillars, I could easily iterate the keys and add logic
10:26 babilen Because that is rarely done
10:27 babilen What kind of data is this and which service is it (there might be code available already) ?
10:29 hemebond And the number at the start is the order it gets merged in?
10:30 absolutejam aye
10:30 babilen absolutejam: Another approach would be to maintain the list of files in pillars, target them and then iterate over that in your state
10:31 hemebond Are the plain text files?
10:31 absolutejam yeah, babilen I can see that working, I just don't like the idea of keeping blocks of config in pillars
10:31 absolutejam not really what yaml is best at
10:31 absolutejam but it's an option
10:31 absolutejam yes hemebond
10:31 juke left #salt
10:32 babilen "blocks of config" ?
10:32 absolutejam But I'm just checking and I'm not sure if the program I want to do this for now supports conf.d style configs, hahaha
10:32 babilen You mean large blocks of plain text?
10:32 absolutejam yesd
10:32 absolutejam each file holds parts of a toml config file
10:32 babilen You can address that with import_text for example
10:32 babilen But it really depends on the service and data this is for
10:32 babilen It's hard to do this all hypothetically
10:33 babilen Ah, you can write toml programmatically .. I use that for influx for example
10:35 absolutejam oh shit I think the program I'm doing this for supports conf.d style configs
10:35 absolutejam Im sure it never used to
10:35 absolutejam which kinda invalidates all of this
10:36 babilen Which program is this?
10:36 absolutejam telegraf
10:36 babilen Ah
10:36 absolutejam Well I feel like an idiot
10:36 absolutejam Didn't I say this already?
10:36 absolutejam My bad
10:36 babilen Telegraf does and you can write toml programmatically (hence me mentioning it in the context of influx)
10:36 absolutejam The idea was to define which metrics each group of servers would get
10:37 Score_Under joined #salt
10:37 Score_Under https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html is this page blank for anyone else?
10:37 babilen I found it easier to tie this into the data that accompanies each service (so that when you install a db server telegraf is configured already)
10:37 babilen Score_Under: I think the documentation is broken due to the new release
10:37 babilen Older versions should work
10:38 absolutejam woah woah, new release?
10:38 hemebond And so is the new release ;-D
10:38 absolutejam what new release?
10:38 babilen .6
10:38 Score_Under older one does work. thanks
10:38 absolutejam oh, thought you meant new new
10:38 babilen hemebond: Ah, I guess I'll wait a little .. what's the matter?
10:38 absolutejam I found it easier to tie this into the data that accompanies each service (so that when you install a db server telegraf is configured already)
10:38 hemebond babilen: I'm still  on 2016.3.6 because someone broke EC2 support in salt-cloud.
10:38 absolutejam what do you mean by that babilen?
10:39 hemebond I'm going to have to upgrade soon so I'll probably spend the weekend trying to fix that.
10:40 babilen absolutejam: I mean that I already have pillar data that is being used to configure MySQL. I simply add(ed) the telegraf configuration data to that data bundle so that every host that had "mysql: enable: True" also has the corresponding telegraf data
10:41 babilen So if you target "*mysqldb*": - some.config the "some.config" also comes with the data that configured the monitoring. That way you tie the monitoring and service together
10:42 babilen Or just have - telegraf.fooservice and target that too all boxes you target - fooservice
10:45 magnux joined #salt
10:46 Praematura joined #salt
10:46 babilen absolutejam: There are some telegraf formulas, but I haven't used them
10:47 babilen (we are using prometheus now without telegraf)
10:47 babilen https://github.com/justindowning/telegraf-formula/blob/master/pillar.example is one example, but I don't know how good that is
10:50 absolutejam how does prometheus fare vs telegraf?
10:50 absolutejam Heard a lot of people switching to it but I'm not sure what the benefits are
10:51 absolutejam oh you mean have the entire config as yaml
10:51 babilen I do like it a lot, but it is different from Influx. The query language is more powerful and the "collection" approach makes it easier to run different instances for different teams ..
10:52 babilen I needed specific features in Influx that were present in 0.8 and that they've thrown out of the window for 0.9, also the upgrade experience was anything by pleasant
10:53 babilen https://github.com/influxdata/influxdb/issues/5930 is the overview and we needed histogram quite urgently
10:53 babilen It's nicer for approaches were you say "give me all data points between .. and .."
10:54 babilen It's also a lot more open source than InfluxDB with its open core model and I know a bunch of people in the community personally
10:56 edrocks joined #salt
10:59 babilen 2.0 is also coming along well https://prometheus.io/blog/2017/04/10/promehteus-20-sneak-peak/ - https://coreos.com/blog/prometheus-2.0-storage-layer-optimization
11:00 magnux joined #salt
11:02 magnux joined #salt
11:06 puzzlingWeirdo joined #salt
11:09 magnuss joined #salt
11:10 absolutejam hm, might have to take a look
11:11 magnuss hell
11:11 magnuss hello*
11:11 magnuss I wonder about how states are kept on the minions. Do you need to run salt-call state.apply with cron for instance or is there some function within salt that manage that?
11:12 absolutejam there's a scheduler built in to salt that you use to re-apply states
11:12 babilen You can schedule highstate runs on the master
11:12 absolutejam or maintain states against drift
11:12 babilen https://docs.saltstack.com/en/latest/topics/jobs/#scheduling-jobs -- It's easiest to just maintain the "schedule" data structure in pillars for minions
11:13 absolutejam or you can use reactors to run a state if a change is triggered
11:13 babilen Or use startup states to trigger a run whenever a minion comes online .. it really depends on what you want
11:15 magnuss ok, thats good. Thanks so much for the help :)
11:16 babilen If you go down the scheduler route I found it best to maintain it in pillars rather than using the schedule state or other minion-local configuration
11:18 magnuss i will take a look in to that!
11:19 Pyro_ joined #salt
11:19 absolutejam how do you find PromQL vs InfluxQL? babilen
11:19 saintpablo joined #salt
11:24 nku joined #salt
11:35 ronnix joined #salt
11:37 nebuchadnezzar joined #salt
11:38 JohnnyRun joined #salt
11:42 ecdhe joined #salt
11:42 ecdhe joined #salt
11:43 OliverUK joined #salt
11:44 OliverUK How do I delete a minion key from the 'Accepted Keys' list only, I have had to replace a minion and I want to delete the old key and accept the new key?
11:45 absolutejam salt-key -d MINIONNAME
11:45 Score_Under I just delete them and run test.ping on the minion to put the key back in there
11:45 noobiedubie joined #salt
11:46 OliverUK absolutejam: That would delete it from the 'Accepted Keys' and the 'Denied Keys' list, I do not want this, I want to be able to accept the key in the 'Denied Keys' list afterwards
11:46 OliverUK That minion is not alive at the moment and may not be for some time, it's just how our environment is set up
11:47 OliverUK If I removed the key file from '/etc/salt/pki/master/minions' and then accepted the new key, should that work?
11:48 twooster OliverUK: You might be able to remove it from /etc/salt/pki/master/minions manually
11:48 absolutejam ahhh I see
11:48 twooster Oops, yeah. that's worked for me in the past
11:49 OliverUK I'll try that
11:49 absolutejam Didn't realise it went into both in that case
11:49 OliverUK absolutejam: Sorry, I should have been clearer
11:50 absolutejam nah, my fault
11:50 absolutejam it makes sense whaty ou said
11:51 absolutejam every single time I go to list grains, I have to look it up
11:51 absolutejam grains.items
11:51 absolutejam grains.items!
11:52 neilf__ joined #salt
11:53 vishvendra joined #salt
11:53 magnuss absolutejam: where do I find information absolut re-apply states you talked about earlier?
11:53 magnuss cant find anything about it :(
11:53 absolutejam You can look under https://docs.saltstack.com/en/latest/topics/jobs/
11:53 absolutejam there's info abotu scheduling jobs
11:54 absolutejam about*
11:54 OliverUK Huh, the '--include-denied' option is not documented in the salt-key man page
11:54 absolutejam you can even use teh salt.modules.schedule module to manage the scheduling
11:55 magnuss soo, scheduling jobs are the same thing as re-apply in this case?
11:55 absolutejam well you can have a scheduled job to run a specific state or a highstate
11:55 absolutejam either on the minion or on the master
11:56 absolutejam So you could schedule the master to run a highstate on all yoru minions every hour if needed
11:56 absolutejam the highstate is the overall state, determined by the states defined in top.sls
11:59 magnuss aaaw ok, i want to keep the services started at all time. But do not need the minions to have the latest configuration (state) at all time. So it the minion can determin what to start without asking the master every time would be great.
12:00 usernkey1 joined #salt
12:00 absolutejam You mean you want the minion to reapply its states without checking with the master?
12:01 darioleidi joined #salt
12:03 magnuss yes
12:03 fracklen joined #salt
12:04 magnuss check the states once every minute and check if any changes has been made to the state file avery 30 minutes or so..
12:04 absolutejam Uhm, I think the state is cached locally
12:05 thinkt4nk joined #salt
12:05 absolutejam state-call --local state.highstate cache=True
12:06 absolutejam I think that will work, but best to test it
12:06 absolutejam not sure if --local is needed
12:08 pbandark Can we use "watch" prerequsiste to monitor 2 states? I am getting "Recursive requisite found" if I try to do so. More details: https://paste.fedoraproject.org/paste/KcU~EA1M8~-hlRGeGTFeeA
12:09 zerocoolback joined #salt
12:11 magnuss absolutejam: salt-call state.highstate cach=True works fine. Thank you
12:16 asyncsec joined #salt
12:18 cgiroua joined #salt
12:30 johnkeates joined #salt
12:31 hemebond pbandark: Your service watches the file, which requires the database, which requires the service
12:32 hemebond There's your recursion.
12:32 hemebond Why does your file require the database?
12:32 hemebond You could use on_changes to trigger a restart of the service. Maybe.
12:33 hemebond Or listen
12:34 hemebond I still don't see the need for the file to require the database.
12:36 pbandark if I first copy the file to the server(enable_mongo_authentication)(which actually enable authentication to connect the database)then, I cant create database user as it will need authentication. Hence, I am 1. starting service 2. creating db user 3. copying file which enable authentication and as file is changed I want to again restart the service.
12:36 pbandark hemebond: ^
12:39 hemebond So your state will fail after the first time?
12:39 hemebond Or it will succeed because the user exists that is required by the settings in the file?
12:40 pbandark its failing : https://paste.fedoraproject.org/paste/6fX53tjQMkF4POw2YQ28MQ
12:41 hemebond After the firs trun?
12:41 fracklen joined #salt
12:41 hemebond I meant if you didn't have the recursive requisite.
12:41 pbandark ahh. yes. it will fail.
12:43 pbandark hemebond: if I am not wrong then with "watch" I am monitoring 2 states. 1. installation of package 2. modification of file. so once, the package is installed, service should be started and again if file is change the service should be restarted. am i right ?
12:43 flowstategames joined #salt
12:43 hemebond watch is like a require, but with a special power
12:44 flowstategames anyone have experience with escaping single-quoted strings coming from pillars?
12:44 hemebond So if you just want to restart I think you can use `listen` instead.
12:44 pbandark ok. let me try
12:46 flowstategames I need to get the literal string '^\[[[:alnum:]]+[[:space:]]+\][[:space:]]+' from a pillar to a config file. I've tried everything I can find online, and it either doesn't compile, or removes the single-quotes
12:46 babilen pbandark: I'd use a require for the pkg on line 25
12:47 babilen flowstategames: |yaml_encode is your friend
12:47 pbandark ok. let me try that as well
12:47 XenophonF IMO any use of variables in .sls files should be wrapped with |yaml or |yaml_encode
12:48 XenophonF and I really wish there were other encoders available, like one for sh
12:48 babilen XenophonF: The number of roundtrips from Python → FOO_MARKUP → Python makes me sad
12:48 XenophonF same
12:49 flowstategames okay, awesome!
12:49 XenophonF but that's what we get for using a preprocessor that works solely on the text stream
12:49 XenophonF i'm not sure how one would do it differently without re-implementing the rest of LISP
12:49 flowstategames one other thing. I'm trying in my map.jinja to combine a list from my default_settings object, and one from my pillars
12:50 flowstategames I've tried setting a variable to list1+list2, I've tried union(), but nothing will compile
12:50 XenophonF flowstategames: you have to use the .update() method
12:50 XenophonF hang on I'll show you an example
12:50 flowstategames awesome, ty
12:51 XenophonF oh wait sorry, for that you can specify the default_settings dict as the default value in a call to pillar.get()
12:51 XenophonF still, this shows both: https://github.com/irtnog/openssh-formula/blob/master/sshd/map.jinja
12:51 nicksloan joined #salt
12:52 jdipierro joined #salt
12:52 flowstategames so if I have a list from my default_settings called list, and one in my pillar called list, I can do something like
12:52 LondonAppDev joined #salt
12:52 XenophonF that's how i always write formulas nowadays: defaults.yaml loaded in as default_settings, a distro_map, and a pillar lookup
12:52 XenophonF no
12:53 XenophonF you can't merge lists like that
12:53 XenophonF if you want to change a list value in pillar, you have to copy the defaults
12:53 flowstategames right, not automatically like your pattern here
12:53 XenophonF (sorry ESP is working today)
12:53 flowstategames but I can manually combine the two lists in jinja, right?
12:54 XenophonF you can but, eh, i think it's better if pillar values completely override defaults
12:54 flowstategames as a practice, you mean?
12:54 XenophonF it's less surprising
12:54 XenophonF yes
12:54 XenophonF principle of least astonishment
12:54 flowstategames yep, I think POLA all day, haha
12:54 flowstategames okay, so any entries which I deem to be not defaults but base
12:55 flowstategames as in, should be in all "lists"
12:55 flowstategames I can just keep in a separate property
12:55 flowstategames like "standard_entries" as opposed to "entries", which I will pull from the pillar
12:55 flowstategames that's more explicit
12:55 XenophonF I wouldn't
12:55 flowstategames I dig
12:55 flowstategames why/
12:56 absolutejam so
12:56 absolutejam I can't merge pillar lists?
12:56 flowstategames the use case here is installing Filebeat to send our logs to Logstash. So the standard entry would be for the bootstrap log, which all minions have
12:56 absolutejam I seem to have contradicting info, but GitHub issues seem to say no?
12:56 XenophonF i think it's a bad idea, too confusing
12:56 pbandark babilen: it failed with the same error: https://paste.fedoraproject.org/paste/QNfJrkbfaFz2-rZDm2H0xw
12:56 XenophonF save standard setups for the pillar.example file
12:57 edrocks joined #salt
12:57 flowstategames ...pillar.example
12:57 flowstategames teach me, oh wise one
12:57 jeddi joined #salt
12:58 XenophonF see for example https://github.com/irtnog/openssh-formula/blob/master/pillar.example#L53
12:58 absolutejam hm but I can merge dicts
12:58 edrocks joined #salt
12:58 absolutejam how does that make sense
12:58 ssplatt joined #salt
12:58 flowstategames dicts have named properties
12:58 flowstategames makes it easier from a code perspective
12:58 flowstategames but not sure from a ... consistency? perspective?
12:58 absolutejam ^
12:59 XenophonF also for dictionaries iirc it isn't a deep copy by default iirc
12:59 absolutejam you're a deep copy
12:59 XenophonF LOL
12:59 absolutejam but I don't know what that means
12:59 absolutejam it's not recursive?
12:59 XenophonF so when you call the .update() method, it only copies the values of the keys as that level
12:59 absolutejam Oh, didn't know that
13:00 absolutejam Only ever done it with 1 level dicts :P
13:00 absolutejam I'm trying to get my head out of Ansible mentality, I swear
13:00 XenophonF so e.g., `default_settings.sshd.update(distro_map)` only iterates over the keys of distro_map and default_settings.sshd
13:00 XenophonF right it doesn't recurse by default
13:00 flowstategames XenophonF: thanks again, always a life-saver
13:01 absolutejam I'm trying to apply a list of 'roles' to my minions based upon different criteria, but using a dict is fine
13:01 absolutejam I can just have roles: webserver: True
13:01 XenophonF there's a deep copy option that you can enable, but i'm not sure i recommend using it because it violates POLA
13:01 Brew joined #salt
13:01 pbandark hemebond: seemes to be working with listen. let me confirm.
13:02 XenophonF i think it's better to tell people, if you change a default that has a complex value (list, dict) but you want to keep some of that value, you have to replicate those bits you want to keep in Pillar
13:02 XenophonF but YMMV
13:02 XenophonF I have a lot of non-software engineers on staff
13:02 babilen pbandark: You still have the recursion .. My guess is that you don't need the requisite on the mondodb_user to manage the configuration file (that is remove line 43 and 44)
13:04 tongpu joined #salt
13:04 asterisc joined #salt
13:04 pbandark checking
13:13 pbandark thanks babilen and hemebond
13:13 pbandark its working now
13:14 numkem joined #salt
13:15 dunz0r I want to add a grain only if that grain hasn't been set before, via a state, how can I do that?
13:22 evle joined #salt
13:23 babilen dunz0r: Do you want the grain to be present or not?
13:23 Cottser joined #salt
13:24 babilen Obviously if it has been set already it won't be set over and over again with grains.present
13:24 dunz0r babilen: I want it to be present, but I'm generating it from a command that doesn't give the same output, but I just want it the first time
13:24 dunz0r Using it to randomly assign my machines to "patch-groups"
13:24 nkuttler when i have multiple environments, i though including a state file would fall back to the other envs when not found in the current one?
13:25 nkuttler include as in the top.sls list
13:26 babilen dunz0r: That sounds like a job for orchestration that you kick off the first time the minion connects (you simply don't make that grain part of your highstate). Alternatively get the value of that grain and, if it hasn't been defined, execute a state and skip it if not
13:26 racooper joined #salt
13:27 dunz0r babilen: Yeah, but right now I haven't had that orchestration setup, so I've got a bunch of machines that I need to set this Id on :)
13:27 dunz0r Oh. I could of course just do it with a cmd.run, I realise.
13:27 dunz0r Silly me
13:28 babilen Use grains.present and wrap it in {% if ... %} ... {% endif %} and check if the grain has been assigned *any* value
13:29 saintpablo joined #salt
13:32 tongpu joined #salt
13:41 utahcon_ joined #salt
13:41 Naresh joined #salt
13:45 sjorge joined #salt
13:52 flowstategames XenophonF: unfortunately, |yaml_encode still stripped the single-quotes from my string
13:52 flowstategames '^\[[[:alnum:]]+[[:space:]]+\][[:space:]]+' turned to ^\[[[:alnum:]]+[[:space:]]+\][[:space:]]+
13:53 ujjain joined #salt
13:53 ujjain joined #salt
13:58 flowstategames if I |yaml_encode with single-quotes wrapping double-quotes, I can get it to retain the double-quotes. I think that works for Filebeat
14:00 thinkt4nk joined #salt
14:02 yuhl joined #salt
14:04 dxiri joined #salt
14:06 keltim joined #salt
14:07 keltim_ joined #salt
14:07 _JZ_ joined #salt
14:13 usernkey joined #salt
14:23 XenophonF ??
14:23 XenophonF that doesn't sound right, flowstategames
14:23 XenophonF can you post your code?
14:23 flowstategames sure, one sec
14:24 federico3 joined #salt
14:25 graffic joined #salt
14:25 flowstategames https://hastebin.com/noqurazavu.hs
14:26 flowstategames ("pro_d" is just a shortened version of "prospector_defaults" because I was sick of typing the full thing.)
14:28 felskrone is anyone aware of a tool that collects a saltmasters performance data like events per second, number of auths per minute, etc.?
14:29 felskrone logging them with a reactor/returns seems a bit much just for collecting numbers
14:29 flowstategames (also, I couldn't get the defaults to work at all, which is why everything is specified in that pillar. I will likely be removing them)
14:30 flowstategames hmm, maybe something for monitoring ZMQ, felskrone?
14:30 _KaszpiR_ joined #salt
14:30 flowstategames you might have to do your own aggregations, but that shouldn't be the hardest, since the message on the queue includes the action/function name
14:30 felskrone that would be a litte too low level, i would want to distinguish between auths, returns, etc.
14:31 mikea you can create an engine that reads the event bus to create metrics
14:31 nicksloan joined #salt
14:32 felskrone mikea: thats what i was thinking, since my old salt-eventsd is not required anymore (https://github.com/felskrone/salt-eventsd) because the master has its own returners i was thinking about writing a salt-statsd :-)
14:33 mikea the only problem I've seen with engines is that the event bus seems to close when the master is under high load
14:33 flowstategames where is a practical place to learn about engines? I keep seeing them mentioned, but have never found an accessible starting point
14:34 flowstategames I want to use one to name my AWS EC2 nodes my-cluster-coords-X (where X is the lowest available number). As of right now, my minions have helpful names like "ip-10-0-1-102-ec2"
14:34 mikea engines don't do that, I don't think
14:35 mikea I mean technically they can do anything you can do in python
14:35 juke joined #salt
14:35 juke re
14:35 flowstategames well, I was going to power it by catching the first auth for a new minion
14:35 felskrone mikea: what exactly are you refering to when you say "engines"?
14:35 mikea but by the time your engine loads the minion_id is already defined
14:35 flowstategames curses, foiled again.
14:36 mikea felskrone, a salt engine module that's started with the engines: key in the salt config
14:36 juke is there a standard way to plan a command execution ?
14:36 mikea it can read the event bus and has access to __salt__, __opts__, etc dicts
14:37 zerocoolback joined #salt
14:37 fracklen joined #salt
14:38 felskrone mikea: thx, didnt know about those, ill check them out :-)
14:42 miruoy joined #salt
14:44 mikea felskrone, https://docs.saltstack.com/en/latest/topics/engines/index.html
14:59 max42 joined #salt
15:06 hemebond left #salt
15:08 max42 joined #salt
15:09 thinkt4nk joined #salt
15:11 ArQu3R joined #salt
15:12 nicksloan joined #salt
15:14 fracklen joined #salt
15:14 James5mith joined #salt
15:18 losh joined #salt
15:18 aldevar joined #salt
15:19 max42 I am using mysql as ext_pillar with as_list: True. However if the result contains only one result, the result is no list: https://pbot.rmdir.de/TUBqQ_P7dHbWvPmZ_gEvlw Am I missing something?
15:21 sp0097 joined #salt
15:24 dxiri joined #salt
15:29 heaje joined #salt
15:34 cyborg-one joined #salt
15:35 dxiri joined #salt
15:36 lee_ joined #salt
15:36 leev joined #salt
15:40 jimklo joined #salt
15:40 NotBobDole joined #salt
15:42 edrocks joined #salt
15:42 tapoxi anyone using the elasticsearch returner?
15:43 tapoxi I just want to see state output there not job cache
15:46 onlyanegg joined #salt
15:50 Praematura joined #salt
15:51 noobiedubie joined #salt
15:53 sarcasticadmin joined #salt
15:58 sp0097 joined #salt
16:03 dxiri joined #salt
16:05 woodtablet joined #salt
16:09 dxiri_ joined #salt
16:09 aneeshusa joined #salt
16:17 dxiri joined #salt
16:18 twooster Anyone else notice that the docs on docs.saltstack.com are missing a bunch of states for 2016.11.6? e.g., salt.states.pkgrepo, salt.states.test all have empty pagees
16:18 scooby2 yep
16:18 ProT-0-TypE aren't pillars evaluated on master?
16:19 whytewolf yes pillars are rendered on the master
16:19 ProT-0-TypE I have an "if" from a grain value and it's surely dependent on the minion where it is executed
16:19 ProT-0-TypE is that normal?
16:20 whytewolf it is exacuted on the master. against the grains cache.
16:20 ProT-0-TypE mmm
16:20 ProT-0-TypE not sure if I understand this
16:21 ProT-0-TypE especially cause I have a different behaviour between master/minions and via ssh
16:21 ProT-0-TypE so in my pillar I have something like: {% if grains.get('gpg', {}).get('secret', false) %}
16:21 ProT-0-TypE that grain is true only on master
16:22 whytewolf the master doesn't have it's own grains
16:22 whytewolf it has a grans cache.
16:22 ProT-0-TypE but if I run it via salt-ssh it is seen as true (cause it's true in the master)
16:22 ProT-0-TypE so it's grain cache of he specific minion?
16:22 ProT-0-TypE *the
16:22 whytewolf the grains cache has all of the grains from all al the minions.
16:22 whytewolf although salt-ssh I'm not sure about.
16:22 lee_ joined #salt
16:23 ProT-0-TypE and why this is rendered differently via salt-ssh
16:23 ProT-0-TypE ok
16:23 whytewolf salt-ssh is it's own beast. and pretty much anything that is true in a normal master/minion relationship could be handeled compleatly differently for salt-ssh
16:24 whytewolf for all i know it could act as a masterless minion
16:25 whytewolf in which case the pillars would be rendered on the minion instead of on the master. but i am not sure. Eugene is the resident salt-ssh master around here
16:25 Eugene Pretty sure you've got me confused with somebody else
16:25 whytewolf :P
16:25 whytewolf you know way more about salt-ssh then i do
16:26 Eugene I know that it uses ssh?
16:26 whytewolf humm. then who is the one that uses salt-ssh for testing.
16:26 aldevar left #salt
16:27 whytewolf maybe i am mistakeing you for someone else
16:27 whytewolf it is still early for me.
16:27 Eugene Have a beer
16:27 whytewolf would rather have a coma
16:33 major I feel like I am close to a coma
16:33 shanth anyone using salt to manage windows boxes? i tried to make it work in a vm but nothing worked
16:34 major isn't that normal for windows?
16:38 tiwula joined #salt
16:39 noobiedubie joined #salt
16:40 jauz shanth: I'm managing Windows with Salt primarily -- what're you having trouble with?
16:46 dxiri joined #salt
16:51 noobiedubie joined #salt
16:56 thinkt4n_ joined #salt
16:58 edrocks joined #salt
17:04 Edgan joined #salt
17:06 aneeshusa joined #salt
17:08 shanth even doing test.ping jauz it would only respond half the time
17:08 khaije1 joined #salt
17:09 Lionel_Debroux joined #salt
17:10 dxiri joined #salt
17:12 jauz Intermittent response? Make sure the machine(s) aren't going to sleep. -- Other than that, I've only encountered issues when the PATH variable is too long and had to run a script to shorten the path and try re-installing the minion.
17:12 jauz (As far as response to a command... there's plenty of other issues.)
17:15 shanth same thing is happening again, just added a windows vm as a salt minion, fails test.ping but somehow the key got accepted
17:18 shanth feels like windows just being crappy as usual
17:18 Guest73 joined #salt
17:20 cyborg-one joined #salt
17:21 edrocks Does anyone know why the `dockermod` module has `mod` as a suffix but is used as `salt '*' docker.something` in the nitrogen release? I see django also has a `mod` suffix for it's module
17:22 ssplatt joined #salt
17:25 edrocks Is it because the implementation in salt has to import the `docker-py` module which is named `docker` and that would lead to a import conflict?
17:27 dxiri joined #salt
17:31 PatrolDoom joined #salt
17:32 woodtablet because "docker" is a python module
17:33 woodtablet i am sure they didnt want to overload the namespace
17:33 edrocks woodtablet: thanks!
17:34 woodtablet edrocks: you are welcome. how do you like it ? I didnt know about this module until now
17:34 edrocks woodtablet: it's awesome when it works which it has been pretty rock solid for over a year now
17:35 edrocks the only issue I had recently was several months ago there was a bug in the docker-py module which required pinning to and older version
17:36 chrysanthemum joined #salt
17:36 woodtablet edrocks: good to know, i have been looking to integrate salt with my docker hosts and containers
17:36 edrocks besides that it is much nicer than using `cmd.run` and we have used it to run everything
17:36 edrocks the only issue with salt/docker is sharing dns changes between multiple datacenters but swarm can be a fix for that
17:38 nicksloan joined #salt
17:43 MTecknology Is there such thing as an include that silently ignores files not found?
17:43 MTecknology (in pillar)
17:44 MTecknology I'd like to do an include based on hostname and just not care if that file doesn't exist
17:44 major what about a merge with a default?
17:44 Eugene MTecknology - https://madeitwor.se/srv-salt/blob/pepper/pillar/top.sls#L14
17:44 MTecknology I don't think I follow
17:45 MTecknology hm... that could potentially work
17:45 snarfy^ joined #salt
17:46 Eugene It works great :-p
17:46 whytewolf when did pillar get ignore_missing? it didn't used to work in pillar
17:46 Eugene https://github.com/saltstack/salt/issues/39187
17:47 MTecknology We need this for random includes inside other pillar sls as well!
17:48 f3rno joined #salt
17:48 MTecknology include: - .{{ grains['id'] }} - ignore_missing: true   :D
17:48 major whytewolf, there's another gem
17:48 jimklo joined #salt
17:49 MTecknology Eugene: I really like that, and it fits my needs perfectly, but I was hoping to only care about that particular sls missing.
17:49 dxiri joined #salt
17:50 woodtablet there is an ignore_missing?! That is aweesomeeeee, i do things in a funny way just to avoid this problem
17:50 lordcirth_work Can you have 2 include: statements?
17:50 woodtablet Eugene: I am going to have to play with this new found knowledge, thanks!
17:50 whytewolf lordcirth_work: no, but your include statment can include multiple things.
17:51 Eugene I don't know where I found ignore_missing originally now; it seems to be undocumented heh
17:51 lordcirth_work whytewolf, yeah, I was wondering if you could do one with - ignore_missing and one without
17:51 major Eugene, how dare you take this long to share...
17:51 Eugene My srv-salt repo has always been public :-p
17:52 woodtablet lol
17:52 major no excuses
17:52 Eugene You're a towel
17:52 MTecknology heheh
17:52 major I represent that statement
17:53 Inveracity joined #salt
17:56 aneeshusa joined #salt
17:58 Lionel_Debroux joined #salt
17:58 fracklen joined #salt
18:04 impi joined #salt
18:08 dxiri joined #salt
18:08 ssplatt joined #salt
18:17 ecdhe joined #salt
18:27 just_me joined #salt
18:28 just_me left #salt
18:30 dxiri joined #salt
18:31 ujjain joined #salt
18:31 ujjain joined #salt
18:32 dxiri joined #salt
18:38 aldevar joined #salt
18:40 absolutejam isn't there an equivalent to ignore_missing
18:40 absolutejam like pillar.get('foo',False)
18:40 absolutejam There is for config.get iirc
18:41 ChubYann joined #salt
18:49 jimklo joined #salt
18:56 NotBobDole joined #salt
18:58 dxiri joined #salt
18:59 jhauser_ joined #salt
19:00 monjwf joined #salt
19:00 ssplatt https://github.com/saltstack/kitchen-salt/pull/116   eyes please?
19:03 jhauser_ joined #salt
19:05 Heartsbane joined #salt
19:10 jmiven joined #salt
19:14 MTecknology Does jinja let me do {% if len(foo.split('.')) == 1 %} in some way or another?
19:19 jrklein joined #salt
19:20 astronouth7303 salt mine seems to be taunting me. I want to be able to get the IPs of some minions (by compound matcher) to configure other minions, but it looks like the mine is empty? I thought I configured the mine to call `network.ip_addrs` with no args, but it's not showing up in anything. (I've done sync_all() on both the minion and the master, as well as mine.update() on the minion)
19:26 Rumbles joined #salt
19:28 oida joined #salt
19:28 dxiri joined #salt
19:34 jimklo joined #salt
19:37 nixjdm joined #salt
19:40 whytewolf astronouth7303: try salt '*' mine.valid
19:41 astronouth7303 `None`
19:41 whytewolf then you don't have a valid mine.
19:41 astronouth7303 i think I was expecting `[]`, but ok
19:42 whytewolf lets see your mine config.
19:42 absolutejam alright, back at it
19:42 absolutejam Does nodegroups HAVE to be in /etc/salt/master and not in master.d/whatever
19:42 absolutejam I put it in master.d/nodegroups initially and nothing detected after restart
19:42 whytewolf nothing has to be in /etc/salt/master
19:42 whytewolf .conf
19:43 whytewolf nodegroups.conf
19:43 dxiri joined #salt
19:43 whytewolf anything in master.d needs a .conf
19:44 absolutejam ah
19:44 absolutejam derp
19:44 astronouth7303 https://www.irccloud.com/pastebin/3fwZKmJP/master.d%2Fmine.conf
19:44 astronouth7303 absolutejam: i made the same mistake last week
19:44 whytewolf astronouth7303:  ... master.d?
19:45 astronouth7303 yeah?
19:45 astronouth7303 right next to gitfs.conf and cherrypy.conf
19:46 whytewolf did you set pillar_opts to true in every minion conf?
19:46 whytewolf [mine isn't a master setting]
19:46 Praematura_ joined #salt
19:46 absolutejam I'm still trying to figure out the best way of assigning these groups
19:46 astronouth7303 oh, it isn't? There's bits of the docs that say it is
19:47 absolutejam saw an issue for roster, for non-ssh. that would be nice
19:47 whytewolf astronouth7303: where?
19:47 astronouth7303 https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mine.html#salt.modules.mine.update
19:48 whytewolf ahhh
19:49 whytewolf that is meant about master configs that sync to minions. which is not by default
19:50 whytewolf honestly. pillars are the safest and quickest option as they don't need a restart on either the master or the minions
19:51 astronouth7303 just make `mine_functions` a pillar key?
19:51 whytewolf yes
19:51 censorshipwreck joined #salt
19:53 astronouth7303 ok, cool, that's happier
19:53 astronouth7303 thank you, once again, whytewolf
19:53 astronouth7303 they should get you a cape
19:54 whytewolf hehe. a career that actually works with salt would be better then a cape.
19:56 astronouth7303 wait, you're in here all day, you've answered every stupid question i've had, and you don't actually get paid to work with salt?
19:57 whytewolf nope. my $dayjob uses puppet, and I'm an openstack engineer
19:57 astronouth7303 wow
19:57 major right .. he should start a GoFundMe to help w/ expenses to get to SaltConf
19:58 justanotheruser joined #salt
19:58 major or even a PayPal account
19:58 major :P
20:00 whytewolf honestly i would be happy if Saltstack gave me a enterprise license for my homestuff for free.
20:00 major and then you could be like free advertisement for all the cool things SE does
20:01 aldevar left #salt
20:01 astronouth7303 is there a good way to flatten nested lists in jinja?
20:02 astronouth7303 I currently have `{{ salt['mine.get']('G@role:spam', 'network.ip_addrs', 'compound').values()|join(',') }}` which is wrong
20:02 whytewolf a good way? not really.
20:02 stewgoin joined #salt
20:03 major what about any way?
20:03 astronouth7303 especially since jinja doesn't seem to like riciculous comprehension one-liners
20:04 whytewolf depends on the list output. generally. I tend to expose the tuple to a set a variables. then join the secondary info
20:05 whytewolf see https://gist.github.com/jfrost/8798108
20:06 astronouth7303 ooph. I was hoping to dump a list of IPs into a config file for another application.
20:06 astronouth7303 looks like i might have to make said config file slightly more sophisticated
20:07 whytewolf yeap.
20:09 ssplatt joined #salt
20:10 MTecknology vim $(grep -l node_cfg . -R)
20:10 * MTecknology is in for a fun time... :P
20:11 whytewolf is that your $client pillar horror show?
20:12 MTecknology yup
20:13 aneeshusa joined #salt
20:13 dxiri joined #salt
20:15 justanotheruser joined #salt
20:18 dxiri joined #salt
20:22 pbandark joined #salt
20:24 mikecmpbll joined #salt
20:25 dxiri_ joined #salt
20:30 flowstategames joined #salt
20:33 Rumbles joined #salt
20:37 woodtablet whytewolf: are you in SoCal by any chance?
20:38 whytewolf close, by, las vegas
20:38 f3rno joined #salt
20:38 woodtablet whytewolf: i ll be in Vegas for AWS Reinvent, I ll buy you a beer if you are in town =D
20:39 dunz0r joined #salt
20:40 major or 6
20:41 woodtablet he has helped me a couple of times, and i like everyone i have spoke to in the salt channel, if you are there too major i ll get you one too
20:41 woodtablet i have met UtahDave a couple of times, but that is it so far
20:42 woodtablet i was trying to see if he lived in socal, so i could ask my boss to hire him, so his salt skill dont go to waste, lol
20:43 dxiri joined #salt
20:46 Bock joined #salt
20:48 major heh
20:49 philoliva joined #salt
20:49 major think he is closer to me .. but still not "that" close...
20:50 f3rno joined #salt
20:52 nixjdm joined #salt
20:54 aneeshusa joined #salt
21:00 dxiri joined #salt
21:02 ksk joined #salt
21:02 nicksloan joined #salt
21:03 mikecmpbll joined #salt
21:09 sh123124213 joined #salt
21:10 sh123124213 is there anyway I can remove the delay I have after running a command to a minion ( salt -L minion cmd.run 'ls') ? Results comes back but salt hangs for 1-2 seconds before going back to prompt
21:14 astronouth7303 can i OR an `onchanges`?
21:14 tobstone joined #salt
21:15 astronouth7303 sh123124213: i think that's the master waiting to see if any other minions answer. Remember, the master just publishes, it's up to the minions to decide if they care about it.
21:15 whytewolf or onchanges?
21:15 sh123124213 astronouth7303: I get that but I asked if there is anyway I can remove/change that delay
21:15 whytewolf sh123124213: no
21:16 astronouth7303 i have like four rules that, if changed, a server needs to be restarted
21:16 whytewolf sh123124213: you could use --async and read the job cache
21:16 sh123124213 k, thnx
21:17 Rumbles joined #salt
21:19 astronouth7303 (this is what happens when you have the application source, the virtual environment, and the salt-generated config file)
21:20 Trauma joined #salt
21:20 whytewolf astronouth7303: oh you mean a chain of onchanges that if any of them change, restart ... iirc that is the behavour
21:22 astronouth7303 huh, huh, it says result: False with  'The following requisites were not found:\n                   onchanges:\n                       file: /opt/REDACTED/.venv\n'
21:23 astronouth7303 oh, nvm, it's describing a syntax error, not a runtime condition
21:23 whytewolf yes
21:23 whytewolf do you have a file.* state for /opt/REDACTED/.venv
21:23 astronouth7303 no, i have a virtualenv.* state
21:24 whytewolf well then ... file: wouldn't be the right choice ;)
21:24 whytewolf [requisites follow states not the system]
21:25 astronouth7303 i'm pretty ok with that, considering that the only reason I have ssh on the systems is for salt-cloud
21:25 astronouth7303 and debugging
21:26 whytewolf huh
21:29 Rumbles joined #salt
21:32 hemebond joined #salt
21:34 dxiri joined #salt
21:44 snarked joined #salt
21:53 nixjdm joined #salt
21:56 Rumbles joined #salt
21:58 nebuchadnezzar joined #salt
21:58 wyum joined #salt
21:58 dxiri joined #salt
21:59 oldgregg joined #salt
22:02 ecdhe joined #salt
22:07 justan0theruser joined #salt
22:08 dxiri joined #salt
22:09 fracklen joined #salt
22:12 dxiri_ joined #salt
22:19 khaije1 Whats options are available to figure out where a weird minion key was sent from?
22:20 xet7 joined #salt
22:22 jeddi joined #salt
22:22 Basement joined #salt
22:23 whytewolf there really isn't anything. even the auth event only tells you the basic info of the minion id, the minion pub key and the status of the key
22:26 lightswitch joined #salt
22:26 whytewolf maybe you could turn on debugging in the master and see an ip. not really sure about that
22:26 ecdhe joined #salt
22:26 ecdhe joined #salt
22:28 hemebond I'm not sure there is any IP information provided.
22:28 hemebond Unless the rogue minion tries to connect again and you can view the network connection data.
22:29 dxiri joined #salt
22:30 whytewolf if your willing to accept it you can query it with salt. but that is risky
22:36 Eugene I love rogue minions. Accept them, then cmd.run 'dd if=/dev/zero of=/dev/sda'. Tada! No more minion.
22:36 Eugene (don't do this)
22:39 Edgan Eugene: cmd.run "dd if=/dev/urandom of=`df -h | grep '% /$' | awk '{ print $1 }'`"
22:41 justanotheruser joined #salt
22:42 Edgan Eugene: Even better, cmd.run "dd if=/dev/urandom of=`df -h | grep '% /$' | awk '{ print $1 } | sed 's/[0-9]$//g'`"
22:43 Eugene wtf, why are you doing it that way? `df --output=source / | tail -n1` will give you the root device
22:44 Eugene You don't need grep or awek/sed for this
22:44 Eugene Stop abusing UNIX tools
22:45 Eugene And besides, it won't work anyway. You need to fork off the dd process so it keeps running after salt kersplodes
22:45 Edgan Eugene: install screen, and prepend screen -d -m
22:46 Eugene -_-
22:46 whytewolf ... screen? really??
22:46 whytewolf nohup
22:46 whytewolf screen is way over kill for that
22:46 Edgan whytewolf: works too, expected you would say tmux, but I prefer screen
22:48 whytewolf i use tmux over screen but that isn't what this is about. you need a tool that isn't going to die when you lose the hard drive
22:49 sp0097 joined #salt
22:51 juanito joined #salt
22:51 juanito left #salt
22:51 juanito joined #salt
22:51 juanito left #salt
22:53 nixjdm joined #salt
22:54 juanito joined #salt
22:56 juanito joined #salt
22:58 darix joined #salt
22:59 dxiri joined #salt
23:02 ksa joined #salt
23:11 dxiri_ joined #salt
23:44 mvensky joined #salt
23:44 dxiri joined #salt
23:52 flowstategames joined #salt
23:53 nixjdm joined #salt
23:54 f3rno joined #salt
23:57 deuscapturus joined #salt

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