#114 Support scratch dir on separate mount
Merged by mikem. Opened by mikem.
https://github.com/mikem23/koji-playground.git master

Download 114.patch
no initial comment

Koji supports using different storage volumes for builds, but the scratch directory is restricted to the default volume.

This change replaces os.rename and os.link calls with a call that handles moves across mounts gracefully. This allows admins to make the scratch directory a separate mount.

Maybe re-do the syntax here to raise koji.GenericError("Destination exists: %s" % dst) just to prepare the way for a py3 port some day.

Using python-lockfile this is relatively straightforward with: with lockfile.FileLock(src)

Agreed. Looks sane in general.

2 new commits added

  • unit test for safer_move()
  • update raise syntax in safer_move()

rebased

Pull-Request has been merged by mikem

Metadata