Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1574187 - [RFE] provide LVM stderr in imgbased if an exception is caught
[RFE] provide LVM stderr in imgbased if an exception is caught
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: imgbased (Show other bugs)
4.1.10
Unspecified Unspecified
unspecified Severity medium
: ovirt-4.2.3-1
: ---
Assigned To: Ryan Barry
Yaning Wang
: FutureFeature, ZStream
Depends On:
Blocks: imgbased-1.0.17
  Show dependency treegraph
 
Reported: 2018-05-02 14:34 EDT by vaibhav
Modified: 2018-06-11 02:57 EDT (History)
5 users (show)

See Also:
Fixed In Version: imgbased-1.0.17
Doc Type: Enhancement
Doc Text:
Previously, imgbased filtered out stderr from LVM commands to improve parsing reliability. In this release, imgbased now logs stderr from LVM commands in order to provide this information in the imgbased logs, for example during an upgrade failure.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-06-11 02:56:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Node
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 90856 master MERGED lvm: don't use LvmBinary for lvcreate 2018-05-23 07:32 EDT
oVirt gerrit 91528 ovirt-4.2 MERGED lvm: don't use LvmBinary for lvcreate 2018-05-23 07:33 EDT
Red Hat Product Errata RHSA-2018:1820 None None None 2018-06-11 02:57 EDT

  None (edit)
Description vaibhav 2018-05-02 14:34:51 EDT
Description of problem:-

While updating the RHEVH host from RHEV-M GUI if its failed then error message in the imgbase logs is not clear.
Imgbase logs are giving traceback error in the update logs but the error message is generic and not providing much detailed information about why update got failed.

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

redhat-virtualization-host-update
imgbased


How reproducible:

100%

Steps to Reproduce:
1. If RHVH upgrade get failed then 
2. Reboot and login NGN
#imgbase check

1.
2.
3.

Actual results:

subprocess.CalledProcessError: Command '['lvcreate', '--thin', '--virtualsize', '4367354880B', '--name', 'rhvh-4.0-0.20170307.0', u'rhvh/pool00']' returned non-zero exit status 5

Expected results:

It should give a detailed error message in imgbase logs.

Additional info:-

None
Comment 1 Ryan Barry 2018-05-02 14:45:16 EDT
imgbased already logs detailed information in /tmp/imgbased.log or /var/log/imgbased.log, depending on the version.

Are you expecting this to appear in RHVM, or just the stderr in the logs?

'imgbase check' should not be creating LVs.
Comment 3 Yaning Wang 2018-06-04 06:01:18 EDT
Verify Steps:

from rhvh-4.1-0.20180126.0
upgrade to rhvh-4.2.3.1-0.20180531.0

Results:

upgrade failed due to no enough space

stderr be captured in `imgbased.log`

```
2018-06-04 05:47:26,650 [ERROR] (MainThread) Failed to migrate etc
Traceback (most recent call last):
  File "/tmp/tmp.oscuVNMJKQ/usr/lib/python2.7/site-packages/imgbased/plugins/osupdater.py", line 118, in on_new_layer
    check_nist_layout(imgbase, new_lv)
  File "/tmp/tmp.oscuVNMJKQ/usr/lib/python2.7/site-packages/imgbased/plugins/osupdater.py", line 209, in check_nist_layout
    v.create(t, paths[t]["size"], paths[t]["attach"])
  File "/tmp/tmp.oscuVNMJKQ/usr/lib/python2.7/site-packages/imgbased/volume.py", line 55, in create
    vol = self.imgbase._thinpool().create_thinvol(volname, size)

```
Comment 5 errata-xmlrpc 2018-06-11 02:56:53 EDT
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.

https://access.redhat.com/errata/RHSA-2018:1820

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