KeyError: 'default_dns_nameservers' in Horizon

Bug #1843104 reported by Igor D.C.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Akihiro Motoki
kolla-ansible
Invalid
Medium
Unassigned

Bug Description

With:
kolla_base_distro: "ubuntu"
kolla_install_type: "source"
openstack_release: "master"
and images built on 20190820

Trying to:
-> Create a network via Horizon (Create Network dialog)

I get:
-> Instant Horizon "Danger" error
-> "KeyError: 'default_dns_nameservers'" in /var/log/kolla/horizon/horizon.log): http://paste.openstack.org/show/772115/

Right now I'm working around this by: https://github.com/igordcard/homedc/blob/master/scripts/kolla/master/bionic/fix-horizon-default_dns_nameservers-after.sh#L20

Igor D.C. (igordc)
description: updated
Revision history for this message
Mark Goddard (mgoddard) wrote :

It looks like this was caused by https://review.opendev.org/#/c/655208/, which changes the handling of defaults for config in horizon. Since we override the OPENSTACK_NEUTRON_NETWORK variable in local_settings.py, but do not include the default for 'default_dns_nameservers'. A simple workaround for kolla-ansible is to include the default empty list value in our override.

I think this is a bug in horizon though - they should still tolerate missing defaults in dict format config variables.

Changed in kolla-ansible:
importance: Undecided → Medium
Revision history for this message
Mark Goddard (mgoddard) wrote :

I'd expect this to apply also to segmentation_id_range and other fields.

Changed in kolla-ansible:
status: New → Triaged
Revision history for this message
Akihiro Motoki (amotoki) wrote :

This is a bug in horizon. Dict-type settings should use .get() method with the default values from defaults.py (rather than hard-coded default values). I would like to take care of this just after milestone-3 (this Thursday).

Changed in horizon:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Akihiro Motoki (amotoki)
milestone: none → train-rc1
Revision history for this message
Akihiro Motoki (amotoki) wrote :

Note that this is not limited to OPENSTACK_NEUTRON_NETWORK. This affects all dict-type settings.

Revision history for this message
Mark Goddard (mgoddard) wrote :

Thanks for picking this up amotoki.

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

Related fix proposed to branch: master
Review: https://review.opendev.org/684792

Changed in horizon:
status: Triaged → In Progress
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/684793

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Change abandoned by Akihiro Motoki (<email address hidden>) on branch: master
Review: https://review.opendev.org/684798
Reason: Squashed into https://review.opendev.org/#/c/684792/2 to simplify the patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Akihiro Motoki (<email address hidden>) on branch: master
Review: https://review.opendev.org/684797
Reason: Squashed into https://review.opendev.org/#/c/684792/2 to simplify the patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Akihiro Motoki (<email address hidden>) on branch: master
Review: https://review.opendev.org/684796
Reason: Squashed into https://review.opendev.org/#/c/684792/2 to simplify the patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Akihiro Motoki (<email address hidden>) on branch: master
Review: https://review.opendev.org/684795
Reason: Squashed into https://review.opendev.org/#/c/684792/2 to simplify the patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Akihiro Motoki (<email address hidden>) on branch: master
Review: https://review.opendev.org/684794
Reason: Squashed into https://review.opendev.org/#/c/684792/2 to simplify the patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Akihiro Motoki (<email address hidden>) on branch: master
Review: https://review.opendev.org/684793
Reason: Squashed into https://review.opendev.org/#/c/684792/2 to simplify the patch.

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

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

commit ec970fd6e85b19126409ef39aefa013bac701503
Author: Akihiro Motoki <email address hidden>
Date: Wed Sep 25 21:29:05 2019 +0900

    Handle partial dict setting

    In Train cycle, we moved the definition of default values
    to openstack_dashboard/defaults.py. The current code accesses
    a dict member using []. It requires operators to define a dict
    setting with a full member.

    This commit allows to use dict-type settings with partial members.

    A new function is introduced to retrieve a dict-type setting
    considering default values defined in
    {openstack_dashboard,horizon,openstack_auth}/defaults.py

    Change-Id: I7ff0ad4bca698aef9c0eba370b0570200a14367a
    Closes-Bug: #1843104

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
Mark Goddard (mgoddard) wrote :

Thanks for fixing this.

Changed in kolla-ansible:
status: Triaged → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 16.0.0.0rc1

This issue was fixed in the openstack/horizon 16.0.0.0rc1 release candidate.

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.