| Summary: | RHEL 6.1 fv tests fail on spurious stderr output of virt-install and kpartx | |||
|---|---|---|---|---|
| Product: | [Retired] Red Hat Hardware Certification Program | Reporter: | chen yuwen <yuchen> | |
| Component: | Test Suite (tests) | Assignee: | Greg Nichols <gnichols> | |
| Status: | CLOSED ERRATA | QA Contact: | Guangze Bai <gbai> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 1.2 | CC: | czhang, fge, gbai, herrold, qcai, rlandry, ykun, yshao | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: |
In v7 1.2, fv_* tests reported error while the tests finished successfully because of stderr output seen. This issue has been fixed in v7 1.3, now fv_* tests returns zero when tests finished successfully.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 865546 (view as bug list) | Environment: | ||
| Last Closed: | 2011-05-09 16:15:04 UTC | Type: | --- | |
| 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: | 687526 | |||
| Bug Blocks: | 865546 | |||
| Attachments: | ||||
|
Description
chen yuwen
2011-03-04 07:57:29 UTC
*** Bug 678946 has been marked as a duplicate of this bug. *** Run manually :
# losetup /dev/loop0 /var/lib/libvirt/images/v7x86_64.img
# kpartx -av /dev/loop0
add map loop0p1 (253:3): 0 208782 linear /dev/loop0 63
add map loop0p2 (253:4): 0 12370050 linear /dev/loop0 208845
/dev/mapper/loop0p1: mknod for loop0p1 failed: File exists
# echo $?
0
Although the failure exists, the execution of command "kpartx -av /dev/loop0" also pass.
But when run command "Command("kpartx -av " + self.loopBackDevice).echo()", function _checkErrors() of command.py capture the failure and raise exception. Then v7 abort.
The same issue happened in execution of "Command(virtInstall).echo()".
I think it necessary to have a modification to function _run() and _checkErrors() of command.py.
Created attachment 484175 [details]
fvtest.py with some added debug output
Please try the above patch. I've reproduced this on a RHEL 6.1 system. Note the redirect of stderr: [root@hp-xw8400-01 ~]# virt-install --name v7x86_64 --ram 512 --disk path=/var/lib/libvirt/images/v7x86_64.img --disk path=/var/lib/libvirt/images/v7data.img --network network:default --vnc --import --noreboot --noautoconsole 2>stderr.txt Starting install... Domain creation completed. You can restart your domain by running: virsh --connect qemu:///system start v7x86_64 [root@hp-xw8400-01 ~]# more stderr.txt Creating domain... | 0 B 00:00 [root@hp-xw8400-01 ~]# So, it looks like virsh is putting some status messages on stderr now in 6.1. Not that this is a change (regression?) from 6.0. Sorry, I meant that virtinstall was putting output on stderr, not virsh. I've also reproduced the kpartx error: Guest has shutdown Using loopback device /dev/loop0 for guest data image Error: could not mount data image "kpartx -av /dev/loop0" has output on stderr /dev/mapper/loop0p1: mknod for loop0p1 failed: File exists As noted above, re-issuing this command manually works fine. This error looks more real than the virtinstall one. Created attachment 485594 [details]
fv test patch to work around spurious stderr output in virt-install and kpartx
This patch uses some new V7CommandException subclasses to selectively ignore stderr output in these two cases.
Created attachment 485595 [details]
command.py adding new V7CommandException subclasses.
This bug does not need a Tech Note because of: 1. A Red Hatter reported it 2. It only happened in an intermediate version.
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:
In v7 1.2, fv_* tests reported error while the tests finished successfully because of stderr output seen. This issue has been fixed in v7 1.3, now fv_* tests returns zero when tests finished successfully.
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-0497.html |