Browsing /horizon/admin/info/ fails if Neutron not installed

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

Bug Description

When browsing to Admin -> System -> System information, as an admin user, if there's no Neutron installed, then Horizon just crashes:

  [ ... snip ... ]

File "/usr/lib/python3/dist-packages/horizon/utils/memoized.py" in wrapped
  176. args.insert(request_index, request_func(request))

File "/usr/share/openstack-dashboard/openstack_dashboard/api/neutron.py" in get_auth_params_from_request
  804. base.url_for(request, 'network'),

File "/usr/share/openstack-dashboard/openstack_dashboard/api/base.py" in url_for
  347. raise exceptions.ServiceCatalogException(service_type)

Exception Type: ServiceCatalogException at /admin/info/
Exception Value: Invalid service catalog: network

After installing Neutron, then things do display correctly.

It'd be nice to fix this.

Note, if this matters, I was using the Rocky package 3:14.0.0-2 under Debian Sid to do this test.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

Most deployments depend on neutron, so the priority would be low.

Changed in horizon:
importance: Undecided → Low
status: New → Confirmed
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/600971

Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
status: Confirmed → In Progress
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → stein-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit e750c9d06066a62eed111b298ddc788bb0919d93
Author: Akihiro Motoki <email address hidden>
Date: Sat Sep 8 19:00:20 2018 +0000

    admin info: check required service for network tab

    Previously the network tab of Admin Info panel did not check
    the availability of the network service.

    Change-Id: I3117b00762a0257f67a34af89ac65f82d4e563ee
    Closes-Bug: #1791296

Changed in horizon:
status: In Progress → Fix Released
Akihiro Motoki (amotoki)
tags: added: rocky-backport-potential
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.

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

This unfortunately doesn't fix the problem. I still get the stack dump.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

Could you provide the full traceback? I have no environment without neutron and it takes time to prepare such environment as nova depends on neutron.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

Okay, I succeeded to reproduce it.

Changed in horizon:
status: Fix Released → Confirmed
assignee: Akihiro Motoki (amotoki) → nobody
milestone: stein-1 → none
Revision history for this message
Akihiro Motoki (amotoki) wrote :

horizon tabs tries to load tabbed tables even if "permissions" attribute and/or "allowed" method says the tab should be disabled. We can do a workaround in admin/info/tables.py but it looks better to fix the root cause.

tags: added: horizon-core
Revision history for this message
Akihiro Motoki (amotoki) wrote :
Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Well, my environment is super simple to reproduce. Take a Debian sid, and do:

apt-get install keystone horizon

just answer to the debconf prompt, everything is fully automated. Then login to Horizon, and you can check by yourself. No need to install either Nova or Neutron.

If you don't want to install in Sid, there's a Stretch backport available from:

deb http://stretch-rocky.debian.net/debian stretch-rocky-backports main
deb http://stretch-rocky.debian.net/debian stretch-rocky-backports-nochange main

Cheers,

Thomas Goirand (zigo)

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/627189

Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
status: Confirmed → In Progress
Revision history for this message
Akihiro Motoki (amotoki) wrote :

The easiest way to reproduce this is to run "openstack service delete network" in DevStack.
Once testing is over, you can recreate "service" and "endpoint" for neutron.

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

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

commit 26b838b7eb17189d1be49bd6d7fa0db0b1c5eed0
Author: Akihiro Motoki <email address hidden>
Date: Mon Dec 24 23:30:17 2018 +0900

    Do not instantiate tables when a tab is not allowed

    This commit chnages TableTab class not to instantiate
    tables when the tab is not allowed.

    Previously table(s) in a tab is always instatiated
    regardless of that the tab is allowed or not.

    We usually hide a tab using "allowed" method or "permissions" attribute
    of the tab. Table(s) in the tab usually assumes that its dependencies
    are satisfied and they are already checked by allowed or permissions.

    Change-Id: I51d92221fdf02d836e1dc9343e85a69109159521
    Closes-Bug: #1791296

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.0b2

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