Bug 1896439

Summary: Azure VM C&U metrics capture logs shows error: undefined method `iso8601' for nil:NilClass
Product: Red Hat CloudForms Management Engine Reporter: Mihir Lele <mlele>
Component: C&U Capacity and UtilizationAssignee: Daniel Berger <dberger>
Status: CLOSED ERRATA QA Contact: juwatts
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.11.5CC: dmetzger, juwatts, obarenbo, simaishi
Target Milestone: GAKeywords: ZStream
Target Release: 5.11.10Flags: simaishi: cfme-5.11.z+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.10.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-15 21:17:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Azure Target Upstream Version:
Embargoed:

Description Mihir Lele 2020-11-10 14:42:20 UTC
Description of problem:

Azure VM C&U metrics capture logs shows error: undefined method `iso8601' for nil:NilClass

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


Additional info:

Logs:


[----] I, [2020-11-06T03:27:20.633480 #15973:2b010f33e5c4]  INFO -- : Exception in realtime_block :total_time - Timings: {:capture_state=>0.0010428428649902344, :connect=>7.
152557373046875e-07, :capture_counters=>0.9894051551818848, :total_time=>8.194956541061401}
[----] E, [2020-11-06T03:27:20.634043 #15973:2b010f33e5c4] ERROR -- : MIQ(MiqQueue#deliver) Message id: [7089152], Error: [undefined method `iso8601' for nil:NilClass]
[----] E, [2020-11-06T03:27:20.634152 #15973:2b010f33e5c4] ERROR -- : [NoMethodError]: undefined method `iso8601' for nil:NilClass  Method:[block (2 levels) in <class:LogPro
xy>]
[----] E, [2020-11-06T03:27:20.634216 #15973:2b010f33e5c4] ERROR -- : /opt/rh/cfme-gemset/bundler/gems/cfme-providers-azure-cfeeb130051b/app/models/manageiq/providers/azure/
cloud_manager/metrics_capture.rb:202:in `block (2 levels) in perf_collect_metrics'
/opt/rh/cfme-gemset/bundler/gems/cfme-providers-azure-cfeeb130051b/app/models/manageiq/providers/azure/cloud_manager/metrics_capture.rb:173:in `each'
/opt/rh/cfme-gemset/bundler/gems/cfme-providers-azure-cfeeb130051b/app/models/manageiq/providers/azure/cloud_manager/metrics_capture.rb:173:in `block in perf_collect_metrics
'
/var/www/miq/vmdb/app/models/ext_management_system.rb:499:in `with_provider_connection'
/opt/rh/cfme-gemset/bundler/gems/cfme-providers-azure-cfeeb130051b/app/models/manageiq/providers/azure/cloud_manager/metrics_capture.rb:90:in `perf_collect_metrics'
/var/www/miq/vmdb/app/models/metric/ci_mixin/capture.rb:6:in `perf_collect_metrics'
/var/www/miq/vmdb/app/models/metric/ci_mixin/capture.rb:199:in `block in just_perf_capture'
/opt/rh/cfme-gemset/bundler/gems/cfme-gems-pending-e280ad44830f/lib/gems/pending/util/extensions/miq-benchmark.rb:11:in `realtime_store'
/opt/rh/cfme-gemset/bundler/gems/cfme-gems-pending-e280ad44830f/lib/gems/pending/util/extensions/miq-benchmark.rb:35:in `realtime_block'
/var/www/miq/vmdb/app/models/metric/ci_mixin/capture.rb:195:in `just_perf_capture'
/var/www/miq/vmdb/app/models/metric/ci_mixin/capture.rb:141:in `perf_capture'
/var/www/miq/vmdb/app/models/metric/ci_mixin/capture.rb:117:in `perf_capture_realtime'
/var/www/miq/vmdb/app/models/miq_queue.rb:479:in `block in dispatch_method'
/usr/share/ruby/timeout.rb:93:in `block in timeout'
/usr/share/ruby/timeout.rb:33:in `block in catch'
/usr/share/ruby/timeout.rb:33:in `catch'
/usr/share/ruby/timeout.rb:33:in `catch'
/usr/share/ruby/timeout.rb:108:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:477:in `dispatch_method'
/var/www/miq/vmdb/app/models/miq_queue.rb:454:in `block in deliver'

Comment 3 Adam Grare 2020-11-10 19:02:52 UTC
Hey Dan can you take a look at this?  A simple nil check would take care of it but would like to understand why we're getting nil timestamps in the first place might be indicative of other issues?

Comment 17 Daniel Berger 2020-11-12 16:45:29 UTC
That PR should take care of the original problem. Please file the stream.rb issue separately if it persists.

Comment 18 CFME Bot 2020-11-12 17:20:21 UTC
New commit detected on ManageIQ/manageiq-providers-azure/ivanchuk:

https://github.com/ManageIQ/manageiq-providers-azure/commit/691bd3e485fdf2c9ec81b645553d36b84bf2968b
commit 691bd3e485fdf2c9ec81b645553d36b84bf2968b
Author:     Adam Grare <agrare>
AuthorDate: Tue Sep  3 13:41:36 2019 +0000
Commit:     Satoe Imaishi <simaishi>
CommitDate: Thu Nov 12 17:19:05 2020 +0000

    Merge pull request #346 from AlexanderZagaynov/fixes/if_last_timestamp

    fix undefined method issue

    (cherry picked from commit 066e683018408c47f9a1d635a90c008c6ea21fe6)

    https://bugzilla.redhat.com/show_bug.cgi?id=1896439

 app/models/manageiq/providers/azure/cloud_manager/metrics_capture.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 19 juwatts 2020-12-02 15:54:56 UTC
CFME QE is no longer actively testing azure providers, and no specific verification was performed for this BZ

Comment 24 errata-xmlrpc 2020-12-15 21:17: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 (Important: CloudForms 5.0.10 security, bug fix and enhancement update), 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/RHSA-2020:5554