Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 658113

Summary: Upgrade script does not report errors to stderr
Product: Red Hat Enterprise Linux 5 Reporter: Doron Fediuck <dfediuck>
Component: ovirt-nodeAssignee: Alan Pevec <apevec>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 5.6CC: apevec, bsarathy, mburns, mjenner, moli, ovirt-maint
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-node-1.0-50.el5 Doc Type: Bug Fix
Doc Text:
Previously, the /usr/libexec/ovirt-config-boot script reported errors to standard output. However, this made it difficult for an application that called this script to detect these errors. To resolve this issue, the underlying source code has been updated to write all error messages to standard error.
Story Points: ---
Clone Of:
: 658958 722882 (view as bug list) Environment:
Last Closed: 2011-01-13 18:41:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 658930, 658958, 722882    
Attachments:
Description Flags
use stderr for error messages none

Description Doron Fediuck 2010-11-29 12:08:51 UTC
Description of problem:
When an error occurs, /usr/libexec/ovirt-config-boot logs the error
to stdout, and other programs calling this script fail to get the error.

How reproducible:
Try to upgrade to rhel 6, just as a way to get an error.

Steps to Reproduce:
(taken from mail:)
  Sun, 28 Nov 2010 11:00:50 DEBUG    ['/usr/libexec/ovirt-config-boot', '/var/vdsm/image-update']
Sun, 28 Nov 2010 11:00:50 DEBUG    installing the image.
cannot upgrade from 5.5-2.2 to 6.0.

Sun, 28 Nov 2010 11:00:50 DEBUG    
Sun, 28 Nov 2010 11:00:50 ERROR    <BSTRAP component='doUpgrade' status='FAIL' message=''/>

Expected results:
Once this is reported to stderr, the message will get the relevant text.

Additional info:
Relevant for future versions (6.0) as well.

Comment 1 Alan Pevec 2010-11-29 13:47:19 UTC
Created attachment 463488 [details]
use stderr for error messages

Comment 5 Mohua Li 2010-12-07 06:53:42 UTC
[root@intel-5504-24-1 libexec]# cat /etc/redhat-release 
Red Hat Enterprise Virtualization Hypervisor release 5.6 (6.1.el5)


[root@intel-5504-24-1 libexec]# ./ovirt-config-boot /mnt
installing the image.
source image not valid.
[root@intel-5504-24-1 libexec]# ./ovirt-config-boot /mnt > /dev/null
source image not valid.
[root@intel-5504-24-1 libexec]# ./ovirt-config-boot /mnt 2>/dev/null
installing the image.

[root@intel-5504-24-1 libexec]# grep log_error ovirt-config-boot
      log_error "boot partition not available."
      log_error "source image not valid."
      log_error "cannot upgrade from $current_version to $VERSION."
      log_error "root partition not available."
      log_error "image copy failed."
        log_error "umount_boot failed."
        log_error "boot loader install failed."
        log_error "umount_boot failed."

this bug is fixed on rhev-hypervisor 5.6-6.1,

Comment 6 Jaromir Hradilek 2011-01-06 17:18:35 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, the /usr/libexec/ovirt-config-boot script reported errors to standard output. However, this made it difficult for an application that called this script to detect these errors. To resolve this issue, the underlying source code has been updated to write all error messages to standard error.

Comment 8 errata-xmlrpc 2011-01-13 18:41:25 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0148.html