marathon-lb icon indicating copy to clipboard operation
marathon-lb copied to clipboard

Unable to use { in templates

Open jfindley opened this issue 9 years ago • 1 comments

If I want to include a template that uses a brace, I get various errors, depending on how it's done. If I write a simple {, I get a KeyError, as it attempts to parse it as a variable. If I use {{, as is normal for a python template, it actually renders the {{ to the final file.

To reproduce, include a HAPROXY_HTTPS_FRONTEND_HEAD template similar to the below:

frontend marathon_https_in
  bind *:443 ssl {sslCerts}
  mode http
  use_backend mesos if {{ ssl_fc_sni mesos.domain.com }}

I managed to hack together an awful fix by adding print(https_frontends) after line 279 of marathon_lb.py, which presumably does some sort of coercion to force the template to render properly? I don't know python well enough to venture more than vague guesses, unfortunately.

jfindley avatar May 03 '16 14:05 jfindley

I have the same issue, I'm unable to use %{+Q} in a template because of it.

edude03 avatar Sep 06 '16 21:09 edude03