Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 906787

Summary: v7 cannot handle yum errors
Product: [Retired] Red Hat Hardware Certification Program Reporter: Petr Beňas <pbenas>
Component: Test Suite (harness)Assignee: Greg Nichols <gnichols>
Status: CLOSED EOL QA Contact: Lukas Svaty <lsvaty>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1CC: gnichols, pstehlik, rlandry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: hwcert-client 1.7.0-61 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1043517 (view as bug list) Environment:
Last Closed: 2020-03-27 15:51:48 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1043517    
Attachments:
Description Flags
harness.py patch improving output while attempting to install packages none

Description Petr Beňas 2013-02-01 13:40:49 UTC
Description of problem:
v7 plan offers installation of required rpms, but cannot handle situation when yum can't install them


Version-Release number of selected component (if applicable):
v7-1.7.0-3.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1.v7 plan
2.Enter, Enter, Enter, Enter, "Server" Enter, "none" Enter
3. y
  
Actual results:
[root@hp-dl380pgen8-02-vm-5 ~]# v7 plan
Warning: could not determine host for disk /dev/vda (/devices/pci0000:00/0000:00:04.0/virtio1/block/vda)
Hardware: Red Hat KVM KVM
OS: Maipo 7

Please verify the hardware product information:
    vendor:Red Hat
    make:KVM
    model:KVM
    product-url:
    category (Desktop/Workstation|Laptop|Component/Peripheral|Server) Server
What certification is this system being tested for? (new|existing|none) none
response: none
Created a new plan with 11 tests on 338 devices
Checking for additional required packages based on the test plan:
audio requires sox, alsa-utils
usb requires usbutils
network requires ethtool
profiler requires oprofile
video requires xorg-x11-apps, xorg-x11-utils, glx-utils, xorg-x11-server-Xorg, xorg-x11-xinit
info requires kabi-whitelists, policycoreutils
kdump requires kexec-tools, crash, kernel-debuginfo
kdump requires kexec-tools, crash, kernel-debuginfo
Checking installed rpms:
ethtool-3.4.1-2.el7.x86_64
alsa-utils-1.0.26-1.el7.x86_64
crash-6.1.2-1.el7.x86_64
xorg-x11-apps-7.7-1.el7.x86_64
xorg-x11-utils-7.5-7.el7.x86_64
kernel-debuginfo-3.7.0-0.32.el7.x86_64
usbutils-006-2.el7.x86_64
xorg-x11-server-Xorg-1.13.1-3.el7.x86_64
xorg-x11-xinit-1.3.2-7.el7.x86_64
kexec-tools-2.0.3-64.el7.x86_64
policycoreutils-2.1.13-49.el7.x86_64
package kabi-whitelists is not installed
sox-14.4.0-2.el7.x86_64
oprofile-0.9.8-2.el7.x86_64
glx-utils-8.0.1-1.20121218git6eef979.el7.x86_64
The following rpms are required for testing:
 kabi-whitelists
Would you like to install them now? (y|n) y
response: y
Running yum: --------------------------------
Error: Could not install rpm
"yum install -y  kabi-whitelists" has output on stderr
Rechecking required rpms
Checking installed rpms:
ethtool-3.4.1-2.el7.x86_64
alsa-utils-1.0.26-1.el7.x86_64
crash-6.1.2-1.el7.x86_64
xorg-x11-apps-7.7-1.el7.x86_64
xorg-x11-utils-7.5-7.el7.x86_64
kernel-debuginfo-3.7.0-0.32.el7.x86_64
usbutils-006-2.el7.x86_64
xorg-x11-server-Xorg-1.13.1-3.el7.x86_64
xorg-x11-xinit-1.3.2-7.el7.x86_64
kexec-tools-2.0.3-64.el7.x86_64
policycoreutils-2.1.13-49.el7.x86_64
package kabi-whitelists is not installed
sox-14.4.0-2.el7.x86_64
oprofile-0.9.8-2.el7.x86_64
glx-utils-8.0.1-1.20121218git6eef979.el7.x86_64
The following rpms are required for testing:
 kabi-whitelists
Would you like to install them now? (y|n) y
response: y
Running yum: --------------------------------
Error: Could not install rpm
"yum install -y  kabi-whitelists" has output on stderr
Rechecking required rpms
Checking installed rpms:
ethtool-3.4.1-2.el7.x86_64
alsa-utils-1.0.26-1.el7.x86_64
crash-6.1.2-1.el7.x86_64
xorg-x11-apps-7.7-1.el7.x86_64
xorg-x11-utils-7.5-7.el7.x86_64
kernel-debuginfo-3.7.0-0.32.el7.x86_64
usbutils-006-2.el7.x86_64
xorg-x11-server-Xorg-1.13.1-3.el7.x86_64
xorg-x11-xinit-1.3.2-7.el7.x86_64
kexec-tools-2.0.3-64.el7.x86_64
policycoreutils-2.1.13-49.el7.x86_64
package kabi-whitelists is not installed
sox-14.4.0-2.el7.x86_64
oprofile-0.9.8-2.el7.x86_64
glx-utils-8.0.1-1.20121218git6eef979.el7.x86_64
The following rpms are required for testing:
 kabi-whitelists
Would you like to install them now? (y|n) n
response: n
Warning: some tests may fail due to missing rpms
saved test plan to /var/v7/results.xml


Expected results:
v7 reports package cannot be installed

Additional info:
[root@hp-dl380pgen8-02-vm-5 ~]# yum install kabi-whitelists
Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
No package kabi-whitelists available.
Error: Nothing to do
[root@hp-dl380pgen8-02-vm-5 ~]# echo $?
1

Comment 3 Greg Nichols 2013-10-10 14:49:47 UTC
Created attachment 810571 [details]
harness.py patch improving output while attempting to install packages

This patch improves the feedback when hwcert/hwcert-backend are attempting to install packages via yum.

Example output:

[root@bluetwo hwcert]# hwcert-backend plan 
Warning: profiler test disabled
Created a new plan with 22 tests on 561 devices
package kernel-debuginfo is not installed
package kabi-whitelists is not installed
package python-virtinst is not installed
package qemu-kvm-common is not installed
The following packages are required for testing:
kernel-debuginfo, kabi-whitelists, python-virtinst, qemu-kvm-common
Would you like to install them now? (y|n) y
response: y
Loaded plugins: langpacks, refresh-packagekit
Repository beaker-client is listed more than once in the configuration
Repository beaker-client-testing is listed more than once in the configuration
No package kernel-debuginfo available.
No package kabi-whitelists available.
No package python-virtinst available.
No package qemu-kvm-common available.
Error: Nothing to do
Error: could not install required packages.
Rechecking required rpms
package kernel-debuginfo is not installed
package kabi-whitelists is not installed
package python-virtinst is not installed
package qemu-kvm-common is not installed
The following packages are required for testing:
kernel-debuginfo, kabi-whitelists, python-virtinst, qemu-kvm-common
Would you like to re-try installing the missing packages? (y|n) n
response: n
Warning: some tests may fail due to missing packages:
    kdump nfs, kdump local requires kernel-debuginfo
    info requires kabi-whitelists
    fv_storage, fv_memory, fv_network, fv_core requires python-virtinst
    fv_storage, fv_memory, fv_network, fv_core requires qemu-kvm-common
[root@bluetwo hwcert]#

Comment 7 Petr Beňas 2013-10-17 13:57:11 UTC
Verified in hwcert-client-1.7.0-61.el7.noarch.