Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1110746 - Daily usage do not check date range validity
Daily usage do not check date range validity
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon (Show other bugs)
5.0 (RHEL 7)
Unspecified Unspecified
medium Severity medium
: ga
: 7.0 (Kilo)
Assigned To: Matthias Runge
Ido Ovadia
: Reopened, Triaged, ZStream
Depends On: 1106385
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-18 07:22 EDT by Matthias Runge
Modified: 2015-08-05 09:12 EDT (History)
5 users (show)

See Also:
Fixed In Version: python-django-horizon-2015.1.0-7.el7ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1106385
Environment:
Last Closed: 2015-08-05 09:12:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1331427 None None None Never
OpenStack gerrit 107011 None None None Never
Red Hat Product Errata RHEA-2015:1548 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement Advisory 2015-08-05 13:07:06 EDT

  None (edit)
Description Matthias Runge 2014-06-18 07:22:20 EDT
+++ This bug was initially created as a clone of Bug #1106385 +++

Description of problem:
A custome report is generated for the dates between From and To.
If the range is illogical, a blank search resolt is being returned, but a search still occures. The ranges here should be protected, so for example a user should be able to insert
From: Steak and Kidney Pie
To: -1000-01-01
which returns a 500 response.

Version-Release number of selected component (if applicable):
python-django-horizon-2014.1-7.el7ost.noarch

How reproducible:
Always

Steps to Reproduce:
1. go to Resources Usage > Daily Usage
2. select as range Other
3. Enter From: something silly
4. Enter To: something sillier

Actual results:
Something Went Wrong message.

Expected results:
a warning saying that ranges are not valid
ranges should be protected. a good range here might be from EPOC to 2025 and date format only.

Additional info:
2014-06-09 08:30:06,544 31597 ERROR django.request Internal Server Error: /dashboard/admin/metering/report
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 38, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 86, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 54, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 38, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 86, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 162, in post
    return self.get(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 154, in get
    handled = self.construct_tables()
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 137, in construct_tables
    tables = self.get_tables().values()
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/metering/views.py", line 106, in get_tables
    project_data = self.load_data(self.request)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/metering/views.py", line 153, in load_data
    3600 * 24)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/metering/views.py", line 246, in query_data
    date_options)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/metering/views.py", line 225, in _calc_date_args
    raise ValueError("The dates haven't been "
ValueError: The dates haven't been recognized

--- Additional comment from Matthias Runge on 2014-06-18 05:01:36 EDT ---

I can not reproduce it. 
The error message is: Error: Invalid date format: Using today as default.

--- Additional comment from Amit Ugol on 2014-06-18 05:03:49 EDT ---

I can reproduce it on the version that I mentioned. What version are you testing it on?

--- Additional comment from Matthias Runge on 2014-06-18 07:21:32 EDT ---

Nah. scratch that. 

Reported upstream, raised prio.
Amit, thank you for insisting here, you're absolutely right.
Comment 2 Matthias Runge 2015-02-16 03:35:39 EST
This was merged for kilo
Comment 6 Ido Ovadia 2015-06-22 11:42:13 EDT
Verified
========
python-django-horizon-2015.1.0-10.el7ost.noarch
Comment 8 errata-xmlrpc 2015-08-05 09:12:38 EDT
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://access.redhat.com/errata/RHEA-2015:1548

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