Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2016-02-15

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

All times shown according to UTC.

Time Nick Message
00:01 totzky joined #salt
00:06 BLoodBinary joined #salt
00:06 BLoodBinary hello?
00:06 ZiLi0n has a give states a way to notify another state that it run?
00:06 ZiLi0n a given*
00:09 nyx_ joined #salt
00:10 tweakism ZiLi0n: This may be what you're looking for:  https://docs.saltstack.com/en/latest/topics/tutorials/states_pt2.html  https://docs.saltstack.com/en/latest/ref/states/requisites.html
00:10 tweakism This allows you to have e.g. a state that modifies apache.conf, notify the apache service state afterward so that it restarts.
00:14 hoonetorg joined #salt
00:22 ZiLi0n tweakism thanks, I didn't find the one you describe in the example above. The closest one I see is onchange.
00:28 bronz joined #salt
00:30 pjammer joined #salt
00:32 rem5 joined #salt
00:39 edrocks joined #salt
00:51 xstra joined #salt
00:51 iceyao joined #salt
01:10 joe_n joined #salt
01:19 jaybocc2 joined #salt
01:24 malinoff joined #salt
01:28 onlyanegg joined #salt
01:33 fracklen joined #salt
01:35 ruxu joined #salt
01:41 xstra joined #salt
01:45 eliasp joined #salt
01:45 joe_n joined #salt
01:47 scoates joined #salt
01:48 leev_ joined #salt
01:51 SubOracle joined #salt
01:53 onlyanegg joined #salt
02:01 thehaven joined #salt
02:03 cpowell joined #salt
02:16 catpigger joined #salt
02:18 subsignal joined #salt
02:23 edrocks_ joined #salt
02:26 michelangelo joined #salt
02:29 xstra joined #salt
02:36 ruxu joined #salt
02:41 antpa joined #salt
02:51 evle joined #salt
03:06 anmol joined #salt
03:20 jaybocc2 joined #salt
03:22 fracklen joined #salt
03:22 nyx_ joined #salt
03:36 tweakism What python versions are officially supported by Salt?
03:36 tweakism Working on a module I plan to submit as a feature, and want to know if I can depend on python >= 2.6
03:50 justanotheruser joined #salt
03:50 pdayton joined #salt
03:52 joe_n joined #salt
04:04 treaki__ joined #salt
04:07 ruxu joined #salt
04:17 scoates joined #salt
04:18 beardedeagle joined #salt
04:19 honestly joined #salt
04:19 kbyrne joined #salt
04:20 ablemann joined #salt
04:22 k_sze[work] joined #salt
04:30 jalbretsen joined #salt
04:30 anmol joined #salt
04:38 anmol joined #salt
04:43 racooper joined #salt
04:43 srinivas joined #salt
04:50 malinoff joined #salt
04:59 viq joined #salt
05:00 jhujhiti_ joined #salt
05:02 joshin joined #salt
05:02 joshin joined #salt
05:04 rdas joined #salt
05:07 voidspacexyz joined #salt
05:08 ruxu joined #salt
05:10 fracklen joined #salt
05:12 hightekvagabond joined #salt
05:17 mohae joined #salt
05:35 voidspacexyz1 joined #salt
05:39 tzero joined #salt
05:42 patchedmonkey joined #salt
05:44 whytewolf tweakism: https://docs.saltstack.com/en/latest/topics/installation/#dependencies
05:45 tweakism thanks.
05:52 brianfeister joined #salt
05:54 anthpa joined #salt
05:56 whytewolf np
05:58 voidspacexyz1 joined #salt
06:00 patchedmonkey joined #salt
06:01 mohae joined #salt
06:03 antpa joined #salt
06:06 beardedeagle So there are no instructions on how to write things for salt-pack. I will assume this should provide me with everything I need to know since I am duplicating it for centos 7? https://github.com/saltstack/salt-pack/search?utf8=%E2%9C%93&q=winexe
06:10 beardedeagle although I maintain backwards compatability for 6 as well so I may update that one as well
06:12 whytewolf humm. I know this is showing that it has the potentail to build winexe. however it doens't look like it actually does. there is no winexe rpms in the redhat 6 repo
06:13 tweakism whytewolf: are you a salt dev?
06:13 whytewolf tweakism: no
06:13 beardedeagle @whytewolf: if I have to wait to work with dmurphy that is fine, just wanted to get a jump on it
06:14 whytewolf tweakism: I'm just a guy that REALLLLLLLY digs salt.
06:14 kshlm joined #salt
06:14 tweakism I could use some mentorship/double-checking on what I think is a bug, and correctly submitting a PR for a fix
06:14 whytewolf beardedeagle: might have to salt-pack is a beast.
06:14 beardedeagle dmurphy is the one who approved that PR
06:14 tweakism I think I know the correct branch and stuff to base off of, but I really just don't want it to get merged if I'm mistaken about it.
06:14 beardedeagle so I _ASSUME_ it works
06:15 tweakism about it being a bug I mean
06:16 beardedeagle ah
06:16 beardedeagle file_roots/pkg/winexe/1_1/rhel6/RPMS/x86_64/winexe-1.1-1b787d2.el6.x86_64.rpm
06:16 beardedeagle there is an rpm there
06:16 beardedeagle just probably not in repo.saltstack.com yet
06:16 whytewolf tweakism: it isn't that bad really. your patch should be against the earliest branch version that has the bug.
06:16 whytewolf beardedeagle: yeah. i think it is missing from the pkgbuild stuff is the only reason it isn't in the repo
06:17 whytewolf beardedeagle: https://github.com/saltstack/salt-pack/blob/a5944bc1f6dd8e16329627b2e984369806a50656/pillar_roots/pkgbuild.sls
06:17 beardedeagle yeah, that makes sense
06:18 whytewolf and github i think doens't like the salt-pack repo. when i hit the pillar_roots/versions/ tree it sometimes doesn't show the full tree
06:19 beardedeagle gunna have to do some mock stuff so I can provide 32bit rpms as well, just in case
06:19 whytewolf tweakism: check https://docs.saltstack.com/en/latest/topics/development/contributing.html for more about how to submit PR's
06:19 tweakism I did read that.
06:20 whytewolf tweakism: basicly try to aim for the earliest branch that has the bug. but if you did develop they can back-port it
06:20 tweakism so should I submit a bug, and add 'fixes #{bug_number}' in my commit that I do the PR off of?
06:21 tweakism and I guess the branch would be 2015.8
06:21 whytewolf in your PR comment mention the bug number
06:21 wych joined #salt
06:22 whytewolf the commit should describe the bug
06:22 whytewolf [for the release notes since it works with commit logs]
06:22 whytewolf or was it bug numbers i forget
06:22 tweakism ah... is there a certain format or anything I should use then?
06:22 tweakism conventions..
06:23 whytewolf not really. english is perferred.
06:23 tweakism I know if you put 'fixes #423' github will close the issue #423 when the commit is merged with the main branch (develop)
06:23 tweakism but I don't know that's desired or not
06:24 whytewolf that is not desired. [and i think they have that turned off]
06:24 tweakism kk, thanks for your help sir.
06:24 whytewolf np
06:25 whytewolf night everyone
06:28 rotbeard joined #salt
06:29 keimlink joined #salt
06:42 voidspacexyz1 joined #salt
06:42 kevinquinnyo joined #salt
06:45 kevinquinnyo joined #salt
06:45 kevinquinnyo joined #salt
06:45 ruxu joined #salt
06:47 kevinquinnyo joined #salt
06:48 giantlock joined #salt
06:48 kevinquinnyo joined #salt
06:49 igorwidl joined #salt
06:49 kevinquinnyo joined #salt
06:50 voidspacexyz joined #salt
06:50 kevinquinnyo joined #salt
06:51 pdayton joined #salt
06:51 felskrone joined #salt
06:51 kevinquinnyo joined #salt
06:52 felskrone joined #salt
06:56 kevinquinnyo joined #salt
06:57 kevinquinnyo1 joined #salt
06:58 totzky joined #salt
06:58 M-MadsRC joined #salt
06:58 fracklen joined #salt
07:02 colttt joined #salt
07:03 Sketch joined #salt
07:03 trent joined #salt
07:04 voileux joined #salt
07:04 lionel joined #salt
07:04 norii joined #salt
07:04 davromaniak joined #salt
07:04 dh joined #salt
07:04 okfine joined #salt
07:04 davromaniak joined #salt
07:04 colegatron joined #salt
07:04 ze- joined #salt
07:04 pezus joined #salt
07:04 stooj joined #salt
07:04 foundatron joined #salt
07:04 jinkyu joined #salt
07:04 ]V[ joined #salt
07:04 nicksloan joined #salt
07:04 rburkholder joined #salt
07:04 aqua^c joined #salt
07:04 dimeshake joined #salt
07:04 nomad_fr joined #salt
07:04 sixninetynine joined #salt
07:04 fxhp joined #salt
07:04 babilen joined #salt
07:04 sarlalian joined #salt
07:04 mgresser joined #salt
07:04 edulix joined #salt
07:04 w1gz joined #salt
07:04 antix_ joined #salt
07:05 jcockhren joined #salt
07:05 cpowell joined #salt
07:06 sjohnsen joined #salt
07:06 Gareth joined #salt
07:06 voidspacexyz1 joined #salt
07:07 kawa2014 joined #salt
07:13 jxm_ joined #salt
07:18 voidspacexyz1 joined #salt
07:23 wendall911 joined #salt
07:35 rubendv joined #salt
07:41 keimlink joined #salt
07:44 voidspacexyz joined #salt
07:46 atmosx joined #salt
07:47 ruxu joined #salt
07:48 KermitTheFragger joined #salt
07:49 armyriad joined #salt
07:51 jimklo joined #salt
07:52 iceyao joined #salt
07:55 bdrung_work joined #salt
07:55 impi joined #salt
07:56 adelcast joined #salt
08:01 keimlink joined #salt
08:07 jaybocc2 joined #salt
08:10 favadi joined #salt
08:11 voidspacexyz1 joined #salt
08:11 dgutu joined #salt
08:11 adelcast joined #salt
08:11 iceyao_ joined #salt
08:14 k_sze[work] joined #salt
08:15 fracklen joined #salt
08:17 debian112 joined #salt
08:18 fracklen joined #salt
08:18 avozza joined #salt
08:18 fracklen joined #salt
08:18 nledez joined #salt
08:18 kalessin joined #salt
08:19 klocek joined #salt
08:19 voidspacexyz1 joined #salt
08:20 ntropy joined #salt
08:22 voidspacexyz joined #salt
08:24 keimlink joined #salt
08:25 brianfeister joined #salt
08:26 voidspacexyz1 joined #salt
08:26 slav0nic joined #salt
08:26 josuebrunel joined #salt
08:30 malinoff joined #salt
08:34 ffredrikk joined #salt
08:40 voidspacexyz joined #salt
08:41 armyriad joined #salt
08:48 jeddi joined #salt
08:48 CeBe1 joined #salt
08:51 pdayton joined #salt
08:52 jimklo joined #salt
08:56 josuebrunel joined #salt
09:01 GreatSnoopy joined #salt
09:04 linjan joined #salt
09:05 LondonAppDev joined #salt
09:05 ruxu joined #salt
09:05 ronnix joined #salt
09:08 jaybocc2 joined #salt
09:08 Rumbles joined #salt
09:09 voidspacexyz1 joined #salt
09:11 tweakism joined #salt
09:11 totzky joined #salt
09:12 voidspacexyz1 joined #salt
09:14 wwwbukolaycom joined #salt
09:14 BhavyaM joined #salt
09:16 dgutu joined #salt
09:17 k_sze[work] joined #salt
09:17 voidspacexyz1 joined #salt
09:24 s_kunk joined #salt
09:28 LondonAppDev__ joined #salt
09:28 lempa joined #salt
09:28 andrew_v joined #salt
09:28 om3 joined #salt
09:28 quasiben1 joined #salt
09:28 impi joined #salt
09:29 deniszh joined #salt
09:29 twiedenbein joined #salt
09:29 ashb joined #salt
09:29 SteamWells joined #salt
09:30 voidspacexyz1 joined #salt
09:37 ronnix joined #salt
09:38 jespada joined #salt
09:53 ronnix_ joined #salt
09:53 jimklo joined #salt
09:54 patchedmonkey joined #salt
09:57 pjammer joined #salt
10:02 Xevian joined #salt
10:08 onlyanegg joined #salt
10:08 sauvin joined #salt
10:14 brianfeister joined #salt
10:17 slav0nic joined #salt
10:34 rominf joined #salt
10:37 brianfeister joined #salt
10:38 favadi joined #salt
10:41 amcorreia_ joined #salt
10:43 abednarik joined #salt
10:45 slav0nic joined #salt
10:48 giantlock joined #salt
10:51 pdayton joined #salt
10:52 AlexK joined #salt
10:52 AlexK Anybody here?
10:53 Guest34239 Hi there,,
10:54 schinken is it possible to watch a single file for service.running on a file.recurse?
10:55 jimklo joined #salt
11:08 ronnix joined #salt
11:09 jaybocc2 joined #salt
11:11 voidspacexyz1 joined #salt
11:21 cyborg-one joined #salt
11:38 chiui joined #salt
11:41 dunz0r joined #salt
11:42 dunz0r I've got a state that's pretty long and full of a lot of repition, what's the best way to avoid this?
11:42 dunz0r This is the state: http://sprunge.us/YMES
11:42 dunz0r I suspect I can do a loop or something with Jinja
11:43 voidspacexyz1 joined #salt
11:46 dunz0r I don't think I want to store the files in the pillar though, feels 'wrong'
11:47 ruxu joined #salt
11:51 tweakism joined #salt
11:54 `chris Not sure if it's me or salt.. I've got file.append which is acting up as soon as it wants to change something.  If unattended_email is corrent, the state runs through fine.  What I see is that salt-minion is sitting at 100%CPU and the salt run never finishes.  http://paste.debian.net/388748/ <- That's my state, nothing too fancy I though?
11:55 `chris s/corrent/correct/
11:57 jimklo joined #salt
12:02 Ritesh__ joined #salt
12:02 dunz0r `chris: Wouldn't it be "saner" to do an else instead of that default?
12:03 dunz0r `chris: Because if I'm correct, it should set unattended_email to root@aaa instead of root@bbb if the domain isn't bbb, right?
12:04 `chris Correct.
12:05 dunz0r `chris: Here's how I would do it: http://paste.debian.net/388749/
12:07 dkrae joined #salt
12:07 `chris dunz0r: That looks good, thanks.
12:08 `chris I can still see the same behaviour, that when I roll that out, my salt-minion is hanging with 100%CPU and never finishes the highstate.
12:08 dunz0r Hmm. Could it be that it's trying to send the email but it hangs or something?
12:08 * `chris needs to kill the salt-minion and ctrl-c the highstate to get out of that situation.
12:08 iceyao joined #salt
12:09 `chris It should in theory only set the email in the 50unattended-upgrades.common file.
12:09 pprkut Hi! I have troubles configuring a git ext_pillar in salt 2015.8.5 and ran out of ideas on where to look. Would appreciate some pointers on what could be wrong
12:10 pprkut it's a rather simple setup with just a master branch that should be available in the base environment
12:10 pprkut I see the master fetching the git repo just fine, but it never seems to appear in the pillar data
12:11 pprkut when I reference it in pillar's top.sls and try to execute a state all I get is: Specified SLS 'foo' in environment 'base' is not available on the salt master
12:14 linovia Is it possible to define cleanly fallback values within pillar ? I'd like to keep things DRY and avoid repeating several times the same default value in the state files
12:25 fracklen joined #salt
12:26 fracklen joined #salt
12:26 babilen dunz0r: Might https://github.com/saltstack-formulas/postfix-formula come in handy? And yes, you can use loops
12:27 q1x joined #salt
12:29 dunz0r Yeah, I did it like this: http://sprunge.us/Dcbb
12:30 dunz0r Not as fancy like the postfix-formula, but it works :)
12:33 ronnix joined #salt
12:38 kevinquinnyo joined #salt
12:38 pprkut solved my problem. My git pillar needed a top.sls file.
12:46 oida joined #salt
12:46 kevinquinnyo joined #salt
12:47 kevinquinnyo joined #salt
12:50 kevinquinnyo joined #salt
12:50 kevinquinnyo joined #salt
12:52 favadi joined #salt
12:52 pdayton joined #salt
12:52 kevinquinnyo joined #salt
12:59 fredvd joined #salt
13:00 pdayton joined #salt
13:01 nyx_ joined #salt
13:05 elsmo joined #salt
13:08 vincent_vdk joined #salt
13:09 vincent_vdk hi, is there anyone with some sane docs about salt-ssh
13:09 vincent_vdk i'm confused about the path to the priv key
13:09 jaybocc2 joined #salt
13:09 slav0nic joined #salt
13:10 vincent_vdk i've been using ssh_minion_opts, but now i can't get it to work
13:15 srinivas joined #salt
13:16 josuebrunel joined #salt
13:17 ronnix joined #salt
13:17 ninkotech joined #salt
13:19 rem5 joined #salt
13:20 numkem joined #salt
13:21 AndreasLutro vincent_vdk: you specify the path to the private key in the roster: https://docs.saltstack.com/en/latest/topics/ssh/roster.html
13:22 honestly I am trying to get a dev version of salt-ssh working by just cloning the salt repo like it says in HACKING.rst. I also did git fetch --tags but running "scripts/salt-ssh --versions-report" from the repo still gives me the system salt. Is HACKING.rst not accurate?
13:23 babilen honestly: How do you know that it gives you the system salt-ssh?
13:23 akhter joined #salt
13:24 vincent_vdk AndreasLutro: tried that too
13:24 honestly it gives me the version info of the system salt.
13:24 akhter_1 joined #salt
13:31 babilen It probably imports the system libraries .. do it in a virtualenv
13:31 honestly that makes snese.
13:32 honestly The sentence "Just cloning the repository is enough to work with Salt and make contributions" in HACKING.rst is a bit misleading ;)
13:32 babilen Well, it seems to assume that you don't have salt installed
13:33 KennethWilke joined #salt
13:35 rem5 joined #salt
13:36 kawa2014 joined #salt
13:37 lompik joined #salt
13:39 abednarik joined #salt
13:39 ZiLi0n Hi all,
13:41 ZiLi0n when having more than one minion, does saltstack execute states synchronously so that a new state is not run until all minions have complete the previous one? (Suppose that all the minions have to run the exact same steps)
13:42 babilen no
13:43 edrocks joined #salt
13:43 voidspacexyz joined #salt
13:44 ZiLi0n Thanks babilen. I see, ok. Let me explain what I am trying to achieve. So let's say I have four minions and I want to download their SSH public keys, merge them all toghether, and upload them back to each minion. It is essentially creating a mesh of SSH keys. How can I do that?
13:44 bluenemo joined #salt
13:44 KennethWilke I'd probably write a salt-runner for that: https://docs.saltstack.com/en/develop/ref/runners/index.html
13:45 KennethWilke a runner is basically a script that runs on the master that uses salt like a library
13:45 KennethWilke so you could have it read the ssh key file from many servers, combine the results, then push back out
13:46 honestly okay, I think my dev salt is working. How do I actually make it surrender a stacktrace when it runs into a python exception? I am executing 'salt-ssh -i --refresh --user $(whoami) 'ubuntusystem12' cp.get_file_str salt://test' (because that is as far as I've managed to minimize the reproduction of my issue, originally it's the ssh_auth.present stat that's failing - basically everything in the cp module is broken) and it throws 'Passed invalid ...
13:46 honestly ... arguments: coercing to Unicode: need string or buffer, bool found.'
13:46 babilen ZiLi0n: I'd rather collect them all in the salt mine and then fill whatever file you want to fill with them on each individually. Much like the openssh-formula does in the https://github.com/saltstack-formulas/openssh-formula#id7 openssh.known_hosts state
13:47 KennethWilke what babilen suggests is also a good idea
13:47 ZiLi0n KennethWilke thanks a lot! I will look at it.
13:48 ZiLi0n salt mine...mmm that is a new term for me :)
13:48 KennethWilke if you want to automate that process in the case of future minions being added, i think babilen's idea is better
13:49 babilen ZiLi0n: The salt mine is essentially for information about other minions
13:50 tpaul joined #salt
13:51 teryx510 joined #salt
13:51 pdayton joined #salt
13:51 honestly on the minion this is the only relevant log entry I get: [salt.fileclient  ][DEBUG   ][15637] Could not find file from saltenv 'base', 'salt://test' - but the reason it didn't find the file is that it keeled over somehow, not that the file isn't there
13:52 ZiLi0n babilen cool it looks good. Thanks
13:53 babilen ZiLi0n: Maybe the openssh.known_hosts state is exactly what you need
13:53 The_Loeki joined #salt
13:53 impi joined #salt
13:56 kevinquinnyo joined #salt
13:58 ronnix joined #salt
13:58 M-MadsRC joined #salt
13:59 denys joined #salt
14:00 dariusjs joined #salt
14:01 ZiLi0n babilen yes, it is exactly what I need indeed
14:01 nicksloan joined #salt
14:02 honestly ...nothing?
14:04 dyasny joined #salt
14:05 rm_jorge joined #salt
14:07 jimklo joined #salt
14:07 akhter_1 honestly: What's the settings on your file_roots for the salt master?
14:08 catpig joined #salt
14:10 onlyanegg joined #salt
14:11 honestly file_roots: base: - /srv/saltstack/states
14:13 akhter_1 Are any other states working?
14:13 honestly yes
14:14 honestly file.managed works nicely, for example
14:14 honestly because it doesn't use the cp module
14:14 akhter_1 What error does it through when using trace level log?
14:15 M-liberdiko joined #salt
14:15 honestly let's see
14:15 honestly Passed invalid arguments: coercing to Unicode: need string or buffer, bool found.
14:16 honestly I am really looking for the error that the fileserver encounters
14:16 honestly but I can't find that anywhere
14:19 akhter_1 What did you pass into the cp module?
14:19 akhter_1 I'd open a issue on github about this by the way.
14:19 andrew_v joined #salt
14:20 rem5_ joined #salt
14:20 cyborglone joined #salt
14:21 abednarik joined #salt
14:22 keimlink joined #salt
14:22 cpowell joined #salt
14:23 twiedenbein_ joined #salt
14:23 honestly_ joined #salt
14:23 dyasny_ joined #salt
14:24 hoonetorg_ joined #salt
14:24 six99 joined #salt
14:24 srinivas joined #salt
14:24 pezus joined #salt
14:25 dgutu joined #salt
14:25 bdrung_work joined #salt
14:25 fxhp joined #salt
14:25 kawa2014 joined #salt
14:26 wych joined #salt
14:27 antpa joined #salt
14:27 paolo joined #salt
14:27 malinoff joined #salt
14:28 dijit joined #salt
14:29 M-MadsRC joined #salt
14:29 honestly_ so this gets called on the minion: SALT_ARGV: ['/usr/bin/python2.7', '/tmp/.erlacher_f62e6b_salt/salt-call', '--local', '--metadata', '--out', 'json', '-l', 'quiet', '-c', '/tmp/.erlacher_f62e6b_salt', '--', 'cp.cache_file', 'path=salt://test']
14:30 honestly_ how do I make that "-l trace"?
14:31 AndreasLutro with salt-ssh? you can't, you have to ssh into the machine and run it yourself
14:32 racooper joined #salt
14:33 ZiLi0n babilen, so I'd like to group the minions in different groups, so that each group has a totally diferent config. I think I know how to do that using pillar (basically each group can use its own pillar sls file). But what about the salt mine? Can I create one salt mine per group, or isolate part of the salt mine per group?
14:33 honestly_ ok, all I get out of that is again just "Unable to cache file 'salt://test' from saltenv 'base'."
14:33 honestly_ no way to figure out why
14:35 giantlock joined #salt
14:36 ZiLi0n babilen... I think that is possible, mine.get allows you to specify the target. So I guess that would be what I want.
14:37 dkrae joined #salt
14:42 rubenb Hi. Is it doable to run salt on non-standard ports? :)
14:45 teryx5101 joined #salt
14:46 M-liberdiko joined #salt
14:47 hasues joined #salt
14:47 hasues left #salt
14:48 akhter_1 honestly_: I read that wrong, it states unable to cache file, are you running on a user other than root?
14:49 honestly_ yes, I run salt-ssh as an unprivileged user
14:51 fracklen joined #salt
14:52 honestly_ with sudo on the minion
14:52 honestly_ (sudo: True in the roster_
14:52 honestly_ )
14:54 fracklen joined #salt
14:54 mapu joined #salt
14:55 ALLmightySPIFF joined #salt
14:55 joshin joined #salt
14:55 keimlink joined #salt
14:57 babilen ZiLi0n: If its okay for minions of a group to get information about minions of other groups that's fine, yeah
14:57 bowhunter joined #salt
14:58 ZiLi0n babilen so actually it should not be ok, each minion should only have access to info about other minions in its group
14:58 spiette joined #salt
14:59 akhter joined #salt
14:59 babilen ZiLi0n: The mine is per-master .. you'd need different masters in that case
15:00 akhter joined #salt
15:00 andrew_v joined #salt
15:00 babilen (so are states btw)
15:00 akhter joined #salt
15:01 ZiLi0n but it seems that mine.get allows to specify a target. So it seems that if a target only matches that specific group then the salt.mine can be sliced.
15:01 babilen But a minion could still request different data
15:01 babilen (by using a different target)
15:02 ZiLi0n how would the minion do that? using a command?
15:03 babilen Running "salt-call mine.get ..." on the minion would be one way .. but essentially: The minion can communicate with the master and request *all* information in the mine.
15:03 babilen If you don't want that to happen then you need different masters
15:04 ZiLi0n I see, mmm
15:04 babilen This is assuming that you cannot trust your minions, naturally
15:04 akhter_1 joined #salt
15:04 babilen Or that you have different customers on them or something ..
15:04 ZiLi0n right
15:05 antpa joined #salt
15:05 ZiLi0n so the problem with having different masters is that different IP addresses are required for each one, right?
15:06 giantlock joined #salt
15:06 babilen Are you running out of addresses?
15:06 teryx510 joined #salt
15:07 ZiLi0n no
15:07 babilen Normally a master would run on a different box that has a different IP, yeah
15:07 akhter joined #salt
15:08 bearonis joined #salt
15:08 beardedeagle joined #salt
15:09 ZiLi0n so babilen... I am thinking about what you said before about that state are per-master. Could a minion request to run another states other than what it has assigned in top.sls? I am just trying to understand if the same global concept of the mine applies to the states as well
15:09 akhter_1 joined #salt
15:10 jaybocc2 joined #salt
15:10 babilen it could
15:11 babilen If you need your minions separare then use different masters for them. Glue them together via syndics if you want to.
15:12 babilen *separate
15:12 jimklo joined #salt
15:13 brianfeister joined #salt
15:15 mpanetta joined #salt
15:19 ZiLi0n thanks babilen, oh I see, so run another states might be ok, but access to another data would not be ok tough. Pillar seems to isolate well enough the static data between minions correct? So that only one minion have access to its pillar data only and it cannot request other data of other minions.
15:20 babilen Yeah, pillars are completely isolated
15:21 srinivas joined #salt
15:21 ZiLi0n cool
15:22 akhter_1 honestly_: Try with root user that has access to the cache directory.
15:23 akhter_1 If that works, make sure your unprivileged user has access to the default salt cache directory.
15:23 ZiLi0n babilen, it seems there is no way to store dinamically data in the pillar, so that a state could do it, that would do it for me instead of the salt mine
15:24 babilen ZiLi0n: I just like to point out these ramifications as soon as I hear "separate groups" as people new to salt might not be aware as to which data are available to all minions and which data are not
15:24 bearonis_ joined #salt
15:24 babilen No, no dynamic data .. unless you store it in one of the external pillar sources
15:25 ZiLi0n babilen absolutely, that is excellent help and feedback. Thanks very much, you always point out in the right direction.
15:25 unusedPhD joined #salt
15:25 rideh- joined #salt
15:25 Ashald joined #salt
15:26 PsionTheory joined #salt
15:28 nyx_ joined #salt
15:28 catpig joined #salt
15:30 jimklo joined #salt
15:31 honestly_ akhter_1: the cache directory is set so user has access
15:32 honestly_ akhter_1: other salt states work, they wouldn't work without access to the cache directory
15:32 gmoro_ joined #salt
15:32 akhter_1 It's hard to say if other modules are accessing the same cache directory.
15:32 akhter_1 Although it shouldn't be any different.
15:33 abednarik joined #salt
15:33 honestly_ running as root makes no difference.
15:36 Fiber^ joined #salt
15:36 Tyrm joined #salt
15:37 akhter_1 That's weird, root should have all privileges.
15:38 honestly_ it's probably not a privilege problem.
15:39 honestly_ why do you think it's a privilege problem?
15:39 akhter_1 Probably isn't but the only error you're getting is that it can't create the cache file.
15:39 Brew joined #salt
15:40 honestly_ the error is from the minion, not from the master.
15:40 akhter_1 So either there's no space, inode, or permissions to create a file.  Or the method it's trying to use to create the file it has to no permissions to.
15:40 akhter_1 That's right, I know.
15:41 akhter_1 The minion is what caches states.
15:41 srinivas joined #salt
15:41 honestly_ the minion is running with sudo.
15:42 akhter_1 Check your /var/cache/minion/files/base directory.
15:42 akhter_1 Hmmm, that shouldn't be the issue then.
15:42 honestly_ there is no /var/cache/salt/minion directory because I'm using salt-ssh
15:42 akhter_1 Ahh that's right.
15:43 akhter_1 Welp, I'm not sure then, I'd say open a case on github.
15:43 adelcast left #salt
15:48 ZiLi0n hello again, thanks for all your help. I am trying to do a map.jinja based on a value in the pillar. As there is no pillar.filter_by function, at least I can't find it I thought that maybe having a state to set a grain (and then do grain.filter_by) based on it could work. Unfortunately it seems that when sls are compiled it does not take into account grain that do not exist in the minion yet... not sure what an elegant solution
15:48 ZiLi0n could be
15:50 ZiLi0n I guess the easiest would be to run the state that sets the grain first, and then run the rest of the states that depend on it. After the grain is set, then highstate should work to completion
15:50 mpanetta joined #salt
15:50 pzipoy joined #salt
15:51 adelcast joined #salt
15:51 babilen ZiLi0n: Why don't you simply provide the correct information via pillars?
15:52 ZiLi0n thanks babilen, so the information is in the pillars. but how can I run a filter_by fucntion in a map.jinja using the pillar?
15:52 Rumbles_ joined #salt
15:53 babilen ZiLi0n: No, I meant: Just provide whatever information you want to provide in map.jinja via pillars directly. map.jinja is typically used for "sane" platform specific defaults
15:53 ZiLi0n grains has function filter_by, so for example depending on the OS version I can set different values to variables. Basically I would like to to the same but based on a pillars, so that if a variable in the pillar has value A, then set defaults to 1, if it is instead B, then set other values
15:55 babilen In pillars you would simply provide the correct information to begin with .. not sure if you can filter on pillars there
15:55 babilen (don't think so, but haven't checked)
15:55 ZiLi0n babilen, yes what you are saying makes sense, but the good thing with a pillars.filter_by is that you don't have to change values of all variables manually, you could just have a flag that you change only
15:56 ZiLi0n and depending of that flag, then maybe 1 or 50 vars with set values correctly
15:56 babilen I see where you are coming from, but there isn't much different in simply targeting a suitbale group_a_settings.sls to group A, while targeting group_b_settings.sls to group B
15:59 ZiLi0n well, yeah, I guess it is easier to manage with a filter_by. Imagine that the path to logs, to configuration files, etc change depending of the version of a given application. So instead of thinking which values to add to your minion's pillar file, you could just create than mappping in a jinja file, and it will do it for you automatically
16:01 babilen Well, then provide two sets of settings and select the right one based on the version ...
16:03 babilen map.jinja and grains.filter_by is meant for distribution defaults.
16:04 ZiLi0n yeah, that is essentially what the grains.filter_by avoids depending on the OS version, it is so great :). The one I am mentioning it is the same but for application version
16:04 tweakism in various places in salt, I see references to 'will do {whatever} if {whatever} contains binary data'.
16:04 ZiLi0n yeah, this pillars.filter_by would be for application verions defaults in this case
16:04 tweakism is there some well-established definition of binary datar?
16:05 tweakism it doesn't seem trivial to me to reliably detect text vs. binary data
16:06 tweakism a unicode text file will have lots of 8-bit chars, and a real binary file could easily be valid utf-8 by coincidence.
16:06 ZiLi0n babilen I guess I could workaround this setting the grain through minion.cfg
16:07 babilen ZiLi0n: But why are you making it so hard for yourself? Just ship the correct settings in map.jinja (filtered by distribution) and have a config:8 and a config:9, where foo/install_the_thing.sls (the state) picks the correct one based on the pillar
16:10 babilen ZiLi0n: https://github.com/saltstack-formulas/influxdb-formula/blob/master/influxdb/map.jinja showcases some of that for influxdb 0.8 and 0.9
16:10 ZiLi0n sure, I could do that. To make sure I understood you correctly, you mean two have two pillar configs and I can assign the correct one to the minion in pillar's top.sls, right?
16:10 numkem joined #salt
16:10 babilen no
16:10 tweakism I wonder... if it would be a good policy... for things like pillar/file_tree to strip a single trailing newline by default, and then file.managed adds a trailing newline by default when they get file contents from a pillar...
16:11 babilen ZiLi0n: Look at the solution I implemented for influxdb .. something like that is what I have in mind
16:11 tweakism that would seem to do the right thing for pillar values from file_tree, whether they're to be used in a template var or a file to deploy.
16:12 ZiLi0n babilen, thanks! I am going to have a look
16:13 ALLmightySPIFF joined #salt
16:15 spiette joined #salt
16:15 scoates joined #salt
16:17 onlyanegg joined #salt
16:18 gh34 joined #salt
16:21 hightekvagabond joined #salt
16:22 ronnix joined #salt
16:27 hasues joined #salt
16:28 hasues left #salt
16:30 DammitJim joined #salt
16:34 ZiLi0n babilen, thank you. your solution fits very well but I wanted to do :)
16:34 nethershaw joined #salt
16:40 babilen Great, enjoy!
16:44 abednarik joined #salt
16:50 brent joined #salt
16:50 writtenoff joined #salt
16:51 brent ls
16:51 brent joined #salt
16:52 teryx510 joined #salt
16:53 Pluggi joined #salt
16:54 amcorreia joined #salt
16:54 denys_ joined #salt
16:54 Pluggi hi
16:54 Pluggi I've got a problem with salt
16:55 dean joined #salt
16:55 Pluggi because when I enable it with systemd and then boot the computer
16:55 Pluggi and try to ping it from the master, it doesn't answer. But if I then restart the service and re-try a ping, it is receiving it
16:56 brent joined #salt
16:57 q1x joined #salt
17:02 giantlock joined #salt
17:06 malinoff joined #salt
17:10 patchedmonkey joined #salt
17:11 impi joined #salt
17:11 jaybocc2 joined #salt
17:13 q1x joined #salt
17:18 nyx_ joined #salt
17:19 yidhra joined #salt
17:24 pppingme joined #salt
17:28 yekta joined #salt
17:34 lumtnman joined #salt
17:39 tehsufn joined #salt
17:40 tehsufn anyone use block_volume with rackspace to build a new server?
17:40 Ashald hi guys
17:40 Ashald I created a PR with some improvements for Salt's Consul pillar https://github.com/saltstack/salt/pull/31187
17:40 tehsufn I get, [ERROR ] The required 'image' configuration setting is missing from the 'cent6' profile, which is configured under the 'rackspace' alias. It shouldn't require the image configuration setting
17:40 saltstackbot [#31187]title: Full control over client options in Consul pillar |
17:41 Ashald How I can attract someones attention to it to hear feedback?
17:52 linovia is it possible to create a module for pillar as we can do for state or execution ?
17:53 babilen Ashald: Maybe jfindlay can do some initial triaging
17:53 Ashald babilen: do I need to ping him or invite to PR?
17:54 Ashald thanks
17:54 babilen He's here
17:54 nyx_ joined #salt
18:03 teryx510 joined #salt
18:04 babilen Ashald: Looks good though (on first glance)
18:04 Ashald thanks ;)
18:05 Ashald that's a 'feature PR' that only add functionality without changing existing behavior
18:05 babilen Yeah, I can tell. You have to wonder why it wasn't implemented like that in the first place
18:05 Ashald I hope it will be merged so I can proceed with creating PR for other improvements for Consul Pillar
18:07 Ashald I believe the one who created initial implementation was trying to solve the problem in front of him and didn't care about other use-cases (which is IMO is totally OK for 1st time implementation)
18:07 Ashald Or maybe at the time to was created there were less options... who knows
18:07 babilen aye
18:08 tiadobatima joined #salt
18:08 Ashald I believe that it can be improved even more by using introspection got get client's options in runtime
18:08 Ashald so if anything changed/updated in future we won't need to change the code
18:08 Ashald but this would a more sophisticated solution
18:08 Ashald and I guess whether it worth it...
18:10 murrdoc joined #salt
18:10 brent joined #salt
18:11 babilen Ashald: cachedout merged most of the previous commits .. maybe ping him if you don't hear anything
18:11 Ashald on GitHub or here?
18:12 brent joined #salt
18:12 tiadobatima joined #salt
18:13 teryx510 joined #salt
18:13 KennethWilke joined #salt
18:13 akhter joined #salt
18:14 babilen GH
18:15 brent left #salt
18:17 mohae joined #salt
18:17 murrdoc joined #salt
18:18 akhter joined #salt
18:19 lompik joined #salt
18:19 teryx5101 joined #salt
18:20 brent joined #salt
18:20 brent left #salt
18:23 scoates joined #salt
18:25 slav0nic joined #salt
18:25 murrdoc joined #salt
18:28 akhter joined #salt
18:28 murrdoc left #salt
18:28 murrdoc joined #salt
18:33 pppingme joined #salt
18:33 grumm_servire joined #salt
18:36 llua^_^AznSmile- joined #salt
18:37 nlb joined #salt
18:38 brent joined #salt
18:39 hightekvagabond joined #salt
18:40 brent joined #salt
18:41 murrdoc joined #salt
18:42 jaybocc2 joined #salt
18:42 baffle joined #salt
18:42 brent joined #salt
18:43 brent left #salt
18:43 patchedmonkey joined #salt
18:43 Muchoz joined #salt
18:43 brent joined #salt
18:44 murrdoc joined #salt
18:45 brent joined #salt
18:46 Muchoz When using file.managed it doesn't seem to replace {{ variable }} with the variables I passed via the 'defaults' argument (indented with 4 spaces). Is there something I'm doing wrong? The file state doesn't have an example of a file using it.
18:46 evle1 joined #salt
18:47 babilen Muchoz: Show us the state and result on one of http://refheap.com, http://paste.debian.net, https://gist.github.com, http://sprunge.us, …
18:48 brent joined #salt
18:49 Muchoz babilen, http://hastebin.com/zugibizuru.pl
18:49 Eugene vomitb.in is best bin
18:49 whytewolf hastebin keeps giving errors now days.
18:50 Muchoz whytewolf, it does but whatever. None of those paste websites are any good anyway
18:50 Eugene Mine has the funniest name, so obviously the best
18:50 jhujhiti joined #salt
18:51 whytewolf I acutally like gist cause of the multiple file support and the ability to edit, plus commenting
18:51 Muchoz Yes, but I sometimes want it to be anonymous
18:51 Muchoz And making a gist takes too much time
18:51 Muchoz I want it to be: go to site, cmd+v, save and share link
18:51 whytewolf you can push to gist through git and you don't have to be logged into to get most of the features [can't edit when annoynmouse of coarse]
18:52 Muchoz whytewolf, too much work
18:52 babilen Muchoz: Could you use a different pastebin? One of the aforementioned would be fine ... they work at least!
18:52 Muchoz babilen, oh it's working fine here
18:52 Muchoz No problem
18:52 whytewolf also, you need template: jinja in your state
18:52 babilen Muchoz: I get "application error"
18:52 Muchoz whytewolf, really? It says jinja is the default value
18:53 whytewolf Muchoz: None is the default
18:54 whytewolf where does it say jinja is the default? cause that is very wrong
18:54 Muchoz whytewolf, facepalm. It is the default for append
18:54 brent joined #salt
18:54 whytewolf ahh
18:55 whytewolf i think with append it gets setup in the state file before it is pushed to the new file. so acts like it is the default.
18:56 whytewolf oh no, you are right. the default for append is 'jinja'
18:56 whytewolf crazy
18:56 snarfy joined #salt
18:58 GreatSnoopy joined #salt
18:58 snarfy yodudes. i got this deprecation warning about cmd.run but i dont quite understand it sez "please switch to cmd.shell or set python_shell=True" ... ?
18:58 snarfy cmd.shell isn't a thing is it?
18:59 whytewolf snarfy: oh lovely. that is the exacution module throwing that error [where cmd.shell is a thing]
18:59 whytewolf trying to remeber what triggers that saw it a couple of months ago
19:00 whytewolf iirc it had to do with trying to get pipes working in cmd.run
19:00 snarfy yeah. there is something about 'shellisms' not being supported if python_shell=false
19:00 fredvd joined #salt
19:00 snarfy but i'm not sure where to fiddle with that
19:00 alinuxninja it was this I think: https://github.com/saltstack/salt/issues/30460
19:00 saltstackbot [#30460]title: cmd.shell should be documented | Use of cmd.run currently generates a DeprecationWarning:...
19:01 snarfy ahh yes that link is already purple :)
19:01 cro salt doesn't run commands executed via cmd.run through a shell anymore.  Doing it by default made it too easy to introduce security issues.
19:01 cro See here:
19:01 cro https://docs.saltstack.com/en/latest/topics/releases/2015.5.0.html
19:02 cro snarfy: ^^
19:02 snarfy i think i gotcha.
19:03 whytewolf snarfy: if you are breaking down to pipes with a cmd.run state. you might as well just write it as a script and use cmd.script
19:05 snarfy i'm not really. i think i'm over reacting
19:05 snarfy i've just been trying to get all warnings and stuff removed from my highstate runs
19:05 whytewolf always a possability :P
19:05 snarfy upgraded pyopenssl... etc etc
19:06 grumm_servire joined #salt
19:06 snarfy this is one of the last remaining things
19:06 snarfy the other one is that I can't seem to get top_file_merging_strategy: same to work as expected...
19:07 snarfy so i use merge and then i get a superfluous warning
19:07 pppingme joined #salt
19:07 snarfy using gitfs
19:08 atmosx joined #salt
19:08 mapu joined #salt
19:09 nahamu Is anyone using Salt heavily on OSX?
19:10 cro nahamu: yes
19:10 mapu joined #salt
19:10 nahamu cro: do you know of any documentation anywhere that's Mac specific of how people are using Salt?
19:11 Muchoz babilen, whytewolf, thank you btw
19:11 cyborg-one joined #salt
19:11 snarfy yes, thanks :)
19:12 cro nahamu: Not that I'm aware of.  In 2016.3 there will be several improvements to Mac support.  Is there something specific you are looking for?
19:12 roidelapluie joined #salt
19:12 Muchoz nahamu, yes
19:13 nahamu I found it odd that there wasn't yet a grain containing the serial number read out from system_profiler... I wrote a custom grain for that for now.
19:13 Muchoz nahamu, yes but it's no minion/master. But that's probably not what you're asking
19:14 cro nahamu: that's handy.  Did you consider submitting a PR to add it to upstream?
19:15 nahamu cro: I'm not sold on the hacky way I wrote it...
19:15 cro :-)
19:15 nahamu but maybe I should at least open an issue and put it in there as inspiration to someone else...
19:17 murrdoc joined #salt
19:19 psojourner joined #salt
19:19 cro nahamu: It looks like that is already in 2016.3, just FYI
19:19 nahamu cro: good to know.
19:19 numkem joined #salt
19:21 nahamu beautiful: https://github.com/saltstack/salt/blob/2016.3/salt/grains/core.py#L940-L964
19:21 cro yeah, I was just looking at those lines
19:21 nahamu interesting that it's parsing the text output rather than using plistlib to parse the XML version of the output...
19:22 edrocks joined #salt
19:23 nahamu This is what I have at the moment: https://gist.github.com/nshalman/68844e98831d37fc7483
19:25 cro using plistlib is a better approach I think
19:25 cro less likely to break
19:29 antpa joined #salt
19:30 cilkay joined #salt
19:31 nahamu I'm not totally happy with my magical mac_ prefix set of grains, but the grain namespace is flat and I didn't want to override existing grains with data in an unexpected format...
19:31 cilkay Hello. Is it possible to use https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.postgres.html#salt.modules.postgres.psql_query in a state file without having to use cmd.run?
19:32 cro cilkay: Use the module.run state: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html
19:33 alinuxninja Is there a better way to determine if a SLS is being included in the highstate rather than {% set sls = salt['state.show_highstate']() -%} ?. I have a lot of SLSs that do not use the actual SLS name inside.
19:34 babilen alinuxninja: What ware you really trying to achieve?
19:35 alinuxninja I need to determine if a SLS is enabled for the particular minion
19:35 babilen show_highstate should include it, but if you want to make sure then just check your top.sls
19:36 babilen (and add it if it is missing)
19:36 cilkay cro: Great! Thank you. Now to find out if it's available in 2015.5 or 2015.9
19:36 brianfeister joined #salt
19:37 alinuxninja thanks, I got the reccomendation to use state.show_highstate from the ML a while ago, just wanted to see if there was something added since.
19:37 cilkay Available on both.
19:37 tweakism I made a part of simple issues + PR's  (Issue #31223 -> PR #31225  &  Issue #31224 -> PR #31226), if anyone would like to take a look and provide feedback before I do more.
19:37 murrdoc joined #salt
19:38 babilen alinuxninja: You are aware that you can call that on the command line, aren't you?
19:38 alinuxninja yep
19:38 alinuxninja However, I am using it in a actual SLS for a firewall
19:39 babilen Whatfor?
19:39 alinuxninja CSF Firewall
19:40 alinuxninja I prefer not to append as sometimes I need to re-reun the whole SLS, and don't want a highstate
19:40 babilen I fail to see how that relates to you checking if you remembered to enable a specific SLS
19:40 alinuxninja It isn't checking to see if I have remembered, it is adding firewall rules if a SLS is enabled
19:41 babilen I'd argue that those firewall rules should be part of the SLS that requires them or, rather and better, simply be managed in pillars.
19:43 alinuxninja How would I manage them through pillars?
19:43 a7p joined #salt
19:43 DammitJim is there an easy way to generate a samba password for a user with salt?
19:45 josuebrunel joined #salt
19:45 tweakism babilen: could you create states that modify pillar data, so like state A sets some pillar data, and then state B that requires A uses the data, and then at the end you send the complete added data to salt mine ?
19:48 murrdoc joined #salt
19:56 Eugene DammitJim - like, smbpasswd? I'm not aware of anything specifically for it in Salt
19:57 Eugene I find Salt's handling of UNIX password-changing(local database) to be.... lacking. I use LDAP(AD) for all my auth and it Just Works.
19:57 Eugene You should be able to work out something using `smbpasswd -w`
19:58 DammitJim ok, thanks
19:58 DammitJim Eugene, you might know this off the top of your head, but is that something that can be done for samba?
19:58 DammitJim set the password to be the one from AD?
19:59 Eugene I have the Samba server Join the AD domain and just use AD for everything
19:59 DammitJim got it
19:59 DammitJim I'll check it out ;)
19:59 beardedeagle just for giggles what are you using samba for?
20:00 DammitJim I want to get rid of this
20:00 Eugene Home fileserver.... mostly just "media" folder
20:00 DammitJim the developers are grabbing files from another server on this one application
20:00 Eugene We have a few things at $DAYJOB using Samba for their file shares; none of that is Salted
20:01 _beardedeagle joined #salt
20:08 subsignal joined #salt
20:11 subsignal joined #salt
20:12 subsigna_ joined #salt
20:12 jaybocc2 joined #salt
20:13 deniszh joined #salt
20:18 deniszh joined #salt
20:21 tercenya joined #salt
20:23 murrdoc joined #salt
20:23 Brew joined #salt
20:23 kevinquinnyo joined #salt
20:24 murrdoc joined #salt
20:25 akhter joined #salt
20:29 ageorgop joined #salt
20:33 patchedmonkey joined #salt
20:34 jaybocc2 joined #salt
20:35 murrdoc joined #salt
20:48 akhter joined #salt
20:48 TooLmaN joined #salt
20:58 JDiPierro joined #salt
20:59 snarfy joined #salt
21:00 fracklen joined #salt
21:00 JDiPierro I'm having some weirdness with Salt's compound matchers.. Could someone take a peek at this and let me know if there's a better way to do it? http://pastebin.com/C65YrmAU
21:00 antpa joined #salt
21:05 egil joined #salt
21:07 dyasny joined #salt
21:08 zer0def joined #salt
21:09 cro JDiPierro: That looks like a bug to me
21:09 cro what Salt version?
21:10 JDiPierro 2015.8.3
21:10 cro yeah, that should work
21:10 JDiPierro :( I'll write up an issue.
21:10 cro thanks
21:10 iggy not using anything weird like multi-master or anything?
21:11 JDiPierro Nope
21:12 iggy checked for existing issues?
21:12 numkem joined #salt
21:12 akhter joined #salt
21:13 JDiPierro I haven't, I'll do a seaerch.
21:16 evidence is it not possible to disable the lazy loader in certain instances?
21:20 toastedpenguin joined #salt
21:21 amcorreia joined #salt
21:21 MadHatter41 joined #salt
21:22 tarak joined #salt
21:22 MadHatter42 joined #salt
21:23 MadHatter41 joined #salt
21:23 MadHatter42 joined #salt
21:26 Muchoz joined #salt
21:27 cro evidence: No, there's no code in loader.py to support that currently.
21:32 snarfy joined #salt
21:34 evidence yeah thx for confirming.. we are having an issue where the pkg gets updated during a highstate, and the lazy loader continues do its thing.  if the api for a module loaded post upgrade happens during the highstate, everything shits the bed.  doesn't seem to be too bad, but if we could we could everything at startup on the upgrade states we could avoid it
21:35 evidence i guess first i'll just try order: last on the pkg upgrade
21:40 shaggy_surfer joined #salt
21:44 shaggy_surfer1 joined #salt
21:48 kevinquinnyo joined #salt
21:49 josuebrunel joined #salt
21:53 lompik joined #salt
21:55 whytewolf evidence: have you tried reload_modules https://docs.saltstack.com/en/latest/ref/states/index.html#reloading-modules
21:55 tweakism ok... this continues to confound me...
21:56 tweakism if I want e.g. to ensure that a directory is empty, except that stateA.sls manages a file in it, and stateB.sls manages a different file in it
21:56 tweakism how do you do that?
21:57 tweakism if you make a state that ensures the directory is empty, and then make a state that ensures a file is in it, and set the second to depend on the first, does that work or error?  and if it works, does it cause a change every run?
22:00 futuredale joined #salt
22:00 dynamicudpate joined #salt
22:00 whytewolf tweakism: read the description for clean in file.directory. as well as exclude_pat https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html
22:00 whytewolf sorry https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.directory
22:01 tweakism "Make sure that only files that are set up by salt and required by this function are kept."
22:01 murrdoc joined #salt
22:02 tweakism so is there really no way to have 2 independent states manage files in the same directory, that's otherwise assured empty?
22:03 whytewolf ... you can. if the require isn't working you can use exclude_pat
22:03 whytewolf "When 'clean' is set to True, exclude this pattern from removal list and preserve in the destination."
22:03 tweakism but I mean, you have to have one state that requires all the states that create files in the dir?
22:04 whytewolf again. if require doesn't work for you. use exclude_pat
22:04 tweakism I don't understand how that solves the problem.
22:04 tweakism can you give me an example?
22:04 whytewolf exclude_pat won't delete the files.
22:05 kevinquinnyo joined #salt
22:06 tweakism this is the scenario:  1) the dir must be empty, except for files placed in it by salt.  2) stateA.sls creates a file in the dir.  3) stateB.sls creates a file in the dir.  4) stateA.sls is targeted to hostA and hostC  5) stateB.sls is targeted to hostB and host C
22:06 kevinquinnyo joined #salt
22:06 tweakism is that possible?
22:06 kevinquinnyo joined #salt
22:08 tweakism it seems like salt mostly doesn't think like this, things seem like they're aimed at managing some stuff and leaving non-managed stuff alone.
22:08 tweakism whereas I prefer to remove non-managed stuff and manage everything that exists.
22:09 tweakism in puppet, pretty much every container has a purged => true param you can set; so if you're doing network interfaces, for example, you'd configure lo, eth1, and eth2, and then if you specify purge => true at the top level, it'll e.g. make sure all other network interfaces are configured to be down
22:09 whytewolf tweakism: it is possable but won't be pretty. and would need templating to in order to sus out what is needed
22:09 kevinquinnyo joined #salt
22:11 tweakism I keep hoping I'm just missing the obvious way to do the same pattern.
22:14 whytewolf I'm not sure if clean works with require_in. if it does you don't need to require from the file.directory but can require_in from the file.managed
22:15 kevinquinnyo joined #salt
22:15 tweakism I'll try it out and see.
22:17 fxhp joined #salt
22:19 ageorgop joined #salt
22:25 TTimo joined #salt
22:27 murrdoc joined #salt
22:27 hackor joined #salt
22:29 ctrlrsf joined #salt
22:30 lahwran joined #salt
22:30 mohae joined #salt
22:30 quasiben joined #salt
22:30 Muchoz joined #salt
22:32 evidence whytewolf: good call.. reload_modules is avail for all states it appears?
22:32 teryx510 joined #salt
22:35 whytewolf evidence: most of them. it is a built in function. normally happens at the start of a highstate.
22:36 Edgan joined #salt
22:37 StevenGFX joined #salt
22:37 psojourner joined #salt
22:38 nyx_ joined #salt
22:41 ageorgop joined #salt
22:41 penguinpowernz joined #salt
22:43 zenlot1 joined #salt
22:47 totzky joined #salt
22:48 Bloodshot joined #salt
22:58 joe_n joined #salt
22:59 akhter joined #salt
23:04 nyx_ joined #salt
23:06 kevinquinnyo joined #salt
23:07 kevinquinnyo joined #salt
23:13 kevinquinnyo joined #salt
23:15 kevinquinnyo joined #salt
23:17 kevinquinnyo joined #salt
23:18 kevinquinnyo joined #salt
23:18 justanotheruser joined #salt
23:21 ageorgop joined #salt
23:23 ageorgop1 joined #salt
23:25 Tyrm joined #salt
23:25 justanotheruser joined #salt
23:30 kevinquinnyo joined #salt
23:31 teryx510 joined #salt
23:32 justanot1eruser joined #salt
23:36 nyx_ joined #salt
23:42 Ch3LL joined #salt
23:47 brianfeister joined #salt
23:48 ageorgop joined #salt
23:50 kevinquinnyo joined #salt

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