Bug 1395914

Summary: undefined method `split' for nil:NilClass [host/perf_chart_chooser] while grouping C&U data by tag when there is no daily data
Product: Red Hat CloudForms Management Engine Reporter: Nandini Chandra <nachandr>
Component: ReportingAssignee: Gregg Tanzillo <gtanzill>
Status: CLOSED DEFERRED QA Contact: Nandini Chandra <nachandr>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: hkataria, jhardy, mpovolny, obarenbo, yrudman
Target Milestone: GA   
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:c&u
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-14 21:22:31 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:

Description Nandini Chandra 2016-11-16 23:34:23 UTC
Description of problem:
-----------------------
The UI blows up with this error while grouping C&U data by tag when there is no daily data.

Error text:

undefined method `split' for nil:NilClass [host/perf_chart_chooser] 

 "task_id"=>"55"}
[----] F, [2016-11-16T18:21:42.639571 #3013:157b970] FATAL -- : Error caught: [NoMethodError] undefined method `split' for nil:NilClass
/var/www/miq/vmdb/app/models/miq_report/formatting.rb:34:in `get_default_format'
/var/www/miq/vmdb/app/models/miq_report/formatting.rb:43:in `javascript_format'
/var/www/miq/vmdb/lib/report_formatter/c3.rb:92:in `build_document_header'
/opt/rh/cfme-gemset/bundler/gems/ruport-3727775479b0/lib/ruport/controller.rb:598:in `maybe'
/opt/rh/cfme-gemset/bundler/gems/ruport-3727775479b0/lib/ruport/controller.rb:584:in `block in execute_stages'
/opt/rh/cfme-gemset/bundler/gems/ruport-3727775479b0/lib/ruport/controller.rb:583:in `each'
/opt/rh/cfme-gemset/bundler/gems/ruport-3727775479b0/lib/ruport/controller.rb:583:in `execute_stages'
/opt/rh/cfme-gemset/bundler/gems/ruport-3727775479b0/lib/ruport/controller.rb:574:in `_run_'
/opt/rh/cfme-gemset/bundler/gems/ruport-3727775479b0/lib/ruport/controller.rb:520:in `run'
/opt/rh/cfme-gemset/bundler/gems/ruport-3727775479b0/lib/ruport/controller.rb:436:in `render'
/var/www/miq/vmdb/app/models/miq_report/formatters/graph.rb:68:in `to_chart'
/var/www/miq/vmdb/app/controllers/application_controller/performance.rb:1445:in `perf_gen_chart'
/var/www/miq/vmdb/app/controllers/application_controller/performance.rb:887:in `gen_perf_chart'
/var/www/miq/vmdb/app/controllers/application_controller/performance.rb:921:in `block in perf_gen_tag_data_after_wait'
/var/www/miq/vmdb/app/controllers/application_controller/performance.rb:919:in `each'
/var/www/miq/vmdb/app/controllers/application_controller/performance.rb:919:in `each_with_index'
/var/www/miq/vmdb/app/controllers/application_controller/performance.rb:919:in `perf_gen_tag_data_after_wait'
/var/www/miq/vmdb/app/controllers/application_controller/performance.rb:819:in `perf_gen_tag_data'
/var/www/miq/vmdb/app/controllers/application_controller/performance.rb:615:in `perf_gen_data'
/var/www/miq/vmdb/app/controllers/application_controller/performance.rb:42:in `perf_chart_chooser'
/var/www/miq/vmdb/app/controllers/application_controller.rb:221:in `wait_for_task'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/abstract_controller/base.rb:188:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:126:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:455:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/rescue.rb:20:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'



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


How reproducible:
----------------
Always


Steps to Reproduce:
------------------
1.Manage a provider.Enable C&U collection for the provider.
2.Tag a VM.Collect C&U data for a few hours.
3.Navigate to the VM's host summary page.View hourly Utilization graphs for the host since there is no daily C&U data yet.Then group the graphs by 'VM <Tag Category'.The graphs are correctly displayed.Now, switch from the hourly to daily option.


Actual results:
--------------
The UI blows up.


Expected results:
----------------
No UI error


Additional info:
---------------

Comment 2 Yuri Rudman 2018-08-14 21:22:31 UTC
Closing this BZ since version 5.7 is in "Maintenance Support" phase.
Please check on latest version and open separate BZ if needed