Bug 1369556

Summary: Apply updates errors when checking for updates CFME 5.6.1
Product: Red Hat CloudForms Management Engine Reporter: Bill Helgeson <bhelgeso>
Component: ApplianceAssignee: Šimon Lukašík <slukasik>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Jan Krocil <jkrocil>
Severity: high Docs Contact:
Priority: high    
Version: 5.6.0CC: abellott, bhelgeso, cpelland, jhardy, obarenbo, slukasik
Target Milestone: GAKeywords: ZStream
Target Release: 5.7.0Flags: jkrocil: needinfo? (bhelgeso)
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: updates
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1371192 (view as bug list) Environment:
Last Closed: 2017-03-09 10:25:21 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:
Bug Depends On:    
Bug Blocks: 1371192    

Description Bill Helgeson 2016-08-23 18:18:36 UTC
Description of problem:
When trying to apply updates from the 5.6.1 vmware appliance image generates an error looking for updates:

[----] I, [2016-08-23T13:51:49.628168 #2897:a9798c]  INFO -- : MIQ(MiqServer#check_updates) Checking for platform updates
...
[----] E, [2016-08-23T13:51:54.834157 #2897:a9798c] ERROR -- : MIQ(MiqQueue#deliver) Message id: [10000000000290], Error:
 [Error: Exit Code 1]
[----] E, [2016-08-23T13:51:54.834362 #2897:a9798c] ERROR -- : [RuntimeError]: Error: Exit Code 1  Method:[rescue in deli
ver]

See full trace below.

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


How reproducible:


Steps to Reproduce:
1.install latest 5.6.1 image from OVA vmware ESX 5.5
2.Register appliance in updates area of the appliance
3.Check for updates

Actual results:
[----] I, [2016-08-23T13:51:49.628168 #2897:a9798c]  INFO -- : MIQ(MiqServer#check_updates) Checking for platform updates
...
[----] E, [2016-08-23T13:51:54.834157 #2897:a9798c] ERROR -- : MIQ(MiqQueue#deliver) Message id: [10000000000290], Error:
 [Error: Exit Code 1]
[----] E, [2016-08-23T13:51:54.834362 #2897:a9798c] ERROR -- : [RuntimeError]: Error: Exit Code 1  Method:[rescue in deli
ver]
[----] E, [2016-08-23T13:51:54.834541 #2897:a9798c] ERROR -- : /opt/rh/cfme-gemset/gems/linux_admin-0.17.0/lib/linux_admi
n/yum.rb:50:in `updates_available?'
/var/www/miq/vmdb/app/models/miq_server/update_management.rb:171:in `check_platform_updates'
/var/www/miq/vmdb/app/models/miq_server/update_management.rb:143:in `check_updates'
/var/www/miq/vmdb/app/models/miq_queue.rb:345:in `block in deliver'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:89:in `block in timeout'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:34:in `block in catch'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:34:in `catch'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:34:in `catch'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:104:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:341:in `deliver'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:106:in `deliver_queue_message'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:134:in `deliver_message'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:152:in `block in do_work'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:146:in `loop'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:146:in `do_work'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:334:in `block in do_work_loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:331:in `loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:331:in `do_work_loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:153:in `run'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:128:in `start'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:21:in `start_worker'
/var/www/miq/vmdb/app/models/miq_worker.rb:347:in `block in start'
/opt/rh/cfme-gemset/gems/nakayoshi_fork-0.0.3/lib/nakayoshi_fork.rb:24:in `fork'
/opt/rh/cfme-gemset/gems/nakayoshi_fork-0.0.3/lib/nakayoshi_fork.rb:24:in `fork'
/var/www/miq/vmdb/app/models/miq_worker.rb:345:in `start'
/var/www/miq/vmdb/app/models/miq_worker.rb:274:in `start_worker'
/var/www/miq/vmdb/app/models/miq_worker.rb:154:in `block in sync_workers'
/var/www/miq/vmdb/app/models/miq_worker.rb:154:in `times'
/var/www/miq/vmdb/app/models/miq_worker.rb:154:in `sync_workers'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:52:in `block in sync_workers'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:50:in `each'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:50:in `sync_workers'
/var/www/miq/vmdb/app/models/miq_server.rb:173:in `start'
/var/www/miq/vmdb/app/models/miq_server.rb:265:in `start'
/var/www/miq/vmdb/lib/workers/evm_server.rb:65:in `start'
/var/www/miq/vmdb/lib/workers/evm_server.rb:92:in `start'
/var/www/miq/vmdb/lib/workers/bin/evm_server.rb:4:in `<main>'


Expected results: no updates available.


Additional info:

Comment 2 Jan Krocil 2016-08-29 06:58:38 UTC
Hi there,
I was not able to reproduce this issue in 5.6.1.2.
Also, what exactly are you trying to achieve here, please? If you register an appliance v5.6.1.2 through RHSM, there are not going to be any updates available because this is the latest version.
Registering the appliance and checking updates should work, though.

You should be able to see the following in the UI:
===================================================
"Available Product version: 5.6.1.2" and the "Last Message" column in the table should state "Registered"

If you are sure what you are trying to do is supposed to work:
==============================================================
Is the network properly configured?
Are you behind an http proxy and if so, did you configure it in the UI?
Lastly, can you try registering and checking updates through terminal?
# subscription-manager register --auto-attach --username <USERNAME> --password <PASSWORD>
# subscription-manager repos --enable=cf-me-5.6-for-rhel-7-rpms
# subscription-manager repos --enable=rhel-server-rhscl-7-rpms
# yum info cfme-appliance --show-duplicates

This is what I see:
===================
Installed Packages
Name        : cfme-appliance
Arch        : x86_64
Version     : 5.6.1.2
Release     : 1.el7cf
Size        : 102 k
Repo        : installed
From repo   : koji-override-0
Summary     : CloudForms Management Engine appliance configuration
URL         : https://github.com/ManageIQ/manageiq-appliance
License     : Unknown
Description : CloudForms Management Engine Appliance

Available Packages
Name        : cfme-appliance
Arch        : x86_64
Version     : 5.6.0.13
Release     : 1.el7cf
Size        : 45 k
Repo        : cf-me-5.6-for-rhel-7-rpms/x86_64
Summary     : CloudForms Management Engine appliance configuration
URL         : https://github.com/ManageIQ/manageiq-appliance
License     : Unknown
Description : CloudForms Management Engine Appliance

Name        : cfme-appliance
Arch        : x86_64
Version     : 5.6.1.2
Release     : 1.el7cf
Size        : 44 k
Repo        : cf-me-5.6-for-rhel-7-rpms/x86_64
Summary     : CloudForms Management Engine appliance configuration
URL         : https://github.com/ManageIQ/manageiq-appliance
License     : Unknown
Description : CloudForms Management Engine Appliance
=======================

So like I said, there is nothing to update to if youre already on v5.6.1.2. Registering and checking available updates should work, though. If you are, however, trying to update platform packages, it has to be done through the terminal. This was never done through the UI. UI updates cfme-related packages only.

Comment 3 Šimon Lukašík 2016-08-29 09:03:23 UTC
This pr will fix improve the message.

https://github.com/ManageIQ/linux_admin/pull/166

That's only thing we can do here, as the cause of problem lays outside CFME.

Comment 5 CFME Bot 2016-09-09 21:40:05 UTC
New commit detected on ManageIQ/linux_admin/master:
https://github.com/ManageIQ/linux_admin/commit/54487ec548257132351e8db0d503a6ab5ffd6a36

commit 54487ec548257132351e8db0d503a6ab5ffd6a36
Author:     Šimon Lukašík <isimluk>
AuthorDate: Mon Aug 29 10:43:08 2016 +0200
Commit:     Šimon Lukašík <isimluk>
CommitDate: Mon Aug 29 12:21:38 2016 +0200

    Improve error message when yum-check-update returns error
    
    The `yum check-update` will return 1 when the system has connectivity
    issues or when the system is not registered with rhn (empty repolist).
    
    Without the improvement, users have low chances to understand what was
    the nature of an error, as they may not understand what command was
    being run.
    
    Addressing:
    https://bugzilla.redhat.com/show_bug.cgi?id=1369556

 lib/linux_admin/yum.rb | 6 +++---
 spec/yum_spec.rb       | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

Comment 6 Šimon Lukašík 2017-03-09 10:27:00 UTC
Closing insufficient data. We cannot investigate the cause without the requested info. Please re-open when details are available. Thanks!