Metadata widget errors and problems with changing metadata

Bug #1572686 reported by Rob Cresswell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Travis Tripp

Bug Description

Seeing the following error in the Update Metadata widget, in both Launch Instance and from Images:

angular.js:11707 TypeError: Cannot read property 'type' of null
    at new MetadataTreeItemController (metadata-tree-item.controller.js:35)
    at Object.invoke (angular.js:4219)
    at extend.instance (angular.js:8525)
    at angular.js:7771
    at forEach (angular.js:334)
    at nodeLinkFn (angular.js:7770)
    at delayedNodeLinkFn (angular.js:8048)
    at compositeLinkFn (angular.js:7149)
    at nodeLinkFn (angular.js:7795)
    at compositeLinkFn (angular.js:7149)

Refers to this line of code: https://github.com/openstack/horizon/blob/b0f3ec3ace531c110f328d208cded302d2617f88/horizon/static/framework/widgets/metadata/tree/metadata-tree-item.controller.js#L35

description: updated
Changed in horizon:
milestone: none → next
Changed in horizon:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Travis Tripp (travis-tripp) wrote :

I'm proposing high for this since it is broken on the ng images.

Changed in horizon:
milestone: next → newton-1
Revision history for this message
Travis Tripp (travis-tripp) wrote :

I don't know if this is related, but metadata tree also should match properties using case insensitive. I've found that Glance v1 create takes all the properties and stores them as lower case. So when you create an image with metadata of FOO=BAR, it will store as foo=bar.

Maybe when we move off to v2 Glance that won't be a problem?

There are some properties "CIM_PASD_InstructionSet" that when created at the same time as creating the image get changed to cim_pasd_instructionset". When displayed in the metadata-display widget, it doesn't recognize them and won't show them.

Revision history for this message
Travis Tripp (travis-tripp) wrote :

I think the two are unrelated, so filed bug: https://bugs.launchpad.net/horizon/+bug/1580790

Changed in horizon:
assignee: nobody → Travis Tripp (travis-tripp)
summary: - Console errors in Metadata widget
+ Metadata widget errors and problems with changing metadata
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/315282

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

Reviewed: https://review.openstack.org/315282
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=6ad36e0e5706f0b0a89269ccfa694dee82fd712c
Submitter: Jenkins
Branch: master

commit 6ad36e0e5706f0b0a89269ccfa694dee82fd712c
Author: Travis Tripp <email address hidden>
Date: Wed May 11 16:58:47 2016 -0600

    Fix existing metadata display in metadata widget

    The metadata widget displays both available and existing
    metadata for a given resource. For example, on images
    you can click "Update Metadata" and it will show you
    all of the metadata that you can apply on the left
    and all the metadata that is already on the image
    on the right. This is basically a vertical transfer
    table.

    Available metadata is structure as a tree and the
    actual properties are "leaf" nodes. When you
    transfer from left to right it is only supposed to
    show actual properties and not the "folders". These
    are the leaf nodes.

    This was handled by filtering with the built in
    angular filter [0] and was relying on a property
    "leaf" to be set to null. However, in doing research,
    I found that the way angular handles null in filtering
    changes between angular versions [0]. I tried various
    options and could not seem to make it work, so this
    patch changes from setting leaf from null to false.

    This fix removes the console log, but also removes
    an issue where sometimes you couldn't remove metadata
    item that had previously been saved.

    [0] http://stackoverflow.com/questions/18644412/angularjs-filter-not-null

    Change-Id: Ib93890d40b8103c378bb806015e50f3baa2b4fc6
    Closes-Bug: 1572686

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

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/316763

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

Reviewed: https://review.openstack.org/316763
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=b398571dceaf990a1c38492a1134ec08312f1f4c
Submitter: Jenkins
Branch: stable/mitaka

commit b398571dceaf990a1c38492a1134ec08312f1f4c
Author: Travis Tripp <email address hidden>
Date: Wed May 11 16:58:47 2016 -0600

    Fix existing metadata display in metadata widget

    The metadata widget displays both available and existing
    metadata for a given resource. For example, on images
    you can click "Update Metadata" and it will show you
    all of the metadata that you can apply on the left
    and all the metadata that is already on the image
    on the right. This is basically a vertical transfer
    table.

    Available metadata is structure as a tree and the
    actual properties are "leaf" nodes. When you
    transfer from left to right it is only supposed to
    show actual properties and not the "folders". These
    are the leaf nodes.

    This was handled by filtering with the built in
    angular filter [0] and was relying on a property
    "leaf" to be set to null. However, in doing research,
    I found that the way angular handles null in filtering
    changes between angular versions [0]. I tried various
    options and could not seem to make it work, so this
    patch changes from setting leaf from null to false.

    This fix removes the console log, but also removes
    an issue where sometimes you couldn't remove metadata
    item that had previously been saved.

    [0] http://stackoverflow.com/questions/18644412/angularjs-filter-not-null

    Change-Id: Ib93890d40b8103c378bb806015e50f3baa2b4fc6
    Closes-Bug: 1572686
    (cherry picked from commit 6ad36e0e5706f0b0a89269ccfa694dee82fd712c)

tags: added: in-stable-mitaka
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 10.0.0.0b1

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

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 9.0.1

This issue was fixed in the openstack/horizon 9.0.1 release.

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.