Bug 1383498 - Inventory Refresh failing for Container Provider.
Summary: Inventory Refresh failing for Container Provider.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.6.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.8.0
Assignee: Mooli Tayer
QA Contact: Einat Pacifici
URL:
Whiteboard:
Depends On:
Blocks: 1388983 1388984
TreeView+ depends on / blocked
 
Reported: 2016-10-10 19:29 UTC by Josh Carter
Modified: 2020-01-17 16:00 UTC (History)
9 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1388983 1388984 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:43:26 UTC
Category: ---
Cloudforms Team: Container Management
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed Patch (hot fix) (40.00 KB, patch)
2016-11-08 07:50 UTC, Yaacov Zamir
no flags Details | Diff
Proposed Patch (hot fix) (40.00 KB, application/octet-stream)
2016-11-08 07:53 UTC, Yaacov Zamir
no flags Details
Proposed Patch (hot fix) (40.00 KB, application/octet-stream)
2016-11-08 07:55 UTC, Yaacov Zamir
no flags Details

Comment 11 CFME Bot 2016-10-25 18:00:55 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/a1cbffbbed0a09da20480e4f3b40a006a9312d28

commit a1cbffbbed0a09da20480e4f3b40a006a9312d28
Author:     Oleg Barenboim <chessbyte>
AuthorDate: Tue Oct 25 19:57:16 2016 +0200
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Tue Oct 25 19:57:58 2016 +0200

    Merge pull request #11974 from moolitayer/handle_nil_argument
    
    Handle nil container state
    (cherry picked from commit 8a5e0ce131114721b79c50c710c345bb332dbb4a)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1383498

 .../providers/kubernetes/container_manager/refresh_parser.rb       | 4 ++--
 .../providers/kubernetes/container_manager/refresh_parser_spec.rb  | 7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

Comment 12 CFME Bot 2016-10-25 18:01:04 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/58578628b1cadc001c747a653e08df4ad1365672

commit 58578628b1cadc001c747a653e08df4ad1365672
Author:     Mooli Tayer <mtayer>
AuthorDate: Sun Oct 16 01:10:35 2016 +0300
Commit:     Mooli Tayer <mtayer>
CommitDate: Tue Oct 25 12:09:45 2016 +0300

    Handle nil container state
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1383498

 .../providers/kubernetes/container_manager/refresh_parser.rb       | 4 ++--
 .../providers/kubernetes/container_manager/refresh_parser_spec.rb  | 7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

Comment 22 Yaacov Zamir 2016-11-08 07:50:17 UTC
Created attachment 1218428 [details]
Proposed Patch (hot fix)

The gzipped tar archive has a single file app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb

On a Test appliance please make a backup of the existing file app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb and replace it with the enclosed file.

Comment 23 Yaacov Zamir 2016-11-08 07:53:20 UTC
Created attachment 1218430 [details]
Proposed Patch (hot fix)

The gzipped tar archive has a single file app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb

On a Test appliance please make a backup of the existing file app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb and replace it with the enclosed file.

Comment 24 Yaacov Zamir 2016-11-08 07:55:12 UTC
Created attachment 1218431 [details]
Proposed Patch (hot fix)

The gzipped tar archive has a single file app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb

On a Test appliance please make a backup of the existing file app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb and replace it with the enclosed file.

Comment 25 Einat Pacifici 2017-04-24 06:38:13 UTC
Mooli, Yaacov, this BZ has a long history. 
Can you please provide details on how to reproduce? 

Einat

Comment 26 Mooli Tayer 2017-04-24 08:00:20 UTC
It would be best if we had a way to mock kubernetes data. for now you can verify this by following:

https://gist.github.com/moolitayer/e5e7d0cf910a05fa5a7f400f0a115f2f

Comment 27 Einat Pacifici 2017-04-24 17:43:23 UTC
Mooli, 

What's the expected result for the above? 
I ran the queries and the final query returned: 
{:type=>"ManageIQ::Providers::Kubernetes::ContainerManager::Container", :ems_ref=>"0_registry_openshift/origin-docker-registry:v1.4.0-alpha.1", :name=>"registry", :restart_count=>2, :backing_ref=>"docker://77fe0206d0f9b651cc501ddc0318816189d6aca7d8013066446130b18bf8cb69", :container_image=>{:name=>"openshift/origin-docker-registry", :tag=>"v1.4.0-alpha.1", :digest=>nil, :image_ref=>"docker://sha256:c9e453bd2e055aad9283f2fd6d51e309ef871fc6c27bc6060e366bf066b33bed", :registered_on=>2017-04-24 17:46:24 UTC, :container_image_registry=>nil}, :last_state=>:terminated, :last_reason=>nil, :last_started_at=>nil, :last_finished_at=>nil, :last_exit_code=>nil, :last_signal=>nil, :last_message=>nil}

Is this the expected result?

Comment 28 Mooli Tayer 2017-04-24 18:10:43 UTC
Yes, When run without the fix it raises an exception

Comment 29 Einat Pacifici 2017-04-25 10:22:18 UTC
Verified. Ran script as explained in comment 26.


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