Bug 1702055 - conversion host conversion state failure is potentially misleading
Summary: conversion host conversion state failure is potentially misleading
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: V2V
Version: 5.10.2
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.10.4
Assignee: Fabien Dupont
QA Contact: Yadnyawalk Tale
Red Hat CloudForms Documentation
URL: https://github.com/ManageIQ/manageiq/...
Depends On: 1695847
TreeView+ depends on / blocked
Reported: 2019-04-22 20:37 UTC by Satoe Imaishi
Modified: 2019-05-21 05:47 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1695847
Last Closed: 2019-05-21 05:46:54 UTC
Category: ---
Cloudforms Team: V2V
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1247 None None None 2019-05-21 05:47:00 UTC

Comment 2 CFME Bot 2019-04-24 19:47:11 UTC
New commits detected on ManageIQ/manageiq/hammer:

commit 7709b441d46250f2f5ac08ba6918b78bbfd967be
Author:     Adam Grare <agrare@redhat.com>
AuthorDate: Wed Mar 27 09:06:03 2019 -0400
Commit:     Adam Grare <agrare@redhat.com>
CommitDate: Wed Mar 27 09:06:03 2019 -0400

    Merge pull request #18258 from djberg96/get_conversion_state

    Add more robust error handling to ConversionHost#get_conversion_state

    (cherry picked from commit f73e7e68382dd99b295c56b4409b4c0a4118c7a5)

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

 app/models/conversion_host.rb | 11 +-
 spec/models/conversion_host_spec.rb | 29 +
 2 files changed, 38 insertions(+), 2 deletions(-)

Comment 3 Shveta 2019-05-03 17:46:38 UTC
When the file exist on rhev host but contents are invalid

irb(main):001:0>conversion_host = ConversionHost.find_by(:name => 'env-rhv42-03.cfme2.lab.eng.rdu2.redhat.com')
PostgreSQLAdapter#log_after_checkout, connection_pool: size: 5, connections: 1, in use: 1, waiting_in_queue: 0
=> #<ConversionHost id: 5, name: "env-rhv42-03.cfme2.lab.eng.rdu2.redhat.com", address: nil, type: nil, resource_type: "Host", resource_id: 5, version: nil, max_concurrent_tasks: nil, vddk_transport_supported: true, ssh_transport_supported: nil, created_at: "2019-05-03 17:35:48", updated_at: "2019-05-03 17:36:01", concurrent_transformation_limit: nil, cpu_limit: nil, memory_limit: nil, network_limit: nil, blockio_limit: nil>

    irb(main):003:0> conversion_host.get_conversion_state("/root/abcd.json")
    RuntimeError: Could not parse conversion state data from file '/root/abcd.json': cdbds
            from /var/www/miq/vmdb/app/models/conversion_host.rb:157:in `rescue in get_conversion_state'
            from /var/www/miq/vmdb/app/models/conversion_host.rb:151:in `get_conversion_state'
            from (irb):3
            from /opt/rh/cfme-gemset/gems/railties- `start'
            from /opt/rh/cfme-gemset/gems/railties- `start'
            from /opt/rh/cfme-gemset/gems/railties- `console'
            from /opt/rh/cfme-gemset/gems/railties- `run_command!'
            from /opt/rh/cfme-gemset/gems/railties- `<top (required)>'
            from bin/rails:4:in `require'
            from bin/rails:4:in `<main>'

When file does not exist on host 
    irb(main):029:0> conversion_host.get_conversion_state("/root/abcd.json")
    E, [2019-05-03T13:39:31.063683 #34928] ERROR -- net.ssh.transport.session[6518974]: forcing connection closed
    RuntimeError: Error retrieving and parsing conversion state file '/root/abcd.json' from 'env-rhv42-03.cfme2.lab.eng.rdu2.redhat.com' with [RuntimeError: open /root/abcd.json: no such file (2)
            from /var/www/miq/vmdb/app/models/conversion_host.rb:159:in `rescue in get_conversion_state'
            from /var/www/miq/vmdb/app/models/conversion_host.rb:151:in `get_conversion_state'
            from (irb):29
            from /opt/rh/cfme-gemset/gems/railties- `start'
            from /opt/rh/cfme-gemset/gems/railties- `start'
            from /opt/rh/cfme-gemset/gems/railties- `console'
            from /opt/rh/cfme-gemset/gems/railties- `run_command!'
            from /opt/rh/cfme-gemset/gems/railties- `<top (required)>'
            from bin/rails:4:in `require'
            from bin/rails:4:in `<main>'

Tested on

Comment 5 errata-xmlrpc 2019-05-21 05:46:54 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.


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