twoliter icon indicating copy to clipboard operation
twoliter copied to clipboard

tar: file changed as we read it

Open bcressey opened this issue 10 months ago • 0 comments

I've noticed occasional build failures with VMware variants because of errors like this:

tar: bottlerocket-vmware-k8s-1.31-x86_64-1.34.0-f3d88ccc6.vmdk: file changed as we read it

I'm pretty sure this happens if we get a sequence like this:

  1. rpm2img, rpm2kmodkit, rpm2migrations all start
  2. rpm2img creates the VMDK file
  3. rpm2kmodkit or rpm2migrations finishes
  4. rpm2img starts the OVA creation
  5. the recursive chown of everything in /output starts
  6. rpm2img observes the VMDK change from root:root to builder:builder - error!

In theory any of these stages could finish first, then disrupt a tar operation in progress in one of the other stages when it runs chown.

bcressey avatar Mar 06 '25 00:03 bcressey