Image metadata deletion doesn't work from the Update Metadata widget

Bug #1618578 reported by Brad Pokorny
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Matt Borland

Bug Description

Deleting image metadata doesn't work from the Update Metadata widget when deleting metadata items that have existing metadata definitions. It works for deleting custom metadata items.

Steps to reproduce:

Start with the latest master Horizon code as of 8/30/16.

- To to Project -> Compute -> Images.
- Select the "Update Metadata" button for an image.
- If you have metadata definitions defined in your glance installation, you should see categories for existing metadata definitions under "Available Metadata".
- Add a metadata item from the "Available Metadata" categories, such as "Common Operating System Properties" -> "OS Version". Give it a value and Save the change. This works fine.
- Select the "Update Metadata" button for the same image and note that the metadata item you just added (such as os_version) now appears in the "Existing Metadata" section.
- Remove the metadata item and click Save.
- No errors are displayed and no errors are written to the Horizon logs.
- Select the "Update Metadata" button for the same image and note that the metadata item you just tried to remove is still there.

A workaround for this is to enable the angular images feature and use "Edit Image" -> Metadata to delete metadata items. It works fine from that screen.

Brad Pokorny (bpokorny)
tags: added: angularjs glance
description: updated
Timur Sufiev (tsufiev-x)
Changed in horizon:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → newton-rc1
Revision history for this message
Itxaka Serrano (itxaka) wrote :

This does not happen with custom metadata definitions.

And the issue is here: https://github.com/openstack/horizon/blob/master/openstack_dashboard/static/app/core/metadata/modal/modal.controller.js#L60-L67

Which was introduced by https://bugs.launchpad.net/horizon/+bug/1606988 trying to solve a similar issue.

Changed in horizon:
assignee: nobody → surbhi sarda (surbhisarda)
Revision history for this message
surbhi sarda (surbhisarda) wrote :

Is this bug a duplicate of https://bugs.launchpad.net/horizon/+bug/1606988 ? or else can i work on it?

Changed in horizon:
milestone: newton-rc1 → next
Changed in horizon:
milestone: next → newton-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
assignee: surbhi sarda (surbhisarda) → Matt Borland (palecrow)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/375078
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=2425e6e860932514c963844dfab6d24b023883bf
Submitter: Jenkins
Branch: master

commit 2425e6e860932514c963844dfab6d24b023883bf
Author: Matt Borland <email address hidden>
Date: Thu Sep 22 13:40:29 2016 -0600

    Fix metadata removal

    This fixes the case where known metadata types were not being removed
    upon saving. When trying to apply name changes to the provided value,
    the work was done out of order, causing the item to be taken out
    of the 'removed' list.

    Change-Id: I0058ce369a9616b4c49f3d6d1a54cf69144e2f0c
    Co-Authored-By: Matt Wood <email address hidden>
    Closes-Bug: 1618578

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/375515

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/newton)

Reviewed: https://review.openstack.org/375515
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=02ceefd81be29ca60acd05ba1677eb1c8eaae4e0
Submitter: Jenkins
Branch: stable/newton

commit 02ceefd81be29ca60acd05ba1677eb1c8eaae4e0
Author: Matt Borland <email address hidden>
Date: Thu Sep 22 13:40:29 2016 -0600

    Fix metadata removal

    This fixes the case where known metadata types were not being removed
    upon saving. When trying to apply name changes to the provided value,
    the work was done out of order, causing the item to be taken out
    of the 'removed' list.

    Change-Id: I0058ce369a9616b4c49f3d6d1a54cf69144e2f0c
    Co-Authored-By: Matt Wood <email address hidden>
    Closes-Bug: 1618578
    (cherry picked from commit 2425e6e860932514c963844dfab6d24b023883bf)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 10.0.0.0rc2

This issue was fixed in the openstack/horizon 10.0.0.0rc2 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 11.0.0.0b1

This issue was fixed in the openstack/horizon 11.0.0.0b1 development milestone.

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.