[Bug 1559079] Re: swiftclient.service upload leaks filehandles for large files
Kazufumi Noto
1559079 at bugs.launchpad.net
Thu Mar 16 12:48:41 UTC 2017
** Changed in: python-swiftclient
Status: Confirmed => In Progress
** Changed in: python-swiftclient
Assignee: (unassigned) => Kazufumi Noto (knoto)
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-swiftclient in Ubuntu.
https://bugs.launchpad.net/bugs/1559079
Title:
swiftclient.service upload leaks filehandles for large files
Status in python-swiftclient:
In Progress
Status in python-swiftclient package in Ubuntu:
Confirmed
Bug description:
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/python-swiftclient/+bug/1559079/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list