← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1674846] Re: using glance v2 api does not remove temporary files

 

hi, I tried to reproduce this bug on the master branch but not succeed.
I think it is already fixed by [1].
So when you try to create an image using django(leagcy) way, it will create a
temporary file which will be deleted once the upload is completed[2].


[1] https://review.opendev.org/c/openstack/horizon/+/703632
[2] https://github.com/openstack/horizon/blob/master/openstack_dashboard/api/glance.py#L517

If you still face the same issue, please add more steps to reproduce it.

** Changed in: horizon
       Status: New => Incomplete

** No longer affects: horizon

** Also affects: horizon
   Importance: Undecided
       Status: New

** Changed in: horizon
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1674846

Title:
  using glance v2 api does not remove temporary files

Status in OpenStack Dashboard (Horizon):
  Incomplete
Status in OpenStack Security Advisory:
  Incomplete

Bug description:
  Currently if you are using Glance v2 with TemporaryUploadedFile
  (legacy mode?) the temporary file created on disk is never removed.
  This will eventually cause the machine to run out of tmp disk space.

  The issue is that if Glance v2 is used, the code never calls image_update which is responsible for deleting the temporary file.
  https://github.com/openstack/horizon/blob/446e5aefb4354c9092d1cbc5ff258ee74558e769/openstack_dashboard/api/glance.py#L439
  https://github.com/openstack/horizon/blob/446e5aefb4354c9092d1cbc5ff258ee74558e769/openstack_dashboard/api/glance.py#L349

  Either the function image_update should always be called, or if data
  is a TemporaryUploadedFile object, the call should always try to
  delete the temporary file once done.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1674846/+subscriptions