os.rename fails across mounted devices

Bug #1594932 reported by Curtis Hovey
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-release-tools
Triaged
Low
Unassigned

Bug Description

While investing a test failure on my local system, I discovered there were a few calls to os.rename.
    OSError: [Errno 18] Invalid cross-device link

This error could be a problem because we often rely on extra mounts to gain extra space. As the two offenders are involved with package building and streams, this is a risk we can mitigate with shutil.move.

Revision history for this message
Curtis Hovey (sinzui) wrote :

Aaron suggested we refactor so that the rename is not needed:
   we should get rid of the os.rename, and just update StanzaWriter.filename before writing. os.rename was atomic, and if we're getting rid of that, I don't see why we want to rename into place at all.

Changed in juju-ci-tools:
status: In Progress → Triaged
affects: juju-ci-tools → juju-release-tools
Changed in juju-release-tools:
importance: High → Medium
importance: Medium → Low
Curtis Hovey (sinzui)
Changed in juju-release-tools:
assignee: Curtis Hovey (sinzui) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.