Error retrieving containers

Bug #1981615 reported by Juan Moyano
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Zun UI
Fix Released
Undecided
Tamas Gergely Peter

Bug Description

When I go to Containers menu in the Dashboard, there are no containers listed, even though container information is being returned by the API. The console shows the following error:

output.50d08d0a0ec4.js:1568 Uncaught (in promise) TypeError: apiService.get(...).error is not a function
    at Object.getContainers (output.50d08d0a0ec4.js:1568:118)
    at ResourceType.getContainersPromise [as list] (output.50d08d0a0ec4.js:1537:50)
    at listResources (output.50d08d0a0ec4.js:628:66)
    at resolve (output.50d08d0a0ec4.js:626:6)

I'm attaching a screenshot of the data being sent back by the API.

Possible Solution:
From what I can see in the source of the other plugins, instead of apiService.get().error() in /zun_ui/static/dashboard/container/zun.service.js, apiService.get().catch() should be used.

-OS:
Ubuntu 20.04.4 LTS
-OpenStack Installation from Devstack repo:
https://opendev.org/openstack/devstack
-Relevant local.conf options:
enable_plugin zun https://opendev.org/openstack/zun $TARGET_BRANCH
enable_plugin zun-tempest-plugin https://opendev.org/openstack/zun-tempest-plugin
enable_plugin devstack-plugin-container https://opendev.org/openstack/devstack-plugin-container $TARGET_BRANCH
ENABLE_CONTAINERD_CRI=True
KURYR_CAPABILITY_SCOPE=global
KURYR_PROCESS_EXTERNAL_CONNECTIVITY=False
enable_plugin kuryr-libnetwork https://opendev.org/openstack/kuryr-libnetwork $TARGET_BRANCH
LIBS_FROM_GIT="python-zunclient"
enable_plugin zun-ui https://opendev.org/openstack/zun-ui $TARGET_BRANCH

Revision history for this message
Juan Moyano (juan-moyano) wrote :
Changed in zun-ui:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun-ui (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/zun-ui/+/863518

Changed in zun-ui:
status: Confirmed → In Progress
Changed in zun-ui:
assignee: nobody → Tamas Gergely Peter (tamasgp)
Revision history for this message
hongbin (hongbin034) wrote :

It seems the root cause is the new AngularJS v1.8.2 requirements. @Tamas's patch fixes one error. Need to revisit if any other breakage due to AngularJS v1.8.2

FYI, below is the Horizon's fix.

commit f044c4b0a30da4b4b5e3df1b7888811efddce447
Author: Tatiana Ovchinnikova <email address hidden>
Date: Tue May 24 15:28:38 2022 -0500

    Migrate to AngularJS v1.8.2

    This patch aligns current code with AngularJS v1.8.2 requirements.

    Change-Id: Ifdad18e805953957bfaa1b42908dfbbe8976dbcb

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

Reviewed: https://review.opendev.org/c/openstack/zun-ui/+/863518
Committed: https://opendev.org/openstack/zun-ui/commit/1600023614ef793f74eb8436da10ae87e936130a
Submitter: "Zuul (22348)"
Branch: master

commit 1600023614ef793f74eb8436da10ae87e936130a
Author: Tamas Gergely Peter <email address hidden>
Date: Thu Nov 3 13:01:34 2022 +0000

    Fix apiService .error() calls

    Changed all calls of apiService(xxx).error() methods to the
    new .catch(function onError() {}) format.

    Closes-Bug: #1981615
    Change-Id: Ib2f58f8eb58b1bb3a6893cf02b8a0952394bcb54

Changed in zun-ui:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/zun-ui 11.0.0.0rc1

This issue was fixed in the openstack/zun-ui 11.0.0.0rc1 release candidate.

Revision history for this message
Buddhika Sanjeewa (bsanjeewa) wrote :

Is there any chance that this patch would be backported to zed as well?

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.