v2 API isn't updating image updated_at attribute

Bug #1036507 reported by Brian Waldon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Critical
Iccha Sethi

Bug Description

Notice in the following example that updated_at is the same as created_at, yet the Date header indicates what updated_at should actually be:

curl -i -X PUT -H "X-Auth-Token: $OS_AUTH_TOKEN" -H "Content-Type: application/json" \
       -d '{"login_user": "root"}' \
       $OS_IMAGE_URL/v2/images/ce7aaeea-ca16-4423-8a98-a62b647b3b77

HTTP/1.1 200 OK
Content-Length: 456
Content-Type: application/json; charset=UTF-8
X-Openstack-Request-Id: req-bdd7ff7b-f47c-43eb-84a8-6d1c1b0012a0
Date: Tue, 14 Aug 2012 06:13:47 GMT

{"status": "queued", "name": "Ubuntu 12.10", "tags": ["ubuntu", "quantal", "12.10"], "login_user": "root", "created_at": "2012-08-14T05:57:43Z", "min_ram": 0, "updated_at": "2012-08-14T05:57:43Z", "visibility": "private", "id": "ce7aaeea-ca16-4423-8a98-a62b647b3b77", "protected": false, "file": "/v2/images/ce7aaeea-ca16-4423-8a98-a62b647b3b77/file", "min_disk": 0, "self": "/v2/images/ce7aaeea-ca16-4423-8a98-a62b647b3b77", "schema": "/v2/schemas/image"}

Brian Waldon (bcwaldon)
Changed in glance:
milestone: none → folsom-rc1
Changed in glance:
assignee: nobody → Iccha Sethi (iccha-sethi)
Revision history for this message
Brian Waldon (bcwaldon) wrote :

This appears to only be a problem when a user sets a non-core property (a property that isn't in the Image table). It also affects the v1 API.

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/11431

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

Reviewed: https://review.openstack.org/11431
Committed: http://github.com/openstack/glance/commit/85d8d7af5808a98bbae7b010595e08752d0c9bd0
Submitter: Jenkins
Branch: master

commit 85d8d7af5808a98bbae7b010595e08752d0c9bd0
Author: isethi <email address hidden>
Date: Wed Aug 15 20:20:24 2012 +0000

    Updates Image attribute updated_at

    When the image properties are updated, the image attribute updated_at
    should be updated as well.

    Fixes bug 1036507

    Change-Id: I889eab92e8f182633ab6e462cac1ff7ab0cb1223

Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: folsom-rc1 → 2012.2
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.