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: failed deleting non-compaction group directories/files #3912

Closed
goober opened this issue Mar 11, 2021 · 3 comments
Closed

Compact: failed deleting non-compaction group directories/files #3912

goober opened this issue Mar 11, 2021 · 3 comments

Comments

@goober
Copy link
Contributor

goober commented Mar 11, 2021

Thanos, Prometheus and Golang version used:

Docker image: thanos/thanos:v0.19.0-rc.1

Command arguments:

compact
  --http-address=0.0.0.0:10902
  --objstore.config-file=/etc/thanos/config/thanos.yaml
  --data-dir=/var/thanos/compact
  --retention.resolution-raw=14d
  --retention.resolution-5m=14d
  --retention.resolution-1h=14d
  --delete-delay=12h
  --no-debug.halt-on-error
  --wait

Object Storage Provider:
Ceph 3.2

What happened:
When we upgraded to v0.19.0-rc.1 from v0.18 to verify that #3795 solves our compact issues (which it did) we have started to notice a lot of warning messages in the thanos-compact logs.

level=warn ts=2021-03-10T23:58:43.986607565Z caller=compact.go:964 msg="failed deleting non-compaction group directories/files, some disk space usage might have leaked. Continuing" err="read dir: open /var/thanos/compact/compact: no such file or directory" dir=/var/thanos/compact/compact

Everything seems to work as expected otherwise.

Could it be relevant to check if the compact folder exists and ignore the following lines if it does not?

https://github.com/thanos-io/thanos/blob/main/pkg/compact/compact.go#L963-L965

@GiedriusS
Copy link
Member

This message is harmless but IMHO we should fix this before the final release. Thank you for the report 🤗 I think the correct approach here is to check whether the directory exists before trying to do anything with it. @bwplotka you had suggestions regarding this. Do you agree with my proposed solution here?

@bwplotka
Copy link
Member

bwplotka commented Mar 15, 2021

Thanks, yea I think we are on it with your PR @GiedriusS, so... we are on it (: Nothing to worry about, thanks for reporting!

@wiardvanrij
Copy link
Member

This is fixed in the 0.19 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants