Bug 863707

Summary: network service start tries to activate all wireless connections
Product: [Fedora] Fedora Reporter: John L Magee <jlmagee>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 17CC: iarlyy, jonathan, jpopelka, lnykryn, notting, plautrba, rvokal, vpavlin
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: initscripts-9.45-1.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-15 14:41:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.