Bug 1172390

Summary: Runtime error when loading module 'Bootloader'
Product: [openSUSE] openSUSE Tumbleweed Reporter: Berthold Gunreben <azouhr>
Component: InstallationAssignee: E-mail List <yast2-maintainers>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: azouhr, dimstar, jlopez, jreidinger, rw, slindomansilla
Version: Current   
Target Milestone: ---   
Hardware: S/390-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast2 logs
command to initiate s390x installation with qemu-system-s390

Description Berthold Gunreben 2020-06-02 11:30:56 UTC
Created attachment 838410 [details]
yast2 logs

OpenQA fails with an internal YaST error. See also 
https://openqa.opensuse.org/tests/1283763#

The autoinst log files shows the following:

2020-05-30 21:40:02 <3> 192.168.112.10(3067) [Y2Ruby] binary/Y2RubyUtils.cc(y2_require):26 cannot require yast:cannot load such file -- cfa/grub2/default at /mounts/mp_0001/usr/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
2020-05-30 21:40:02 <3> 192.168.112.10(3067) [Y2Ruby] binary/Y2RubyComponent.cc(import):99 Reporting runtime error for import of module 'Bootloader' message 'cannot load such file -- cfa/grub2/default'
2020-05-30 21:40:02 <3> 192.168.112.10(3067) [Interpreter] yast/i18n.rb:169 Runtime error when loading module 'Bootloader'
2020-05-30 21:40:02 <3> 192.168.112.10(3067) [Y2Ruby] binary/Y2RubyUtils.cc(y2_require):26 cannot require yast:Failed to load Module 'Bootloader' due to: cannot load such file -- cfa/grub2/default at /mounts/mp_0001/usr/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
2020-05-30 21:40:02 <3> 192.168.112.10(3067) [Y2Ruby] binary/Y2RubyComponent.cc(import):99 Reporting runtime error for import of module 'SystemSettings' message 'Failed to load Module 'Bootloader' due to: cannot load such file -- cfa/grub2/default'
2020-05-30 21:40:02 <3> 192.168.112.10(3067) [Interpreter] yast/i18n.rb:169 Runtime error when loading module 'SystemSettings'
2020-05-30 21:40:02 <3> 192.168.112.10(3067) [Y2Ruby] binary/Y2RubyUtils.cc(y2_require):26 cannot require yast:Failed to load Module 'SystemSettings' due to: Failed to load Module 'Bootloader' due to: cannot load such file -- cfa/grub2/default at /mounts/mp_0001/usr/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
2020-05-30 21:40:02 <3> 192.168.112.10(3067) [Y2Ruby] binary/Y2RubyComponent.cc(import):99 Reporting runtime error for import of module 'InitHWinfo' message 'Failed to load Module 'SystemSettings' due to: Failed to load Module 'Bootloader' due to: cannot load such file -- cfa/grub2/default'
2020-05-30 21:40:02 <3> 192.168.112.10(3067) [Interpreter] yast/i18n.rb:169 Runtime error when loading module 'InitHWinfo'
2020-05-30 21:40:02 <3> 192.168.112.10(3067) [Ruby] yast/wfm.rb:253 Client /mounts/mp_0001/usr/share/YaST2/clients/hwinfo_proposal.rb failed with 'Failed to load Module 'InitHWinfo' due to: Failed to load Module 'SystemSettings' due to: Failed to load Module 'Bootloader' due to: cannot load such file -- cfa/grub2/default' (RuntimeError).


Attaching yast2 logs.

