<?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>12444</bug_id>
          
          <creation_ts>2017-12-21 07:57:05 +0000</creation_ts>
          <short_desc>[Test Case 1542] test_2_logrotate fails in MinnowMax with core-image-lsb-sdk-genericx86-64 image</short_desc>
          <delta_ts>2018-10-12 16:37:43 +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>BSPs</product>
          <component>bsps-configuration</component>
          <version>2.4.1</version>
          <rep_platform>MinnowBoard Max</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.5 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="yeoh ee peng">ee.peng.yeoh</reporter>
          <assigned_to name="yeoh ee peng">ee.peng.yeoh</assigned_to>
          <cc>richard.purdie</cc>
    
    <cc>yp.bsp.watcher</cc>
    
    <cc>yp.watcher</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>78777</commentid>
    <comment_count>0</comment_count>
    <who name="yeoh ee peng">ee.peng.yeoh</who>
    <bug_when>2017-12-21 07:57:05 +0000</bug_when>
    <thetext>Step to reproduce error:
1) Boot up MinnowMax with core-image-lsb-sdk-genericx86-64 image
2) Configure local.conf following steps in BSP Test Plan
https://wiki.yoctoproject.org/wiki/BSP_Test_Plan
3) Run bitbake core-image-lsb-sdk -c testimage

RESULTS - logrotate.LogrotateTest.test_1_logrotate_setup - Testcase 1544: PASSED
RESULTS - logrotate.LogrotateTest.test_2_logrotate - Testcase 1542: FAILED

NOTE:   test_1_logrotate_setup (logrotate.LogrotateTest)
DEBUG: Checking if at least one of logrotate is installed
DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR 172.30.199.124 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; mkdir $HOME/logrotate_dir
DEBUG: time: 1513754065.3160224, endtime: 1513754365.3126523
DEBUG: [Command returned &apos;0&apos; after 0.18 seconds]
DEBUG: Command: mkdir $HOME/logrotate_dir
Output:  

DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR 172.30.199.124 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; sed -i &quot;s#wtmp {#wtmp {\n    olddir $HOME/logrotate_dir#&quot; /etc/logrotate.conf
DEBUG: time: 1513754065.5603456, endtime: 1513754365.5569317
DEBUG: [Command returned &apos;0&apos; after 0.18 seconds]
DEBUG: Command: sed -i &quot;s#wtmp {#wtmp {\n    olddir $HOME/logrotate_dir#&quot; /etc/logrotate.conf
Output:  

NOTE:  ... OK (0.426s)
NOTE:   test_2_logrotate (logrotate.LogrotateTest)
DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR 172.30.199.124 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; logrotate -f /etc/logrotate.conf
DEBUG: time: 1513754065.7415323, endtime: 1513754365.7380984
DEBUG: Partial data from SSH call: error: destination /var/log/dnf.log-20171220 already exists, skipping rotation
error: destination /var/log/dnf.librepo.log-20171220 already exists, skipping rotation
error: destination /var/log/dnf.rpm.log-20171220 already exists, skipping rotation
error: destination /var/log/hawkey.log-20171220 already exists, skipping rotation

DEBUG: time: 1513754065.9317398, endtime: 1513754365.931738
DEBUG: [Command returned &apos;1&apos; after 0.19 seconds]
DEBUG: Command: logrotate -f /etc/logrotate.conf
Output:  error: destination /var/log/dnf.log-20171220 already exists, skipping rotation
error: destination /var/log/dnf.librepo.log-20171220 already exists, skipping rotation
error: destination /var/log/dnf.rpm.log-20171220 already exists, skipping rotation
error: destination /var/log/hawkey.log-20171220 already exists, skipping rotation

