← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1371121] [NEW] Glance image-create stuck in SAVING state and when deleted image remains on the filesystem

 

Public bug reported:

I'm using Icehouse (Ubuntu 14.04) and a directory as a backend is
configured in Glance to store images.

When I perform image-create and it takes a long period of time, glance
ends up with "NotAuthenticated: Authentication required" exception and
"Failed to upload image" in logs. Later glance reports "Unable to kill
image" because of the very same error "NotAuthenticated" and because
previous action failed and generally it makes the image to stuck in
SAVING state.

More magic is after deleting that broken image. Glance reports that the
image was deleted successfully and there is no error in logs, but it
turns out only data from the DB was removed, but the image itself (file
in the directory) remains untouched. It's not longer visible in glance
image-list, but is still in glance's images directory.

NotAuthenticated error is probably caused by Keystone tokens. When I
increased keystone token expiration time it looks like the amount of
time to cause very same situation was also increased. However, when I
was uploading multiple images during the same session in Horizon I ended
up with all successfull image-create except the last one which was
during the time when the token should expire, so still it's an issue.

Nevertheless, Glance should do the whole cleanup properly even if the
image is in e.g. SAVING state and it should look for a file matching
that broken image and purge it from the disk, if such file exists.

** Affects: glance
     Importance: Undecided
         Status: New

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

Title:
  Glance image-create stuck in SAVING state and when deleted image
  remains on the filesystem

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  I'm using Icehouse (Ubuntu 14.04) and a directory as a backend is
  configured in Glance to store images.

  When I perform image-create and it takes a long period of time, glance
  ends up with "NotAuthenticated: Authentication required" exception and
  "Failed to upload image" in logs. Later glance reports "Unable to kill
  image" because of the very same error "NotAuthenticated" and because
  previous action failed and generally it makes the image to stuck in
  SAVING state.

  More magic is after deleting that broken image. Glance reports that
  the image was deleted successfully and there is no error in logs, but
  it turns out only data from the DB was removed, but the image itself
  (file in the directory) remains untouched. It's not longer visible in
  glance image-list, but is still in glance's images directory.

  NotAuthenticated error is probably caused by Keystone tokens. When I
  increased keystone token expiration time it looks like the amount of
  time to cause very same situation was also increased. However, when I
  was uploading multiple images during the same session in Horizon I
  ended up with all successfull image-create except the last one which
  was during the time when the token should expire, so still it's an
  issue.

  Nevertheless, Glance should do the whole cleanup properly even if the
  image is in e.g. SAVING state and it should look for a file matching
  that broken image and purge it from the disk, if such file exists.

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


Follow ups

References