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 561778 - Dispatcher with 3G connections doens't work like it should
Dispatcher with 3G connections doens't work like it should
Status: RESOLVED DUPLICATE of bug 387832
Product: NetworkManager
Classification: Platform
Component: general
0.7.x
Other All
: Normal normal
: ---
Assigned To: Dan Williams
Dan Williams
Depends on:
Blocks:
 
 
Reported: 2008-11-21 08:20 UTC by Christoph Klaffl
Modified: 2008-11-24 18:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christoph Klaffl 2008-11-21 08:20:28 UTC
Please describe the problem:
If I disconnect the 3G connection throug the nm-applet, NetworkManager should run the Dispatcher Action "down" before it disconnect from the 3G network, but it disconnects beforce the Dispatcher Action "down" is performed. I discovered the bug because I'm using "vnStat" to calcualte my device stats. It is a app which measures the amount of data which is transferedevery 5minutes. So if I disconnect the connection, I want tu run vnstat the last time so ist also measures the data which is transfered since the last intervall. But ist complains that the device "ppp0" doesn't exist anymore. So I checked the Dispatcher and discovered this Bug. There is anotherbug too, the Dispather gets a false IFACE name, instead of the correct device "ppp0" it gets "ttyUSB0" (the 3G modem serial interface).

Steps to reproduce:
1. Connect to a 3G network throug NetworkManager
2. Disconnect from the 3G Network

Actual results:
The connection will be disconnected before the Dispatcher action "down" is performed.

Expected results:
The connection will be disconnected after the Dispatcher action "down" is performed.And after the disconnect the Dispatcher action "post-down" should be performed.

Does this happen every time?
Yes

Other information:
Comment 1 Dan Williams 2008-11-21 13:45:21 UTC

*** This bug has been marked as a duplicate of 387832 ***
Comment 2 Christoph Klaffl 2008-11-22 17:17:22 UTC
I think this bug isn't a duplicate of 387832, because 387832 suggests an enhancement and this bug describes a problem in the dispatcher which should already work.
Comment 3 Dan Williams 2008-11-24 15:41:03 UTC
This is actually a dupe, because the other bug is an RFE requesting a method by which applications have a chance to do something _before_ the network connection is terminated, which is essentially what this request was, right?

Note that NetworkManager also emits signals on the bus showing the amount of data that PPP reports as transferred, which updates every 5 seconds.
Comment 4 Christoph Klaffl 2008-11-24 18:01:21 UTC
No, this bug hasn't anything todo with dbus. This bug is about the ifupdown system (called dispatcher in NM). So you can put scripts into "/etc/NetworkManager/dispatcher.d/" which are executed on every connection change. There is a standard script ("/etc/NetworkManager/dispatcher.d/01ifupdown") which runs the normal ifupdown system found in "/etc/network/".
But this doesn't work correctly with 3G connections, as I described in the first case.

It has absolutly nothing todo with any sort of sending signals to apps on dbus or hal.

PS: Sorry for my English :-)
Comment 5 Dan Williams 2008-11-24 18:19:16 UTC
(In reply to comment #0)
> Please describe the problem:
> If I disconnect the 3G connection throug the nm-applet, NetworkManager should
> run the Dispatcher Action "down" before it disconnect from the 3G network, but
> it disconnects beforce the Dispatcher Action "down" is performed. I discovered

NM runs the disconnect _after_ the network is down, because many times you cannot predict when the network will go down, or the network may go down without warning, and also because NM cannot wait on arbitrary numbers of scripts before taking the interface down.

> the bug because I'm using "vnStat" to calcualte my device stats. It is a app
> which measures the amount of data which is transferedevery 5minutes. So if I
> disconnect the connection, I want tu run vnstat the last time so ist also
> measures the data which is transfered since the last intervall. But ist
> complains that the device "ppp0" doesn't exist anymore. So I checked the
> Dispatcher and discovered this Bug. There is anotherbug too, the Dispather gets
> a false IFACE name, instead of the correct device "ppp0" it gets "ttyUSB0" (the
> 3G modem serial interface).

Please convert the program to listen for the NetworkManager D-Bus signals which provide eqiuvalent functionality at an even higher granularity than you're currently using.

> Steps to reproduce:
> 1. Connect to a 3G network throug NetworkManager
> 2. Disconnect from the 3G Network
> 
> Actual results:
> The connection will be disconnected before the Dispatcher action "down" is
> performed.
> 
> Expected results:
> The connection will be disconnected after the Dispatcher action "down" is

This will only happen sometimes, because often the network goes down unexpectedly.  A "down" even before the network goes away would be purely informational and could not be relied upon..
Comment 6 Christoph Klaffl 2008-11-24 18:28:38 UTC
k, now I understand the problem thank you :-)

I'm not the author of this app, and I'm not a good programmer. Furthermore I don't know how dbus works.

I just thought this is a bug, so can you mark this bug report as invalid or something else.