Open
Description
Environment info
- NooBaa Version: VERSION
- Platform: Kubernetes 1.14.1 | minikube 1.1.1 | OpenShift 4.1 | other: specify
on POSIX safe_move function we validate the mtime to the version-id. in case the mtime of the file was changed after it was created (and got a version-id): safe_move will fail on mismatch mtime. this will keep happening no matter how much we try to move because the version-id and mtime do no fit anymore. this may also be the case for the safe_unlink function.
see:
SafeMove, SafeUnlink in fs_nappi.cpp
Actual behavior
1.move fails with internal error
Expected behavior
1.move succeeds
Steps to reproduce
- enable versioning:
s3api put-bucket-versioning --bucket test-bucket --versioning-configuration Status=Enabled
- create a new object:
s3api put-object --bucket test-bucket --key key1
- change mtime of the file:
on linux:
touch -d "5 days ago" ${target_path}
on mac:
touch -t $(date -v -5d +"%Y%m%d%H%M.%S") ${target_path}
- create a new object with the same key:
s3api put-object --bucket test-bucket --key key1
this will try to move the object to the .versions dir