Bug 1528290

Summary: [RFE] otopi should run with rpmverbosity "debug"
Product: [oVirt] otopi Reporter: Yedidyah Bar David <didi>
Component: Plugins.packagersAssignee: Yedidyah Bar David <didi>
Status: CLOSED CURRENTRELEASE QA Contact: Lucie Leistnerova <lleistne>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.6.2CC: bugs, lleistne, lsvaty, lveyde, trichard
Target Milestone: ovirt-4.1.9Keywords: FutureFeature
Target Release: 1.6.3Flags: rule-engine: ovirt-4.1?
rule-engine: planning_ack?
sbonazzo: devel_ack+
lsvaty: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: otopi-1.6.3 Doc Type: Enhancement
Doc Text:
otopi's yum plugin is now more verbose, also logging all RPM scriptlets' output. This can help debug failures caused by errors from such scriptlets.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-24 10:39:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1532525    

Description Yedidyah Bar David 2017-12-21 13:13:03 UTC
Description of problem:

If an rpm scriptlet fails, yum considers this non-fatal, and emits a suitable error. However, otopi does consider it fatal and fails the transaction. See also bug 1493160 and bug 1493033.

To help debug such failures, it would be useful to have otopi run with rpmverbosity = "debug", which (among other things) causes rpm to run the scriptlets with 'set -x'/'set -o xtrace' and log stdout/stderr to its logs, which inside otopi goes to otopi's log, which is the relevant tool's log (host-deploy, engine-setup etc).

This was already done in oVirt 4.2/otopi-1.7 [1], opening current bug for 4.1.

Patch cherry-picked and verified [2].

[1] https://gerrit.ovirt.org/81993
[2] https://gerrit.ovirt.org/82128

Comment 1 Lucie Leistnerova 2018-01-22 13:01:24 UTC
in host-deploy or mgmt logs yum prints more informations
e.g.
2018-01-17 13:17:51 INFO otopi.plugins.otopi.packagers.yumpackager yumpackager.info:80 Yum Status: Running Transaction
2018-01-17 13:17:52 INFO otopi.plugins.otopi.packagers.yumpackager yumpackager.info:80 Yum install: 1/262: satyr-0.13-14.el7.x86_64
XZDIO:      68 reads,  2319412 total bytes in 0.059597 secs
2018-01-17 13:17:52 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:76 Yum Script sink: D: closed   db index       /var/lib/rpm/Obsoletename
D: closed   db index       /var/lib/rpm/Conflictname
D: closed   db index       /var/lib/rpm/Providename
...

verified in otopi-1.6.3-1.el7ev.noarch with ovirt-engine-4.1.9-0.2.el7.noarch

Comment 2 Sandro Bonazzola 2018-01-24 10:39:49 UTC
This bugzilla is included in oVirt 4.1.9 release, published on Jan 24th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.1.9 release, published on Jan 24th 2018, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.