OpenStack Compute (Nova)

shutil.move is erroneously copying data

Reported by Rick Harris on 2012-02-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
High
Rick Harris

Bug Description

We use `shutil.move` to move data in the XenAPI migration script.

The issue is that code runs in a Python 2.4 environment which is still affected by this bug http://bugs.python.org/issue1577 which causes unecessary copying of data when the dst is a directory.

The fix is to either use os.rename directly, or to pass shutil.move a filename as dst rather than a directory.

Changed in nova:
assignee: nobody → Rick Harris (rconradharris)
importance: Undecided → High
status: New → In Progress

Reviewed: https://review.openstack.org/4368
Committed: http://github.com/openstack/nova/commit/043347267bdb2ea49d562d02c03fe8d242b641c9
Submitter: Jenkins
Branch: master

commit 043347267bdb2ea49d562d02c03fe8d242b641c9
Author: Rick Harris <email address hidden>
Date: Tue Feb 21 22:00:03 2012 +0000

    Avoid copying file if dst is a directory.

    Fixes bug 938153

    `shutil.move` in Python 2.4 will fallback to copying the file if dst is
    a directory. See http://bugs.python.org/issue1577.

    Change-Id: I2390337d82db5a72fef0e63877401134b1dcca55

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-02-29
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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