<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11341</bug_id>
          
          <creation_ts>2017-04-12 05:40:16 +0000</creation_ts>
          <short_desc>Systemctl fails to rename usb network interfaces</short_desc>
          <delta_ts>2017-06-16 13:33:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>IoT Reference OS Kit</product>
          <component>intel-iot-refkit-connectivity</component>
          <version>2.3</version>
          <rep_platform>MinnowBoard Max</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.4 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ismo Puustinen">ismo.puustinen</reporter>
          <assigned_to name="Dmitry Rozhkov">dmitry.rojkov</assigned_to>
          <cc>matti-pekka.sivosuo</cc>
    
    <cc>mikko.ylinen</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72371</commentid>
    <comment_count>0</comment_count>
    <who name="Ismo Puustinen">ismo.puustinen</who>
    <bug_when>2017-04-12 05:40:16 +0000</bug_when>
    <thetext>When I plug in a USB network interface, systemd fails to rename the device according to https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ . The interface name stays eth0, even though systemd creates a .device unit for the modified name:

sys-subsystem-net-devices-enp0s20u1u4.device loaded active plugged   DUB-E100 Fast Ethernet Adapter(rev.C1) [ASIX AX88772]               

This makes it difficult to do the mapping between systemd network devices and actual interfaces. The reason for this behavior could be a race condition where someone (connman?) enables the interface before renaming of the interface can be done.

journalctl:

Apr 06 12:00:10 intel-corei7-64 kernel: usb 1-1.4: new high-speed USB device number 9 using xhci_hcd
Apr 06 12:00:10 intel-corei7-64 connmand[423]: eth0 {create} index 7 type 1 &lt;ETHER&gt;
Apr 06 12:00:10 intel-corei7-64 connmand[423]: eth0 {update} flags 4098 &lt;DOWN&gt;
Apr 06 12:00:10 intel-corei7-64 connmand[423]: eth0 {newlink} index 7 address C8:D3:A3:03:41:D9 mtu 1500
Apr 06 12:00:10 intel-corei7-64 connmand[423]: eth0 {newlink} index 7 operstate 2 &lt;DOWN&gt;
Apr 06 12:00:10 intel-corei7-64 kernel: asix 1-1.4:1.0 eth0: register &apos;asix&apos; at usb-0000:00:14.0-1.4, ASIX AX88772 USB 2.0 Ethernet, c8:d3:a3:03:41:d9
Apr 06 12:00:10 intel-corei7-64 kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Apr 06 12:00:10 intel-corei7-64 connmand[423]: Adding interface eth0 [ ethernet ]
Apr 06 12:00:10 intel-corei7-64 connmand[423]: eth0 {update} flags 36931 &lt;UP,RUNNING&gt;
Apr 06 12:00:10 intel-corei7-64 connmand[423]: eth0 {newlink} index 7 address C8:D3:A3:03:41:D9 mtu 1500
Apr 06 12:00:10 intel-corei7-64 connmand[423]: eth0 {newlink} index 7 operstate 0 &lt;UNKNOWN&gt;
Apr 06 12:00:10 intel-corei7-64 connmand[423]: eth0 {update} flags 36867 &lt;UP&gt;
Apr 06 12:00:10 intel-corei7-64 connmand[423]: eth0 {newlink} index 7 address C8:D3:A3:03:41:D9 mtu 1500
Apr 06 12:00:10 intel-corei7-64 connmand[423]: eth0 {newlink} index 7 operstate 2 &lt;DOWN&gt;
Apr 06 12:00:10 intel-corei7-64 systemd-udevd[656]: Error changing net interface name &apos;eth0&apos; to &apos;enp0s20u1u4&apos;: Device or resource busy
Apr 06 12:00:10 intel-corei7-64 systemd-udevd[656]: could not rename interface &apos;7&apos; from &apos;eth0&apos; to &apos;enp0s20u1u4&apos;: Device or resource busy

ifconfig eth0:

eth0      Link encap:Ethernet  HWaddr C8:D3:A3:03:41:D9  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72719</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry Rozhkov">dmitry.rojkov</who>
    <bug_when>2017-04-20 13:53:17 +0000</bug_when>
    <thetext>I&apos;ve managed to make it work with blacklisting eth* interfaces in connman (by adding &quot;NetworkInterfaceBlacklist=vmnet,vboxnet,virbr,ifb,docker,veth,eth,wlan&quot; to /etc/connman/main.conf) and this patch

https://lists.01.org/pipermail/connman/2017-April/021786.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72756</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry Rozhkov">dmitry.rojkov</who>
    <bug_when>2017-04-21 08:37:09 +0000</bug_when>
    <thetext>Submitted a patch to OE-core:
https://patchwork.openembedded.org/patch/139328/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72815</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry Rozhkov">dmitry.rojkov</who>
    <bug_when>2017-04-25 08:54:32 +0000</bug_when>
    <thetext>Submitted v2 of the patch (without blacklisting by default):
https://patchwork.openembedded.org/patch/139417/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74279</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry Rozhkov">dmitry.rojkov</who>
    <bug_when>2017-06-16 13:33:17 +0000</bug_when>
    <thetext>The fix got released as part of connman 1.34 which is in OE-Core now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>