Bug 1130714 - Completely disabled availability zone cause horizon to trace at availability zones list
Summary: Completely disabled availability zone cause horizon to trace at availability ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: 4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: z5
: 4.0
Assignee: Julie Pichon
QA Contact: Ido Ovadia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-16 17:44 UTC by John Fulton
Modified: 2018-12-06 17:47 UTC (History)
9 users (show)

Fixed In Version: python-django-horizon-2013.2.3-3.el6ost
Doc Type: Bug Fix
Doc Text:
Previously, the Availability Zones tab in the System Info always expected an Availability Zone to have associated hosts. Consequently, the System Info panel would fail to display when the Compute (nova) services for an Availability Zone did not have any hosts, for example, because the zone was disabled. With this update, graceful handling has been added for cases where an existing Availability Zone has no currently associated hosts. As a result, System Info panel is displayed correctly, even when an Availability Zone is disabled.
Clone Of:
Environment:
Last Closed: 2014-10-22 18:23:35 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1696 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform 4 Bug Fix Advisory 2014-10-22 22:22:32 UTC
OpenStack gerrit 89569 None None None Never
Launchpad 1297920 None None None Never

Description John Fulton 2014-08-16 17:44:33 UTC
* Description of problem:

A strategic customer has a problem which was caused by the following upstream bug:

 https://code.launchpad.net/bugs/1297920

This has been verified by manually applying this patch:

 https://git.openstack.org/cgit/openstack/horizon/commit/?id=306c5ca86c149a864692bb311488ef8ab08d1c27

I am requesting that this be backported to OSP4 and that the customer receive a hotfix. 

* Version-Release number of selected component (if applicable):

 python-django-horizon-2013.2.3-1.el6ost

* Steps to Reproduce:
1. Create host aggregate and availability zone (nova aggreage-create some some)
2. Add some (at least one) host to that host aggregate (nova aggreage-add-host some compute_host)
3. Disable service at all compute_hosts (nova service-disable compute_host nova-compute)
4. Go to (in dashboard) Admin -> System Info -> Availability Zones

* Expected results:
Output with list of availabilizy zones

* Actual results:

The following is pasted from the above referenced launchpad bug (1297920). 

"""
TemplateSyntaxError at /admin/info/

'NoneType' object has no attribute 'items'

Request Method: GET
Request URL: http://dashboard.local/horizon/admin/info/
Django Version: 1.5.4
Exception Type: TemplateSyntaxError
Exception Value:

'NoneType' object has no attribute 'items'

Exception Location: /usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/info/tables.py in get_hosts, line 60
Python Executable: /usr/bin/python
Python Version: 2.7.3
Python Path:

['/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../..',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/share/openstack-dashboard/',
 '/usr/share/openstack-dashboard/openstack_dashboard']

Server time: [redacted]

P. S.
+------------------+------+-----------+----------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+------+-----------+----------+-------+----------------------------+-----------------+
| nova-scheduler | pp1 | internal | enabled | up | 2014-03-26T15:54:34.000000 | None |
| nova-consoleauth | pp1 | internal | enabled | up | 2014-03-26T15:54:32.000000 | None |
| nova-conductor | pp1 | internal | enabled | up | 2014-03-26T15:54:39.000000 | None |
| nova-cert | pp1 | internal | enabled | up | 2014-03-26T15:54:35.000000 | None |
| nova-compute | pp7 | test,nova | disabled | up | 2014-03-26T15:54:34.000000 | None |
| nova-compute | pp4 | nova | enabled | up | 2014-03-26T15:54:33.000000 | None |
| nova-compute | pp3 | nova | enabled | up | 2014-03-26T15:54:39.000000 | None |
+------------------+------+-----------+----------+-------+----------------------------+-----------------+
"""

Additional info:
I will be happy to provide whatever else you require.

Comment 2 Julie Pichon 2014-08-18 10:21:19 UTC
Thank you for including the link to upstream, this is incredibly helpful.

Comment 3 Julie Pichon 2014-08-18 10:29:34 UTC
How to test:
------------

1. Disable the services for an existing zone:

$ nova service-list
+------------------+-----------------------+----------+---------+-------+----------------------------+-----------------+
| Binary           | Host                  | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+------------------+-----------------------+----------+---------+-------+----------------------------+-----------------+
| nova-conductor   | localhost.localdomain | internal | enabled | up    | 2014-08-07T12:07:10.000000 | -               |
| nova-compute     | localhost.localdomain | nova     | enabled | up    | 2014-08-07T12:07:16.000000 | -               |
| nova-cert        | localhost.localdomain | internal | enabled | up    | 2014-08-07T12:07:10.000000 | -               |
| nova-scheduler   | localhost.localdomain | internal | enabled | up    | 2014-08-07T12:07:10.000000 | -               |
| nova-consoleauth | localhost.localdomain | internal | enabled | up    | 2014-08-07T12:07:10.000000 | -               |
+------------------+-----------------------+----------+---------+-------+----------------------------+-----------------+

$ nova service-disable localhost.localdomain nova-compute

2. In Horizon, log in as admin and navigate to Admin -> System Info

3. All the tabs are displayed. The AZ tab indicates that the zone (e.g. 'nova' here) is not available.

Comment 6 Ido Ovadia 2014-10-07 15:26:01 UTC
Verified
========
python-django-horizon-2013.2.4-1.el6ost.noarch

Comment 8 errata-xmlrpc 2014-10-22 18:23:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2014-1696.html


Note You need to log in before you can comment on or make changes to this bug.