Bug 1219543

Summary: TW: yast2-online-update-configuration does not save switching on
Product: [openSUSE] openSUSE Tumbleweed Reporter: Kasimir _ <kasimir_>
Component: YaST2Assignee: E-mail List <yast2-maintainers>
Status: RESOLVED INVALID QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: aarch64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast2-online-update-configuration on aarch64

Description Kasimir _ 2024-02-04 15:35:56 UTC
Created attachment 872438 [details]
yast2-online-update-configuration on aarch64

I wanted to use yast2-online-update-configuration. To do this, I opened yast2-online-update-configuration, switched it on, set the options and exited with OK. After reopening yast2-online-update-configuration, the options are still set as desired, but it is no longer switched on (see attachment).

I noticed this with the RPi4 (aarch64)[1] and RPi2 (armv7l)[2]. With x86, turning on yast2-online-update-configuration is saved.

[1] https://download.opensuse.org/ports/aarch64/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-X11-raspberrypi.aarch64-2024.01.16-Snapshot20240131.raw.xz
[2] https://download.opensuse.org/ports/armv7hl/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-JeOS-raspberrypi2.armv7l-2024.01.16-Snapshot20240131.raw.xz
Comment 1 Stefan Hundhammer 2024-02-05 09:37:48 UTC
For starters, that YaST module is about enabling unattended online updates via patches (a collection of packages that belong together to fix one single problem).

The unattended part comes with a big caveat because it will silently ignore updates that cannot be installed without any user interaction. So as soon as there is any dependency conflict (which can easily happen), it will automatically choose the most defensive option of that conflict handling which is almost always "do not install the updated package".

I believe there is a section in the PDF documentation that explains this and warns against it.

For another thing, Tumbleweed as a rolling release does not use patches, it uses update RPMs. The official and documented way to update TW is with "zypper dup" which installs updated RPMs, and more often than not does a bit more: "dup" is short for "Distribution UPdate". The idea is to always keep your distribution update to the latest one, to keep the rolling release rolling.

Of course, that can lead to dependency conflicts a lot more often; they usually need manual interaction which the fully automated unattended update does not support.

I'll check how much of that is even supported in Tumbleweed.
Comment 2 Stefan Hundhammer 2024-02-05 09:42:41 UTC
The reference documentation for this YaST module for Leap 15.5:

https://doc.opensuse.org/documentation/leap/startup/html/book-startup/cha-onlineupdate-you.html#sec-onlineupdate-you-automatically
Comment 3 Stefan Hundhammer 2024-02-05 09:45:47 UTC
https://en.opensuse.org/Portal:Tumbleweed

"Rolling release means no updates, only urgent patches and upgrades

When updating Tumbleweed, you can use YaST or the system update applet just as on Leap.

To keep Tumbleweed updated to the latest snapshot using zypper, run the following command as root (ideally inside a screen or tmux session):

  zypper dup
"
Comment 4 Stefan Hundhammer 2024-02-05 09:53:45 UTC
On TW, when you start

  sudo yast2 online_update

you will not get the YaST Online Update module, you will get the "sw_single" module instead, where you can switch to the "Repositories" view, select the "@System" category (all installed packages) from the list on the left. All the packages with a blue version number have updated versions available, so you can use menu "Package" -> "All in this list" -> "Update if newer version available".

That is the very complicated counterpart to a 

  sudo zypper up

command line; notice that this does less than the recommended

  sudo zypper dup
Comment 5 Stefan Hundhammer 2024-02-05 09:58:11 UTC
That "yast2-online-update-configuration" module is less than useless on Tumbleweed; it gives users a false sense of security. They probably think that their system is being taken care of with automated unattended updates in the background.

I am not sure if it even does anything on TW. In the best case, it would simply do a

  zypper dup

with root permissions, but if any manual interaction is needed, that would go unnoticed, an the system would increasingly become outdated without the user even knowing.

A RasPi doing silent tasks in the background without any system console would be dangerously outdated very quickly if the user doesn't check it on a regular basis; and who does that if that machine is just sitting there and apparently working?
Comment 6 Stefan Hundhammer 2024-02-05 10:12:57 UTC
So in conclusion, if that yast2-online-update-configuration module does not save any configuration on TW, it does the right thing. 

Should it go even further and tell the user that it cannot work on Tumbleweed? Maybe. Or maybe not; some users might find a legitimate use case for it after all.

But in order to avoid giving users a false sense of security an mentioned in comment #5, it shouldn't be there on TW in the first place.

Kasimir, did you get it installed by default? (Probably not)
Or did you have to install it manually?
Comment 7 Stefan Hundhammer 2024-02-05 10:38:18 UTC
This is the script that the module will ultimately install and add to /etc/cron.daily/, /etc/cron.weekly/, /etc/cron.monthly/ :

https://github.com/yast/yast-online-update-configuration/blob/master/src/bin/online_update
Comment 11 Stefan Hundhammer 2024-02-05 12:36:27 UTC
This script builds a zypper command based on

  zypper patch

with various options; but it's always 'zypper patch', never 'zypper dup' or 'zypper up'.

But 'zypper patch' will always just do nothing on TW because there are no patches for TW.
Comment 12 Stefan Hundhammer 2024-02-07 12:24:48 UTC
In summary, this yast2-online-update-configuration is not suitable for a rolling release like Tumbleweed. Even if it would do what it is designed to do, that would be the wrong thing.

The intended and documented way to keep Tumbleweed up to date is 'zypper dup'. But that might need some manual intervention every now and then, so doing that unattended, for example in a cron job or with a systemd timer, has limitations.

Bug #1219562 (which happened to me as I was investigating this bug) is a drastic example what can go wrong.


As for yast2-online-update-configuration, we will file a drop request for Tumbleweed because it can only lead to a false sense of security as explained above.