<?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>5066</bug_id>
          
          <creation_ts>2013-08-28 20:33:07 +0000</creation_ts>
          <short_desc>LSB systemd inconsistency between busybox-syslogd and sysklogd</short_desc>
          <delta_ts>2013-09-09 01:51:06 +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>core</component>
          <version>1.5</version>
          <rep_platform>x86</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>1.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Peter A. Bigot">pab</reporter>
          <assigned_to name="Chen Qi">Qi.Chen</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>Qi.Chen</cc>
    
    <cc>ross.burton</cc>
    
    <cc>yi.zhao</cc>
          
          
          <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>36009</commentid>
    <comment_count>0</comment_count>
    <who name="Peter A. Bigot">pab</who>
    <bug_when>2013-08-28 20:33:07 +0000</bug_when>
    <thetext>busybox is installed by packagegroup-core-boot and sysklogd by packagegroup-core-basic.  Both end up in core-image-lsb.  Both provide /sbin/syslogd under update-alternatives, with the sysklogd version having higher priority.

systemd starts syslogd using busybox-syslog.service, but that service references /sbin/syslogd regardless of that referring to sysklogd.  The command-line arguments between the two versions are incompatible.

The net result is that, if VIRTUAL-RUNTIME_init_manager = &quot;systemd&quot;, core-image-lsb will fail to start syslogd.

root@beagleboard:~# ls -l /sbin/syslogd
lrwxrwxrwx 1 root root 22 Aug 28  2013 /sbin/syslogd -&gt; /sbin/syslogd.sysklogd
root@beagleboard:~# ls -l /lib/systemd/system/*syslog*
-rw-r--r-- 1 root root  270 Aug 28  2013 /lib/systemd/system/busybox-syslog.service
lrwxrwxrwx 1 root root    9 Aug 28  2013 /lib/systemd/system/syslog.service -&gt; /dev/null
-rw-r--r-- 1 root root 1235 Aug 28  2013 /lib/systemd/system/syslog.socket
root@beagleboard:~# systemctl status busybox-syslog.service
busybox-syslog.service - System Logging Service
   Loaded: loaded (/lib/systemd/system/busybox-syslog.service; enabled)
   Active: failed (Result: start-limit) since Sat 2000-01-01 00:04:29 UTC; 51s ago
  Process: 307 ExecStart=/sbin/syslogd -n $OPTIONS (code=exited, status=1/FAILURE)
 Main PID: 307 (code=exited, status=1/FAILURE)
   CGroup: /system.slice/busybox-syslog.service
Jan 01 00:04:29 beagleboard systemd[1]: Starting System Logging Service...
Jan 01 00:04:29 beagleboard systemd[1]: Started System Logging Service.
Jan 01 00:04:29 beagleboard systemd[1]: busybox-syslog.service: main process exited, code=exited, status=1/FAILURE
Jan 01 00:04:29 beagleboard systemd[1]: Unit busybox-syslog.service entered failed state.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36019</commentid>
    <comment_count>1</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2013-08-29 06:30:58 +0000</bug_when>
    <thetext>As the service is named as &apos;busybox-sylog.service&apos;, I think we should explicitly use busybox in that service file.

So, instead of using
ExecStart=@base_sbindir@/syslogd -n $OPTIONS
maybe we should use
ExecStart=@busybox_exec_syslogd@ -n $OPTIONS

And at do_install, we replace the @busybox_exec_syslogd@ with &apos;/bin/busybox.nosuid syslogd&apos; or &apos;/bin/busybox syslod&apos; according to whether we&apos;re splitting the busybox binary.

//Chen Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36030</commentid>
    <comment_count>2</comment_count>
    <who name="Peter A. Bigot">pab</who>
    <bug_when>2013-08-29 11:46:17 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; As the service is named as &apos;busybox-sylog.service&apos;, I think we should
&gt; explicitly use busybox in that service file.
&gt; 
&gt; So, instead of using
&gt; ExecStart=@base_sbindir@/syslogd -n $OPTIONS
&gt; maybe we should use
&gt; ExecStart=@busybox_exec_syslogd@ -n $OPTIONS
&gt; 
&gt; And at do_install, we replace the @busybox_exec_syslogd@ with
&gt; &apos;/bin/busybox.nosuid syslogd&apos; or &apos;/bin/busybox syslod&apos; according to whether
&gt; we&apos;re splitting the busybox binary.
&gt; 
&gt; //Chen Qi

I agree this would be less confusing and might be worth doing, but it doesn&apos;t address the underlying issue: if update-alternatives selects sysklogd as the source for /sbin/syslogd, busybox&apos;s syslogd should not be started by systemd.  I think the real fix requires adding syslogd systemd service management to the ua rules for syslogd.  I also think this is going to require pretty advanced recipe-fu and I&apos;m not there yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36063</commentid>
    <comment_count>3</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2013-08-30 01:59:04 +0000</bug_when>
    <thetext>Hi Ross,

Are we going to use different syslog service providers in systemd according to which one provides the /sbin/syslogd, just as Peter suggested? Or we only use busybox&apos;s syslogd service?

Best Regards,
Chen Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36156</commentid>
    <comment_count>4</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2013-09-02 11:01:38 +0000</bug_when>
    <thetext>sysklogd package hasn&apos;t got systemd support. So I think in case of a systemd based system, we should weigh busybox&apos;s syslog and klogd utilities over the sysklogd package. Because by default, busybox has CONFIG_FEATURE_SYSTEMD enabled.

Besides, as busybox has CONFIG_FEATURE_SYSLOGD_CFG enabled, it should have a configuration file &apos;/etc/syslog.conf&apos; in busybox-syslog package.

//Chen Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36400</commentid>
    <comment_count>5</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2013-09-09 01:51:06 +0000</bug_when>
    <thetext>merged into poky/master:
101662d357adfb200c5b38b71494fced1fda5607
43510e5c775597fd78eab5f703e447fb238403f6

http://git.openembedded.org/?p=openembedded-core.git&amp;a=commit;h=45d18a1b6bcdc56d252b289d0d304b26799943b0

http://git.openembedded.org/?p=openembedded-core.git&amp;a=commit;h=b7f6688f0700a1575037362af7a8ca94dccce471</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>