thanos-io / thanos

Highly available Prometheus setup with long term storage capabilities. A CNCF Incubating project.
https://thanos.io
Apache License 2.0
12.99k stars 2.08k forks source link

Index header creation is not windows compatible #7147

Open henrikschristensen opened 7 months ago

henrikschristensen commented 7 months ago

Thanos latest and main

Object Storage Provider: Minio

What happened: When "pkg/block/indexheader/binary_reader" reads index files from storage it uses filepath.join to create the read path. this behaves differently on linux vs windows. More specifically on windows it produces paths with backslashes witch is incompatible with s3 file paths. code should use path.join witch produces paths with forward slashes regardles of operating system. Also when writing index header files to local storage the current code does a rename of an open temp file. Works just fine on Unix filesystems, but fails on windows with access denied. The tmp file should be closed before rename to make it windows compatible.

What you expected to happen: Index headers correctly written to local disk

How to reproduce it (as minimally and precisely as possible): run storage gateway agains minio with data. fails to sync index files to local disk.

Full logs to relevant components:

Anything else we need to know:

yeya24 commented 7 months ago

What's your usecase of running store gateway on Windows?

henrikschristensen commented 7 months ago

I am running thanos in docker swarm on windows nodes

shai-labos commented 4 months ago

Hi,

We've encountered similar issues when running Thanos on Windows. Since our operations rely on Windows, resolving this is crucial for us. Could you please let us know if there's an anticipated fix and merge coming soon?

Thank you.