Re: Annoying NetworkManager "feature"
- From: Dan Williams <dcbw redhat com>
- To: Gene Czarcinski <gene czarc net>
- Cc: networkmanager-list gnome org
- Subject: Re: Annoying NetworkManager "feature"
- Date: Tue, 22 Sep 2009 22:48:48 -0700
On Sat, 2009-08-29 at 12:33 -0400, Gene Czarcinski wrote:
> 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).
Sorry, that should read "when there's _no_ configuration defined".
> >
> > > 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?
By default, creating a connection in the applet or connection editor
creates a GConf "user" connection, not a system connection. Creating a
system connection is only done when the "Available to all users" box
gets checked in the connection editor, and the Apply button is clicked.
> I have never seen anything in /etc/Network?manager/system-connections/.
> Again, when is this suppose to be used?
This will happen when the keyfile plugin is enabled
in /etc/NetworkManager/nm-system-settings.conf and the "Available to all
users" button gets checked in the connection editor, and Apply gets
clicked.
The first write-capable plugin on the plugins= line wins, so on Fedora,
that's 'ifcfg-fedora'. Thus if you have "plugins=ifcfg-fedora,keyfile",
the ifcfg-fedora plugin will write the file out, not keyfile.
Other distros typically have keyfile as the only write-capable plugin
(since only ifcfg-fedora and keyfile are write-capable anyway, and it's
pointless to use ifcfg-fedora on Debian), and thus keyfile gets the
connection write request there no matter where it's at on the plugins=
line.
> -------------
> 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
I believe when using this it's the *host* that keeps track of how many
NICs you have created and sets them when KVM/QEMU start. Note that
'udev' tries to ensure consistent naming, and will match up MAC
addresses with device names. So if you change the MAC address or add a
different NIC with a different MAC address, your device name will
change. See /etc/udev/rules.d/70-persistent-net.rules inside your VM.
> "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:
At that point where you still have "Auto eth2", can you grab the output
of "gconftool-2 --dump /system/networking/connections" for me?
Dan
> ------------
> 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
> _______________________________________________
> NetworkManager-list mailing list
> NetworkManager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]