Project

General

Profile

Actions

tickets #167362

closed

Avoid package removals on automatic update download failure

Added by crameleon about 2 months ago. Updated 19 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Core services and virtual infrastructure
Target version:
-
Start date:
2024-09-26
Due date:
% Done:

0%

Estimated time:

Description

From https://progress.opensuse.org/issues/167359:

Sep 25 01:26:08 mailman3 systemd[1]: Starting Update of system...
Sep 25 01:26:17 mailman3 os-update[19993]: Retrieving repository 'openSUSE:infrastructure' metadata [.error]
Sep 25 01:26:17 mailman3 os-update[19993]: Repository 'openSUSE:infrastructure' is invalid.
Sep 25 01:26:17 mailman3 os-update[19993]: [openSUSE:infrastructure|http://download-prg.infra.opensuse.org/repositories/openSUSE:/infrastructure/openSUSE_Tumbleweed/] Valid metadata not found at specified URL
Sep 25 01:26:17 mailman3 os-update[19993]: History:
Sep 25 01:26:17 mailman3 os-update[19993]:  - [|] Error trying to read from 'http://download-prg.infra.opensuse.org/repositories/openSUSE:/infrastructure/openSUSE_Tumbleweed/'
Sep 25 01:26:17 mailman3 os-update[19993]: Please check if the URIs defined for this repository are pointing to a valid repository.
Sep 25 01:26:17 mailman3 os-update[19993]: Warning: Skipping repository 'openSUSE:infrastructure' because of the above error.
Sep 25 01:26:27 mailman3 os-update[19993]: Retrieving repository 'openSUSE_infrastructure_mailman3' metadata [.error]
Sep 25 01:26:27 mailman3 os-update[19993]: Repository 'openSUSE_infrastructure_mailman3' is invalid.
Sep 25 01:26:27 mailman3 os-update[19993]: [openSUSE_infrastructure_mailman3|http://download.infra.opensuse.org/repositories/openSUSE:/infrastructure:/mailman3/openSUSE_Tumbleweed/] Valid metadata not found at specified URL
Sep 25 01:26:27 mailman3 os-update[19993]: History:
Sep 25 01:26:27 mailman3 os-update[19993]:  - [|] Error trying to read from 'http://download.infra.opensuse.org/repositories/openSUSE:/infrastructure:/mailman3/openSUSE_Tumbleweed/'
Sep 25 01:26:27 mailman3 os-update[19993]: Please check if the URIs defined for this repository are pointing to a valid repository.
Sep 25 01:26:27 mailman3 os-update[19993]: Warning: Skipping repository 'openSUSE_infrastructure_mailman3' because of the above error.
Sep 25 01:26:36 mailman3 os-update[19993]: Retrieving repository 'repo-oss' metadata [.error]
Sep 25 01:26:36 mailman3 os-update[19993]: Repository 'repo-oss' is invalid.
Sep 25 01:26:36 mailman3 os-update[19993]: [repo-oss|http://download.infra.opensuse.org/tumbleweed/repo/oss/] Valid metadata not found at specified URL
Sep 25 01:26:36 mailman3 os-update[19993]: History:
Sep 25 01:26:36 mailman3 os-update[19993]:  - [|] Error trying to read from 'http://download.infra.opensuse.org/tumbleweed/repo/oss/'
Sep 25 01:26:36 mailman3 os-update[19993]: Please check if the URIs defined for this repository are pointing to a valid repository.
Sep 25 01:26:36 mailman3 os-update[19993]: Warning: Skipping repository 'repo-oss' because of the above error.
Sep 25 01:26:36 mailman3 os-update[19993]: Some of the repositories have not been refreshed because of an error.
Sep 25 01:26:36 mailman3 os-update[19993]: Loading repository data...
Sep 25 01:26:36 mailman3 os-update[19993]: Reading installed packages...
Sep 25 01:26:36 mailman3 os-update[19993]: Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this>
Sep 25 01:26:36 mailman3 os-update[19993]: Computing distribution upgrade...
Sep 25 01:26:37 mailman3 os-update[19993]: The following item is locked and will not be changed by any action:
Sep 25 01:26:37 mailman3 os-update[19993]:  Installed:
Sep 25 01:26:37 mailman3 os-update[19993]:   redis
Sep 25 01:26:37 mailman3 os-update[19993]: The following package is going to be REMOVED:
Sep 25 01:26:37 mailman3 os-update[19993]:   python3-mailman-web
Sep 25 01:26:37 mailman3 os-update[19993]: 1 package to remove.
Sep 25 01:26:37 mailman3 os-update[19993]: Package install size change:
Sep 25 01:26:37 mailman3 os-update[19993]:               |         0 B    required by packages that will be installed
Sep 25 01:26:37 mailman3 os-update[19993]:   -123.8 KiB  |  -  123.8 KiB  released by packages that will be removed
Sep 25 01:26:37 mailman3 os-update[19993]: Backend:  classic_rpmtrans
Sep 25 01:26:37 mailman3 os-update[19993]: Continue? [y/n/v/...? shows all options] (y): y
Sep 25 01:26:37 mailman3 [RPM][20065]: Transaction ID 66f366cd started
Sep 25 01:26:38 mailman3 [RPM][20065]: erase python3-mailman-web-0.0.9-81.2.noarch: success
Sep 25 01:26:38 mailman3 os-update[19993]: (1/1) Removing: python3-mailman-web-0.0.9-81.2.noarch [..
Sep 25 01:26:38 mailman3 os-update[19993]: warning: /etc/mailman3/settings.py saved as /etc/mailman3/settings.py.rpmsave
Sep 25 01:26:38 mailman3 [RPM][20065]: erase python3-mailman-web-0.0.9-81.2.noarch: success
Sep 25 01:26:38 mailman3 [RPM][20065]: Transaction ID 66f366cd finished: 0
Sep 25 01:26:38 mailman3 os-update[19993]: .done]
Sep 25 01:26:38 mailman3 os-update[19993]: Running post-transaction scripts [...done]
Sep 25 01:26:39 mailman3 os-update[19993]:
Sep 25 01:26:39 mailman3 os-update[19992]: ERROR: update failed, exit code was 106
Sep 25 01:26:39 mailman3 os-update[20227]: ERROR: update failed, exit code was 106

If download.i.o.o fails, the update job should not proceed to do seemingly "random" things such as removing a package without installing the corresponding update candidate.

In my opinion, this is a problem with zypper, it should not do such dangerous "best effort" operations if called non-interactively (global -n switch) but rather die early.

One idea to improve it in our infrastructure would be adding something like ExecStartPre=ping -c1 <mirror> in a os-update.service drop-in - of course, that only covers the situation partially (for example, what if the HTTP server dies while zypper refreshes the repositories).


Related issues 1 (0 open1 closed)

Follows openSUSE admin - tickets #167359: mailing lists interface down?Resolvedcrameleon2024-09-25

Actions
Actions #1

Updated by crameleon about 2 months ago

  • Private changed from Yes to No
Actions #2

Updated by crameleon about 2 months ago

  • Due date set to 2024-09-26
  • Start date changed from 2024-09-25 to 2024-09-26
  • Follows tickets #167359: mailing lists interface down? added
Actions #3

Updated by crameleon about 2 months ago

  • Due date deleted (2024-09-26)
Actions #4

Updated by cboltz about 2 months ago

Welcome to https://bugzilla.opensuse.org/show_bug.cgi?id=1223446 ;-) - I just CC'd you there.

Actions #5

Updated by crameleon about 2 months ago

Thanks!

I feel the explicit refresh solution suggested by Michael to be a workaround and would prefer safer handling in zypp, but I proposed it to os-update now regardless: https://github.com/openSUSE/os-update/pull/21.

Actions #6

Updated by crameleon 19 days ago

  • Status changed from New to In Progress
  • Assignee set to crameleon
Actions #7

Updated by crameleon 19 days ago

  • Status changed from In Progress to Resolved

Improvement was accepted and released in Factory in the meanwhile.

Actions

Also available in: Atom PDF