Bug 545003 - NetworkManager keeps controlling an interface inspite of NM_MANAGED=no
Summary: NetworkManager keeps controlling an interface inspite of NM_MANAGED=no
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 12
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-07 09:59 UTC by Tommi Kyntola
Modified: 2010-01-05 07:07 UTC (History)
1 user (show)

Fixed In Version: 0.7.2-2.git20091223.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-07 20:20:31 UTC
Type: ---


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 603959 0 Normal RESOLVED NetworkManager keeps controlling an interface inspite of NM_MANAGED=no 2021-02-15 10:54:49 UTC

Description Tommi Kyntola 2009-12-07 09:59:29 UTC
Description of problem:
NetworkManager keeps controlling an interface no matter what.

Version-Release number of selected component (if applicable):
0.7.996-6.git20091021.fc12.x86_64

How reproducible:
Very, occurs every time.

Steps to Reproduce:
1. Mark eth0 with NM_MANAGED=no (by un-checking from system-config-network)
2. ifconfig eth0 10.11.12.13
3. plug line in and plug out
  
Actual results:
NetworkManager: <info> (eth0): ...
NetworkManager: <info> (eth0): deactivating device (reason: 40)
NetworkManager: <info> (eth0): ...

Expected results:
none of that. I expect it to not touch eth0 if I mark it unmanaged.

Additional info:
Works only if I kill it.

Comment 1 Dan Williams 2009-12-07 18:30:01 UTC
Can you attach some bits from /var/log/messages when NM starts up for me?  That'll let us know what's going on here.  If the ifcfg file is invalid or NM has a bug that fails to parse the ifcfg file, NM will still control the device.  It'll look like this:

NetworkManager: <info>  starting...
NetworkManager: <info>  Trying to start the modem-manager...
NetworkManager: Loaded plugin ifcfg-rh: (c) 2007 - 2008 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list.
NetworkManager: Loaded plugin keyfile: (c) 2007 - 2008 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list.
NetworkManager: <info>  Found radio killswitch rfkill4 (at /sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0/rfkill/rfkill4) (driver iwlagn)
NetworkManager: <info>  Wireless enabled by radio killswitch; enabled by state file
NetworkManager:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-pan0 ... 
NetworkManager:    ifcfg-rh:     read connection 'System pan0'
NetworkManager:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-Auto_eth0 ... 
NetworkManager:    ifcfg-rh:     read connection 'Auto eth0'


Also, can you paste in your /etc/sysconfig/network-scripts/ifcfg-eth0 for me too?  NM requires the HWADDR field to be filled in an correct so that it can match the ifcfg file with an actual device too.

Comment 2 Tommi Kyntola 2009-12-07 19:55:12 UTC
DEVICE=eth0
ONBOOT=no
BOOTPROTO=none
TYPE=Ethernet
NM_CONTROLLED=no
IPV6INIT=no
USERCTL=no

Dec  7 21:52:14 localhost NetworkManager: <info>  starting...
Dec  7 21:52:14 localhost NetworkManager: <info>  modem-manager is now available
Dec  7 21:52:14 localhost NetworkManager: Loaded plugin ifcfg-rh: (c) 2007 - 2008 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list.
Dec  7 21:52:14 localhost NetworkManager: <info>  Found radio killswitch rfkill1 (at /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/ieee80211/phy0/rfkill1) (driver <unknown>)                                                                                                                                                                           
Dec  7 21:52:14 localhost NetworkManager: <info>  Wireless enabled by radio killswitch; enabled by state file                                                                 
Dec  7 21:52:14 localhost NetworkManager:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-lo ...                                                                    
Dec  7 21:52:14 localhost NetworkManager:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth0 ...                                                                  
Dec  7 21:52:14 localhost NetworkManager:    ifcfg-rh:     error: addresses                                                                                                   
Dec  7 21:52:14 localhost NetworkManager: <info>  (eth0): carrier is OFF                                                                                                      
Dec  7 21:52:14 localhost NetworkManager: <info>  (eth0): new Ethernet device (driver: 'e1000e')                                                                              
Dec  7 21:52:14 localhost NetworkManager: <info>  (eth0): exported as /org/freedesktop/NetworkManager/Devices/0                                                               
Dec  7 21:52:14 localhost NetworkManager: <info>  (eth0): now managed                                                                                                         
Dec  7 21:52:14 localhost NetworkManager: <info>  (eth0): device state change: 1 -> 2 (reason 2)                                                                              
Dec  7 21:52:14 localhost NetworkManager: <info>  (eth0): bringing up device.                                                                                                 
Dec  7 21:52:14 localhost kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready

