thanos icon indicating copy to clipboard operation
thanos copied to clipboard

Index header creation is not windows compatible

Open henrikschristensen opened this issue 1 year ago • 3 comments

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:

henrikschristensen avatar Feb 18 '24 18:02 henrikschristensen

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

yeya24 avatar Feb 18 '24 19:02 yeya24

I am running thanos in docker swarm on windows nodes

henrikschristensen avatar Feb 18 '24 19:02 henrikschristensen

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.

shai-labos avatar May 12 '24 12:05 shai-labos