This might also be related to ruby 2.7 change, see boo#1171368
Comment 1 Berthold Gunreben 2020-06-02 11:32:31 UTC
I only get forbidden when trying to login to openqa, therefore I cannot update the test to reflect this bug. Please, someone with permissions do this for me.
Comment 2 Dominique Leuenberger 2020-06-02 11:59:45 UTC
(In reply to Berthold Gunreben from comment #1)
> I only get forbidden when trying to login to openqa, therefore I cannot
> update the test to reflect this bug. Please, someone with permissions do
> this for me.

Nobody can login at the moment: https://progress.opensuse.org/issues/66703
Comment 3 Michal Filka 2020-06-02 18:31:59 UTC
@Josef:
Sounds like either cfa_grub2 gem is missing or search path issue to me. Could you comment please?
Comment 4 Josef Reidinger 2020-06-03 06:29:36 UTC
for me it looks like system ruby version is not switched. Bootloader has dependency on cfa grub2

https://github.com/yast/yast-bootloader/blob/master/package/yast2-bootloader.spec#L36

Can you please inspect in openqa image what is output of 

ls -l /usr/lib*/ruby/gems/*/gems/cfa_grub2-*/
Comment 5 Stefan Hundhammer 2020-06-16 09:43:44 UTC
azouhr@opensuse.org: This is waiting for input from your side. Please check.
Comment 6 Berthold Gunreben 2020-06-16 20:19:44 UTC
(In reply to Josef Reidinger from comment #4)
> for me it looks like system ruby version is not switched. Bootloader has
> dependency on cfa grub2
> 
> https://github.com/yast/yast-bootloader/blob/master/package/yast2-bootloader.
> spec#L36
> 
> Can you please inspect in openqa image what is output of 
> 
> ls -l /usr/lib*/ruby/gems/*/gems/cfa_grub2-*/

Unfortunately, I am not a suse employee, and thus unable to access any of the openqa machines. However, I try to get this solved, and thus used qemu-system-s390x to initiate an installation and look at the output:

0:install:~ # ls -l /usr/lib*/ruby/gems/*/gems/cfa_grub2-*/
total 0
drwxr-xr-x 3 root root 26 May 12 00:00 lib

Since you probably wanted to see the path there:

0:install:~ # ls -ld /usr/lib*/ruby/gems/*/gems/cfa_grub2-*/
drwxr-xr-x 3 root root 26 May 12 00:00 /usr/lib64/ruby/gems/2.7.0/gems/cfa_grub2-2.0.0/
---------------------------------
Just for reference, and maybe also to help getting this forward, I add a small script to this bug that allows to start qemu-system-s390 into the installation system on your local x86 workstation. Before starting, get the latest qemu-s390 package from the Virtualization development project.
osc repourls Virtualization

To prepare a raw sparse disk with 20G, use the command:
dd if=/dev/zero of=tumbleweed.raw bs=1G count=0 seek=20

Then get the latest untested ISO from 
https://build.opensuse.org/package/binaries/openSUSE:Factory:zSystems/000product:openSUSE-dvd5-dvd-s390x/images

The last thing before firing up is to fix the name of the iso image. By default, you get a port forward to your local machine to port 10022 for ssh. That is how I got into the installation system.
Comment 7 Berthold Gunreben 2020-06-16 20:20:51 UTC
Created attachment 838868 [details]
command to initiate s390x installation with qemu-system-s390
Comment 8 José Iván López González 2020-06-17 11:56:39 UTC
Unit tests for yast2-bootloader are failing in s390, see [1]. Possibly, the old yast2-bootloader package (with old Ruby 2.6 dependency) was used, and for this reason we end up with a mixture of ruby 2.6 and 2.7 versions. Thanks Ladislav for your research!

Note: We touched the XEN detection method only few days ago [2], but this bug was reported earlier, so that changes should not be the source of the problem. 

[1] https://build.opensuse.org/package/live_build_log/openSUSE:Factory:zSystems/yast2-bootloader/standard/s390x

[2] https://github.com/yast/yast-yast2/pull/1062
Comment 9 José Iván López González 2020-06-18 09:41:23 UTC
Unit tests have been improved to avoid the failure [1]. This should be fixed with yast2-bootloader 4.3.6. A new submit request has been already sent [2]. Please, wait for a refreshed iso and try it again.

Please, don't hesitate to reopen the bug if the problem persists. Thanks!

[1] https://github.com/yast/yast-bootloader/pull/610

[2] https://build.opensuse.org/request/show/815696