Bug 1780791 - Enabling automatic updates fails with 'oops' in current Fedora Rawhide
Summary: Enabling automatic updates fails with 'oops' in current Fedora Rawhide
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: cockpit
Version: rawhide
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Martin Pitt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: openqa
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-06 23:06 UTC by Adam Williamson
Modified: 2019-12-15 18:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-15 18:38:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Adam Williamson 2019-12-06 23:06:46 UTC
Note: this is not the same as https://bugzilla.redhat.com/show_bug.cgi?id=1765685 .

With Fedora-Rawhide-20191206.n.0, the openQA test that tests enabling automatic updates in Cockpit fails consistently:

https://openqa.stg.fedoraproject.org/tests/685218

I've run it multiple times and it always fails. The test clicks the 'Automatic Updates' slider, accepts the request to install dnf-automatic, and then after a few seconds a red 'Ooops!' appears at top right, next to the 'Privileged' indicator:

https://openqa.stg.fedoraproject.org/tests/685218#step/server_cockpit_autoupdate/17

Unlike 1765685, this is also manually reproducible: it's very easy, just run an install from that compose (with e.g. https://kojipkgs.fedoraproject.org/compose/rawhide/Fedora-Rawhide-20191206.n.0/compose/Server/x86_64/iso/Fedora-Server-dvd-x86_64-Rawhide-20191206.n.0.iso ) , run a browser and go to Cockpit, go to the Software Updates tab, and try to enable automatic updates. For me on the first try it just did nothing (a bit like 1765685 in fact), second try gave me the 'Ooops!'

If I quit my browser then run it again and log in again, the 'Automatic Updates' slider seems to have vanished entirely from the 'Software Updates' tab.

Not sure what's going on here, but it definitely seems broken.

Comment 1 Chris Smart 2019-12-07 21:59:47 UTC
So Automatic Updates are broken in Cockpit for me on several Fedora 31 machines I've tested with, see bz 1765685#c7

I thought I'd try removing dnf-automatic and see what happens. When I do, the slider to enable Automatic Updates re-appears and prompts me to install dnf-automatic.

After that, I see the same oops Adam mentions.

Looking at the JS console, I can see that this.state.backend is null which might explain why automatic updates are not showing up. Not sure why it's null though...

Comment 2 Chris Smart 2019-12-07 23:00:51 UTC
Looking at the upstream code for 208[1] the checks run in getBackend() and DnfImpl() work on my machine on the CLI.

It doesn't look like SELinux is blocking anything.

I can't seem to get the debug messages out[2], so I probably need to spin up the code to do some more debugging to see what's actually happening it there.

I built it from upstream source (master) and it worked fine...

[1] https://github.com/cockpit-project/cockpit/blob/208/pkg/packagekit/autoupdates.jsx
[2] https://github.com/cockpit-project/cockpit/blob/master/HACKING.md#debug-logging-of-cockpit-processes

Comment 3 Matej Marušák 2019-12-08 11:56:16 UTC
> I built it from upstream source (master) and it worked fine...

A few days ago we had one fix for packagekit for dnf-automatic in [1]. Could you please try if this commit fixes it for you?

[1] https://github.com/cockpit-project/cockpit/pull/13229

Comment 4 Adam Williamson 2019-12-10 00:05:48 UTC
actually that's turning out to be a bit tricky because applying that patch to a cockpit package build causes it to want to re-generate stuff with nodejs that it doesn't usually need to do during a package build (I think), and I'm not sure Fedora packages contain all the necessary bits for that to work...

Looking at the Cockpit release schedule it seems likely a new release will show up on Wednesday. If so, we can probably just wait for that and see if it fixes this.

Comment 5 Adam Williamson 2019-12-14 17:01:21 UTC
Cockpit 209 is built but didn't quite make the 20191213.n.0 compose, it looks like (from the screenshots it still had 208). Next compose should include it and we can see if this is fixed.

Comment 6 Adam Williamson 2019-12-15 18:38:20 UTC
Looks like this is fixed in the latest Rawhide. Thanks.


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