Unattended update for opensuse server?

Hi,
On an opensuse slowroll server I enabled weekly update in the yast2 module ‘online-update-configuration’. (tick auto-agree-licence and skip interactive package). One month later I find it not doing any update during this time.
Online research lead me to a reddit post that says auto update should be set up after installing transactional-update and rebootmgr services

Any idea why online-update-configuration module is not working as expected?

It is NOT meant to be used with Slowroll or Tumbleweed. YOU is for Leap. Slowroll and Tumbleweed needs to be upgraded via zypper dup. You could have become suspicious when you see that the YOU window opens with the tab “Patches”. As Tumbleweed/Slowroll does not use patches but full package updates/upgrades, that should have been a stop sign for you.

As YaST is a universal tool for all openSUSE distributions, not all modules are applicable for each distribution flavor.

But you can for sure set up a systemd timer/service which performs a zypper dup for you. transactional-updates is officially NOT supported on Tumbleweed/Slowroll as it is meant for immutable distributions only.

“Patches” (as used in YOU) are full package updates/upgrades.

This doesn’t change the situation, that YOU is not applicable for Tumbleweed/Slowroll. A Tumbleweed/Slowroll system on an older snapshot can only be upgraded via zypper dup. YOU shows no available patches even if 345 packages need an upgrade, as seen in the screenshot:

Thanks. That’s very informative.

I hope there’d be some clarification on the module’s help page, and better some guidance on how to do automatic update on TW/slowroll. I guess they’d argue that TW/slowroll should not do unattended automatic upgrade in the first place?!

But I really don’t like Leap at the moment, as I had quite some issues with the flavor until I switched to TW/Slowroll.

Another alternative is the package os-update which contains an already preconfigured systemd service/timer. The package is available from the standard OSS repo. Documentation here.

1 Like

openSUSE documentation can be incomplete and confusing. However man transactional-update is detailed and precise on how to use transactional-update. Host freiburg, a sibling of Infamous Host Erlangen runs on Tumbleweed and performs daily unattended upgrades since July 2024:

root@freiburg: ~
# systemctl cat transactional-update.timer
# /usr/lib/systemd/system/transactional-update.timer
[Unit]
Description=Daily update of the system
Documentation=man:transactional-update(8)
After=network.target local-fs.target

[Timer]
OnCalendar=daily
AccuracySec=1m
RandomizedDelaySec=2h
Persistent=true

[Install]
WantedBy=timers.target

root@freiburg: ~
# 

A single drop-in file checks for availability of repos and avoids interference with other services:

root@freiburg: ~
# cat /etc/systemd/system/transactional-update.service.d/override.conf
[Unit]
After=btrbk-backup-home.service btrbk-backup-root.service btrfs-balance.service btrfs-scrub.service

[Service]
ExecStartPre=/usr/local/bin/check-opensuse.sh

root@freiburg: ~
# 

Upgrades of host freiburg are virtually maintenance free.

You are as always free to break and bork your personal system. But this doesn’t change the fact the transactional-upgrade is totally unsupported on RW filesystems.

Quote from Thorsten Kukuk:

While transactional-update currently works with a read-write root filesystem, it is really not supported. And if we need to break it for new features, we will break it.
Using transactional-uodate on a read-write filesystem can lead to data lossage.

So please don‘t advertise unsupported tools which can anytime get removed/broken as outlined by the devs.

https://bugzilla.opensuse.org/show_bug.cgi?id=1221742#c27

And as outlined by one of the Admins in another thread from you: no need to reinvent the wheel, when fully supported, maintained and working tools like os-update exist.

2 Likes

Appreciate the reply. I did exactly that yesterday following the reddit method. Now it seems I should switch to the os-update method to be safe.

You are welcome.

Great!

Not exactly. Astute readers learned they may safely ignore strong opinions unsupported by evidence.

Both methods are described in the man pages: os-update vs. transactional-update. While os-update works on the running system transactional-update works on a current snapshot of the running system. Always choose what fits your workflow best.

You weren’t able to provide evidence (in opposite to the cited developer which explains that it is unsupported) that transactional-update is officially supported on Tumbleweed/Slowroll/Leap (all OS with rw filesystem).
So in other words you say that your opinion without evidence can be ignored?

I trust the openSUSE devs, when they say that something is not supported (and explain why). Even more when they say that an unsupported function can be removed or willingly broken without warning.

As already said, you are free to use or do whatever you want on your systems. But please don’t assume that your unsupported and unsafe practices should be applied by other users.

Closed pending moderator review.