Can't update image properties with Glance Rocky

Bug #1830301 reported by Andy Botting
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
In Progress
Undecided
MarkMielke

Bug Description

With the Rocky version of Glance, some new READ ONLY image properties were added: os_hash_algo and os_hash_value.
(See https://docs.openstack.org/releasenotes/glance/rocky.html)

Since these were added, it can be impossible for a regular user to update an image from the OpenStack dashboard, because these properties are read-only and can be None, the update image dialog considers the form as incomplete and greys out the 'Update Image' button.

Tags: glance
Ivan Kolodyazhny (e0ne)
Changed in horizon:
status: New → Confirmed
tags: added: glance
Revision history for this message
Andy Botting (andybotting) wrote :

The documentation has configuration setting:

IMAGE_RESERVED_CUSTOM_PROPERTIES
A list of image custom property keys that should not be displayed in the Update Metadata tree.

This sounds perfect, but appears to be not referenced in the code at all. Would be great to be able to use this to filter out those read only properties.

Revision history for this message
MarkMielke (mark-mielke) wrote :

It looks like the code to implement IMAGE_RESERVED_CUSTOM_PROPERTIES got removed as part of this commit:

commit 3c2ce866df58eccb4eef44ae766997236c074ff1
Author: Szymon Wroblewski <email address hidden>
Date: Tue May 19 16:14:59 2015 +0200

    Angularize metadata update modals

    Update table action to use new angular modal dialog.
    Remove "Metadata Update" views.

    Implemenents: blueprint angularize-metadata-update-modals
    Change-Id: I7b3d2eab8c0830dc44a45901981eb0e71009c038

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.opendev.org/676313

Changed in horizon:
assignee: nobody → MarkMielke (mark-mielke)
status: Confirmed → In Progress
Revision history for this message
MarkMielke (mark-mielke) wrote :

I think there should be some built-in support for these new read-only properties, perhaps even showing read-only form fields that don't get posted when updating the custom image properties. However, this is a bigger change.

I've added back an implementation of IMAGE_RESERVED_CUSTOM_PROPERTIES, and tested that the Image Custom Properties form now works in Rocky with this setting:

IMAGE_RESERVED_CUSTOM_PROPERTIES = ['os_hash_algo', 'os_hash_value']

This should buy some time for a proper solution to be worked on. It also re-enables the documented setting in case anybody has need of the underlying functionality for their own custom properties.

Please review, and then we should backport to Stein and Rocky. I am testing with Rocky.

Revision history for this message
Andy Botting (andybotting) wrote :

Thanks MarkMielke, that works well on our Stein dashboard.

I included os_hidden as that seems to be affected too.

IMAGE_RESERVED_CUSTOM_PROPERTIES = [
    'os_hash_algo',
    'os_hash_value',
    'os_hidden'
]

I wonder if any os_* properties should be included.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by MarkMielke (<email address hidden>) on branch: master
Review: https://review.opendev.org/676313
Reason: It looks like Train has removed documentation for this capability, and it looks like this fix isn't needed in Train for the original problem I was having ('os_hash_algo', 'os_hash_value').

I still think this feature was allowed to break, and then the fix was not allowed to be submitted. But, I no longer need this feature, so I will abandon this review and let somebody else take it up if they need this feature returned.

Revision history for this message
MarkMielke (mark-mielke) wrote :

I'll leave this issue open as it was reported against Rocky, and as anybody still on Rocky (or Stein) may still be encountering this issue, and still want a fix. But, for those that can move forwards - Train seems to resolve the underlying problem here, and eliminate the need for us to use IMAGE_RESERVED_CUSTOM_PROPERTIES to work around the problem.

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.