Bug 863707 - network service start tries to activate all wireless connections
Summary: network service start tries to activate all wireless connections
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 17
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-06 19:28 UTC by John L Magee
Modified: 2014-03-17 03:32 UTC (History)
8 users (show)

Fixed In Version: initscripts-9.45-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-15 14:41:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description John L Magee 2012-10-06 19:28:44 UTC
Description of problem: when both network and NetworkManager are enabled, the network service attempts to acivate all devices without ONBOOT=no including wireless devices named Auto_.. created by NetworkManager representing SSIDs that are not present. This wreaks havoc with start up of laptop.

Version-Release number of selected component (if applicable): 

How reproducible: 

Steps to Reproduce:
1. have several NM created wireless devices
2. enable network service
3. reboot system
  
Actual results: network service forces NetworkManager to attempt to activate every wireless connection in /etc/sysconfig/network-scripts/ifcfg-*

Expected results: ignore wireless connections and let NetworkManager activate the one present.

Additional info: This started happening sometime in life of F16. I've generally disabled wireless with switch on laptop during boot. 

Today I added NM_CONTROLLED=yes to all these devices and added this to /etc/init.d/network just before the ONBOOT check and it works like a charm

if LANG=C grep -EL "^NM_CONTROLLED=['\"]?[Yy][Ee][Ss]['\"]?" ifcfg-$i > /dev/null ; then
   # ignore Network Manager Controlled devices
   continue
fi

Comment 1 Lukáš Nykrýn 2013-03-13 15:49:01 UTC
I am not sure that it is wise to skip all ifcgs with NM_CONTROLLED. They are handled with network script, when NM is not present. Maybe we should just skip calling nmcli of wireless devices on boot.

Untested patch:
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index f931dd8..53decee 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -66,6 +66,9 @@ then
 fi
 
 if [ "$_use_nm" = "true" -a -n "$UUID" ]; then
+    if [ "foo$2" = "fooboot" ] && [ "${TYPE}" = "Wireless" ]
+        exit 0
+    fi
     nmcli con up uuid "$UUID"
     exit $?
 fi

Comment 2 Bill Nottingham 2013-03-13 16:03:26 UTC
This would cause different behavior between the case when NM is enabled and when it isn't. That's probably OK, though.

Comment 3 Lukáš Nykrýn 2013-03-13 16:25:26 UTC
I don't think that this difference will be a problem for someone.

Just please note that there is a small typo in my patch, there is missing "then"
+    if [ "foo$2" = "fooboot" ] && [ "${TYPE}" = "Wireless" ]; then

Comment 4 Lukáš Nykrýn 2013-03-14 12:15:44 UTC
Patch committed upstream.


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