← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2072483] [NEW] Revert image status to queued if image conversion fails

 

Public bug reported:

When glance has enabled import plugin `image_conversion` and if this
plugin fails to convert the image to its desired format then image
remains in `importing` state forever and also image data remains in
staging area unless you delete that image.

Ideally image data should be deleted from the staging area and image
state should be rolled back to `queued so that user can rectify the
error in previous attempt and import image again.

Environment settings:
Ensure you have glance-direct,web-download method enabled in your glance-api.conf
Ensure you have image_conversion plugin enabled in glance-image-import.conf

How to reproduce:
1. Create bad image file with below command
   qemu-img create -f qcow2 -o data_file=abcdefghigh,data_file_raw=on disk.qcow2 1G
2. Use above file to create image using import workflow
   glance image-create-via-import --disk-format qcow2 --container-format bare --import-method glance-direct --file disk.qcow2 --name test-glance-direct-conversion_1

Expected result:
    Operation should fail, image should be in queued state and image data should be deleted from staging area


Actual result:
    Operation fails, image remains in importing state and image data remains in staging area

** Affects: glance
     Importance: Undecided
     Assignee: Abhishek Kekane (abhishek-kekane)
         Status: In Progress

** Changed in: glance
     Assignee: (unassigned) => Abhishek Kekane (abhishek-kekane)

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

Title:
  Revert image status to queued if image conversion fails

Status in Glance:
  In Progress

Bug description:
  When glance has enabled import plugin `image_conversion` and if this
  plugin fails to convert the image to its desired format then image
  remains in `importing` state forever and also image data remains in
  staging area unless you delete that image.

  Ideally image data should be deleted from the staging area and image
  state should be rolled back to `queued so that user can rectify the
  error in previous attempt and import image again.

  Environment settings:
  Ensure you have glance-direct,web-download method enabled in your glance-api.conf
  Ensure you have image_conversion plugin enabled in glance-image-import.conf

  How to reproduce:
  1. Create bad image file with below command
     qemu-img create -f qcow2 -o data_file=abcdefghigh,data_file_raw=on disk.qcow2 1G
  2. Use above file to create image using import workflow
     glance image-create-via-import --disk-format qcow2 --container-format bare --import-method glance-direct --file disk.qcow2 --name test-glance-direct-conversion_1

  Expected result:
      Operation should fail, image should be in queued state and image data should be deleted from staging area

  
  Actual result:
      Operation fails, image remains in importing state and image data remains in staging area

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



Follow ups