Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1414806

Summary: UI crashes when showing "system information" if a service has a timestamp of "null"
Product: Red Hat OpenStack Reporter: Eric Harney <eharney>
Component: python-cinderclientAssignee: Eric Harney <eharney>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: high Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: adhingra, aortega, athomas, eharney, jruzicka, lruzicka, mrunge, nlevinki, opavlenk, srevivo
Target Milestone: z2Keywords: ZStream
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-cinderclient-1.9.0-5.el7ost Doc Type: Bug Fix
Doc Text:
When users tried to display "Service information" in horizon, the python-cinderclient service pointed to an empty value and returned a TemplateSyntaxError. Consequently, horizon reported the error and did not show the requested information. The problem has been fixed. As a result, python-cinderclient no longer reports the error and horizon displays service information correctly.
Story Points: ---
Clone Of: 1412868 Environment:
Last Closed: 2017-03-01 13:38:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1412868    

Description Eric Harney 2017-01-19 14:05:55 UTC
+++ This bug was initially created as a clone of Bug #1412868 +++

Description of problem:

If there is a service configured in openstack with a timestamp of "null", the UI crashes when a user click on "system information". Obviously the dashboard cannot handle the null value of service timestamp.
Version-Release number of selected component (if applicable):
Redhat OpenStack 9 Platform

How reproducible:
Repeatedly and verified.

Steps to Reproduce:
1.Example:
If there is a cinder service configured, that did not start, and has no "updated_at" timestamp, the value of this timestamp is null and breaks the UI.
If you run "cinter service-list", you can check this updated_at timestamp. This value is getting retrieved in the overview of the "system information" UI, and causes the UI to crash if it is "null" for any service shown there.

I hit this issue when reconfiguring my services, and one of the services was created but not started for a first time.

--snip--

Actual results:

Horizon not able to handle null values in variables.

Expected results:

Horizon should be able to handle null values in variables.

Additional info:

--- Additional comment from Radomir Dopieralski on 2017-01-13 11:14:01 EST ---

I think I managed to reproduce the error, but the problem is actually not in Horizon, but in python-cinderclient:

...
  File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 381, in get_data
    data = self.get_raw_data(datum)
  File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 363, in get_raw_data
    "%(obj)s.") % {'attr': self.transform, 'obj': datum}
  File "/usr/lib/python2.7/site-packages/django/utils/functional.py", line 178, in __mod__
    return six.text_type(self) % rhs
  File "/usr/lib/python2.7/site-packages/cinderclient/v2/services.py", line 25, in __repr__
    return "<Service: %s>" % self.service
  File "/usr/lib/python2.7/site-packages/cinderclient/openstack/common/apiclient/base.py", line 505, in __getattr__
    raise AttributeError(k)
TemplateSyntaxError: service


It looks like it's referencing a non-existing attribute "service" on the service object.

Comment 7 nlevinki 2017-02-28 13:51:23 UTC
https://rhos-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/RHOS/view/RHOS10/job/qe-phase2-10_director-rhel-7.3-virthost-1cont_1comp_1ceph-ipv4-vxlan-ceph/76/

All regression tests passed with no errors and the right rpm is in the puddle.

Comment 9 errata-xmlrpc 2017-03-01 13:38:03 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-2017-0356.html

Comment 10 Radomir Dopieralski 2017-03-02 12:56:13 UTC
I can see the cinderclient code is updated and doesn't contain the problematic lines anymore.