Bug 1223206 - Yast internal error after configuring network
Summary: Yast internal error after configuring network
Status: RESOLVED INVALID
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Current
Hardware: PC openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-22 10:30 UTC by Heinrich Seebauer
Modified: 2024-04-29 08:26 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
compressed y2logs (14.89 MB, application/x-compressed-tar)
2024-04-22 14:21 UTC, Heinrich Seebauer
Details
Screenshot: "yast2 lan" "Global Options" tab with open "General Network Settings" combo box open (51.08 KB, image/png)
2024-04-22 16:18 UTC, Stefan Hundhammer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heinrich Seebauer 2024-04-22 10:30:00 UTC
Network service is disabled by Yast network configuration.
On click 'OK' Yast network config closes. Everything seems OK so far.

Yast network config is called again to setup network configuration.
After config is done, on clicking 'OK' Yast emits error message:

Internal error. Please report a bug report with logs.
Run save_y2logs to get complete logs.
Caller: /usr/share/YaST2/modules/NetworkService.rb:97:in `RunSystemCtl'
Details: No network service defined.

Because network manager is not applicable, I'd turn to Yast, but Yast exits with error, seemingly without changing network configuration in any way.
Comment 1 Stefan Hundhammer 2024-04-22 14:02:27 UTC
Then please attach the y2logs generated with the supplied 'save_y2logs' script that the error message mentioned.

https://en.opensuse.org/openSUSE:Report_a_YaST_bug#I_reported_a_YaST2_bug,_and_now_I_am_asked_to_"attach_y2logs"_(for_package_installation_also_"libzypp_logging")._What_does_that_mean,_and_how_do_I_do_that?


Also, when did that happen? During installation, or in the installed system? When was the last time the network worked on that machine?

https://en.opensuse.org/openSUSE:How_to_Write_a_Good_Bugreport
Comment 2 Heinrich Seebauer 2024-04-22 14:21:30 UTC
Created attachment 874419 [details]
compressed y2logs
Comment 3 Heinrich Seebauer 2024-04-22 14:40:15 UTC
When did thi happen?

System configuration:
- Linux Host (Tumbleweed)
- 2 physical network interfaces enp031f6, enp1s0 on separate subnets
- 2 VMs (KVM) (should be) attached to the default network
-- 1 MS Win10 machine
-- 1 OpenSusde TW, acting as NTP server
- some external machines, generally IoT nodes, should be able to request NTP service, on the subnet of enp1s0.

Tumbleweed has been installed some time ago. Network Manager was enabled by default.

Because I have not been able to setup my physical and virtual networks by means of Network Manager, I decided to disable Network Manager and do it with Yast. 

In a first step I disabled NM, after that I configured the network devices with Yast network config.
Comment 4 Stefan Hundhammer 2024-04-22 15:14:32 UTC
It looks like it worked until here:

y2-63-lan.log

>> 2024-03-19 14:52:57 ... y2base called with ["lan", "qt", ...
>> ...
>> 14:53:13  ShellCommand.cc(shellcommand):78 Removed "/etc/systemd/system/multi-user.target.wants/NetworkManager.service".
>> 14:53:13  ShellCommand.cc(shellcommand):78 Removed "/etc/systemd/system/network.service".
>> 14:53:13  ShellCommand.cc(shellcommand):78 Removed "/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service".
>> 14:53:13  ShellCommand.cc(shellcommand):78 Removed "/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service".
>> 14:53:13  clients/lan.rb(main):211 Lan module finished

--------------------------------------------------


First internal error:

y2-64-lan.log

>> 2024-03-19 14:53:21 ... y2base called with ["lan", "qt", ...
>> ...
>> 2024-03-19 14:53:57 <3> swilx010(26941) [Ruby]
>>   yast/wfm.rb(handle_exception):271 Client
>>   /usr/share/YaST2/clients/lan.rb failed with
>>   'No network service defined.' (ArgumentError).
>>   
>> Backtrace:
>> 
>> /usr/share/YaST2/modules/NetworkService.rb:97:in `RunSystemCtl'
>> /usr/share/YaST2/modules/NetworkService.rb:470:in `disable_service'
>> /usr/share/YaST2/modules/NetworkService.rb:198:in `disable'
>> /usr/share/YaST2/modules/Lan.rb:502:in `Write'
>> /usr/share/YaST2/include/network/lan/complex.rb:205:in `WriteDialog'
>> /usr/share/YaST2/include/network/lan/wizards.rb:58:in `block in LanSequence'
>> /usr/lib64/ruby/vendor_ruby/3.3.0/yast/builtins.rb:546:in `eval'
>> /usr/share/YaST2/modules/Sequencer.rb:247:in `WS_run'
>> /usr/share/YaST2/modules/Sequencer.rb:318:in `block in Run'
>> <internal:kernel>:187:in `loop'
>> /usr/share/YaST2/modules/Sequencer.rb:310:in `Run'
>> /usr/share/YaST2/include/network/lan/wizards.rb:88:in `LanSequence'
>> /usr/lib64/ruby/vendor_ruby/3.3.0/yast/fun_ref.rb:33:in `call'
>> /usr/lib64/ruby/vendor_ruby/3.3.0/yast/fun_ref.rb:33:in `call'
>> /usr/share/YaST2/modules/CommandLine.rb:1569:in `Run'
>> /usr/share/YaST2/clients/lan.rb:207:in `main'
>> /usr/share/YaST2/clients/lan.rb:221:in `<top (required)>'
>> /usr/lib64/ruby/vendor_ruby/3.3.0/yast/wfm.rb:345:in `eval'
>> /usr/lib64/ruby/vendor_ruby/3.3.0/yast/wfm.rb:345:in `run_client'
>> /usr/lib64/ruby/vendor_ruby/3.3.0/yast/wfm.rb:206:in `call_builtin'
>> /usr/lib64/ruby/vendor_ruby/3.3.0/yast/wfm.rb:206:in `call_builtin_wrapper'
>> /usr/lib64/ruby/vendor_ruby/3.3.0/yast/wfm.rb:195:in `CallFunction'
Comment 5 Stefan Hundhammer 2024-04-22 15:19:50 UTC
I see *a lot* of package actions in the zypp history around that time: Packages being removed and installed with the YaST Qt package manager, repos being added and removed; some of them contradictory.

Just some repo actions from zypp/history:

>>  2024-02-20 08:55:19|radd   |openSUSE-20240216-0|cd:/?devices=/dev/disk/by-id/ata-HL-DT-ST_DVDRAM_GHC0N_703HC014424|
>>  2024-02-20 08:55:19|radd   |repo-update|http://download.opensuse.org/update/tumbleweed/|
>>  2024-02-20 08:55:19|radd   |repo-oss|http://download.opensuse.org/tumbleweed/repo/oss/|
>>  2024-02-20 08:55:19|radd   |repo-non-oss|http://download.opensuse.org/tumbleweed/repo/non-oss/|
>>  2024-02-20 08:55:19|radd   |repo-debug|http://download.opensuse.org/debug/tumbleweed/repo/oss/|
>>  2024-02-20 08:55:19|radd   |repo-source|http://download.opensuse.org/source/tumbleweed/repo/oss/|
>>  2024-02-20 08:55:19|radd   |repo-openh264|http://codecs.opensuse.org/openh264/openSUSE_Tumbleweed|
>>  2024-04-09 13:00:51|radd   |leap_15.4_oss|http://download.opensuse.org/distribution/leap/15.5/repo/oss/|
>>  2024-04-09 13:00:51|radd   |leap_15.4_non_oss|http://download.opensuse.org/distribution/leap/15.4/repo/non-oss/|
>>  2024-04-09 13:06:53|rremove|leap_15.4_non_oss|
>>  2024-04-09 13:06:53|rremove|leap_15.4_oss|
>>  2024-04-09 13:06:53|radd   |leap_15.4_non_oss|http://download.opensuse.org/distribution/leap/15.3/repo/non-oss/|
>>  2024-04-09 13:06:53|radd   |leap_15.4_oss|http://download.opensuse.org/distribution/leap/15.3/repo/oss/|
>>  2024-04-09 13:11:18|rremove|leap_15.4_non_oss|
>>  2024-04-09 13:11:18|rremove|leap_15.4_oss|


Mixing TW and Leap repos is asking for trouble; even more so if it's not even the latest Leap 15.5, but an even older one like Leap 15.4. But in any case that can easily lead to a very inconsistent system state.
Comment 6 Stefan Hundhammer 2024-04-22 15:21:05 UTC
Even worse: If you look at the repo URLs, you will also find some 15.3 repos. That's a wild mixture of distro versions; nasty surprises are to be expected.
Comment 7 Stefan Hundhammer 2024-04-22 15:33:26 UTC
Here are upgrades, downgrades and upgrades again of yast2-network (I just grepped for that name, I didn't even check how many other YaST packages were up- and downgraded at the same time):

>> 2024-02-20 08:50:42|install|yast2-network|5.0.2-1.1|noarch||openSUSE-20240216-0
>> 2024-02-26 10:22:48|install|yast2-network|5.0.2-1.2|noarch||repo-oss
>> 2024-03-18 10:49:44|install|yast2-network|5.0.3-1.1|noarch||repo-oss
>> 2024-04-09 13:02:31|install|yast2-network|4.5.20-150500.1.1|noarch|root@swilx010|leap_15.4_oss
>> 2024-04-09 13:08:58|install|yast2-network|4.3.67-1.1|noarch|root@swilx010|leap_15.4_oss
>> 2024-04-09 13:14:36|command|root@swilx010|'zypper' 'up' 'yast2-network'|
>> 2024-04-09 13:14:36|install|yast2-network|5.0.3-1.1|noarch|root@swilx010|repo-oss


Tumbleweed / Factory yast2 packages should have a 5.0.x version number. Here we see 4.5.x and even 4.3.x between them.


It's okay to experiment with the system if you are technically inclined and willing to fix it when things go wrong, but don't expect us to sort out this kind of mess.
Comment 8 Stefan Hundhammer 2024-04-22 15:59:31 UTC
As for the message that appeared: yast2-network needs one of the supported backends, either network manager or wicked. If none of them is available, there is nothing that it can configure.

On TW, wicked is not installed by default, which leaves only network manager. If that is deinstalled (which is possible if you don't want any network at all) or wrecked, yast2-network only has the option to install the missing packages. But if a system is already really inconsistent, that may or may not work.
Comment 9 Stefan Hundhammer 2024-04-22 16:18:03 UTC
Created attachment 874420 [details]
Screenshot: "yast2 lan"    "Global Options" tab with open "General Network Settings" combo box open

Here you can see the options for network setup:

- Network Manager
- Wicked
- No network
Comment 10 Stefan Hundhammer 2024-04-22 16:24:09 UTC
Since you have a Btrfs root filesystem, reverting to a previous snapshot where things were still working would be an option. It's less painful than a new installation.
Comment 11 Heinrich Seebauer 2024-04-23 11:01:35 UTC
Root cause was that 'wicked' networking was not installed.
Tumbleweed actvated Network Manager by default, as it seems, and Wicked is not installed by default, and, als, had been missing.
Installed Wicked and everything works as expected.

Thank you, very much, Stefan, for your help.
Comment 12 Stefan Hundhammer 2024-04-23 12:25:28 UTC
You are welcome!

Yes, TW installs and uses Network Manager by default since that is a widely accepted Open Source project used by lots of other distributions as well.

Wicked OTOH is a SUSE Open Source project that doesn't seem to be used by any other distributions. AFAIK it's more powerful and has more options, but little community support outside of SUSE, so the openSUSE community decided years ago that they prefer Network Manager.
Comment 13 Felix Miata 2024-04-24 02:36:55 UTC
Heinrich, TW provides a 4th rpm option: systemd-network. AFAIR, it too is not installed by default. YaST hasn't been adapted to use it yet, but I have about 40 TW installations that have been using it and static IPs since before it was issued as a separate package instead of inclusion as part of the systemd rpm. I do have one using NM (with Leap), but none using Wicked. e.g.:
# rpm -qa | grep d-net
systemd-network-255.4-2.1.x86_64
# cat /etc/systemd/network/eth0.network
[Match]
PermanentMACAddress=<filter>

[Network]
Address=...
DNS=...
Gateway=...
IPv6AcceptRA=...
LinkLocalAddressing=...
# systemctl list-unit-files | egrep 'twor|ager|wick|solv'
display-manager.service                  enabled         enabled
systemd-network-generator.service        disabled        disabled
systemd-networkd-wait-online.service     disabled        disabled
systemd-networkd-wait-online@.service    disabled        disabled
systemd-networkd.service                 disabled        disabled
systemd-resolved.service                 masked          disabled
systemd-networkd.socket                  enabled         disabled
network-online.target                    static          -
network-pre.target                       static          -
network.target                           static          -
#
Comment 14 Heinrich Seebauer 2024-04-29 08:26:38 UTC
Hello Felix,

thanks for your comment on this valuable feature.
Good to know about that option, but, since I've got that configration up & running OK, I hope not being obliged to try another way.