[Bug 1559079] [NEW] swiftclient.service upload leaks filehandles for large files
Chris Stratford
chris.stratford at canonical.com
Fri Mar 18 12:59:27 UTC 2016
Public bug reported:
When uploading large files (i.e. multi-segment ones) using the
swiftclient.service functions, if you pass a file path instead of a file
object it seems to leave the files open after upload.
For example:
tmpfile = "/tmp/wibble"
obj = SwiftUploadObject(tmpfile, object_name=tmpfile)
swift.upload(container="mycontainer", objects=[obj])
After this, lsof shows /tmp/wibble is still open (multiple times)
This approach works around the problem:
with open(tmpfile, "r") as f:
obj = SwiftUploadObject(f, object_name=tmpfile)
swift.upload(container=container, objects=[obj]):
While I've seen this on the wily packaged version, it also appears to be
a problem in the upstream (3.0) python module.
$ lsb_release -rd
Description: Ubuntu 15.10
Release: 15.10
$ apt-cache policy python-swiftclient
python-swiftclient:
Installed: 1:2.6.0-1ubuntu1
Candidate: 1:2.6.0-1ubuntu1
Version table:
*** 1:2.6.0-1ubuntu1 0
500 http://gb.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
100 /var/lib/dpkg/status
** Affects: python-swiftclient (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to python-swiftclient in Ubuntu.
https://bugs.launchpad.net/bugs/1559079
Title:
swiftclient.service upload leaks filehandles for large files
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-swiftclient/+bug/1559079/+subscriptions
More information about the Ubuntu-server-bugs
mailing list