Image delete notification sends old image info instead of deleted image info

Bug #1041332 reported by Iccha Sethi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Medium
Ian Cordasco

Bug Description

One of the earlier commits(51faf289) introduced this change:

- image = registry.delete_image_metadata(req.context, id)
+ registry.delete_image_metadata(req.context, id)

so later when notification is sent out

 self.notifier.info('image.delete', image)

it sends the old image info instead of deleted image info. This in turn results in the image having fields with deleted=False and deleted_at=null

Changed in glance:
assignee: nobody → Iccha Sethi (iccha-sethi)
Revision history for this message
Iccha Sethi (iccha-sethi) wrote :

The earlier commit wanted to ensure that image properties are sent in the notification.

Changed in glance:
status: New → In Progress
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/11945

Brian Waldon (bcwaldon)
Changed in glance:
importance: Undecided → Medium
Changed in glance:
status: In Progress → Confirmed
Changed in glance:
assignee: Iccha Sethi (iccha-sethi) → nobody
Revision history for this message
Mark Washenberger (markwash) wrote :

If deleted_at is not present, it should be almost exactly the same to simply use the "timestamp" field in the notification.

Revision history for this message
Mark Washenberger (markwash) wrote :

I can't see any good reason to include "deleted" and "deleted_at" in image.delete notifications. They answer questions that have no legitimate reason for being asked. To be clear, if you see an image.deleted notification, then implicitly deleted = True. The time it was deleted is the same as the timestamp when the notification was generated.

So now we just need to remove the "deleted" and "deleted_at" fields from the notifications in the domain layer.

Changed in glance:
milestone: none → grizzly-rc1
Changed in glance:
assignee: nobody → Mark Washenberger (markwash)
Changed in glance:
milestone: grizzly-rc1 → none
tags: added: grizzly-rc-potential
Mark McLoughlin (markmc)
tags: added: grizzly-backport-potential
tags: removed: grizzly-backport-potential
Thierry Carrez (ttx)
tags: added: grizzly-backport-potential
removed: grizzly-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in glance:
assignee: Mark Washenberger (markwash) → Justin Shepherd (jshepher)
status: Confirmed → In Progress
Revision history for this message
Iccha Sethi (iccha-sethi) wrote :

Justin,

A related bug has been reported https://bugs.launchpad.net/glance/+bug/1201701.

Since you already have a patch up for it, would you like to restore it?

Revision history for this message
Justin Shepherd (jshepher) wrote : Re: [Bug 1041332] Re: Image delete notification sends old image info instead of deleted image info

Yeah.. I'll restore the merge-prop

Sent from my iPhone

> On Nov 24, 2013, at 12:06, "Iccha Sethi" <email address hidden> wrote:
>
> Justin,
>
> A related bug has been reported
> https://bugs.launchpad.net/glance/+bug/1201701.
>
> Since you already have a patch up for it, would you like to restore it?
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1041332
>
> Title:
> Image delete notification sends old image info instead of deleted
> image info
>
> Status in OpenStack Image Registry and Delivery Service (Glance):
> In Progress
>
> Bug description:
> One of the earlier commits(51faf289) introduced this change:
>
>
> - image = registry.delete_image_metadata(req.context, id)
> + registry.delete_image_metadata(req.context, id)
>
> so later when notification is sent out
>
> self.notifier.info('image.delete', image)
>
> it sends the old image info instead of deleted image info. This in
> turn results in the image having fields with deleted=False and
> deleted_at=null
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/glance/+bug/1041332/+subscriptions

Revision history for this message
Justin Shepherd (jshepher) wrote :

Actually looking at the old fix.. I am not sure it is a good solution.

Alan Pevec (apevec)
tags: removed: grizzly-backport-potential
Ian Cordasco (icordasc)
Changed in glance:
assignee: Justin Shepherd (jshepher) → nobody
status: In Progress → Triaged
tags: added: propose-close
Ian Cordasco (icordasc)
Changed in glance:
assignee: nobody → Ian Cordasco (icordasc)
Revision history for this message
Erno Kuvaja (jokke) wrote :

Cleaning up, lets open this again if it is still an issue.

Changed in glance:
status: Triaged → Invalid
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.