Bug 1300057 - packagekit thinks the system is offline even though it is not
Summary: packagekit thinks the system is offline even though it is not
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: KDE SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-19 20:43 UTC by marc-schmitzer
Modified: 2016-11-04 08:41 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-19 18:40:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description marc-schmitzer 2016-01-19 20:43:53 UTC
Description of problem:

Today I realized that I had not gotten any software update notifications for days or even weeks. Looking at the pk-updates Icon in the systray, its tooltip shows "Your system is offline", opening the widget likewise says "Network is offline". The system is most certainly not offline.

Checking manually via dnf showed that there are indeed updates available.

I use a wifi connection by the "normal" means, i.e. plasma network manager. Checking via "nmcli networking connectivity" shows "full".


Version-Release number of selected component (if applicable):

plasma-pk-updates-0.2-5.fc22.i686

How reproducible:

Always.

Steps to Reproduce:
1. Log in.
2. Wait for WiFI connection to establish
3. Notice that pk-updates claims that the system is offline

Actual results: No package update notifications

Expected results: Package update notifications


Additional info:

The pk-updates widget says "Last updated 23 days and 10 hours ago" (Dec. 27th 2015). I cannot correlate this with any package updates from the logs, but then again, I do not know how complete these are.

Comment 1 Rex Dieter 2016-01-19 22:06:18 UTC
PackageKit daemon thinks you're offline for some reason I think, to verify, what's the output from:

$ pkmon

??

For me, it returns,

Transactions:
 [none]
daemon connected=1
network status=wifi

(then I press CNTL-C to interrupt the monitoring)

Comment 2 marc-schmitzer 2016-01-20 20:02:20 UTC
Hi, thanks for the quick follow-up!

Seems you're right about PackageKit.

$ pkmon
Transactions:
 [none]
daemon connected=1
network status=offline

Looking through the journal, it seems that the network connection comes up *after* PackageKit has been started.

Comment 3 Rex Dieter 2016-01-20 20:03:56 UTC
OK, reassigning to PackageKit.

Interesting, I'd have hoped/assumed PK would be smart enough to notice when network goes up and down (regardless of it's state when started).

Comment 4 marc-schmitzer 2016-01-22 16:58:25 UTC
I think I can confirm this is a sequence issue. Connecting the WiFi via nmcli from a VT before logging into KDE makes pk-updates work.

I think you meant to reassign this to packagekit? I'll do it now.

Comment 5 marc-schmitzer 2016-01-22 19:38:56 UTC
I've done some more digging/debugging:

  * Networkmanager behavior looks good: the StateChanged D-Bus signal is emitted with value 70 when the WiFi has fully connected.
  * PK does correctly change from online to offline if I get it to online as described in #4 and then disconnect the WiFi.
  * Running packagekitd with --verbose seems to show that pk receives the NetworkManager signals, but thinks that the connection is not the default:

packagekitd[8084]: 20:23:08        PackageKit        is_default: 0
packagekitd[8084]: 20:23:08        PackageKit        not default, skipping
packagekitd[8084]: 20:23:08        PackageKit        network state is offline
packagekitd[8084]: 20:23:08        PackageKit        emitting network-state-changed: offline

(This block is repeated six seconds later for the same connection-up).

  * Checking manually with qdbus:
$ qdbus  --literal --system org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.ActiveConnections
[Variant: [Argument: ao {[ObjectPath: /org/freedesktop/NetworkManager/ActiveConnection/6]}]]

$ qdbus --system org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/ActiveConnection/6 org.freedesktop.NetworkManager.Connection.Active.Default
true

Maybe the Default property is not immediately set when pk handles the signal from NM?

Comment 6 marc-schmitzer 2016-01-28 21:10:56 UTC
So, I've hacked up a python script that connects to NetworkManager via DBus.

I can confirm that when the connection state goes to 70 (fully connected) there is an active connection, but the "Default" property is false. The connection object eventually emits the "PropertiesChanged" signal with "Default" true.

It seems that PackageKit recently revamped its network code (commit 827bb2b), so maybe that will fix that.

Comment 7 Fedora End Of Life 2016-07-19 18:40:02 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 8 Colonel Panic 2016-07-21 23:43:08 UTC
I'm running Fedora 24 and this is still an issue on my system.

Comment 9 Mauro Innocenti 2016-11-04 08:41:20 UTC
Me too: Fedora 24 with wired network connection as this same issue.


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