Public bug reported:

Note: This issue only occurs if multiple stores are configured in
glance.

Deleting image from particular store, if get_image_location policy is
disabled or it does not match the policy criteria then you will get 500
internal server error.

Steps to reproduce:
1. Verify you have multiple stores configured
2. Create image in all stores using below command
   $ glance image-create-via-import --disk-format qcow2 --container-format bare 
--name policy_test --file <file_path> --all-stores True
3. Disable get_image_location in policy.yaml file and restart glance-api service
4. Delete image from any of the store using below command
   $ glance stores-delete <IMAGE_ID_FROM_STEP_2> --store <store-name>

Expected output:
Unable to delete image '<IMAGE_ID_FROM_STEP_2>' from store '<store-name>'. 
(HTTP 403 Forbidden: You are not authorized to complete get_image_location 
action.)

Actual output: 
Unable to delete image '<IMAGE_ID_FROM_STEP_2>' from store '<store-name>'. 
(HTTP 500 Internal Server Error: The server has either erred or is incapable of 
performing the requested operation.)

** 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/1939977

Title:
  500 error on deleting image from store if get_image_location policy is
  disabled

Status in Glance:
  New

Bug description:
  Note: This issue only occurs if multiple stores are configured in
  glance.

  Deleting image from particular store, if get_image_location policy is
  disabled or it does not match the policy criteria then you will get
  500 internal server error.

  Steps to reproduce:
  1. Verify you have multiple stores configured
  2. Create image in all stores using below command
     $ glance image-create-via-import --disk-format qcow2 --container-format 
bare --name policy_test --file <file_path> --all-stores True
  3. Disable get_image_location in policy.yaml file and restart glance-api 
service
  4. Delete image from any of the store using below command
     $ glance stores-delete <IMAGE_ID_FROM_STEP_2> --store <store-name>

  Expected output:
  Unable to delete image '<IMAGE_ID_FROM_STEP_2>' from store '<store-name>'. 
(HTTP 403 Forbidden: You are not authorized to complete get_image_location 
action.)

  Actual output: 
  Unable to delete image '<IMAGE_ID_FROM_STEP_2>' from store '<store-name>'. 
(HTTP 500 Internal Server Error: The server has either erred or is incapable of 
performing the requested operation.)

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


-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to