UnhashableKeyWarning in openstack_dashboard.api.nova extension_supported

Bug #1790930 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Akihiro Motoki

Bug Description

When horizon runs with tox -e runserver with python3, the following message is output as an error message. This potentially pollutes the error log file with unnecessary messages.

UnhashableKeyWarning: The key of openstack_dashboard.api.nova extension_supported is not hashable and cannot be memoized: (('Aggregates', (<ListExtResource alias=NMN, description=Multiple network support., links=[], name=Multinic, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=OS-DCF, description=Disk Management Extension., links=[], name=DiskConfig, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=OS-EXT-AZ, description=Extended Availability Zone support., links=[], name=ExtendedAvailabilityZone, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=OS-EXT-IMG-SIZE, description=Adds image size to image listings., links=[], name=ImageSize, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=OS-EXT-IPS, description=Adds type parameter to the ip list., links=[], name=ExtendedIps, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=OS-EXT-IPS-MAC, description=Adds mac address parameter to the ip list., links=[], name=ExtendedIpsMac, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=OS-EXT-SRV-ATTR, description=Extended Server Attributes support., links=[], name=ExtendedServerAttributes, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=OS-EXT-STS, description=Extended Status support., links=[], name=ExtendedStatus, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=OS-FLV-DISABLED, description=Support to show the disabled status of a flavor., links=[], name=FlavorDisabled, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=OS-FLV-EXT-DATA, description=Provide additional data for flavors., links=[], name=FlavorExtraData, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=OS-SCH-HNT, description=Pass arbitrary key/value pairs to the scheduler., links=[], name=SchedulerHints, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=OS-SRV-USG, description=Adds launched_at and terminated_at on Servers., links=[], name=ServerUsage, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-access-ips, description=Access IPs support., links=[], name=AccessIPs, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-admin-actions, description=Enable admin-only server actions

    Actions include: resetNetwork, injectNetworkInfo, os-resetState
    , links=[], name=AdminActions, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-admin-password, description=Admin password management support., links=[], name=AdminPassword, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-agents, description=Agents support., links=[], name=Agents, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-aggregates, description=Admin-only aggregate administration., links=[], name=Aggregates, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-assisted-volume-snapshots, description=Assisted volume snapshots., links=[], name=AssistedVolumeSnapshots, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-attach-interfaces, description=Attach interface support., links=[], name=AttachInterfaces, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-availability-zone, description=1. Add availability_zone to the Create Server API.
       2. Add availability zones describing.
    , links=[], name=AvailabilityZone, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-baremetal-ext-status, description=Add extended status in Baremetal Nodes v2 API., links=[], name=BareMetalExtStatus, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-baremetal-nodes, description=Admin-only bare-metal node administration., links=[], name=BareMetalNodes, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-block-device-mapping, description=Block device mapping boot support., links=[], name=BlockDeviceMapping, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-block-device-mapping-v2-boot, description=Allow boot with the new BDM data format., links=[], name=BlockDeviceMappingV2Boot, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-cell-capacities, description=Adding functionality to get cell capacities., links=[], name=CellCapacities, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-cells, description=Enables cells-related functionality such as adding neighbor cells,

.....

iption=Provide data on migrations., links=[], name=Migrations, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-multiple-create, description=Allow multiple create in the Create Server v2.1 API., links=[], name=MultipleCreate, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-networks, description=Admin-only Network Management Extension., links=[], name=Networks, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-networks-associate, description=Network association support., links=[], name=NetworkAssociationSupport, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-pause-server, description=Enable pause/unpause server actions., links=[], name=PauseServer, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-personality, description=Personality support., links=[], name=Personality, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-preserve-ephemeral-rebuild, description=Allow preservation of the ephemeral partition on rebuild., links=[], name=PreserveEphemeralOnRebuild, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-quota-class-sets, description=Quota classes management support., links=[], name=QuotaClasses, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-quota-sets, description=Quotas management support., links=[], name=Quotas, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-rescue, description=Instance rescue mode., links=[], name=Rescue, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-security-group-default-rules, description=Default rules for security group support., links=[], name=SecurityGroupDefaultRules, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-security-groups, description=Security group support., links=[], name=SecurityGroups, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-server-diagnostics, description=Allow Admins to view server diagnostics through server action., links=[], name=ServerDiagnostics, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-server-external-events, description=Server External Event Triggers., links=[], name=ServerExternalEvents, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-server-group-quotas, description=Adds quota support to server groups., links=[], name=ServerGroupQuotas, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-server-groups, description=Server group support., links=[], name=ServerGroups, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-server-list-multi-status, description=Allow to filter the servers by a set of status values., links=[], name=ServerListMultiStatus, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-server-password, description=Server password support., links=[], name=ServerPassword, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-server-sort-keys, description=Add sorting support in get Server v2 API., links=[], name=ServerSortKeys, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-server-start-stop, description=Start/Stop instance compute API support., links=[], name=ServerStartStop, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-services, description=Services support., links=[], name=Services, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-shelve, description=Instance shelve mode., links=[], name=Shelve, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-simple-tenant-usage, description=Simple tenant usage extension., links=[], name=SimpleTenantUsage, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-suspend-server, description=Enable suspend/resume server actions., links=[], name=SuspendServer, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-tenant-networks, description=Tenant-based Network Management Extension., links=[], name=OSTenantNetworks, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-used-limits, description=Provide data on limited resources that are being used., links=[], name=UsedLimits, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-used-limits-for-admin, description=Provide data to admin on limited resources used by other tenants., links=[], name=UsedLimitsForAdmin, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-user-data, description=Add user_data to the Create Server API., links=[], name=UserData, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-user-quotas, description=Project user quota support., links=[], name=UserQuotas, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-virtual-interfaces, description=Virtual interface support., links=[], name=VirtualInterfaces, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-volume-attachment-update, description=Support for updating a volume attachment., links=[], name=VolumeAttachmentUpdate, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>, <ListExtResource alias=os-volumes, description=Volumes support., links=[], name=Volumes, namespace=http://docs.openstack.org/compute/ext/fake_xml, updated=2014-12-03T00:00:00Z>)), ())

Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → stein-1
assignee: nobody → Akihiro Motoki (amotoki)
importance: Undecided → Medium
tags: added: rocky-backport-potential
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/600203

Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Change abandoned by Ivan Kolodyazhny (<email address hidden>) on branch: master
Review: https://review.openstack.org/600204
Reason: This review is > 4 months without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

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

Reviewed: https://review.openstack.org/600204
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=f9bb10b945c8b00b345e9169ba7faa5d068382a9
Submitter: Zuul
Branch: master

commit f9bb10b945c8b00b345e9169ba7faa5d068382a9
Author: Akihiro Motoki <email address hidden>
Date: Wed Sep 5 19:08:33 2018 +0000

    Avoid UnhashableKeyWarning in api.nova.extension_supported

    In python3, novaclient ListExtResource is not hashable.
    An error message on UnhashableKeyWarning is emitted repeatedly
    and this can pollute error log with unuseful messages.

    A tuple of extension names are now passed to the memoized
    decorator so that the decorator can hash it.

    Change-Id: I7f200ee6ece36767586207dc26aed1325b909226
    Closes-Bug: #1790930

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 15.0.0.0b1

This issue was fixed in the openstack/horizon 15.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.