<?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>8399</bug_id>
          
          <creation_ts>2015-09-25 15:41:25 +0000</creation_ts>
          <short_desc>ConnMan service modified to unconditionally start a program that doesn&apos;t exist for most use cases</short_desc>
          <delta_ts>2016-02-17 15:53:09 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>connectivity</component>
          <version>1.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</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.1 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Lock">joshuagloe</reporter>
          <assigned_to name="Joshua Lock">joshuagloe</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ross.burton</cc>
          
          <qa_contact name="Daniel Istrate">daniel.alexandrux.istrate</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>54679</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2015-09-25 15:41:25 +0000</bug_when>
    <thetext>Analysing the journal of a custom distro running on target hardware I spotted:

connman.service: Failed at step EXEC spawning /usr/lib/connman/wired-setup: No such file or directory

Having done some digging I have discovered that wired-setup is a script from the connman-conf recipe that helps set up qemu machines running on the autobuilder, however the script is unconditionally inserted as an ExecPre for all targets.

This means anyone building a systemd based OS with Yocto/OE Core gets this error for free unless they replace/modify the connman service.

I think the default stance should be to ship metadata which is usable without errors for the use case of building an OS to run on target hardware, rather than the metadata being built to support the autobuilder use case first and foremost.

Rather than hack the connman.service file to have an ExecPre couldn&apos;t the connman-conf recipe provide its own unit which uses the Before= option to ensure it&apos;s started before connman?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54682</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-09-25 15:53:11 +0000</bug_when>
    <thetext>Yes, that&apos;s an excellent idea.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55286</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2015-10-14 09:42:29 +0000</bug_when>
    <thetext>Currently testing the following pair of changes:

https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=joshuagl/connman&amp;id=398ac8777eca62a95b8ea93e8dd4d8c4195ca15f
https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=joshuagl/connman&amp;id=9285c0a1fc970d70ceb306b4d11e9bab472fcbd5

should possibly be squashed...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55287</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2015-10-14 10:22:01 +0000</bug_when>
    <thetext>RFC patch series submitted http://lists.openembedded.org/pipermail/openembedded-core/2015-October/111536.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57153</commentid>
    <comment_count>4</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2015-12-10 09:03:22 +0000</bug_when>
    <thetext>v3 of the series, to address various review comments, has been submitted:

http://lists.openembedded.org/pipermail/openembedded-core/2015-December/113933.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57313</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2015-12-16 20:44:18 +0000</bug_when>
    <thetext>Simpler v4 series posted based on feedback from Martin:
http://lists.openembedded.org/pipermail/openembedded-core/2015-December/114241.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58370</commentid>
    <comment_count>6</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-02-01 08:01:52 +0000</bug_when>
    <thetext>v5 of canges has landed: 

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=79f4495244ceddb197879ae24c33f469285bbff2
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d74325e22ed81e49eec63335fd0f4b789f9dfc21</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59155</commentid>
    <comment_count>7</comment_count>
    <who name="Daniel Istrate">daniel.alexandrux.istrate</who>
    <bug_when>2016-02-17 15:53:09 +0000</bug_when>
    <thetext>Verified on master: 152914f2983c5d69001de1d46ce99547fa1e75fe


Steps:
1. test that qemu machines continue to work as before
root@qemux86-64:~# journalctl | grep connman
Feb 17 14:41:56 qemux86-64 connmand[422]: Connection Manager version 1.31
Feb 17 14:41:56 qemux86-64 connmand[422]: Adding configuration wired
Feb 17 14:41:56 qemux86-64 connmand[422]: Checking loopback interface settings
Feb 17 14:41:56 qemux86-64 connmand[422]: System hostname is qemux86-64
Feb 17 14:41:57 qemux86-64 connmand[422]: lo {newlink} index 1 address 00:00:00:00:00:00 mtu 65536
Feb 17 14:41:57 qemux86-64 connmand[422]: lo {newlink} index 1 operstate 0 &lt;UNKNOWN&gt;
Feb 17 14:41:57 qemux86-64 connmand[422]: eth0 {create} index 2 type 1 &lt;ETHER&gt;
Feb 17 14:41:57 qemux86-64 connmand[422]: eth0 {RX} 32 packets 5573 bytes
Feb 17 14:41:57 qemux86-64 connmand[422]: eth0 {TX} 29 packets 4759 bytes
Feb 17 14:41:57 qemux86-64 connmand[422]: eth0 {update} flags 69699 &lt;UP,RUNNING,LOWER_UP&gt;
Feb 17 14:41:57 qemux86-64 connmand[422]: eth0 {newlink} index 2 address 52:54:00:12:34:56 mtu 1500
Feb 17 14:41:57 qemux86-64 connmand[422]: eth0 {newlink} index 2 operstate 6 &lt;UP&gt;
Feb 17 14:41:58 qemux86-64 connmand[422]: Skipping disconnect of carrier, network is connecting.
Feb 17 14:41:59 qemux86-64 connmand[422]: Adding interface eth0 [ ethernet ]
Feb 17 14:41:59 qemux86-64 connmand[422]: sit0 {newlink} index 3 address 00:00:00:00:08:00 mtu 1480
Feb 17 14:41:59 qemux86-64 connmand[422]: sit0 {newlink} index 3 operstate 2 &lt;DOWN&gt;
Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} address 192.168.7.2/24 label eth0 family 2
Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} route 192.168.7.1 gw 0.0.0.0 scope 253 &lt;LINK&gt;
Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} route 8.8.8.8 gw 192.168.7.1 scope 0 &lt;UNIVERSE&gt;
Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} route 0.0.0.0 gw 192.168.7.1 scope 0 &lt;UNIVERSE&gt;
Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} route 8.8.8.8 gw 192.168.7.1 scope 0 &lt;UNIVERSE&gt;
Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} route 192.168.7.0 gw 0.0.0.0 scope 253 &lt;LINK&gt;
Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} route 192.168.7.1 gw 0.0.0.0 scope 253 &lt;LINK&gt;
Feb 17 14:42:04 qemux86-64 connmand[422]: Online check failed for 0x726100 Wired

2. test that non-qemu machines no longer unconditionally try to run that script
Feb 17 15:34:21 genericx86-64 connmand[457]: Connection Manager version 1.31
Feb 17 15:34:21 genericx86-64 connmand[457]: Checking loopback interface settings
Feb 17 15:34:21 genericx86-64 connmand[457]: System hostname is genericx86-64
Feb 17 15:34:21 genericx86-64 connmand[457]: lo {newlink} index 1 address 00:00:00:00:00:00 mtu 65536
Feb 17 15:34:21 genericx86-64 connmand[457]: lo {newlink} index 1 operstate 0 &lt;UNKNOWN&gt;
Feb 17 15:34:21 genericx86-64 connmand[457]: eno1 {create} index 2 type 1 &lt;ETHER&gt;
Feb 17 15:34:21 genericx86-64 connmand[457]: eno1 {update} flags 4098 &lt;DOWN&gt;
Feb 17 15:34:21 genericx86-64 connmand[457]: eno1 {newlink} index 2 address C0:3F:D5:69:19:C7 mtu 1500
Feb 17 15:34:21 genericx86-64 connmand[457]: eno1 {newlink} index 2 operstate 2 &lt;DOWN&gt;
Feb 17 15:34:22 genericx86-64 connmand[457]: Adding interface eno1 [ ethernet ]
Feb 17 15:34:22 genericx86-64 connmand[457]: sit0 {newlink} index 3 address 00:00:00:00:08:00 mtu 1480
Feb 17 15:34:22 genericx86-64 connmand[457]: sit0 {newlink} index 3 operstate 2 &lt;DOWN&gt;
Feb 17 15:34:22 genericx86-64 connmand[457]: eno1 {update} flags 36867 &lt;UP&gt;
Feb 17 15:34:22 genericx86-64 connmand[457]: eno1 {newlink} index 2 address C0:3F:D5:69:19:C7 mtu 1500
Feb 17 15:34:22 genericx86-64 connmand[457]: eno1 {newlink} index 2 operstate 2 &lt;DOWN&gt;
Feb 17 15:34:25 genericx86-64 connmand[457]: eno1 {add} route ff00:: gw :: scope 0 &lt;UNIVERSE&gt;
Feb 17 15:34:25 genericx86-64 connmand[457]: eno1 {add} route fe80:: gw :: scope 0 &lt;UNIVERSE&gt;
Feb 17 15:34:25 genericx86-64 connmand[457]: eno1 {update} flags 102467 &lt;UP,RUNNING,LOWER_UP&gt;
Feb 17 15:34:25 genericx86-64 connmand[457]: eno1 {newlink} index 2 address C0:3F:D5:69:19:C7 mtu 1500
Feb 17 15:34:25 genericx86-64 connmand[457]: eno1 {newlink} index 2 operstate 6 &lt;UP&gt;
Feb 17 15:34:25 genericx86-64 connmand[457]: Skipping disconnect of carrier, network is connecting.
Feb 17 15:35:04 genericx86-64 connmand[457]: eno1 {add} address 169.254.15.204/16 label eno1 family 2
Feb 17 15:35:04 genericx86-64 connmand[457]: eno1 {add} route 169.254.0.0 gw 0.0.0.0 scope 253 &lt;LINK&gt;
Feb 17 15:35:04 genericx86-64 connmand[457]: eno1 {add} route 0.0.0.0 gw 0.0.0.0 scope 253 &lt;LINK&gt;

No connman errors.

Also the eth0 device on the QEMU machine has values matching http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config and that eth0 on the non-qemu machine doesn&apos;t:
NUC:  eno1      Link encap:Ethernet  HWaddr C0:3F:D5:69:19:C7 
qemu: eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:56</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>