Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2018-04-18

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

All times shown according to UTC.

Time Nick Message
00:00 onslack joined #salt
00:07 bluenemo hi guys. When I do something like {% set foo = 'asdf\asdf' %} it is being templated via {{ foo }} as  asdf\\asdf   how do I prevent that and have it template only one \ ?
00:10 blu_ joined #salt
00:13 Hybrid joined #salt
00:47 zerocoolback joined #salt
01:08 zerocoolback joined #salt
01:26 JacobsLadd3r joined #salt
01:32 shred joined #salt
01:34 tiwula joined #salt
01:47 adongy joined #salt
01:56 ilbot3 joined #salt
01:56 Topic for #salt is now Welcome to #salt! <+> Latest Versions: 2017.7.5, 2018.3.0 <+> Support: https://www.saltstack.com/support/ <+> Logs: http://irclog.perlgeek.de/salt/ <+> Paste: https://gist.github.com/ <+> See also: #salt-devel, #salt-offtopic, and https://saltstackcommunity.herokuapp.com (for slack) <+> We are volunteers and may not have immediate answers
02:52 shiranaihito joined #salt
03:31 stooj joined #salt
03:36 rickflare joined #salt
04:08 cgiroua joined #salt
04:12 dxiri joined #salt
04:17 lompik joined #salt
04:42 cliluw joined #salt
04:44 armyriad joined #salt
04:48 mk-fg joined #salt
04:48 mk-fg joined #salt
04:57 golodhrim|work joined #salt
05:15 Hybrid joined #salt
05:16 sauvin joined #salt
05:36 Hybrid joined #salt
05:51 golodhrim|work joined #salt
05:54 hemebond left #salt
06:04 xet7 joined #salt
06:10 awerner joined #salt
06:25 rollniak joined #salt
06:27 hahaxD joined #salt
06:39 Tucky joined #salt
06:48 tyx joined #salt
06:51 briner joined #salt
06:54 briner_ joined #salt
06:56 xet7_ joined #salt
06:58 jken__ joined #salt
07:02 CrummyGummy joined #salt
07:08 rollniak joined #salt
07:11 hahaxD joined #salt
07:16 Pjusur joined #salt
07:22 Ricardo1000 joined #salt
07:28 OliverUK left #salt
07:35 Ricardo1000 joined #salt
07:37 darioleidi joined #salt
07:40 dnull joined #salt
07:47 CrummyGummy joined #salt
07:52 rollniak joined #salt
07:56 nbari hi all, I am trying to use file.line to replace a line using match: ^buildargs:-j (my hope is just to match lines starting with buildargs, but I notice is replacing also lines sgtargin with # buildargs
07:57 nbari any idea how to match work and replace only the line exactly defined in match ?
07:58 nbari I am using mode: replace but seems that is replacing the words founds
08:02 mikecmpbll joined #salt
08:06 DanyC joined #salt
08:08 nbari I think find.replace is better in this case :-)
08:15 MTecknology either manage the file or don't..
08:17 MTecknology except for very specific cases, life is waaay easier that way
08:31 Elsmorian joined #salt
08:32 Elsmoria_ joined #salt
08:40 nbari this is very basic but how to put a list of misions on top.sls to use a state
08:40 nbari I ma using "minion1 and minion2":
08:40 nbari but for some reasons not working
08:42 zer0def that one falls under compound matching
08:42 zer0def i thin.
08:42 nbari interestinog that if I use and not works
08:42 sjorge joined #salt
08:42 nbari so I can do something like "minion1 and not minion2" will only work for minion1
08:43 zer0def oh, sorry, you meant `or`, not `and`
08:43 zer0def meaning "apply this sls to minions `minion1` and `minion2`"
08:43 zer0def no minion will have both of those ids at the same time
08:43 nbari I think I will have to use L@minion1.example.com,minion3.domain.com
08:44 zer0def i'd try "minion1 or minion2" first
08:44 zer0def but your approach is just as viable
08:44 vhasi you just need to learn that matching is done by applying the statement to a value - "minion1 and minion2" means the value needs to be both minion1 _and_ minion2, which it never will be for one minion
08:45 nbari "and not" seems to work with out the compout matrcher
08:45 zer0def yes, it was just a mistake on my part reading your first matching statement at first glance
08:45 vhasi because minion1 is minion1 and not minion2
08:45 zer0def vhasi just explained it more precisely
08:45 vhasi but minion1 is never both minion1 and minion2
08:46 zer0def it's a boolean logic issue, not a statement issue, per se
08:47 vhasi think of it as a question posed to each minion: are you "minion1 AND minion2"? are you "minion1 AND NOT minion2"? are you "minion1 OR minion2"?
08:47 nbari I see, ineed -L@ didn't work" so I think the best to ut multiples will be like zer0def mentioned using "or"
08:52 zer0def ideally you'd probably want to target based on some shared characteristic, like a grain or pillar
08:59 nbari I see, thanks :) also vhasi, thinking about a question to each minion, simplified the logic more :-)
09:03 xet7 joined #salt
09:07 lompik joined #salt
09:34 mikecmpb_ joined #salt
09:45 mrueg joined #salt
09:52 lompik joined #salt
10:06 saltnoob58 joined #salt
10:06 saltnoob58 hi
10:07 saltnoob58 can someone provide an example how to run in an orchestrator sls a cmd.run with runas and cwd arguments. Tried doing "arg: \n - thecommanditselt \n- cwd: /dir" and even adding cmd: before the command but it doesnt want to work
10:08 saltnoob58 documentation doesn't have any examples with more args than the cmd itself
10:08 saltnoob58 only for commandline
10:08 saltnoob58 why is translating commandline salt to sls so hard
10:11 saltnoob58 https://pastebin.com/7XY90E6X
10:12 saltnoob58 tried like this, but gives cwd errors, totally not sure if it's at all the right format
10:22 babilen https://pastebin.com/raw/7XY90E6X (less eye cancer inducing)
10:27 xet7 joined #salt
10:48 mikecmpbll joined #salt
11:13 mikecmpbll joined #salt
11:27 Elsmorian joined #salt
11:28 shiranaihito joined #salt
11:30 babilen saltnoob58: What's the actual error you get? How do you run that? What are you trying to do? (and so on)
11:31 babilen http://paste.debian.net, https://gist.github.com, http://sprunge.us, … are nicer than the horrors that are pastebin.com also
11:46 sjl_ joined #salt
11:48 zerocoolback joined #salt
11:49 dendazen joined #salt
11:51 zer0def saltnoob58: `runas: someuser` is a kwarg
11:55 zer0def worthwhile note: everything you use "<key>=<val>" notation to any function call in shell, that's a kwarg
12:05 rollniak joined #salt
12:05 jerematic joined #salt
12:10 jerematic joined #salt
12:16 Bochi joined #salt
12:17 sjorge joined #salt
12:20 Nahual joined #salt
12:24 Cadmus You know what would be really handy? If you could give service.running a command where it only considers the service running when it returns true (polling every couple of seconds).
12:26 Cadmus - complete: curl http://localhost/health | grep 'ALIVE'
12:28 zer0def shouldn't that be the service file's job to guarantee that $daemon doesn't fall over?
12:29 zer0def service file/initscript's, to be pedantic
12:33 briner joined #salt
12:34 Cadmus Actually that's a good point, see if I can do something with sd-notify (this is a systemd system)
12:34 zer0def check the service's log, perhaps some configuration detail makes it trip on it's face
12:37 Cadmus It's not if it dies, I'm thinking of stuff like batch-mode across a cluster, where I don't want it to move onto the next machine until it's happy the service is alive. I could use init_delay but eyeballing it feels inelegant.
12:39 Cadmus But yes, I think you're right that's the service file's job, now if only I understood process types better >_>
12:39 zer0def that escalated quickly, so far the concern was that the service trips shortly after getting the start signal, so i'd focus on that
12:41 zer0def if you're having a hard time with systemd, you might always cheat by using supervisord, there's a state module for it
12:43 Tucky joined #salt
12:46 morgana2313 joined #salt
12:46 pahiz How do I make sure that salt calls state.highstate every 30 minutes?
12:46 pahiz I thought that was a default but can't seem to find it anywhere now
12:47 XenophonF the "this was deprecated in 2018.3.0 and will be removed in Neon" warning doesn't really tell me anything
12:47 XenophonF is Neon the next major release of Salt?  two major releases from now?
12:48 zer0def pahiz: https://docs.saltstack.com/en/latest/topics/jobs/#scheduling-jobs
12:49 pahiz So would I have to manually set this behaviour?
12:49 pahiz I thought top.sls was being ran every 30 minutes
12:50 Bochi joined #salt
12:53 morgana2313 Hello! Only the archive.* states know the if_missing argument. How can I make other states run only if a file is missing?
12:53 morgana2313 When I use file.exist with an on-fail I get a failed state that prevents other dependencies further down to fail
12:53 zer0def morgana2313: `creates`
12:54 zer0def it's basically the same kwarg as `onlyif` and `unless`, sounds like would fit your case
12:55 xet7 joined #salt
12:55 AngryJohnnie joined #salt
12:55 morgana2313 zer0def: can you point to an example? I don't see the light yet...
12:56 morgana2313 I see unless and only_if in the requisites page.
12:57 zer0def it's not a requisite, it's a kwarg that, as far as i've experienced, adds a condition on whether to execute the state or just report success
12:58 zer0def https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html has usage examples
12:58 Cadmus 'creates' is for cmd.run (and a couple of others?) I've got a simple example here, let me just pastebin it
12:58 Cadmus https://pastebin.com/Pu9M5Jwq
12:59 Cadmus So the logic is "This command creates a file, so if it exists, it must have already been run, so don't do anything"
12:59 zer0def it's not exclusive to it, since there was plenty of need for it elsewhere - if unsure, test it first.
13:00 zer0def for example, `unless`, `onlyif` and `creates` aren't listed in file or git states, yet they work just fine with them
13:01 Cadmus Huh, I knew 'unless' and 'onlyif' were more widespread, didn't realise 'creates' was. Good to know :)
13:01 Cadmus Anyway, I hope my example helps morgana2313
13:04 zer0def if it comes to the worst (as in `creates` doesn't work), `unless: '[ -e <path> ]'` most likely will work
13:04 Cadmus Shell checks like that are very useful in these sorts of conditions
13:07 colegatron joined #salt
13:18 lompik joined #salt
13:22 Elsmorian joined #salt
13:32 cgiroua joined #salt
13:41 cgiroua joined #salt
13:45 racooper joined #salt
13:48 AngryJohnnie joined #salt
13:56 stooj joined #salt
13:56 jken joined #salt
13:57 jken I need to pick a CM tool for a deployment, and I really don't want to use puppet if I can use salt. however, I have a requirement in my infrastructure that my minions only use a single port to talk to the master.
13:57 jken I was looking into the TCP transport yesterday, but as far as I can tell it still uses 2 ports, one for pub and one for ret
13:58 blu_ joined #salt
13:59 exarkun The other 65534 ports are allocated already?
14:04 jken no, its a ridiculously dumb requirement, Our devices are deployed behind third party networks and everything needs to happen over port 443.
14:05 jken and right now its the only blocker on using salt.
14:07 exarkun Maybe you can assign two addresses to the master and have it use 443 on each address for the two different whatevers?  (I don't really know much about salt networking but https://docs.saltstack.com/en/latest/topics/tutorials/firewall.html says only the master needs to have ports open)
14:09 exarkun except looks like the master config only has `interface`, not `publish_interface` and `return_interface`.  too bad.
14:10 exarkun but I guess you could use an external port-forwarder to forward 443 on the second interface to some other port on the salt-bound interface
14:10 exarkun (hack hack hack)
14:11 hiroshi haha
14:17 jken yeah, 2 IPs on a TCP load balancer was the best I came up with too
14:17 mikecmpbll joined #salt
14:17 jken or running on vpn from the devices, but that adds more complexity
14:19 jken Need a salt https transport, lol
14:23 jken ours ops department is pushing puppet pretty hard.. :(
14:23 hiroshi jken: what about ansible . you just need one port for ssh to your minions
14:24 jken Due to the varying network setups our devices are deployed behind, we really need something that "calls home"
14:25 jken We can't connect to the minions in most cases, but they can always connect to us on port 443
14:26 zer0def jken: would salt-ssh be sufficient to achieve your goal? because i can imagine a situation of protocol multiplexing+ssh agent forwarding through a bastion host
14:27 zer0def oh, ok, nevermind, just caught up on how the situation looks like
14:29 zer0def jken: so minions at $client are basically minions to your internet-facing master?
14:30 jken Yeah, we ship devices out to customers and they put them on their network.
14:31 jken Network setup could be anything, home wifi, corporate/enterprise stuff, so we have a hard requirement on all outbound connections from our devices happening on 443
14:31 zer0def yeah, i've got nothing
14:33 cablekevin joined #salt
14:33 JacobsLadd3r joined #salt
14:34 zer0def *technically* you could do some crude packet matching on haproxy to direct traffic to appropriate ports
14:40 dave_den joined #salt
14:45 jken zer0def, that could actually work, although I don't know enough about the protocol to implement that myself
14:46 jken we are also using amazons NLB, rather than haproxy, so I would need to ensure it could do it
14:46 zer0def time to bust out that tcpdump/wireshark
14:46 dave_den left #salt
14:47 zer0def might be that someone else has a better idea, but there's nothing i'm aware of that would allow minion contact to master through 443 or https
14:48 jken yeah, all options are definitely hacks..
14:48 jken and would feel brittle
14:50 * jken bites the bullet and opens the puppet docs
14:50 zer0def yeah, i was about to mention that, but then i'm reminded people have made businesses on lesser guarantees
14:51 Cadmus There's a certain depth of hackery where backing out and trying something else is the wise move.
14:52 JacobsLadd3r joined #salt
14:57 zer0def for the record, though, the spec sounds like written for a very specific toolkit… unless we consider https on any other port viable
15:00 mikecmpbll joined #salt
15:03 ddg joined #salt
15:08 mchlumsky joined #salt
15:11 Bochi joined #salt
15:11 tiwula joined #salt
15:14 cbosdonnat joined #salt
15:16 morgana2313 joined #salt
15:16 tyx joined #salt
15:17 cbosdonnat I'ld like to allow changing the connection used for virt.* functions on the fly... should I only rely on the pillar data for that or should I also add an optional connection parameter in each function?
15:17 morgana2313 Cadmus: your example depends on the other states (confluence_installer_download and confluence_response_file). Onlyif and Unless are documented in de requisites page  https://docs.saltstack.com/en/latest/ref/states/requisites.html#unless
15:18 Cadmus Ignore those, just look at the `creates` example
15:18 morgana2313 creates is not mentioned on that page however...
15:18 Cadmus "/opt/confluence" doesn't exist until the installer runs.
15:19 morgana2313 Cadmus: ah, I overlooked the creates statement in your example, I'm sorry. But I still would like to read some docs about it :-)
15:19 Cadmus I think the best examples of its use are on the page for cmd.run (but as was pointed out is also works on other states)
15:20 Cadmus https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html
15:21 zer0def morgana2313: what you're looking for is an example, there's plenty in `cmd` state, since that's where `unless` and `onlyif` are sourced from, just try using `creates` and if that doesn't work, just the shell equivalent using `unless`
15:26 Cadmus Ultimately most of these prereqs do the same thing, it's about making your statements easier to understand
15:27 zer0def you also don't want to introduce more moving parts than you need to
15:30 xet7 joined #salt
15:32 dezertol joined #salt
15:35 simmel What should one use if you need "variables" for a role (which many nodes could have) in Salt? Simple example: Which vhost should the role "webserver" have in it's config and states?
15:35 mauli joined #salt
15:35 gtmanfred simmel: pillars
15:37 simmel As I suspected. Got an easy link which shows my usecase? Need to send it to someone to show quick how to do it?
15:37 simmel I found https://www.endpoint.com/blog/2013/12/23/setting-server-role-in-salt-comparing but it uses grains (and I suspected pillars was the thing to use)
15:37 exarkun joined #salt
15:38 lordcirth_work simmel, I generate vhost config files from a pillar list.
15:38 gtmanfred simmel: https://github.com/saltstack-formulas/apache-formula/blob/master/pillar.example
15:47 squig joined #salt
15:47 squig hi
15:48 squig I am wondering if there is some way to see the rendered jinja from one of my salt states
15:48 simmel So I can define two roles: - mywebsite - loadbalancer on a node and by using "variables" in pillars I can have those roles pick up things like the pool name for the loadbalancer role from the webservice role?
15:48 simmel gtmanfred: While extensive, that apache example was very descriptive.
15:49 MTecknology squig: -l debug
15:49 simmel gtmanfred: And thank you!
15:49 gtmanfred +1
15:49 gtmanfred squig: you can use slsutil.renderer to render the file
15:49 gtmanfred https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.slsutil.html#salt.modules.slsutil.renderer
15:50 gtmanfred or cp.get_template
15:50 MTecknology I've never used slsutil so I always forget about it :(
15:50 gtmanfred it is super worth it
15:50 gtmanfred salt \* slsutil.renderer salt://path/to/file.sls default_renderer=jinja
15:51 gtmanfred --subset=1
15:51 gtmanfred i have started using --subset=1 for all my test=true state.apply runs, and it has made it a lot more useful
15:51 xet7 joined #salt
15:52 MTecknology oh, interesting.. I usually just pick specific nodes to try first before pushing to all
15:55 Pomidora If I call a state, e.g. "Salt 'minion' state.sls something.thing pillar='{data:{x=1}}'", will that override the pillar in my cluster?
15:56 Pomidora I.e. If my pillar is y=2, will supplying pillar={data:{x:1}} replace my cluster's pillar? or just add onto it?
15:56 MTecknology you could check with pillar.data pillar=foo
15:57 Pomidora MTecknology: that's true, idk why i haven't done that
15:57 simmel gtmanfred: Was +1 an answer to my "So I can define two roles" claim?
15:57 Pomidora Thanks MTecknology
15:58 gtmanfred simmel: +1 was a thumbs up for when you said thanks
15:58 gtmanfred as for assigning two roles to a node, yeah you should be able to do that
15:59 gtmanfred just make roles: a list
16:00 simmel gtmanfred: Sweet. Thanks again! = )
16:00 Mousey joined #salt
16:01 mikecmpbll joined #salt
16:08 Elsmorian joined #salt
16:09 rollniak joined #salt
16:10 xet7 joined #salt
16:12 exarkun joined #salt
16:13 ibtjw joined #salt
16:18 dxiri joined #salt
16:21 DanyC joined #salt
16:22 DanyC_ joined #salt
16:24 gh34 joined #salt
16:26 exarkun joined #salt
16:26 pmcg joined #salt
16:28 squig thanks all!
16:37 blu_ joined #salt
16:55 xet7 joined #salt
16:55 Elsmorian joined #salt
16:56 JawnAuz joined #salt
16:59 Yamakaja joined #salt
17:03 lompik joined #salt
17:03 wongster80 joined #salt
17:09 heaje joined #salt
17:11 Elsmorian joined #salt
17:11 JacobsLadd3r joined #salt
17:22 Elsmorian joined #salt
17:31 Elsmorian joined #salt
17:48 rollniak joined #salt
17:51 JacobsLadd3r joined #salt
17:59 zerocoolback joined #salt
18:09 eseyman joined #salt
18:10 jeremati_ joined #salt
18:11 JacobsLadd3r joined #salt
18:26 Elsmorian joined #salt
18:29 ymasson joined #salt
18:31 gmoro_ joined #salt
18:35 jerematic joined #salt
18:38 rollniak joined #salt
18:41 AngryJohnnie joined #salt
18:43 Trauma joined #salt
18:50 briner joined #salt
18:55 mikecmpbll joined #salt
18:58 exarkun joined #salt
19:01 xet7 joined #salt
19:23 Edgan Is there a max pillar size?
19:24 babilen Are you running into problems?
19:25 Edgan yep, failing to render valid yaml by just adding a new entry
19:26 babilen And it parses correctly on, say, http://yaml-online-parser.appspot.com/ ?
19:26 Edgan http://www.yamllint.com/  yes
19:27 Edgan Striping it line by line to try to isolate it
19:28 Edgan Found it
19:28 babilen Binary search might work
19:28 babilen And, was it due to the size?
19:28 Edgan Duplicate value, but error message just says failure to render
19:29 Edgan and to check the master logs, but they show the same error with no detail
19:29 babilen Aye .. I've never encountered an issue with pillar size. I'm sure there are limits (at least in number of keys that can be addressed in 64bit)
19:29 Edgan I try to do alphabetical order to avoid this problem, but in this case I sorted by uid instead of name :\
19:32 Edgan Looks like the pillar error message could be improved
19:47 Elsmorian joined #salt
20:14 AngryJohnnie joined #salt
20:15 ibtjw joined #salt
20:40 xet7 joined #salt
20:43 blu_ joined #salt
20:52 Elsmorian joined #salt
20:54 Trauma joined #salt
20:55 dendazen joined #salt
21:03 dxiri_ joined #salt
21:06 lungaro left #salt
21:07 Aslam joined #salt
21:09 dxiri joined #salt
21:11 jamtoast joined #salt
21:12 joshin joined #salt
21:12 oida joined #salt
21:18 jeremati_ joined #salt
21:25 onmeac joined #salt
21:31 penladen joined #salt
21:37 ProT-0-TypE joined #salt
21:42 al joined #salt
21:42 al joined #salt
21:48 seffyroff joined #salt
21:53 seffyroff hey folks, Using salt-masterless (via Terraform) to provision a docker install on a handful of freshly installed Xenial servers.  Salt bootstrap is called as part of the Terraform apply.  It fails when it tries to copy the state files from /tmp to /srv/salt because it doesn't exist.  Obviously I can mkdir but naively I expected salt-bootstrap to do this as part of it's script.  That doesn't seem to be the case.
21:53 seffyroff Is there a generally accepted practice in this case? is it simply down to the user to mkdir?
21:53 pahiz Was there a way to totally ignore a key from a minion with a certain name?
21:53 xet7 joined #salt
21:54 pahiz So it doesn't show up in denied keys or unaccepted keys
21:54 pahiz Or even in rejected keys
21:58 dezertol joined #salt
22:04 blu_ joined #salt
22:05 seffyroff answer from Slack: /srv/salt isn't created by any script, it's down to the user to create it.
22:10 hemebond joined #salt
22:10 ipsecguy joined #salt
22:17 stooj joined #salt
22:20 Edgan You would git clone which would do it, and even better use gitfs and not worry about it
22:22 Shirkdog joined #salt
22:30 cliluw joined #salt
22:30 xet7 joined #salt
22:33 seffyroff ok, so gitfs and clone directly to /srv/salt then?
22:34 whytewolf gitfs and don't worry about it, or git clone it yourself.
22:34 whytewolf they are 2 different options
22:36 seffyroff I like the ring to 'don't worry about it' and gitfs seems the most elegant/extensible/reusable solution.  thanks!
22:47 exarkun I have been somewhat disappointed by gitfs.
22:47 exarkun Like the unnecessary split between gitfs and pillar gitfs
22:47 exarkun And the minimal documentation of best practices for development workflow
22:47 exarkun fwiw.
22:49 xet7 joined #salt
22:54 Edgan exarkun: I agree it is overly complicated
22:54 Edgan exarkun: but it is better than git clone
22:54 Edgan exarkun: It also stops people from directly mucking with the branch and files on disk
22:55 dezertol joined #salt
22:55 Edgan exarkun: You just reminded me I have an issue with the split I need to fix
22:55 Edgan exarkun: I have a map.jinja I have to maintain in both repos, because I reference it both in formulas and pillars, but pillars can't see the formulas copy
22:56 hemebond unnecessary split?
22:57 Edgan hemebond: One part is the syntaxes are different for each
22:57 Edgan hemebond: and have changed over time
22:58 hemebond The GitFS syntax is different between states and pillars?
22:58 Edgan hemebond: They are also not merged in memory into a unified virtual namespace
22:59 Edgan hemebond: https://pastebin.com/FXJnRSjf
23:00 whytewolf well, I would argue they shouldn't be unified in namespace since that could expose pillar to the state tree, allowing pillars to be fetched on any minion.
23:00 Edgan whytewolf: true. I think I know a work around for my map.jinja problem
23:01 Edgan hemebond: pillars include the branch name, though I think it ignores it, you need to define git_pillar_base
23:03 Edgan whytewolf: Looks like I can use the mountpoint option to get what I need
23:03 whytewolf nice
23:08 Edgan whytewolf: the mountpoint in https://pastebin.com/zVgvTsmz
23:19 vhasi joined #salt
23:21 bd joined #salt
23:21 rome_390 joined #salt
23:26 Edgan whytewolf: Super new option, was on 2017.7.4 and it is in 2017.7.5 and 2018.3.0
23:27 Edgan whytewolf: the documentation implies it was added in 2017.7.0, but I think it is talking about the gitfs not ext_pillar
23:28 whytewolf odd, mountpoitn was added to gitfs in 2014.7
23:29 whytewolf https://docs.saltstack.com/en/latest/ref/configuration/master.html#gitfs-mountpoint
23:30 Edgan whytewolf: like but different option. That seems to be mount files from the fileserver into the gitfs namespace. This is mount a directory in another git repo into the namespace
23:31 whytewolf they do pretty much the same thing
23:32 Edgan whytewolf: mountpoint is not working, so far :\
23:32 Edgan whytewolf: but your option, I think, would only work for states not pillars
23:33 whytewolf um, yes because the one i linked to is gitfs. I was talking about when they were added.
23:37 whytewolf I'm not sure how it looks to pillar.
23:38 xet7 joined #salt
23:38 Edgan whytewolf: I think I am going to have to do it backwards
23:39 Edgan whytewolf: mount a directory from pillars into formulas
23:39 Edgan whytewolf: pillars are implemented weird
23:39 whytewolf maybe, i would becareful you don't expose any pillars in the state tree.
23:40 Edgan whytewolf: hence the mount
23:40 Edgan whytewolf: not just adding the repo
23:40 Edgan whytewolf: I had that thought
23:43 Edgan I don't think that is going to work either :\
23:44 Edgan since there are other files in the same directory. I would have to move the whole folder over.
23:44 Edgan Guess I can make a new directory, but that will cause a mass rewrite
23:45 yidhra joined #salt
23:46 dezertol joined #salt
23:49 whytewolf that does not sound right. gitfs is all based on merge together
23:50 Edgan whytewolf: but it is mount, it is really a merge?
23:50 whytewolf it should be
23:50 Edgan ok, will try it
23:50 Edgan whytewolf: I have a weirder one
23:51 Edgan whytewolf: I had _grains/map.jinja in pillars.git. Then I removed it, and "TemplateNotFound: _grains/map.jinja", since the mountpoint didn't work right with pillars.
23:51 Edgan whytewolf: So I reverted the commit to put it back in pillars.git
23:52 Edgan whytewolf: and I restarted the salt master and ran a gitfs sync
23:52 Edgan whytewolf: But kept getting "TemplateNotFound: _grains/map.jinja" till I restarted the minion
23:52 Edgan wtf
23:52 whytewolf gitfs sync? you mean the git_pillar fetch?
23:53 Edgan /usr/bin/salt-call event.fire_master update salt/fileserver/gitfs/update
23:53 Edgan whytewolf: but this is pillar rendering, so why would the minion need to be restarted?
23:53 whytewolf cache
23:54 whytewolf no, not cache. timing
23:54 Edgan whytewolf: poor caching of the master per minion?
23:54 whytewolf updating gitfs does not update git_pillar
23:54 Edgan This is my old way of doing it that has worked, though I also sometimes use
23:55 Edgan salt-run fileserver.update
23:55 whytewolf which also doens't touch git_pillar
23:55 Edgan Then what will
23:55 whytewolf salt-run git_pillar.update
23:55 Edgan No catchall?
23:55 whytewolf no catchall
23:55 Edgan :(
23:56 Edgan Guess I need a pull request
23:56 whytewolf git_pillar isn't hosed in gitfs. it uses some of the libs from gitfs but that is all
23:56 whytewolf i wish people would stop calling it pillar gitfs.
23:56 Edgan whytewolf: this is an example of how them being completely different code paths is painful
23:57 Edgan whytewolf: They do almost the same thing at a certain level
23:57 Edgan whytewolf: But we have two implemenations
23:57 cliluw joined #salt
23:57 whytewolf honestly there should be a third thing that they both use.
23:58 Edgan Agreed

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