diff --git a/zuul_registry/filesystem.py b/zuul_registry/filesystem.py index 6cdb102..cedc76f 100644 --- a/zuul_registry/filesystem.py +++ b/zuul_registry/filesystem.py @@ -52,6 +52,8 @@ class FilesystemDriver(storageutils.StorageDriver): else: for chunk in data: f.write(chunk) + f.flush() + os.fsync(f.fileno()) def get_object(self, path): path = os.path.join(self.root, path) @@ -117,6 +119,8 @@ class FilesystemDriver(storageutils.StorageDriver): if not d: break outf.write(d) + outf.flush() + os.fsync(outf.fileno()) for chunk in chunks: chunk_path = os.path.join(self.root, chunk['path']) os.unlink(chunk_path)