Hello Guang,

This does look like a bug, after some digging it appears it was as a result
of KNOX-973.

Have you tried using

<rewrite
template="{$frontend[url]}/jobstoryui/jobstory/jobhistory/logs/{**}"/>

I am curious to see what you get.


Best,
Sandeep




On Thu, Mar 1, 2018 at 4:30 PM, Guang Yang <k...@uber.com> wrote:

> Hi,
>
> I'm currently working on the Map Reduce Job History UI rewrite rules, and
> found several potential bugs here.
>
> <rewrite template="1; url=/gateway/jobstoryui/jobsto
> ry/jobhistory/logs/{**}"/>
> For this rewrite template
> <https://github.com/apache/knox/blob/master/gateway-service-definitions/src/main/resources/services/yarnui/2.7.0/rewrite.xml#L104>,
> let's not say what the `jobstory` is here for now. I think the target url
> should start with something like {$frontend[url]}, just like other OUT
> rules, because the previous one doesn't specify the deployment/environment
> after word `gateway`.
>
> But after I change it to <rewrite template="1; url={$frontend[url]}/
> jobstoryui/jobstory/jobhistory/logs/{**}"/>, the variable
> {$frontend[url]} is not replaced with the right value, it's just literal
> `{$frontend[url]}` in the target url. And I found that only when the
> variable following the double quotes, it can be replaced, otherwise it just
> stays there as literal text.
>
> My question is, anyone knows how to fix this bug? Or how to get 
> {$frontend[url]}
> replaced with right value even it's not at the beginning of the template?
>
> Btw, I think the right template should be <rewrite template="1;
> url={$frontend[url]}/jobhistory/joblogs/{**}"/>.
>
> Appreciate for any help.
>
> Thanks,
> Guang
>
>
>

Reply via email to