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

Update thanos v0.11.0 #23

Merged
merged 259 commits into from Mar 7, 2020

Conversation

pgier
Copy link

@pgier pgier commented Mar 6, 2020

This includes some enahncements needed for thanos ruler in CMO. I based this PR off of the earlier upgrade PR #22 since @simonpasquier had already fixed some of the conflicts.

bwplotka and others added 30 commits October 18, 2019 18:48
Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
…le (thanos-io#1656)

* Start metric and status probe server as soon as possible

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Update changelog

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Schedule a separate goroutine to start server

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Add InitSync to the rungroup

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Fix linter pointed issues

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Move InitSync to alreay existed run.Group

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Remove unnecessary changes and update CHANGELOG

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Add simple explanation for probes

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Make requested changes

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Update CHANGELOG.md

Co-Authored-By: Martin Chodur <m.chodur@seznam.cz>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
This commit simplifies the registration of pprof HTTP endpoints. The
pprof.Index handler automatically takes care of delegating to the
correct handler for each profile depending on the request path:
https://golang.org/src/net/http/pprof/pprof.go?s=8862:9042#L260
The following profiles are handled:
https://golang.org/src/net/http/pprof/pprof.go?s=7565:8570#L248
Note that this also includes the `allocs` profile, which was previously
not explicitly added.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
…s. (thanos-io#1666)

* Fixed compactor tests; Moved to full e2e compact test; Cleaned metrics.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

* Removed block after each compaction group run.

Fixes: thanos-io#1499

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

* Moved to label hash for dir names for compactor groups.

Fixes: thanos-io#1661

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

* Addressed comments.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

* Addressed comments, rebased.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
Signed-off-by: Povilas Versockas <p.versockas@gmail.com>
…io#1675)

This will definitely helps with offset queries.

Same was done on cortexproject/cortex#1012

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
This small PR simply fixes an error message that confused me during a
review.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
…sharding e2e test. (thanos-io#1669)

* store: Filter blocks before loading it. Sort advertise labels; Added sharding e2e test.

Fixes: thanos-io#1664

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

* Trying to speed up tests a bit.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

* Fixed tests.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
This commit gives the Thanos receive component the capability to use TLS
in both the remote-write client and server. This means that Thanos
receive can now authenticate all requests.

In order to accomplish this change, this commit abstracts the majority
of the logic of `defaultGRPCServerOpts` into a reusable func for gRPC
and HTTP servers and creates a similar func for TLS client
configurations.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
* add oss support

Signed-off-by: wujinhu <wujinhu920@126.com>

* fix docs

Signed-off-by: wujinhu <wujinhu920@126.com>

* fix Makefile

Signed-off-by: wujinhu <wujinhu920@126.com>

* review comments

Signed-off-by: wujinhu <wujinhu920@126.com>

* fix style

Signed-off-by: wujinhu <wujinhu920@126.com>

* review comments

Signed-off-by: wujinhu <wujinhu920@126.com>

* review comments

Signed-off-by: wujinhu <wujinhu920@126.com>

* review comments

Signed-off-by: wujinhu <wujinhu920@126.com>

* review comments

Signed-off-by: wujinhu <wujinhu920@126.com>
* Add new http-grace-period flag

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Update CHANGELOG

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Update docs

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Update pkg/server/http.go

Co-Authored-By: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Rename initializer for HTTP server

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Fixes thanos-io#1670

Signed-off-by: Olivier Biesmans <olivier.biesmans@blablacar.com>
Signed-off-by: mengskysama <mengskysama@gmail.com>
Signed-off-by: wujinhu <wujinhu920@126.com>
Kind of annoying and easy to forget: it should be done by promu eventually. Will investigate later.


Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
PR thanos-io#1680 introduced graceful handling for the HTTP server in Thanos, but
the graceful `Shutdown` call was being performed on an `http.Server`
instance that was *not* running at all. The actual server that was
listening for requests was started through `http.Serve`, so there was no
reference to the server struct that we could use to shut it down. This
was causing all of Thanos to freeze after receiving an exit signal,
because the run-group for the HTTP server would never finalize.

This seems like an oversight because the `(*Server).srv` field was being
properly initialized with an HTTP server. Fix this by calling
`ListenAndServe` on our initialized server.

Signed-off-by: Vicent Marti <vmg@strn.cat>
Signed-off-by: Olivier Biesmans <olivier.biesmans@blablacar.com>
* Fix downsampling option in querier URL

Signed-off-by: Olivier Biesmans <olivier.biesmans@blablacar.com>

* Fix downsampling option in querier URL

Signed-off-by: Olivier Biesmans <olivier.biesmans@blablacar.com>
* Added experimental filesystem bucket implementation

Usa cases:
* See: observatorium/thanos-replicate#7
* Local testing, demos

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

* Fixed edge case.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

* Disabled one test case. We cannot rely on this.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
Currently, the bucket web command generates and registers metrics but
they are never actually exposed. This commit ensures that the metrics
are exposed and leverages the recently created server package for
consistency.

This cleanup also helps prepare for the upcoming changes for
thanos-io#1657.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
these questions are about merged PRs

Signed-off-by: Brett Jones <blockloop@users.noreply.github.com>
As agreed thanos-io#1688 (comment)

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
* Added official Governance page for Thanos.

All maintainers, please review and approve *only* if you agree.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

* Addressed comments.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

* Addressed commments (only FAQ update).

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
* Inroduce graceful shutdown for gRPC

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Add missed cancel branch

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Remove stutter from server structs

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Close servers immediately if grace period is not specified

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Update CHANGELOG

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Rename TLS methods, clarify log messages

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Document public functions

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Fix review issues

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Update bucket docs

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* trigger checks

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* trigger checks

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
While standardizing some flags, commit
9d4d0bf accidentally added
a `--http-address` flag to the bucket web component that is never used.
However, rather than remove this new flag, this commit removes the
`--listen` flag that the component defines so that the component is in
line with the flags defined by other components.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
This commit fixes a regression introduced in thanos-io#1702, where the signature
of the bucketui.Register method was changed. The bug was caused because
one of the registered paths relied on the HTTP parameter variable
support from github.com/julienschmidt/httprouter, which the standard
library does not support. The fix is instead to implement the change
recommended in
thanos-io#1702 (comment).

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
The receive component currently has duplicate spans for requests handled
by its HTTP server. This is due to the fact that the server is
instrumented once using the global singleton tracer and then a second
time with the tracer configured via the CLI. This commit eliminates the
duplicate instrumentation via the global singleton in favor of the
explicit specified tracer, which is consistent with the practice of
other Thanos components.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
- append to s.lset caused reallocs and overallocs
- this is now fixed by properly setting capacity on s.lset
- pprof shows "-316.22MB, 5.00% of 6322.82MB total" for sample data set and query I used

Signed-off-by: Philip Panyukov <ppanyukov@googlemail.com>
Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
khyatisoneji and others added 18 commits February 13, 2020 11:27
Signed-off-by: khyatisoneji <khyatisoneji5@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: yeya24 <yb532204897@gmail.com>
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
…o#2145)

* tracing: track query sent to prometheus via remote read api

Signed-off-by: Igor Wiedler <iwiedler@gitlab.com>

* add CHANGELOG entry

Signed-off-by: Igor Wiedler <iwiedler@gitlab.com>
* Handle SIGHUP

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Only log when signal received

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Use a buffered channel

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: khyatisoneji <khyatisoneji5@gmail.com>
* Improve proxyStore timeouts.

Signed-off-by: Aleskey Sin <asin@ozon.ru>

* Fix send to closed channel.

Signed-off-by: Aleskey Sin <leks.sin@gmail.com>

* Update for PR.

Signed-off-by: Aleskey Sin <leks.sin@gmail.com>

* Fix recv done channel.

Signed-off-by: Aleskey Sin <leks.sin@gmail.com>

* PR fixes.

Signed-off-by: Aleskey Sin <leks.sin@gmail.com>
Signed-off-by: Xiang Dai <764524258@qq.com>
Signed-off-by: Aleskey Sin <leks.sin@gmail.com>
…io#2086)

* Add proposal for improving Thanos Query healthiness handling

Adds a document which proposes improving the healthiness handling of the
store nodes in Thanos Query.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* docs/proposals: thanos_query_health_handling: update

Update the proposal according to our discussion.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* docs: proposals: elaborate more on non-goals

Elaborate more on what the 202001_thanos_query_health_handling.md
proposal is not trying to solve and what problems will still exist after
implementing this in terms of the end result caching.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
…io#2151)

Fixes: thanos-io#2147

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
…os-io#2159)

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
* Update version to v0.11.0-rc.0

* Update CHANGELOG with all PRs for v0.11

* Improve CHANGELOG by being more explicit
…nos-io#2189)

Signed-off-by: Kraig Amador <kraig.amador@ticketmaster.com>
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
@openshift-ci-robot openshift-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 6, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 6, 2020
v0.11.0

Note: upstream removed the vendor directory, so we need to update it
for each new upstream merge.
@pgier
Copy link
Author

pgier commented Mar 6, 2020

/retest

@s-urbaniak
Copy link

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 7, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pgier, s-urbaniak

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit a3b1ae5 into openshift:master Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet