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

Upgrade thanos to release-0.19 #8

Merged
merged 101 commits into from
Apr 12, 2021
Merged

Upgrade thanos to release-0.19 #8

merged 101 commits into from
Apr 12, 2021

Conversation

songleo
Copy link
Member

@songleo songleo commented Apr 12, 2021

squat and others added 30 commits January 6, 2021 21:18
This small commit fixes the changelog entry for release v0.16.0 so that
the section title includes a link to the actual release.

Signed-off-by: Lucas Servén Marín <[email protected]>
* Delete deletion-mark.json at last when deleting a block

Signed-off-by: Marco Pracucci <[email protected]>

* Fixed linter

Signed-off-by: Marco Pracucci <[email protected]>
* Fix race condition in BinaryReader.LookupSymbol()

Signed-off-by: Marco Pracucci <[email protected]>

* Fixed BinaryReader receiver and added CHANGELOG entry

Signed-off-by: Marco Pracucci <[email protected]>
* ui: make old UI work with vanilla blocks

Make the old bucket viewer UI work with vanilla Prometheus blocks by
checking whether the `Thanos` part exists before formatting the HTML.

Signed-off-by: Giedrius Statkevičius <[email protected]>

* CHANGELOG: update

Signed-off-by: Giedrius Statkevičius <[email protected]>

* ui/bucket: fix according to @squat's suggestions

Signed-off-by: Giedrius Statkevičius <[email protected]>

* ui: update bindata after latest changes

Signed-off-by: Giedrius Statkevičius <[email protected]>
Signed-off-by: dmaiocchi <[email protected]>
Co-authored-by: Bartlomiej Plotka <[email protected]>
Query-frontend: use detailed text description for cmd
…3657)

The http.Transport is not auto-tuning and one size does not seem to fit
all cases. In order to respond to a query a store gateway might need to
fetch a large (thousands) of postings, series and chunks.

While the number of idle connections has been increased recently it can
still be too low or expose bursty (opening, closing) behavior. Allow to
tune most of the http.Transport parameters. I considered embedding the
full Transport but there is already a Transport member.

Signed-off-by: Holger Hans Peter Freyther <[email protected]>
* Update design.md

Update store.md

Update design.md

Update storage.md

Update troubleshooting.md

Signed-off-by: Biswajit Ghosh <[email protected]>

* Update design.md

Update store.md

Update design.md

Update troubleshooting.md

Update storage.md

Signed-off-by: Biswajit Ghosh <[email protected]>
…hanos-io#3727)

* Update help messages with a consistent use of capitals and periods.

Signed-off-by: Matt Whitney <[email protected]>

* Update documentation to reflect message changes.

Signed-off-by: Matt Whitney <[email protected]>

* Run `make docs` to correct the documentation rather than manual edits.

Signed-off-by: Matt Whitney <[email protected]>
This commit changes the file suffix from .go.go to simply .go.

Signed-off-by: Lucas Servén Marín <[email protected]>
…3703)

* docs/proposals/210701_endpoint_discovery.md: Add initial proposal

Signed-off-by: Lili Cosic <[email protected]>

* Update docs/proposals/210701_endpoint_discovery.md

Co-authored-by: Bartlomiej Plotka <[email protected]>

Co-authored-by: Bartlomiej Plotka <[email protected]>
…hanos-io#3752)

* Introduce "block-meta-fetch-concurrency" flag for compact and store

Furthermore consolidate the fetcher concurrency by moving the
fetcherConcurrency const to the fetcher code of the block package.

Signed-off-by: Johannes Frey <[email protected]>

* Document flags

Signed-off-by: Johannes Frey <[email protected]>
…s-io#2641) (thanos-io#3723)

* Add `--query-range.request-downsampled` flag to Query Frontend (thanos-io#2641)

Signed-off-by: Vladimir Kononov <[email protected]>

* Apply suggestions from code review

Co-authored-by: Bartlomiej Plotka <[email protected]>
Signed-off-by: Vladimir Kononov <[email protected]>

Co-authored-by: Bartlomiej Plotka <[email protected]>
…anos-io#3760)

* Fix panic on concurrent index-header lazy reader usage and unload

Signed-off-by: Marco Pracucci <[email protected]>

* Addressed review comments

Signed-off-by: Marco Pracucci <[email protected]>

* Addressed review comments

Signed-off-by: Marco Pracucci <[email protected]>
Pad the index size check in the compaction planner by 15% to avoid
situations where the sum of index bytes bloats to be larger than the
sum of the original index sizes.

* thanos-io#3724
* thanos-io#3750

Signed-off-by: Ben Kochie <[email protected]>
…io#3675)

* Fix wrong store api link

Signed-off-by: Junyoung, Sung <[email protected]>

* Fix store api link to absolute

Signed-off-by: Junyoung, Sung <[email protected]>
* added retry function

Signed-off-by: Abhishek357 <[email protected]>

* fixed CI test

Signed-off-by: Abhishek357 <[email protected]>

* restructured code

Signed-off-by: Abhishek357 <[email protected]>
GiedriusS and others added 23 commits February 26, 2021 19:26
Ensure that we have a consistent order of blocks that we are going to
downsample. `range` over maps doesn't enforce any particular order on
purpose.

This is needed for https://github.com/thanos-io/thanos/pull/3031/files.
ATM in that PR before downsampling we delete all directories which do
not match blocks ULIDs in the remote object storage. Ideally, we should
only keep around the files of a block which we are about to downsample.

It is impossible to do that properly ATM if during another iteration
we'd start from a different block. Thus, let's have a consistent order.

Signed-off-by: Giedrius Statkevičius <[email protected]>
* Update ui npm deps to latest

Signed-off-by: Saswata Mukherjee <[email protected]>

* Fix linting errors

Signed-off-by: Saswata Mukherjee <[email protected]>

* Change camelcase lint rule

Signed-off-by: Saswata Mukherjee <[email protected]>
…(downloading) (thanos-io#3031)

* block: precalculate hashes if enabled and use them during compaction

Added the possibility to ignore certain directories in
objstore.{Download,DownloadDir}. Do not download files which have the
same hash as in remote object storage. Wire up `--hash-func` so that
writers could specify what hash function to use when uploading. There is
no performance impact if no hash function has been explicitly specified.
Clean up the removal of files logic in Thanos Compact to ensure we do
not remove something that exists on disk already.

Tested manually + new tests cover all of this more or less.

Signed-off-by: Giedrius Statkevičius <[email protected]>

* block: expose GatherFileStats and use it

Signed-off-by: Giedrius Statkevičius <[email protected]>

* Revert "block: expose GatherFileStats and use it"

This reverts commit 259c70b.

Signed-off-by: Giedrius Statkevičius <[email protected]>

* block: do not calc hash for dirs, add locks

Signed-off-by: Giedrius Statkevičius <[email protected]>

* docs/tools: update

Signed-off-by: Giedrius Statkevičius <[email protected]>

* shipper: pass s.hashFunc

Signed-off-by: Giedrius Statkevičius <[email protected]>

* Fix according to Bartek's comments

Signed-off-by: Giedrius Statkevičius <[email protected]>

* compact: clean up comment

Signed-off-by: Giedrius Statkevičius <[email protected]>

* block: close with log on error

Signed-off-by: Giedrius Statkevičius <[email protected]>

* *: remove unused FNs

Signed-off-by: Giedrius Statkevičius <[email protected]>

* compact: add e2e test for new hash functionality

Signed-off-by: Giedrius Statkevičius <[email protected]>

* Fix according to Bartek's comments

Signed-off-by: Giedrius Statkevičius <[email protected]>
* Upgrade jsonnet tooling

Signed-off-by: Kemal Akkoyun <[email protected]>

* Fix bingo version issue

Signed-off-by: Kemal Akkoyun <[email protected]>

* Fix unintended removal issue

Signed-off-by: Kemal Akkoyun <[email protected]>
* Update reference of master to main in docs

Signed-off-by: Prem Saraswat <[email protected]>

* Update image tag in tutorials/kubernetes-helm

Signed-off-by: Prem Saraswat <[email protected]>
Signed-off-by: Bartlomiej Plotka <[email protected]>
…hanos-io#3889)

* Fix bug introduced in PR thanos-io#3740

Signed-off-by: Hitanshu Mehta <[email protected]>

* Minor change in test

Signed-off-by: Hitanshu Mehta <[email protected]>

Co-authored-by: Hitanshu Mehta <[email protected]>
…rs (thanos-io#3886) (thanos-io#3890)

* rewrite delete should delete a series only if it matches all matchers in a deletion request

Signed-off-by: yeya24 <[email protected]>

* add test case

Signed-off-by: yeya24 <[email protected]>

Co-authored-by: Ben Ye <[email protected]>
Currently, the thanos Receiver infers whether it should use TLS for
the gRPC clients that forwards time series to other receivers based on
whether the remote-write HTTP server uses TLS. This is not correct, as
the HTTP server may use TLS without the gRPC server using TLS. This
commit fixes the inference.

Longer-term, this will be taken care of by the receive/router split.

Signed-off-by: Lucas Servén Marín <[email protected]>
Signed-off-by: Bartlomiej Plotka <[email protected]>
* Fix partial and empty matchers match

Signed-off-by: yeya24 <[email protected]>

* add testcase for non-equal matchers

Signed-off-by: yeya24 <[email protected]>
…usage introduced in 0.17 (thanos-io#3943)

* Added receive benchmark, baseline.

```
goos: linux
goarch: amd64
pkg: github.com/thanos-io/thanos/pkg/receive
BenchmarkHandlerReceiveHTTP
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them.
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them./OK
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them./OK-12      	   22260	   1550152 ns/op	 1380340 B/op	    6093 allocs/op
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them./conflict_errors
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them./conflict_errors-12         	    6619	   6430408 ns/op	 4522487 B/op	   26118 allocs/op
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them.
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them./OK
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them./OK-12                     	    2695	  17208794 ns/op	15072963 B/op	   60441 allocs/op
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them./conflict_errors
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them./conflict_errors-12        	     474	  72533286 ns/op	46396932 B/op	  260141 allocs/op
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/OK
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/OK-12                	     270	 137050518 ns/op	226595379 B/op	     132 allocs/op
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/conflict_errors
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/conflict_errors-12   	      21	1616025443 ns/op	698724321 B/op	     408 allocs/op
PASS

Process finished with exit code 0
```


Signed-off-by: Bartlomiej Plotka <[email protected]>

* Copy labels.

```
GOROOT=/home/bwplotka/.gvm/gos/go1.15 #gosetup
GOPATH=/home/bwplotka/Repos/thanosgopath #gosetup
/home/bwplotka/.gvm/gos/go1.15/bin/go test -c -o /tmp/___BenchmarkHandlerReceiveHTTP_in_github_com_thanos_io_thanos_pkg_receive github.com/thanos-io/thanos/pkg/receive #gosetup
/tmp/___BenchmarkHandlerReceiveHTTP_in_github_com_thanos_io_thanos_pkg_receive -test.v -test.bench ^\QBenchmarkHandlerReceiveHTTP\E$ -test.run ^$ -test.benchmem -test.benchtime=30s
goos: linux
goarch: amd64
pkg: github.com/thanos-io/thanos/pkg/receive
BenchmarkHandlerReceiveHTTP
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them/OK
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them/OK-12      	   25887	   1537262 ns/op	 1380023 B/op	    6092 allocs/op
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them/conflict_errors
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them/conflict_errors-12         	    4237	   7547968 ns/op	 4522583 B/op	   26118 allocs/op
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them/OK
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them/OK-12                     	    2205	  16513380 ns/op	15071092 B/op	   60420 allocs/op
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them/conflict_errors
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them/conflict_errors-12        	     525	  67278233 ns/op	46396645 B/op	  260141 allocs/op
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/OK
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/OK-12               	     285	 148049189 ns/op	226596168 B/op	     132 allocs/op
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/conflict_errors
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/conflict_errors-12  	      20	1731361499 ns/op	698722550 B/op	     401 allocs/op
PASS

Process finished with exit code 0

```

Signed-off-by: Bartlomiej Plotka <[email protected]>

* Addded bench.,

Signed-off-by: Bartlomiej Plotka <[email protected]>

* Fix.

Signed-off-by: Bartlomiej Plotka <[email protected]>

* Improved API.

Signed-off-by: Bartlomiej Plotka <[email protected]>

* Changelog.

Signed-off-by: Bartlomiej Plotka <[email protected]>

* Addressed Lucas comments.

Signed-off-by: Bartlomiej Plotka <[email protected]>
* compact: clean up directories properly

I couldn't stop thinking about this code for some reason and I have
figured that I had missed one case in thanos-io#3031. We need to also clean up
the directories in compaction groups. A compaction could fail leaving
some new directory with a random ULID on the disk. Before attempting to
do another compaction loop, we need to remove it as well because the
compaction process always produces a new, unique directory.

Signed-off-by: Giedrius Statkevičius <[email protected]>

* Remove all non expected dirs.

Signed-off-by: Bartlomiej Plotka <[email protected]>

* Addressed comment.

Signed-off-by: Bartlomiej Plotka <[email protected]>

Co-authored-by: Bartlomiej Plotka <[email protected]>
Signed-off-by: Bartlomiej Plotka <[email protected]>
…hanos-io#3960) (thanos-io#3999)

Currently, if an alerting rule having the same name with different
severity labels is being returned from different replicas then they
are being treated as separate alerts.

Given the following alerts a1,a2 with severities s1,s2 returned from
replicas r1,2:

a1[s1,r1]
a1[s2,r1]
a1[s1,r2]
a1[s2,r2]

Then, currently, the algorithm deduplicates to:

a1[s1]
a1[s2]
a1[s1]
a1[s2]

Instead of the intendet result:

a1[s1]
a1[s2]

This fixes it by removing replica labels before sorting labels for
deduplication.

Signed-off-by: Sergiusz Urbaniak <[email protected]>
# Conflicts:
#	CHANGELOG.md

Co-authored-by: Sergiusz Urbaniak <[email protected]>
Signed-off-by: Bartlomiej Plotka <[email protected]>
Signed-off-by: Bartlomiej Plotka <[email protected]>
@clyang82
Copy link

/lgtm

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clyang82, songleo

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 8460e86 into stolostron:release-2.3 Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.