← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1939977] Re: 500 error on deleting image from store if get_image_location policy is disabled

 

Reviewed:  https://review.opendev.org/c/openstack/glance/+/804585
Committed: https://opendev.org/openstack/glance/commit/434f881d8c462c314e2ef160823bee651e7de496
Submitter: "Zuul (22348)"
Branch:    master

commit 434f881d8c462c314e2ef160823bee651e7de496
Author: Abhishek Kekane <akekane@xxxxxxxxxx>
Date:   Sun Aug 15 12:23:17 2021 +0000

    Check policies for delete image for store in API
    
    These change enforce policies required for deleting image from store
    in API layer.
    
    Partially-Implements: blueprint policy-refactor
    Closes-Bug: #1939977
    
    Change-Id: If390f04aef00fa4e6dc792658ae5fee9917c7d1f


** Changed in: glance
       Status: In Progress => Fix Released

-- 
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:
  Fix Released

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



References