attempt to communicate with non-existent properties

Bug #1468806 reported by Alexey Galkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Niall Bunting

Bug Description

Steps to reproduce:

1. Create new artifact.

POST /v3/artifacts/myartifact/v2.0/drafts HTTP/1.1
Host: 172.18.78.38:9393
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Length: 85

{"description": "This is a sample plugin", "name": "New Artifact", "version": "1" }

2. Trying to update non-existent property via PATCH method.

PATCH /v3/artifacts/myartifact/v2.0/a8c9c8c0-d357-4025-aaa1-5b51f54e74f5 HTTP/1.1
Host: 172.18.78.38:9393
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 99

[{"op": "remove", "path": "/something-non-existent-property/and-another-one", "value": "anydata"}]

Actual result:

HTTP/1.1 500 Internal Server Error
Content-Type: text/plain
Content-Length: 0
Date: Thu, 25 Jun 2015 15:32:30 GMT
Connection: close

Tags: artifacts
Revision history for this message
Alexey Galkin (agalkin) wrote :
Changed in glance:
assignee: nobody → Niall Bunting (niall-bunting)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/200057

Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/200057
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=8f6bdf044106dad9a6d34a79cf466435b23f0be7
Submitter: Jenkins
Branch: master

commit 8f6bdf044106dad9a6d34a79cf466435b23f0be7
Author: Niall Bunting <email address hidden>
Date: Thu Jul 9 12:34:41 2015 +0000

    Catch update to a non-existent artifact property

    Currently if an artifact tries to update a property that does not
    exist it throws an AttributeError causing a 500. This catches that
    exception and causes a ArtifactInvalidProperty returning a 400 error.
    Alerting the user that the property does not exist.

    FastTrack

    Change-Id: I49a385f124236b22360ee07f5adcba27b3c92603
    Closes-bug: 1468806

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → liberty-3
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: liberty-3 → 11.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.