network-admin forgets/deletes configuration, does not properly detect active devices

Bug #12115 reported by j^
8
Affects Status Importance Assigned to Milestone
gnome-system-tools (Ubuntu)
Fix Released
Medium
Sebastien Bacher

Bug Description

to reproduce the problem:
in network-admin, configure a network device with a static address,
now close network-admin - start it again and deacivate the device,
next time you start network-admin all settings are lost,
looking at /etc/network/interfaces it looks like only activated devices
are saved to /etc/network/interfaces, while all deactivated are missing.

a deactivated network device should only be changed by removing
the 'auto devname' stanca from /etc/network/interfaces, not by deleting
all entries related to the device; in addition if the device is active,
as stated in /etc/network/ifstate ifdown devname should be called.

regarding the way network-admin tries to detect active devices,
it should check /etc/network/ifstate and use that instead of using
ifconfig up/down

applying changes has to look like this:
for active devices: only if settings changed: ifdown/save settings/ifup

for deactivated devices: ifdown if listed as active in /etc/network/ifstate;
                         save settings if changed.

Revision history for this message
Sebastien Bacher (seb128) wrote :

I'm not sure to understand the issue. Could you try if that's fixed with 1.1.90
? Here it keeps the config, if I reactivate an interface that works fine ..

Revision history for this message
j^ (j) wrote :

just checked again with 1.1.90, still the same issue,
there is no way to keep the configuration without the auto stanca

launch network-admin, configure device, close network-admin -
/etc/network/interfaces will contain something like:
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1

auto eth0

now you launch network-amdin again, deselect Properties/This device is
configured, close network-admin -
/etc/network/interfaces will not contain any information about eth0

imho it should just remove "auto eth0". or this should be trigert by
Activate/Deactivate

Revision history for this message
Carlos Garnacho (carlosg) wrote :

That's not the behavior it's supposed to have:

- The activate and deactivate buttons are supposed to do both ifup/ifdown and to
add/remove the auto stanza (the latter happens when you close the tool clicking OK)
- The "this interface is configured" checkbutton is meant to just deconfigure
the interface (i.e.: I have a wifi and an ethernet interface, 2 profiles, and I
don't want both configured at the same time), that's why the whole interface
dialog turns insensitive

With this for example you'll be able to ifdown an interface (when you don't need
it) and keep it down even through reboots (which is a pretty consistent behavior
IMHO) and to remove unneeded interfaces from your configuration

maybe the "this interface is configured" string should be more clear, but I
couldn't think of a better one...

     Thanks

Revision history for this message
Sebastien Bacher (seb128) wrote :

what about using "Deactivate" in the main dialog ? Properties -> "The device is
configured" is to remove the device from the system files and that's what it does

Revision history for this message
j^ (j) wrote :

Carlos Garnacho:
activate and deactivate buttons do not work the way you described in all cases..

i have 3 NICs eth0 (e100), eth1(eth1394), eth2(orinoco_pco)
if i configure eth0 and eth1 with an ip address of one network, lets
say 192.168.0.0/255.255.255.0 - i am not able change the auto stanza.
changing one of them to another network i am able to activate/deactivate the
devices.

deactivating eth0 and eth1, selecting DHCP on both NICs, clicking OK will result
in two
instances of dhclient trying to get an IP, /e/n/i does not contain an auto stanza

the problem is that after changing the settings for a device
network-admin will activate the device, even if it was deactivated, than clicking OK

Revision history for this message
Hezekiah Carty (hez) wrote :

I have the same problem here on my system. I am running all Hoary updates as of
the morning of Feb 6. On my laptop I use a static IP address profile for work,
and a DHCP-based profile while at home. If I use my 'Home' profile, all
settings for the 'Work' profile are deleted and replaced with my 'Work' settings.

Revision history for this message
Sebastien Bacher (seb128) wrote :

do you still get this bug with the current versions ?

Revision history for this message
j^ (j) wrote :

activate/deactivate still does not remove/add the auto stance from /e/n/i here.

Revision history for this message
Sebastien Bacher (seb128) wrote :

(In reply to comment #8)
> activate/deactivate still does not remove/add the auto stance from /e/n/i here.

right, there is an another bug about that:
http://bugzilla.ubuntu.com/show_bug.cgi?id=6802

Revision history for this message
Sebastien Bacher (seb128) wrote :

this upload fix it:

 gnome-system-tools (1.2.0-0ubuntu1) hoary; urgency=low
 .
   * New upstream release:
...
     - handled correctly "auto" values (Hoary: #5724).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.