Error in admin Network Details page when dhcp_agent_scheduler not enabled

Bug #1498277 reported by Janet Yu
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Yosef Hoffman

Bug Description

If the Neutron dhcp_agent_scheduler extension is not enabled, when viewing the Network Details page for a network under Admin > System > Networks, an error message is thrown that says "Unable to list dhcp agents hosting network". It should not be an error if there are intentionally no DHCP agents.

Janet Yu (jwy)
Changed in horizon:
assignee: nobody → Janet Yu (jwy)
Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

Removed assignee due to inactivity.

Changed in horizon:
assignee: Janet Yu (jwy) → nobody
tags: added: low-hanging-fruit neutron
Changed in horizon:
status: New → Confirmed
milestone: none → next
importance: Undecided → Low
Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

This should be a fairly trivial fix. The get_agents_data[1] function needs to check that the extension is enabled first[2], and should only print an error message if the extension is enabled, but nothing could be retrieved. If the extension is not enabled, we can fail silently (or probably just hide the agents table entirely)

1. https://github.com/openstack/horizon/blob/b0f3ec3ace531c110f328d208cded302d2617f88/openstack_dashboard/dashboards/admin/networks/views.py#L132

2. "api.neutron.is_extension_supported(self.request, 'dhcp_agent_scheduler')"

Changed in horizon:
assignee: nobody → Yosef Hoffman (yh128t)
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/313100

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/313100
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=e33cbd6d6cfcdfe893a1d1e4ddf3bef7b8c929c2
Submitter: Jenkins
Branch: master

commit e33cbd6d6cfcdfe893a1d1e4ddf3bef7b8c929c2
Author: Yosef Hoffman <email address hidden>
Date: Mon May 16 10:12:10 2016 -0400

    Don’t error if dhcp_agent_scheduler not enabled

    First check to see if dhcp_agent_scheduler is enabled before attempting
    to list dhcp agents hosting network. If it is not enabled, just return
    an empty list. Also updated tests as necessary.

    Change-Id: I5f14a5c364f8f1f362f788fb005fb773cae7b9f4
    Closes-Bug: #1498277

Changed in horizon:
status: In Progress → Fix Released
Changed in horizon:
milestone: next → newton-1
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.

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.