Describe the bug
Sometimes the Pack workflow artifact of the e2e workflow fails with the error:
tar: share/rootfs.img: file changed as we read it
Error: Process completed with exit code 1.
Initially I assumed that Firecracker was running, so it makes sense. However, the error persists even after adding a previous step which stops Firecracker. I assumed that the file system cache has something to do with it, so I added a call to sync in said step.
After these fixes, the error is much more rear but still appears occasionally.
Working environment
- All possible configurations
To Reproduce
Have an e2e workflow running. The failure appears on one out of ten runs or so.
Expected behavior
rootfs.img is not used by Firecracker or mounted at that point of the workflow, so tar should not observe modifications while it's reading it.