← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1462235] [NEW] File descriptors are left open by the filesystem store

 

Public bug reported:

>From this m-l thread: http://lists.openstack.org/pipermail/openstack-
dev/2015-June/065889.html

I believe what's happening is that the ChunkedFile code opens the file and
creates the iterator.  Nova then starts iterating through the file.

If nova (or any other user of glance) iterates all the way through the file
then the ChunkedFile code will hit the "finally" clause in __iter__() and
close the file descriptor.

If nova starts iterating through the file and then stops (due to running out
of room, for example), the ChunkedFile.__iter__() routine is left with an open
file descriptor.  At this point deleting the image will not actually free up
any space.

I'm not a glance guy so I could be wrong about the code.  The
externally-visible data are:
1) glance-api is holding an open file descriptor to a deleted image file
2) If I kill glance-api the disk space is freed up.
3) If I modify nova to always finish iterating through the file the problem
doesn't occur in the first place.

Chris

** Affects: glance-store
     Importance: High
     Assignee: Flavio Percoco (flaper87)
         Status: New

** Changed in: glance
   Importance: Undecided => High

** Changed in: glance
     Assignee: (unassigned) => Flavio Percoco (flaper87)

** Project changed: glance => glance-store

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1462235

Title:
  File descriptors are left open by the filesystem store

Status in OpenStack Glance backend store-drivers library (glance_store):
  New

Bug description:
  From this m-l thread: http://lists.openstack.org/pipermail/openstack-
  dev/2015-June/065889.html

  I believe what's happening is that the ChunkedFile code opens the file and
  creates the iterator.  Nova then starts iterating through the file.

  If nova (or any other user of glance) iterates all the way through the file
  then the ChunkedFile code will hit the "finally" clause in __iter__() and
  close the file descriptor.

  If nova starts iterating through the file and then stops (due to running out
  of room, for example), the ChunkedFile.__iter__() routine is left with an open
  file descriptor.  At this point deleting the image will not actually free up
  any space.

  I'm not a glance guy so I could be wrong about the code.  The
  externally-visible data are:
  1) glance-api is holding an open file descriptor to a deleted image file
  2) If I kill glance-api the disk space is freed up.
  3) If I modify nova to always finish iterating through the file the problem
  doesn't occur in the first place.

  Chris

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance-store/+bug/1462235/+subscriptions


Follow ups

References