Commit Graph

10 Commits

Author SHA1 Message Date
Ben McClelland 27f04ad5ea feat: add windows functional test coverage and fix some windows behavior
This change adds Windows functional test execution in CI and updates
backend handling so windows filesystem error/path semantics map correctly
to expected S3 outcomes.

The only meta supported on windows right now is sidecar, so the tests
in windows mode also skip sidecar skips.

Future work is to address the skips and/or more clearly document
the unsupported/incompatible behavior on windows.

The windows support will still remain best effort, but these tests
should at least flag when future changes introduce incompatible
behavior on windows.
2026-06-18 11:34:05 -07:00
Ben McClelland 8ae566d44e feat: add new ErrNoSpaceLeftOnDevice API error for ENOSPC errors
Add a new non-AWS error ErrNoSpaceLeftOnDevice (HTTP 507 Insufficient
Storage) to s3err. Update all call sites in the posix backend that
could return ENOSPC and return the new error when the underlying
filesystem has no space remaining.

Fixes #2093
2026-04-28 10:34:48 -07:00
Ben McClelland 8c49a3335e fix: add explicit sidecar metadata cleanup on object/bucket deletion
Unlike xattr metadata which is tied to the filesystem object and removed
automatically, sidecar metadata lives in a parallel directory tree and
must be deleted explicitly. Add DeleteAttributes calls after removing
bucket directories, null-version files, and versioned object files.

Also add an os.Stat existence check in GetObjectTagging and
PutObjectTagging when no versionId is given, since sidecar's
StoreAttribute/RetrieveAttribute do not naturally return ErrNotExist
for missing objects the way xattr operations do.
2026-04-22 11:55:11 -07:00
Ben McClelland 81f0158a48 fix: close temp file before rename in sidecar StoreAttribute
On Windows, a file apparently cannot be renamed while an open
handle to it exists.
The previous code used defer tempfile.Close(), which meant the
handle was still open when os.Rename was called, producing:

  failed to rename temporary file: The process cannot access
  the file because it is being used by another process.

Fix by closing the file explicitly before the rename.

Fixes #2021
2026-04-14 11:19:18 -07:00
Anael ORLINSKI a673900b51 fix for multipart upload when using sidecar meta 2026-04-07 23:37:47 +02:00
Jakob van Santen 0559807783 Always write complete files in sidecar meta provider
Some filesystems like dCache don't allow file truncation
2026-03-18 15:29:29 +01:00
Aleksandr Loktionov b78d21c3db fix: optimize sidecar empty-dir checks 2026-01-12 06:51:18 -03:00
Aleksandr Loktionov edac345c23 fix: cleanup sidecar metadata empty dirs 2025-12-29 08:24:05 -03:00
Ben McClelland 04e71c44e9 feat: nometa option to disable bucket/object metadata
This adds a NoMeta MetadataStorer that might be useful for read
only filesystems that are populated with data not from the gateway.
The limitation is that no incoming metadata is stored with the
buckets or objects, and all buckets and objects will only have
default metadata.
2025-01-08 16:19:10 -08:00
Ben McClelland 4025172897 feat: add optional sidecar files for metadata
This adds the option to store metadata for objects and buckets
within a specified directory:
bucket: <sidecar dir>/<bucket>/meta/<attribute>
object: <sidecar dir>/bucket/<object>/meta/<attribute>

Example invocation:
./versitygw -a myaccess -s mysecret posix --sidecar /tmp/sidecar /tmp/gw

The attributes are stored by name within the hidden directory.
2025-01-08 15:47:31 -08:00