Bug 31054 - mgaonline should update list of *current* updates
Summary: mgaonline should update list of *current* updates
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal enhancement
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 28736
  Show dependency treegraph
 
Reported: 2022-10-31 10:27 CET by Morgan Leijström
Modified: 2022-11-01 18:10 CET (History)
1 user (show)

See Also:
Source RPM: mgaonline
CVE:
Status comment:


Attachments

Description Morgan Leijström 2022-10-31 10:27:58 CET
Description of problem:

Some users dont let in updates quickly when mgaonline shows the popup.  When they do later, it takes two rounds, and some large frequent updates like firefox, thunderbird, chromium, kernel may get downloaded in a first redundant old version, taking unnecessary internet time and possible cost, and in kernel case uneccessary disk space.

I have seen that when I help maintain such systems:
1) mgaonline shows there are updates, and i click to let it update.
2) i watch the list and it i.e contain updates to firefox and thunderbird - but not the latest updates of them, and some other updates are missing.
3) it performs suggested updates and comes back with empty list.
4) some minutes later mgaonline shows there are again updates, and now it shows the latest; Firefox and tunderbird are updated again, and other late updates.

It seem to me that once mgaonline have found there are updates, it does not do new checks even for weeks, when system is only suspended/hibernated - it need be reboted or user logged out/in to refresh itself.

Suggestion: refresh the search for updates either
1) When user clicks to install updates
2) Keep using the timely checks 


Version-Release number of selected component (if applicable):
Current in mga8, since ever I presume


How reproducible: always
Morgan Leijström 2022-10-31 10:30:54 CET

Blocks: (none) => 28736

Comment 1 Dave Hodgins 2022-10-31 18:54:55 CET
In cauldron users are expected to run "drakrpm-edit-media --expert" and enable
the updates tag for the release media.

In stable releases that should not be done as it drastically increases the
time it takes to check for updates.

CC: (none) => davidwhodgins

Comment 2 Morgan Leijström 2022-10-31 19:55:55 CET
I am only talking about normal updates in a supported release.
Comment 3 Dave Hodgins 2022-10-31 21:14:13 CET
In the case where there are priority updates (glibc etc.) they will be
installed and then mgapplet restarted, and then show the non priority updates.
The priority updates may change how mgaapplet/urpmi/rpm work, so they get done
first.

mgaapplet checks for updates every X hours (configured using mgaapplet-config,
with the setting stored in /etc/sysconfig/mgaapplet). It also has a delay
on the first check for updates after login.

If mgaapplet is used to install updates and the mirror has synced a new
update since mgaapplet last checked, then the first set up updates get
installed, mgaapplet checks for further updates and finds them.
This should not happen very often as it's rare that we push updates more
than once a day.

If you find a case where it doesn't show the updates without logout/in,
please attach the output of
"journalctl --no-h|grep mgaapplet|tail -n 50>journal.txt"
Comment 4 Morgan Leijström 2022-10-31 22:24:09 CET
I have several times came to that computer after not having been updated for weeks.  Clicked the popup to update, just to minutes later find a bunch of more updates, and sometimes update of the same application that just updated, like Firefox.  And that is separate from handling of priority updates.  And the computer is in use every day, using same good mirror as my own machine (umu.se).

The behaviour is repeatable - after waiting a couple weeks without reboot or logout.
Comment 5 Morgan Leijström 2022-11-01 00:19:40 CET
Will see if I can grab from journal from that computer in a couple days.
Comment 6 Morgan Leijström 2022-11-01 17:39:34 CET
(In reply to Dave Hodgins from comment #3)
> mgaapplet checks for updates every X hours

It was set to 6 hours, but I would say it do not obey as I interprete it;

grep:ing journal for "resumed"

okt 27 07:31:00 aspire7-kajsa systemd-sleep[222954]: System resumed.
okt 27 07:59:26 aspire7-kajsa systemd-sleep[246547]: System resumed.
okt 27 08:32:39 aspire7-kajsa systemd-sleep[269505]: System resumed.
okt 27 11:41:24 aspire7-kajsa systemd-sleep[275055]: System resumed.
okt 27 13:10:16 aspire7-kajsa systemd-sleep[285060]: System resumed.
okt 27 18:11:48 aspire7-kajsa systemd-sleep[290620]: System resumed.
okt 27 18:46:52 aspire7-kajsa systemd-sleep[295114]: System resumed.
okt 28 07:19:03 aspire7-kajsa systemd-sleep[304653]: System resumed.
okt 28 10:02:02 aspire7-kajsa systemd-sleep[312407]: System resumed.
okt 28 13:35:50 aspire7-kajsa systemd-sleep[319567]: System resumed.
okt 29 10:55:10 aspire7-kajsa systemd-sleep[326360]: System resumed.
okt 29 13:57:15 aspire7-kajsa systemd-sleep[335921]: System resumed.
okt 30 08:58:48 aspire7-kajsa systemd-sleep[342567]: System resumed.
okt 30 13:20:25 aspire7-kajsa systemd-sleep[353018]: System resumed.

We see it was resumed several times for a few days

But looking for mgaapplet in journal we see it was not aware time passed; it was not checking for several days despite system was running now and then.

okt 27 07:31:18 mgaapplet[5961]: Checking... Updates are available
okt 31 08:25:42 mgaapplet[5961]: Launching MageiaUpdate
okt 31 08:25:42 mgaapplet[5961]: running: MageiaUpdate --no-media-update --no-confirmation --no-splash

And when user finally launced it, it was not checking for fresh updates ( --no-media-update )


So here are actually two problems:

1) I think it should check for updates with the set interval per clock, not per run hours or whatever it is.  Or that dialogue to set it should tel it is run hours.

2) When user choose to start updating, it ought to check how long time it was since it actually checked. If it is linger than the set interval, do update media and re-check!
Comment 7 Dave Hodgins 2022-11-01 18:10:08 CET
I see journal messages such as ...
# journalctl -b --no-h|grep mgaapplet|tail -n 5
Nov 01 12:07:44 mgaapplet[2743]: Computing new updates...
Nov 01 12:07:44 mgaapplet[2743]: running: mgaapplet-update-checker
Nov 01 12:07:44 mgaapplet-update-checker[108083]: ### Program is starting ###
Nov 01 12:07:45 mgaapplet-update-checker[108083]: running: urpmi.update --update
Nov 01 12:07:50 mgaapplet[2743]: Packages are up to date

# journalctl -b --no-h|grep 'urpmi.update'|tail -n 4
Nov 01 12:07:45 mgaapplet-update-checker[108083]: running: urpmi.update --update
Nov 01 12:07:45 pkexec[108087]: dave: Executing command [USER=root] [TTY=unknown] [CWD=/] [COMMAND=/usr/libexec/urpmi.update --update]
Nov 01 13:07:45 mgaapplet-update-checker[109553]: running: urpmi.update --update
Nov 01 13:07:45 pkexec[109557]: dave: Executing command [USER=root] [TTY=unknown] [CWD=/] [COMMAND=/usr/libexec/urpmi.update --update]

# cat /etc/sysconfig/mgaapplet
FIRST_CHECK_DELAY=100000
UPDATE_FREQUENCY=3600

As shown, I have my system check every hour.

Note You need to log in before you can comment on or make changes to this bug.