Bug 1090505 - yast2 automatic online update calls useless "zypper patch" on Tumbleweed instead of "zypper dup"
yast2 automatic online update calls useless "zypper patch" on Tumbleweed inst...
Status: NEW
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Upgrade Problems
Current
Other Other
: P4 - Low : Enhancement (vote)
: ---
Assigned To: Ladislav Slezák
Jiri Srain
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-04-23 07:59 UTC by Oliver Kurz
Modified: 2019-01-25 16:31 UTC (History)
4 users (show)

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


Attachments
y2logs including zypper.log showing errors and workarounds (1.78 MB, application/x-xz)
2018-04-23 07:59 UTC, Oliver Kurz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Kurz 2018-04-23 07:59:14 UTC
Created attachment 767940 [details]
y2logs including zypper.log showing errors and workarounds

## Observation

On an older openSUSE Tumbleweed installation, originally from 2016, no available updates are shown since some time, I guess since the repo format of openSUSE Tumbleweed was changed to "rpm-md" by default?. Calling `zypper ref` reveals:

```
File '/content' not found on medium 'http://download.opensuse.org/tumbleweed/repo/oss/'
```

## Problem

The repo configuration file /etc/zypp/repos.d/repo-oss.repo is configured with "type=yast2". Changing that to "type=rpm-md" fixes this. Shouldn't that transformation have happened automatically? If not possible then I am not sure if announcements project-wide were enough.

## Further details

See attached y2log files including the zypper.log which shows the errors on trying to refresh the repos as well as the fixed updated calls.
Comment 1 Stephan Kulow 2018-04-23 08:06:56 UTC
So what is the current version of it? you say 'originally from 2016'
Comment 2 Michael Andres 2018-04-23 10:31:55 UTC
> -------------------------------------------------------------------
> Wed Jul 12 17:06:14 CEST 2017 - ma@suse.de
> - repo refresh: Re-probe if the repository type changes (bsc#1048315)
> - version 16.14.0 (0)

Duplicate?
Comment 3 Oliver Kurz 2018-04-24 18:18:49 UTC
The error messages in /var/log/zypper.log it started with

```
2018-03-26 10:00:04 <5> qa-sle-dashboard47(24797) [zypp] Exception.cc(log):137 MediaCurl.cc(evaluateCurlCode):1109 THROW:    File '/content' not found on medium 'http://download.opensuse.org/tumbleweed/repo/oss'
```

And many log entries from 2018-03-25 exist which mention something like "user installed …" so I would say:

2018-03-25


I was checking mailing list archives and google if I can find anything but nothing in
https://lists.opensuse.org/opensuse-factory/2018-03/threads3.html
that looks related and the only post remotely related is
https://lists.opensuse.org/opensuse-factory/2018-02/msg00449.html about openSUSE Leap 15.0

So is it a duplicate of bug 1048315 ? Kinda, because I have libzypp 16.12.0-1.2 currently installed which is the old version before the fix in 16.14.0 but then I wonder about the yast online-update tool which was configured but apparently did not do its job properly.
Comment 4 Michael Andres 2018-04-25 06:36:41 UTC
(In reply to Oliver Kurz from comment #3)
> So is it a duplicate of bug 1048315 ? Kinda, because I have libzypp
> 16.12.0-1.2 currently installed which is the old version before the fix

Yes. 16.14. will re-probe and detect that it's now rpm-md.

*** This bug has been marked as a duplicate of bug 1048315 ***
Comment 5 Oliver Kurz 2018-04-25 07:20:21 UTC
I think I made myself not clear. I reopen the bug and update the subject line. Can someone understand from the attached log files why the automatic update of packages did not work?
Comment 6 Dominique Leuenberger 2018-04-25 07:29:33 UTC
(In reply to Oliver Kurz from comment #5)
> I think I made myself not clear. I reopen the bug and update the subject
> line. Can someone understand from the attached log files why the automatic
> update of packages did not work?

Was that machine EVER updated in the time since libzypp was updated until the product published as an rpm-md repo? We had a > 6 month gap to get users going. At one point we just had to 'move'.
Comment 7 Oliver Kurz 2018-04-25 07:35:51 UTC
(In reply to Dominique Leuenberger from comment #6)
> Was that machine EVER updated in the time since libzypp was updated until
> the product published as an rpm-md repo?

Apparently not and I think you did nothing wrong with the big enough time gap. I just wonder why the yast automatic online update did not do what I expected it to do. And I am even assuming I did something wrong configuring it but I do not understand what hence my kinq request for someone with better understanding of the yast+zypper logs can help me understand what went wrong.
Comment 8 Michael Andres 2018-04-25 08:23:42 UTC
(The '/content not found' error appears since 2018-03-26.)

The zypper.log contains daily calls to `zypper --non-interactive --quiet patch --skip-interactive --no-recommends` since 2018-01-03. These calls see >1500 package update candidates, but seem to find not a single patch to apply. So there's nothing todo. 

Most probably because tumbleweed does not provide any patches.

AFAIK TW likes to be updated by 'zypper dup'.
Comment 9 Oliver Kurz 2018-04-25 14:19:41 UTC
Cool, thank you for your help in the investigation. Updating subject line, assigning to bugowner of yast2-online-update-configuration and reducing severity to "enhancement".
Comment 10 J. Daniel Schmidt 2018-05-09 09:38:27 UTC
Assigning to maintainer


> Shouldn't that transformation have happened automatically?

No, why?
YaST should not automatically modify the repos on a system. This is the task of the admin.
YaST2 automatic_online_update is only made to run "zypper patch" (with some other parameters) via cron. It even skips interactive patches and the ones that require reboot of the system.
The admin needs to make sure that an update repo is present.
(at least that was the original aim when the YaST module was created - it might have changed over time).
Comment 11 Ladislav Slezák 2019-01-25 07:54:45 UTC
(In reply to Michael Andres from comment #8)

> AFAIK TW likes to be updated by 'zypper dup'.

Yes, TW does not provides any patches, you have to use distribution upgrade.

The question is if we really want to do this automatically. Personally I don't think it's a good idea, see my comment https://bugzilla.suse.com/show_bug.cgi?id=1117235#c2.


I could add it into YaST but only with a big warning and explicit user confirmation when running in TW.
Comment 12 Oliver Kurz 2019-01-25 16:12:56 UTC
Yes, I would like that :)

Because the yast module is "interactive" anyway I think we can ask the user to confirm that.
Comment 13 Michael Andres 2019-01-25 16:31:02 UTC
(In reply to Ladislav Slezák from comment #11)
> > AFAIK TW likes to be updated by 'zypper dup'.

See also bug#1061384. The decision whether we (zypper/PK(WIP)) use 'up' or hint the user to use 'dup' depends on the updated products. Products which prefer being updated by `dup` should provide 'product-update() = dup" in the release package.

> static const Capability indicator( "product-update()", Rel::EQ, "dup" );
> if ( obj_r->asKind<Product>()->referencePackage().provides().matches( indicator ) ) {
>   we tell the user that the product requires to be updated by `dup`