Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compact Web: Missing --web.route-prefix and --web.external-prefix wrong #2727

Open
jdfalk opened this issue Jun 5, 2020 · 15 comments
Open

Comments

@jdfalk
Copy link
Contributor

jdfalk commented Jun 5, 2020

Thanos, Prometheus and Golang version used:
Using official docker release for 0.12.2

Object Storage Provider:
NA

What happened:
--web.external-prefix= is supposed to be for the external path as referred to in links but is supposed to serve the content still from /
--web.route-prefix= is supposed to actually serve it on a subpath, unfortunately compact currently lacks this flag.

From the documentation of query:

 --web.route-prefix=""      Prefix for API and UI endpoints. This allows thanos UI to be served on a sub-path. This option is analogous to --web.route-prefix of Promethus.
 --web.external-prefix=""   Static prefix for all HTML links and redirect URLs in the UI query web interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos UI to be served behind a reverse proxy that strips a URL sub-path.

From the documentation of compact (same as query just missing route-prefix):

--web.external-prefix=""  Static prefix for all HTML links and redirect URLs in the bucket web UI interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos bucket web UI to be served behind a reverse proxy that strips a URL sub-path.

If connecting to localhost it should be http://localhost:10902/loaded but on the reverse proxy it would be http://external/prefix/loaded which would get rewritten as http://internal/loaded

What you expected to happen:
Compact should follow the behavior as defined in the documentation and the other components of thanos.

How to reproduce it (as minimally and precisely as possible):

  1. thanos compact --http-address="0.0.0.0:10902" --web.external-prefix=/bucket
  2. go to http://localhost:10902/global -- won't work
  3. go to http://localhost:10902/bucket/global -- does work but shouldn't because it's the wrong option.

Anything else we need to know:
This was incorrectly fixed in #2338
The code as it was, was correct, what the submitter really wanted was the --web.route-prefix which is missing from thanos compact. He should not expect to see anything outside of / if using --web.external-prefix.

@GiedriusS
Copy link
Member

We plan on fixing this soon. cc @prmsrswt

@stale
Copy link

stale bot commented Jul 25, 2020

Hello 👋 Looks like there was no activity on this issue for last 30 days.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity for next week, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Jul 25, 2020
@GiedriusS GiedriusS removed the stale label Jul 27, 2020
@stale
Copy link

stale bot commented Aug 26, 2020

Hello 👋 Looks like there was no activity on this issue for last 30 days.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity for next week, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Aug 26, 2020
@stale
Copy link

stale bot commented Sep 2, 2020

Closing for now as promised, let us know if you need this to be reopened! 🤗

@stale
Copy link

stale bot commented Mar 16, 2021

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Mar 16, 2021
@onprem onprem removed the stale label Mar 17, 2021
@stale
Copy link

stale bot commented Jun 2, 2021

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Jun 2, 2021
@onprem
Copy link
Member

onprem commented Jun 3, 2021

Still valid, and help wanted!

@stale stale bot removed the stale label Jun 3, 2021
@stale
Copy link

stale bot commented Aug 3, 2021

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@rodrigoscferraz
Copy link

rodrigoscferraz commented Oct 5, 2021

Same here...
Set --web.external-prefix=tools/thanos-bucketweb

go to http://domain/tools/thanos-bucket -- won't work
go to http://domain/tools/thanos-bucket/metrics -- does work

Looking into HTTP response, seems like the /static is pointing to tools/static instead of tools/thanos-bucketweb/static...i also tried set --web.external-prefix=tools , /tools and a lot of other combinations, but nothing works

@stale
Copy link

stale bot commented Jan 9, 2022

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Jan 9, 2022
@GiedriusS GiedriusS removed the stale label Jan 10, 2022
@ataahua
Copy link

ataahua commented Jan 27, 2022

Still ongoing. set the

--web.route-prefix=/xxxx
--web.external-prefix=/xxxx

and it's still not working, it ignores the flags, using the latest ver available, 0.24.0

@stale
Copy link

stale bot commented Apr 16, 2022

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Apr 16, 2022
@rodrigoscferraz
Copy link

Still ongoing

@stale stale bot removed the stale label Apr 22, 2022
@metonymic-smokey
Copy link
Contributor

If no one else is working on it, maybe I could take a stab at this sometime?
Thanks!

@stale
Copy link

stale bot commented Aug 13, 2022

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants