From 55006994fac16abeae1d1db54ba0b33ad8392f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Serv=C3=A9n=20Mar=C3=ADn?= Date: Thu, 12 Dec 2019 16:42:20 +0100 Subject: [PATCH] cmd/thanos/receive: dont upload as sidecar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As pointed out by a user on the CNCF Slack, the receiver is currently uploading to object storage as the sidecar. Signed-off-by: Lucas Servén Marín --- CHANGELOG.md | 1 + cmd/thanos/receive.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a05801398a..c3249140ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel ### Fixed - [#1856](https://github.com/thanos-io/thanos/pull/1856) Receive: close DBReadOnly after flushing to fix a memory leak. +- [#1882](https://github.com/thanos-io/thanos/pull/1882) Receive: upload to object storage as 'receive' rather than 'sidecar'. ### Added - [#1852](https://github.com/thanos-io/thanos/pull/1852) Add support for `AWS_CONTAINER_CREDENTIALS_FULL_URI` by upgrading to minio-go v6.0.44 diff --git a/cmd/thanos/receive.go b/cmd/thanos/receive.go index 09c3e8f317..2ea0c962c6 100644 --- a/cmd/thanos/receive.go +++ b/cmd/thanos/receive.go @@ -164,7 +164,7 @@ func runReceive( replicaHeader string, replicationFactor uint64, tsdbBlockDuration model.Duration, - comp component.Component, + comp component.SourceStoreAPI, ) error { logger = log.With(logger, "component", "receive") level.Warn(logger).Log("msg", "setting up receive; the Thanos receive component is EXPERIMENTAL, it may break significantly without notice") @@ -364,7 +364,7 @@ func runReceive( if s != nil { s.Shutdown(errors.New("reload hashrings")) } - tsdbStore := store.NewTSDBStore(log.With(logger, "component", "thanos-tsdb-store"), nil, localStorage.Get(), component.Receive, lset) + tsdbStore := store.NewTSDBStore(log.With(logger, "component", "thanos-tsdb-store"), nil, localStorage.Get(), comp, lset) s = grpcserver.New(logger, &receive.UnRegisterer{Registerer: reg}, tracer, comp, tsdbStore, grpcserver.WithListen(grpcBindAddr), @@ -407,7 +407,7 @@ func runReceive( if upload { // The background shipper continuously scans the data directory and uploads // new blocks to Google Cloud Storage or an S3-compatible storage service. - bkt, err := client.NewBucket(logger, confContentYaml, reg, component.Sidecar.String()) + bkt, err := client.NewBucket(logger, confContentYaml, reg, comp.String()) if err != nil { return err }