Bug 944832 - installing updates during shutdown causes reboot
installing updates during shutdown causes reboot
Status: IN_PROGRESS
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: GNOME
Leap 15.4
x86-64 Linux
: P3 - Medium : Normal with 5 votes (vote)
: ---
Assigned To: Jonathan Kang
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-08 13:08 UTC by Olaf Hering
Modified: 2022-11-14 15:49 UTC (History)
12 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olaf Hering 2015-09-08 13:08:50 UTC
fresh leap milestone 2.

I switched from the iso install source to the online oss repo. This repo had a few differend packages compared to the iso. The gnome software installer recognized them as updates. Once I had to shutdown the system it offered a knob to install pending updates, then shutdown. I enabled that box, and hit return.
I think nothing was downloaded, but the box did a reboot instead of the expected shutdown.

If that feature is not ready yet I suggest to hide it for the time being to really and always do a reliable powerdown if that was requested.
Comment 1 Dominique Leuenberger 2015-09-08 13:36:44 UTC
If you ticked to 'install updates' then the process did as expected:

- reboot in 'update mode' (minimal startup), apply patches, then shutdown.

if you want to do a shutdown NOW, then don't opt to install the updates.
Comment 2 g y 2022-09-13 14:52:06 UTC
A shutdown with the option "install software updates before shutting down" checked always causes a restart and reboot in a loop
Comment 3 Frederic Crozat 2022-09-13 14:57:53 UTC
(In reply to Dominique Leuenberger from comment #1)
> If you ticked to 'install updates' then the process did as expected:
> 
> - reboot in 'update mode' (minimal startup), apply patches, then shutdown.
> 
> if you want to do a shutdown NOW, then don't opt to install the updates.

the offline update doesn't seem to work properly on my leap 15.4 system : no update applied after reboot, the system reboot twice and go back to gdm.
Comment 4 Yifan Jiang 2022-09-14 03:49:16 UTC
Hi Jonathan, I remember this is an area where you were spending time.
Comment 5 Jonathan Kang 2022-09-14 08:42:31 UTC
Offline update is an disabled feature for SLE, therefore it's not available in Leap as well.
Comment 7 Milachew 2022-09-14 18:19:53 UTC
(In reply to Jonathan Kang from comment #5)
> Offline update is an disabled feature for SLE, therefore it's not available
> in Leap as well.

Also, could you tell us the reason why it was decided to do this? I, unfortunately, cannot find bug reports to commits or any other information about this.

Only upstream commit and patch.
Comment 8 Yifan Jiang 2022-09-15 01:23:48 UTC
(In reply to Milachew from comment #7)
> (In reply to Jonathan Kang from comment #5)
> > Offline update is an disabled feature for SLE, therefore it's not available
> > in Leap as well.
> 
> Also, could you tell us the reason why it was decided to do this? I,
> unfortunately, cannot find bug reports to commits or any other information
> about this.
> 
> Only upstream commit and patch.

AFAIK, SLE has not been a big fan of offline update, and the Leap has targeted to downstream SLE in most cases (as Close the Leap Gap aimed for).

Meanwhile I think Olaf made a point the use case made the "offline" update felt being worked while it was not. Besides, it sounds interfering "shutdown" as reboot was lately seen.
Comment 9 Milachew 2022-09-15 08:57:53 UTC
(In reply to Yifan Jiang from comment #8)
> Meanwhile I think Olaf made a point the use case made the "offline" update
> felt being worked while it was not. Besides, it sounds interfering
> "shutdown" as reboot was lately seen.

Yeap, but also this change in PackageKit from Jonathan (https://build.opensuse.org/package/view_file/GNOME:Factory/PackageKit/PackageKit.changes?expand=1) brake upgrading from GNOME Software totally in SLE/Leap.

That's why I propose changes that could adapt GNOME Software to the new PackageKit patch.

Under ideal conditions, I would like to force PackageKit to be updated via GNOME Software without rebooting, as gpk-update-weaver does.
Comment 10 Jonathan Kang 2022-09-15 13:14:32 UTC
(In reply to Milachew from comment #9)
> (In reply to Yifan Jiang from comment #8)
> > Meanwhile I think Olaf made a point the use case made the "offline" update
> > felt being worked while it was not. Besides, it sounds interfering
> > "shutdown" as reboot was lately seen.
> 
> Yeap, but also this change in PackageKit from Jonathan
> (https://build.opensuse.org/package/view_file/GNOME:Factory/PackageKit/
> PackageKit.changes?expand=1) brake upgrading from GNOME Software totally in
> SLE/Leap.

Which one exactly? The latest one?
> 
> That's why I propose changes that could adapt GNOME Software to the new
> PackageKit patch.
> 
> Under ideal conditions, I would like to force PackageKit to be updated via
> GNOME Software without rebooting, as gpk-update-weaver does.

Upstream GNOME Software no longer support online update due to various reasons. However there is a discussion about bringing back online support here[0]. You might be interested in this.

*[0] https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1275
Comment 11 Milachew 2022-09-15 14:39:57 UTC
(In reply to Jonathan Kang from comment #10)
> 
> Which one exactly? The latest one?

No. "PackageKit-zypp-disable-upgrade-system-in-sle.patch" - this one.

(In reply to Jonathan Kang from comment #10)
> Upstream GNOME Software no longer support online update due to various
> reasons. However there is a discussion about bringing back online support
> here[0]. You might be interested in this.
> 
> *[0] https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1275

Thanks for the link!
But patch, that I posted above in this message (which you created), totally brake system upgrade via GNOME Software.
User, who doesn't know about this change, will try to install system updates via GNOME Software (because according to the documentaion he can), but the update won't work and will just reboot the device.
It will look like a bug for him.
Comment 12 Jonathan Kang 2022-09-16 02:02:38 UTC
(In reply to Milachew from comment #11)
> 
> No. "PackageKit-zypp-disable-upgrade-system-in-sle.patch" - this one.

> But patch, that I posted above in this message (which you created), totally
> brake system upgrade via GNOME Software.
> User, who doesn't know about this change, will try to install system updates
> via GNOME Software (because according to the documentaion he can), but the
> update won't work and will just reboot the device.
> It will look like a bug for him.

"upgrade-system" is designed to do a distribution upgrade, for example from openSUSE Leap 15.3 to 15.4. This has nothing to do with what's described in this bug report.

Of course, providing an entry to do an offline upadte and failing to do so is indeed an issue that should be fixed. Looking into this.
Comment 13 Milachew 2022-09-16 07:58:44 UTC
(In reply to Jonathan Kang from comment #12)
> Of course, providing an entry to do an offline upadte and failing to do so
> is indeed an issue that should be fixed. Looking into this.

Good!
I also described why might this not work in this bugreport : https://bugzilla.opensuse.org/show_bug.cgi?id=1203416.

So, if you think it necessary, you can continue there.
At that time, I didn't know that this problem was discussing here.
Comment 14 Milachew 2022-09-17 16:28:06 UTC
Hello, Dominique!
I've looked at the change history of the PackageKit package and found that the changes to disable offline updates were applied by you.

Here are the links :
https://build.opensuse.org/request/show/597329
https://build.opensuse.org/request/show/605349

Unfortunately, these changes now break system updates through GNOME Software. Instead of updating them, the computer simply reboots twice. This makes users think that this is a bug and encourages them to write bug reports.

Therefore, I proposed to return the functionality of offline updates for Leap and SLE : https://build.opensuse.org/request/show/1004371

Or, if the reasons for disabling offline updates are serious, could you post it here so that volunteers can add information to the wiki/documentation?
Comment 15 Milachew 2022-10-08 19:25:40 UTC
(In reply to Jonathan Kang from comment #12)
> Of course, providing an entry to do an offline upadte and failing to do so
> is indeed an issue that should be fixed. Looking into this.

Jonathan, I found some patch, which do "fake online upgrade" on MicroOS from Dario Faggioli : https://gitlab.gnome.org/dfaggioli/gnome-software/-/commit/40bfa07198bba0a3c2968162b2ae8b01fd1e29b8

An attempt to add it to gnome-software was successful (with some changes to make it work in Leap) : https://build.opensuse.org/package/show/home:milachew:branches:GNOME:STABLE:41/gnome-software

Also, I tried it on a test system with 15.4. Imitated the update of system components that would require a reboot: changed repo-oss to 15.5, clicked on the update check button, it was suggested to simply update without rebooting, I clicked, the update was completed and a re-check of the update found nothing.

At the same time, during the update, the wallpaper became another, and the new name of the operating system appears in the settings (openSUSE Leap 15.5).
Therefore, I concluded that the patch still works approximately as needed to fix the problem.

Perhaps it needs to be refined or improved - unfortunately, I do not have the necessary skills.
But hopefully it can help in fixing the problem.
Comment 16 Milachew 2022-10-26 13:35:20 UTC
Hello, Jonathan!
As I see, you decide to direct the user to update their system via gpk-update-viewer.
Ok.

I tried your fix and it works. But, the suggestion to install the update before reboot/shutdown is displayed anyway.

So, I propose the fixing gnome-shell of it : https://build.opensuse.org/request/show/1031355
Comment 17 Jonathan Kang 2022-11-07 01:06:23 UTC
Fixes has been submitted for gnome-software and gnome-shell. And they should be available soon. Closing this.
Comment 18 Milachew 2022-11-07 11:54:03 UTC
(In reply to Jonathan Kang from comment #17)
> And they should be available soon.

I also suggested changes directly to SP4 so that the fix would be delivered faster : 
https://build.opensuse.org/request/show/1033003
https://build.opensuse.org/request/show/1033005
Comment 19 Lubos Kocman 2022-11-07 14:03:04 UTC
Hello team,

I've noticed that the submit requests were submitted against SUSE:SLE-15-SP4:GA in the public OBS. In case of OBS you need to specify explicitly SP4:Update, as otherwise the project is locked and mirroring will fail ( https://en.opensuse.org/Portal:Jump:OBS:SRMirroring )

Could you please resubmit it as SUSE:SLE-15-SP4:Update request(s)?

Thank you
Comment 20 Milachew 2022-11-07 14:26:55 UTC
(In reply to Lubos Kocman from comment #19)
> Hello team,
> 
> I've noticed that the submit requests were submitted against
> SUSE:SLE-15-SP4:GA in the public OBS. In case of OBS you need to specify
> explicitly SP4:Update, as otherwise the project is locked and mirroring will
> fail ( https://en.opensuse.org/Portal:Jump:OBS:SRMirroring )
> 
> Could you please resubmit it as SUSE:SLE-15-SP4:Update request(s)?
> 
> Thank you

Unfortunately, I can't do it.
I get an error : "The target project SUSE:SLE-15-SP4:Update is a maintenance release project, a submit self is not possible, please use the maintenance workflow instead."

Tell me, please, how could I submit package changes to Leap 15.4 and SLE 15 SP4?
Comment 21 Claudio Fontana 2022-11-07 14:56:47 UTC
just offering my way,

I use the command line tools for that (osc sr), and automatically when I make an sr for a branch that is actually an Update branch, it automatically switches to a maintenance request, which is quite handy. Not sure if it's a best practice though.
Comment 22 Lubos Kocman 2022-11-07 16:06:55 UTC
Let me reach out to autobuild team, I think this is a project misconfiguration on OBS (not IBS side). As this works on SP3:Update

Claudio the factor here is that we're doing cross instance request, where maintenance requests with mr are fowarded to openSUSE:Maintenance instead.
Comment 23 Lubos Kocman 2022-11-07 16:10:28 UTC
It's missing attr https://build.opensuse.org/attribs/SUSE:SLE-15-SP3:Update in https://build.opensuse.org/attribs/SUSE:SLE-15-SP4:Update 

I've already reached out to autobuild, I'll ping you once it's set (or you can check the attrs by yourself on listed url).
Comment 24 Lubos Kocman 2022-11-07 16:13:35 UTC
All set, feel free to do the SR
Comment 25 Milachew 2022-11-07 16:39:00 UTC
(In reply to Lubos Kocman from comment #24)
> All set, feel free to do the SR

Ok... it was fast :)

Done :
https://build.opensuse.org/request/show/1034340
https://build.opensuse.org/request/show/1034326
-------------------------------------------------
(a small departure from the topic)
Also, it would be appropriate to set the SP4:Update branch by default for everyone (or only for non-maintainers) who does submit in SP4 via build.opensuse.org?

This would make it possible not to close similar requests with text similar to c#19.
Comment 26 Jonathan Kang 2022-11-08 01:27:14 UTC
I've already submitted changes to SUSE:SLE-15-SP4:Update via maintenance update in IBS. I assume submission in OBS isn't necessary anymore.

https://build.suse.de/request/show/283606
https://build.suse.de/request/show/283607
Comment 27 Milachew 2022-11-08 07:40:53 UTC
(In reply to Jonathan Kang from comment #26)
> I've already submitted changes to SUSE:SLE-15-SP4:Update via maintenance
> update in IBS. I assume submission in OBS isn't necessary anymore.

Excellent.
Please let us know when it will be accepted.
Unfortunately, these sites do not open for me.

And since you did it the other way, I'm undoing my changes in OBS.