Re: Annoying NetworkManager "feature"



I have tried to simplify things but may still be unclear ... sorry.  If you 
would prefer, I can put all of this info in a bugzilla report or continue here 
on this mailing list.

On Wednesday 26 August 2009 12:59:44 Dan Williams wrote:
> On Mon, 2009-08-24 at 13:08 -0400, Gene Czarcinski wrote:
> > I like a lot about how NetworkManager works.  I especially like the way
> > it handles wireless connects.
> >
> > However, there is a NetworkManager "feature" that is extremely annoying:
> > creating new/additional device entries in its list of devices ...
> > sometimes one or more additional entries with the same name and sometimes
> > "Auto eth_" entries.
>
> Which new/additional device entries and what are their names?  When this
> happens, can you run 'nm-tool' for me and paste the output in here?

more below

>
> The "Auto eth_" entries are there so that you can connect to *something*
> by clicking on it even when there's configuration defined.  Otherwise,
> you'd have nothing in the menu and no way to connect the device.  There
> are a few corner cases where more than one could appear, but I haven't
> seen those in quite a while.

OK, I am not sure your statement as written was your intent.  I can understand 
creating "Auto eth_" if no ifcfg-eth_ file exists, but why do this if the file 
does exist ... and then, not necessarily consistently (see below).

>
> > This has become especially annoying with a qemu-kvm guest where on of the
> > NICs needs to have "Use this entry for network connections only on its
> > network" checked ... new entries are created when NetworkManager starts
> > which do not have the check.
> >
> > If there a way to disable this feature? [new/additional entries]
>
> Do you have backing system connections for any of these devices?
> Basically, a fake "auto" connection will be shown for any device that
> doesn't already have a connection defined either in GConf or via
> system-settings (/etc/network/interfaces for Debian/Ubuntu, ifcfg for
> suse/fedora, and /etc/NetworkManager/system-connections for all distros
> depending on the plugin that's been enabled
> in /etc/NetworkManager/nm-system-settings.conf).

See comment above.  

I have sometimes seen ~.gconf/ entries but not all the time.  What are the 
conditions when this is done?

I have never seen anything in /etc/Network?manager/system-connections/.  
Again, when is this suppose to be used?
-------------
I have seen the problems described here on real hardware.  However, I am 
currently using qemu-kvm to run guest virtuals and it is really easy to 
add/remove NICs.  Many of my problems have occurred on a Fedora 11 system 
running virt-preview packages (F12 alpha/rawhide packages built for F11).  
However, to simplify things, the info below and most of my testing for this is 
done on a x86_64 F11 host running F11 qemu-kvm with a x86_64 F11 guest.  
NetworkManager is running on the guest.  The host does not use NetworkManager 
because I have a bridged NIC (br0).

The interfaces on the guest all use "virtio" devices for the NICs.  Also, they 
all use dhcp.  Default/NAT network is 192.168.122.0/24; Private network is 
192.168.217.0/24

OK, here is the senario ---

1. Built fresh x86_64 F11 guest with all updates as of 27 August (Friday) and 
a "standard" (default network) NIC which supports NAT on a "virtio" device.  
System installs and boots up fine ... network works and NetworkManager running.  
I can access the Internet.

2. Shut the guest down and install a new NIC for a "private" network (similar 
to "default" but no NAT, no forwarding, different IP numbers).  Screw things up 
and accidentally delete the NAT NIC ... delete all NICs ... create a new NAT 
NIC.  Reboot.

3.  System boots up in single user mode ... disable autostart of network and 
NetworkManager.  Looking at /proc/sys/net/ipv4/conf/, I now have "eth1" 
instead of "eth0" although there is only one NIC and it is the same "type", 
etc. [BTW, what in the world keeps track of these ... where is that 
information kept???] ... telinit 5 ... use system-config-network to delete the 
"eth0" definition and create a new "eth1" (System eth1) definition ... start 
network ... it works ... stop network, start Network Manager ... it works 
using "System eth1" (no extras).

4.  Shut the guest down and install a 2nd NIC on the "private" network. Boot 
(autostart network and NetworkManager disabled).  Use system-config-network to 
define the eth2 configuration but mark it NOT NetworkManager managed.  Start 
NetworkManager (System eth1 comes up).  Using system-config-network ,enable 
NetworkManager ... NetworkManager brings up eth2 ... check NetworkManager 
devices: System eth1, System eth2, Auto eth2 .. using System eth1 and System 
eth2. Output of nm-tool:
------------
NetworkManager Tool

State: connected

- Device: eth2  [System eth2] 
--------------------------------------------------
  Type:              Wired
  Driver:            virtio_net
  State:             connected
  Default:           yes
  HW Address:        54:52:00:0D:85:BA

  Capabilities:
    Carrier Detect:  yes

  Wired Properties
    Carrier:         on

  IPv4 Settings:
    Address:         192.168.217.151
    Prefix:          24 (255.255.255.0)
    Gateway:         192.168.217.1

    DNS:             192.168.217.1


- Device: eth1  [System eth1] 
--------------------------------------------------
  Type:              Wired
  Driver:            virtio_net
  State:             connected
  Default:           no
  HW Address:        54:52:00:60:A8:F4

  Capabilities:
    Carrier Detect:  yes

  Wired Properties
    Carrier:         on

  IPv4 Settings:
    Address:         192.168.122.162
    Prefix:          24 (255.255.255.0)
    Gateway:         192.168.122.1

    DNS:             192.168.122.1

----------

5.  Shutdown Networkmanager but do not reboot.  Hours later, start 
NetwokrManager ... same NM devices but this time using System eth1 and Auto 
eth2.  Output of nmtool:
-------------
NetworkManager Tool

State: connected

- Device: eth2  [Auto eth2] 
----------------------------------------------------
  Type:              Wired
  Driver:            virtio_net
  State:             connected
  Default:           yes
  HW Address:        54:52:00:0D:85:BA

  Capabilities:
    Carrier Detect:  yes

  Wired Properties
    Carrier:         on

  IPv4 Settings:
    Address:         192.168.217.151
    Prefix:          24 (255.255.255.0)
    Gateway:         192.168.217.1

    DNS:             192.168.217.1


- Device: eth1  [System eth1] 
--------------------------------------------------
  Type:              Wired
  Driver:            virtio_net
  State:             connected
  Default:           no
  HW Address:        54:52:00:60:A8:F4

  Capabilities:
    Carrier Detect:  yes

  Wired Properties
    Carrier:         on

  IPv4 Settings:
    Address:         192.168.122.162
    Prefix:          24 (255.255.255.0)
    Gateway:         192.168.122.1

    DNS:             192.168.122.1
---------------

Why the change?  I have no idea.

6. Check routing ... default is 192.168.217.1 which is wrong!  Tried checking 
the "Use only" route checkbox but no effect and does not persist when re-
edited!  Tried GATEWAY= and GATEWAYDEV= in /etc/sysconfig/network but this has 
no effect.

7. Note, I just noticed that I now have a "ifcfg-Auto eth2" file which I have 
never seen before.  Stop NM. Use s-c-n to delete "Auto eth2" interface.  
Restart NM ... ok even if default route still screwed up.

8.  Reboot.  Start NM.  Only System eth1 brought up.  System eth2 is marked 
NetworkManager=yes but is not started???

Enough for now.

Gene


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]