os.rename fails across mounted devices
Bug #1594932 reported by
Curtis Hovey
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.
Changed in juju-release-tools: | |
importance: | High → Medium |
importance: | Medium → Low |
Changed in juju-release-tools: | |
assignee: | Curtis Hovey (sinzui) → nobody |
To post a comment you must log in.
Aaron suggested we refactor so that the rename is not needed: 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.
we should get rid of the os.rename, and just update StanzaWriter.