NOTE:  ... FAIL (0.197s)
DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR 172.30.199.124 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; rm -rf $HOME/logrotate_dir
DEBUG: time: 1513754065.9389927, endtime: 1513754365.9349895
DEBUG: [Command returned &apos;0&apos; after 0.18 seconds]
DEBUG: Command: rm -rf $HOME/logrotate_dir
Output:</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78810</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-12-21 16:47:30 +0000</bug_when>
    <thetext>It looks like the sed command failed/is incorrectly formatted as the errors indicate logrotate is trying to rotate logs in /var/log/ but the sed command should have set the log directory to $HOME/logrotate_dir

Could you attach a copy of the /etc/logrotate.conf from the DUT?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79191</commentid>
    <comment_count>2</comment_count>
      <attachid>4183</attachid>
    <who name="yeoh ee peng">ee.peng.yeoh</who>
    <bug_when>2018-01-23 09:21:50 +0000</bug_when>
    <thetext>Created attachment 4183
/etc/logrotate.conf from device</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79192</commentid>
    <comment_count>3</comment_count>
    <who name="yeoh ee peng">ee.peng.yeoh</who>
    <bug_when>2018-01-23 09:24:07 +0000</bug_when>
    <thetext>Hi Joshua,

While I tried to retrieve the /etc/logrotate.conf from device.
I rerun the testimage again but it was passing this time, let me close this ticket for now while I will try if I can reproduce this issue.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4183</attachid>
            <date>2018-01-23 09:21:50 +0000</date>
            <delta_ts>2018-01-23 09:21:50 +0000</delta_ts>
            <desc>/etc/logrotate.conf from device</desc>
            <filename>logrotate.conf</filename>
            <type>application/octet-stream</type>
            <size>679</size>
            <attacher name="yeoh ee peng">ee.peng.yeoh</attacher>
            
              <data encoding="base64">IyBzZWUgIm1hbiBsb2dyb3RhdGUiIGZvciBkZXRhaWxzCiMgcm90YXRlIGxvZyBmaWxlcyB3ZWVr
bHkKd2Vla2x5CgojIGtlZXAgNCB3ZWVrcyB3b3J0aCBvZiBiYWNrbG9ncwpyb3RhdGUgNAoKIyBj
cmVhdGUgbmV3IChlbXB0eSkgbG9nIGZpbGVzIGFmdGVyIHJvdGF0aW5nIG9sZCBvbmVzCmNyZWF0
ZQoKIyB1c2UgZGF0ZSBhcyBhIHN1ZmZpeCBvZiB0aGUgcm90YXRlZCBmaWxlCmRhdGVleHQKCiMg
dW5jb21tZW50IHRoaXMgaWYgeW91IHdhbnQgeW91ciBsb2cgZmlsZXMgY29tcHJlc3NlZAojY29t
cHJlc3MKCiMgUlBNIHBhY2thZ2VzIGRyb3AgbG9nIHJvdGF0aW9uIGluZm9ybWF0aW9uIGludG8g
dGhpcyBkaXJlY3RvcnkKaW5jbHVkZSAvZXRjL2xvZ3JvdGF0ZS5kCgojIG5vIHBhY2thZ2VzIG93
biB3dG1wIGFuZCBidG1wIC0tIHdlJ2xsIHJvdGF0ZSB0aGVtIGhlcmUKL3Zhci9sb2cvd3RtcCB7
CiAgICBtaXNzaW5nb2sKICAgIG1vbnRobHkKICAgIGNyZWF0ZSAwNjY0IHJvb3QgdXRtcAogICAg
bWluc2l6ZSAxTQogICAgcm90YXRlIDEKfQoKL3Zhci9sb2cvYnRtcCB7CiAgICBtaXNzaW5nb2sK
ICAgIG1vbnRobHkKICAgIGNyZWF0ZSAwNjAwIHJvb3QgdXRtcAogICAgcm90YXRlIDEKfQoKIyBz
eXN0ZW0tc3BlY2lmaWMgbG9ncyBtYXkgYmUgYWxzbyBiZSBjb25maWd1cmVkIGhlcmUuCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>