Bug 1088682

Summary: yast does not show error when it can't read an rpm from the DVD
Product: [openSUSE] openSUSE Distribution Reporter: Ludwig Nussel <lnussel>
Component: YaST2Assignee: Imobach Gonzalez Sosa <igonzalezsosa>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P2 - High CC: coolo, cwh, igonzalezsosa, lslezak, ma, okurz, santiago.zarate, snwint
Version: Leap 15.0   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://openqa.opensuse.org/tests/652992/modules/await_install/steps/5
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2logs

Description Ludwig Nussel 2018-04-09 12:32:20 UTC
The following test fails in openQA, probably due to an issue with openQA itself. The DVD seems to have problems. YaST eventually shows an error as a package fails in a script section. If you check the yast logs you see that there are tons of pacakges that yast couldn't even fetch so didn't install in the first place. There should be an error popup for those as well rather than silently ignoring those errors:

openQA test in scenario opensuse-15.0-DVD-x86_64-RAID1@64bit fails in
[await_install](https://openqa.opensuse.org/tests/652992/modules/await_install/steps/5)
Comment 1 Ludwig Nussel 2018-04-09 12:33:32 UTC
Created attachment 766461 [details]
y2logs
Comment 2 Ludwig Nussel 2018-04-09 12:36:35 UTC
The log claims user requested to skip but the video does not show that:

2018-04-09 08:09:16 <1> install(3748) [zypp++] MediaSetAccess.cc(provide):217 Going to try to provide  file ./x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm from media number 1
2018-04-09 08:09:16 <1> install(3748) [zypp++] MediaManager.cc(checkDesired):101 checkDesired(6): desired (cached)
2018-04-09 08:09:16 <1> install(3748) [zypp++] MediaManager.cc(checkDesired):101 checkDesired(6): desired (cached)
2018-04-09 08:09:16 <1> install(3748) [zypp++] MediaHandler.cc(provideFile):1015 provideFile(./x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm)
2018-04-09 08:09:16 <1> install(3748) [zypp++] MediaManager.cc(checkDesired):101 checkDesired(6): desired (cached)
2018-04-09 08:09:16 <1> install(3748) [zypp] PathInfo.cc(assert_dir):354 mkdir /mnt/var/cache/zypp/packages/cd-5e1f1593/x86_64 00755
2018-04-09 08:09:16 <1> install(3748) [zypp] PathInfo.cc(hardlinkCopy):863 hardlinkCopy /var/adm/mount/AP_0xHwMGw3/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm -> /mnt/var/cache/zypp/packages/cd-5e1f1593/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm => copy
2018-04-09 08:09:16 <1> install(3748) [zypp::exec++] ExternalProgram.cc(start_program):252 Executing '/bin/cp' '--remove-destination' '--' '/var/adm/mount/AP_0xHwMGw3/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm' '/mnt/var/cache/zypp/packages/cd-5e1f1593/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm'
2018-04-09 08:09:16 <1> install(3748) [zypp::exec++] ExternalProgram.cc(start_program):415 pid 5847 launched
2018-04-09 08:09:16 <1> install(3748) [zypp] PathInfo.cc(copy):797 copy /var/adm/mount/AP_0xHwMGw3/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm -> /mnt/var/cache/zypp/packages/cd-5e1f1593/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm   /bin/cp: error reading '/var/adm/mount/AP_0xHwMGw3/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm': Input/output error
2018-04-09 08:09:16 <1> install(3748) [zypp::exec++] ExternalProgram.cc(checkStatus):509 Pid 5847 exited with status 1
2018-04-09 08:09:16 <1> install(3748) [zypp] PathInfo.cc(copy):800 
2018-04-09 08:09:16 <2> install(3748) [zypp] PathInfo.cc(doLogResult):293  FAILED: returned 1
2018-04-09 08:09:16 <1> install(3748) [zypp++] MediaSetAccess.cc(releaseFile):85 Going to release file ./x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm from media number 1
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 Fetcher.cc(provideToDest):566 THROW:    Can't hardlink/copy /var/adm/mount/AP_0xHwMGw3/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm to /mnt/var/cache/zypp/packages/cd-5e1f1593
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 Fetcher.cc(provideToDest):582 RETHROW:  Can't hardlink/copy /var/adm/mount/AP_0xHwMGw3/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm to /mnt/var/cache/zypp/packages/cd-5e1f1593
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 History:
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166  - Can't provide ./x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 RepoProvideFile.cc(provideFile):335 CAUGHT:   Can't hardlink/copy /var/adm/mount/AP_0xHwMGw3/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm to /mnt/var/cache/zypp/packages/cd-5e1f1593
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 History:
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166  - Can't provide ./x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 
2018-04-09 08:09:16 <2> install(3748) [zypp] RepoProvideFile.cc(provideFile):339 Trying next url
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 RepoProvideFile.cc(provideFile):344 THROW:    [cd-5e1f1593|cd:///?devices=/dev/disk/by-id/scsi-0QEMU_QEMU_CD-ROM_cd0] Can't provide file './x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm' from repository 'cd-5e1f1593'
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 History:
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166  - Can't hardlink/copy /var/adm/mount/AP_0xHwMGw3/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm to /mnt/var/cache/zypp/packages/cd-5e1f1593
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166  - Can't provide ./x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 
2018-04-09 08:09:16 <3> install(3748) [zypp] PackageProvider.cc(providePackage):406 Failed to provide Package (19)MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64(cd-5e1f1593)
2018-04-09 08:09:16 <0> install(3748) [Pkg] Callbacks.YCP.cc(evaluate):240 Evaluating callback (registered funciton: ruby_reference)
2018-04-09 08:09:16 <1> install(3748) [Ruby] modules/PackageCallbacks.rb:201 DoneProvide: 2, Failed to provide Package MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64 (cd-5e1f1593). Do you want to retry retrieval?

[cd-5e1f1593|cd:///?devices=/dev/disk/by-id/scsi-0QEMU_QEMU_CD-ROM_cd0] Can't provide file './x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm' from repository 'cd-5e1f1593'
History:
 - Can't hardlink/copy /var/adm/mount/AP_0xHwMGw3/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm to /mnt/var/cache/zypp/packages/cd-5e1f1593
 - Can't provide ./x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm
, MozillaFirefox-branding-openSUSE
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 PackageProvider.cc(providePackage):422 THROW:    SKIP request: User requested skip of file
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 History:
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166  - [cd-5e1f1593|cd:///?devices=/dev/disk/by-id/scsi-0QEMU_QEMU_CD-ROM_cd0] Can't provide file './x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm' from repository 'cd-5e1f1593'
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166  - Can't hardlink/copy /var/adm/mount/AP_0xHwMGw3/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm to /mnt/var/cache/zypp/packages/cd-5e1f1593
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166  - Can't provide ./x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 TargetImpl.cc(commit):1413 CAUGHT:   SKIP request: User requested skip of file
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 History:
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166  - [cd-5e1f1593|cd:///?devices=/dev/disk/by-id/scsi-0QEMU_QEMU_CD-ROM_cd0] Can't provide file './x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm' from repository 'cd-5e1f1593'
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166  - Can't hardlink/copy /var/adm/mount/AP_0xHwMGw3/x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm to /mnt/var/cache/zypp/packages/cd-5e1f1593
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166  - Can't provide ./x86_64/MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64.rpm
2018-04-09 08:09:16 <5> install(3748) [zypp] Exception.cc(log):166 
2018-04-09 08:09:16 <2> install(3748) [zypp] TargetImpl.cc(commit):1414 Skipping package (19)MozillaFirefox-branding-openSUSE-45-lp150.2.1.x86_64(cd-5e1f1593) in commit
Comment 3 Steffen Winterfeldt 2018-04-10 11:48:04 UTC
I've tested and a regular install stops on broken rpms. As Ludwig suggested this looks like the openqa test deliberately ignores errors.

Screening team, please assign to SUSE OpenQA (I couldn't find them in bugzilla).
Comment 4 Stephan Kulow 2018-04-10 12:04:39 UTC
openQA failed to sync the ISO completely - but openQA surely didn't click away error popups. Ludwig's bug report is about these popups don't appearing. And the 'user' libzypp is talking about is the yast callback.
Comment 5 Stephan Kulow 2018-04-10 12:19:17 UTC
In the ca-certifate case there is a 
[ui] YUINamespace.cc(createFunctionCall):1035 overloaded OpenDialog, 2@12

and this is no [ui] at all in between these:

2018-04-09 08:09:39 <3> install(3748) [zypp] PackageProvider.cc(providePackage):406 Failed to provide Package (2580)p11-kit-tools-0.23.2-lp150.2.2.x86_64(cd-5e1f1593)
2018-04-09 08:09:39 <0> install(3748) [Pkg] Callbacks.YCP.cc(evaluate):240 Evaluating callback (registered funciton: ruby_reference)
2018-04-09 08:09:39 <1> install(3748) [Ruby] modules/PackageCallbacks.rb:201 DoneProvide: 2, Failed to provide Package p11-kit-tools-0.23.2-lp150.2.2.x86_64 (cd-5e1f1593). Do you want to retry retrieval?

[cd-5e1f1593|cd:///?devices=/dev/disk/by-id/scsi-0QEMU_QEMU_CD-ROM_cd0] Can't provide file './x86_64/p11-kit-tools-0.23.2-lp150.2.2.x86_64.rpm' from repository 'cd-5e1f1593'
History:
 - Can't hardlink/copy /var/adm/mount/AP_0xHwMGw3/x86_64/p11-kit-tools-0.23.2-lp150.2.2.x86_64.rpm to /mnt/var/cache/zypp/packages/cd-5e1f1593
 - Can't provide ./x86_64/p11-kit-tools-0.23.2-lp150.2.2.x86_64.rpm
, p11-kit-tools
2018-04-09 08:09:39 <5> install(3748) [zypp] Exception.cc(log):166 PackageProvider.cc(providePackage):422 THROW:    SKIP request: User requested skip of file

So this exception is just ignored by yast.
Comment 6 Steffen Winterfeldt 2018-04-11 08:38:51 UTC
> and this is no [ui] at all in between these:

As mentioned, yast sucks at logging.

I've tried the same with a broken leap iso and I clicked 'skip' on every error. The log looks *exactly* the same as the one in comment 1.

So, unless you can actually show that yast ignores errors outside openqa everything points to an openqa bug here.
Comment 7 Ludwig Nussel 2018-04-11 09:08:48 UTC
As you can see from the video in the linked job there are no popups until the one caused by the %post failure of ca-certificates appears. There openqa clicks on retry which is documented in the test overview. If openqa had ignored all the other errors the overview and the video would show that.
Comment 8 Stephan Kulow 2018-04-11 09:10:34 UTC
works for the developer
Comment 9 Ludwig Nussel 2018-04-11 09:42:37 UTC
$ dd if=openSUSE-Leap-15.0-DVD-x86_64-Build195.1-Media.iso of=test.iso bs=2048 count=1102848
$ qemu-img create img 40G
qemu-system-x86_64 -enable-kvm -device virtio-blk,drive=hd1 -drive file=test.iso,cache=unsafe,if=none,id=hd1 -cdrom test.iso -m 1024 -serial stdio -boot d

click next etc until it fails.
Comment 10 Steffen Winterfeldt 2018-04-11 11:01:55 UTC
Ok, I believe I've found out what's going on: yast only shows a popup when a
script is run and fails. A failed package copy doesn't trigger this *BUT*
instead you get a summary popup 'Installation of some Packages Failed' listing
the failed packages at the end of the installation.

That also explains why I couldn't reproduce this as I cut my iso to a smaller size and run immediately into script failures.

Ladislav, could you comment?
Comment 11 Steffen Winterfeldt 2018-04-11 11:23:37 UTC
The relevant code is here:

https://github.com/yast/yast-yast2/blob/master/library/packages/src/modules/PackageCallbacks.rb#L195-L225

only error code 3 is handled. 2 is basically ignored.
Comment 12 Imobach Gonzalez Sosa 2018-04-12 15:02:42 UTC
A PR is under review:

https://github.com/yast/yast-yast2/pull/726
Comment 13 Imobach Gonzalez Sosa 2018-04-13 08:07:40 UTC
yast2 4.0.69 includes support for these errors. For the time being, I am closing this bug report.

Thanks!