Comment 3 Tommi Kyntola 2009-12-07 20:02:01 UTC
There indeed is the "error: addresses".
Not that I feel like I should add addresses there, but I did and retried with these added lines:
IPADDR=10.11.12.13
NETMASK=255.255.255.0
and I got pretty much same:

Dec  7 21:54:53 localhost NetworkManager:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-lo ...                                                                    
Dec  7 21:54:53 localhost NetworkManager:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth0 ...                                                                  
Dec  7 21:54:53 localhost NetworkManager:    ifcfg-rh:     read connection 'System eth0'                                                                                      
Dec  7 21:54:53 localhost NetworkManager: <info>  (eth0): carrier is OFF                                                                                                      
Dec  7 21:54:53 localhost NetworkManager: <info>  (eth0): new Ethernet device (driver: 'e1000e')                                                                              
Dec  7 21:54:53 localhost NetworkManager: <info>  (eth0): exported as /org/freedesktop/NetworkManager/Devices/0                                                               
Dec  7 21:54:53 localhost NetworkManager: <info>  (eth0): now managed                                                                                                         
Dec  7 21:54:53 localhost NetworkManager: <info>  (eth0): device state change: 1 -> 2 (reason 2)                                                                              
Dec  7 21:54:53 localhost NetworkManager: <info>  (eth0): bringing up device.                                                                                                 
Dec  7 21:54:53 localhost kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready

Comment 4 Dan Williams 2009-12-07 20:20:31 UTC
The problem is that you don't have the HWADDR tag that locks the ifcfg file to a specific device.  If you add that (HWADDR=00:11:22:33:44:55) then NM will ignore the device.

Comment 5 Dan Williams 2009-12-07 20:47:26 UTC
(obviously use your device's MAC address instead of 00:11:22:33:44:55)

I've added a new warning for this situation upstream:

e0fb3125f9bed7dd0bd797224c4d6983eec0be15 (master)
af6839a1d2c9ddf31879c33fade57fa5bdce7574 (0.7.x)

Comment 6 Tommi Kyntola 2009-12-08 08:14:46 UTC
Ok that's it, cheers.

You might also want to make sure the system-config-network and others write it down there, too, atleast when the user requests that the device should not be NetworkManager controlled.

Comment 7 Fedora Update System 2009-12-08 08:23:36 UTC
NetworkManager-0.7.997-1.fc12,ModemManager-0.2.997-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/NetworkManager-0.7.997-1.fc12,ModemManager-0.2.997-1.fc12

Comment 8 Dan Williams 2009-12-08 09:53:03 UTC
(In reply to comment #6)
> Ok that's it, cheers.
> 
> You might also want to make sure the system-config-network and others write it
> down there, too, atleast when the user requests that the device should not be
> NetworkManager controlled.  

I tried on F11 today, and system-config-network will write out HWADDR when creating a connection for a device.  I doubt that's changed in F12...

Comment 9 Tommi Kyntola 2009-12-08 10:23:25 UTC
(In reply to comment #8)
> (In reply to comment #6)
> > Ok that's it, cheers.
> > 
> > You might also want to make sure the system-config-network and others write it
> > down there, too, atleast when the user requests that the device should not be
> > NetworkManager controlled.  
> 
> I tried on F11 today, and system-config-network will write out HWADDR when
> creating a connection for a device.  I doubt that's changed in F12...  

Tried that, too, with F12. But if there is a ifcfg-eth0 file then it happily changes the NM_CONTROLLED flag without adding HWADDR. Now, I'm not saying it's totally wrong the way it is. Since if it ain't there it has been written by the user and it can deemed as his fault for not including the HWADDR there, but since it's absense makes the NM_CONTROLLED flagging useless one could argue that in such a case it should be added there (atleast when the NM_CONTROLLED is set off). Just a thought.

I'm fine with the way it is now. And thanks for all the help.

Comment 10 Fedora Update System 2009-12-14 22:49:12 UTC
NetworkManager-0.7.997-2.git20091214.fc12,ModemManager-0.2.997-2.git20091214.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/NetworkManager-0.7.997-2.git20091214.fc12,ModemManager-0.2.997-2.git20091214.fc12

Comment 11 Fedora Update System 2009-12-23 19:27:43 UTC
NetworkManager-0.7.2-2.git20091223.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/NetworkManager-0.7.2-2.git20091223.fc11

Comment 12 Fedora Update System 2010-01-02 21:27:21 UTC
ModemManager-0.2.997-4.git20091218.fc12, NetworkManager-0.7.997-2.git20091214.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2010-01-02 21:30:09 UTC
NetworkManager-0.7.2-2.git20091223.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.