After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784629 - nmcli networking connectivity check shows previous state
nmcli networking connectivity check shows previous state
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nmcli
1.8.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: nm-review
 
 
Reported: 2017-07-06 18:03 UTC by Laurent Bigonville
Modified: 2017-10-03 10:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] libnm: update property in the manager after connectivity check (2.55 KB, patch)
2017-07-27 14:35 UTC, Beniamino Galvani
none Details | Review

Description Laurent Bigonville 2017-07-06 18:03:01 UTC
Hi,

When running "nmcli networking connectivity check" it seems that nmcli returns the old state, not the new one.

The nmcli call blocks for a new seconds and the icon in gnome-shell change from limited to fill connectivity but the command still returns "limited". The next call to "nmcli networking connectivity" shows the proper state



$ nmcli networking connectivity 
limité
$ nmcli networking connectivity check 
limité << gnome-shell icon is now showing full connectivity
$ nmcli networking connectivity 
plein

The connectivity plugin is configured with an url
Comment 1 Beniamino Galvani 2017-07-27 14:35:08 UTC
Created attachment 356479 [details] [review]
[PATCH] libnm: update property in the manager after connectivity check
Comment 2 Laurent Bigonville 2017-09-26 09:49:57 UTC
Hey,

What's the status of this patch?

Doesn't seems be be merged yet?
Comment 3 Thomas Haller 2017-09-26 10:00:20 UTC
(In reply to Beniamino Galvani from comment #1)
> Created attachment 356479 [details] [review] [review]
> [PATCH] libnm: update property in the manager after connectivity check

there is a race here:

- server sends PropertyChanged(CONNECTIVITY_NONE) 
- clients makes sync request
- connectivity changes, and server answers CONNECTIVITY_FULL and issues 
  PropertyChanged(CONNECTIVITY_FULL) signal
- client updates connectivity due to response.
- client processes obsolete CONNECTIVITY_NONE signal which introduces an invalid 
  state.
- client processes the second PropertyChanged signal, and fixes the connectivity 
  state.

It is a bad idea to interleave synchronous responses with a stream of incoming asynchronous events.


Not that I really mind. The fallacy is to have synchronous requests in the first place. Hence, the patch lgtm.