New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 747841 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

chameleon: No space left on device

Project Member Reported by cychiang@chromium.org, Jul 24 2017

Issue description

When I was updating chameleon, I found that the log file
/www/log/lighttpd.error.log can be as large as 30MB.

Since we usually don't need that file, we can clear it periodically.
 

Comment 1 by itspeter@google.com, Jul 25 2017

Maybe increase the size of rootfs ?
Even without lighttpd, it is relatively small just after install the SD image.

root@socfpga:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               251.4M    220.2M     18.1M  92% /
devtmpfs                372.5M         0    372.5M   0% /dev
tmpfs                   372.7M    140.0K    372.5M   0% /var/volatile
tmpfs                   372.7M         0    372.7M   0% /media/ram


Disk /dev/mmcblk0: 7815 MB, 7815561216 bytes
4 heads, 16 sectors/track, 238512 cylinders, total 15264768 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            2048      206847      102400    b  W95 FAT32
/dev/mmcblk0p2          206848     1845247      819200   83  Linux
/dev/mmcblk0p3         1845248     1847295        1024   a2  Unknown

Cc: rjahagir@chromium.org
I ran these to clear the log file on all the DUT that are ssh-able:

$ ~/trunk/src/third_party/autotest/files/cli/atest host list -b 'pool:chameleon' | cut -f1 -d' ' | tail -n +2 > /tmp/chameleons

$ cat /tmp/chameleons | xargs -IX sh -c "echo X && ssh root@X-chameleon.cros 'echo '' > /www/logs/lighttpd.error.log' || true"

I will work on the fix in chameleond using scheduler to periodically clear the log file. Also, the fix to increase the image size.
Is pool:chameleon a manual label that needs to be added to all boards with chameleon label? 

Otherwise, can we run these commands on all DUTs with just the chameleon label?
I am confused with the label too.
The command above to query the chameleon boards was copied from go/chameleon-bundle.
Kalin, could you please answer #4 ?
Maybe we should update the doc too.

Thanks!

Comment 6 by ka...@chromium.org, Aug 9 2017

Yes, pool:chameleon is manual label.
Having the audo-labels removed when the chameleon boards are disconnected, we have to use manually added ones.
I think the best will be to use label 'pool:chameleon', 'audio_board' or 'pool:audio_board'. 
Status: Started (was: Assigned)
I have uploaded the CL https://chromium-review.googlesource.com/608733 to clear the log periodically.
Project Member

Comment 8 by bugdroid1@chromium.org, Aug 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/chameleon/+/5b22ff63ce8445c8cbaa84a5c75d1e170f1c142a

commit 5b22ff63ce8445c8cbaa84a5c75d1e170f1c142a
Author: Cheng-Yi Chiang <cychiang@chromium.org>
Date: Tue Aug 15 07:25:20 2017

scheduler: Clear the content of obsolete files periodically

Clear the content of log files every one hour to avoid disk being full.

BUG= chromium:747841 
TEST=check content of /www/logs/lighttpd.error.log is cleared
periodically.

Change-Id: I97ca2b5102b1efefdbd988d68fb7092cb8bc96be
Reviewed-on: https://chromium-review.googlesource.com/608733
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[add] https://crrev.com/5b22ff63ce8445c8cbaa84a5c75d1e170f1c142a/chameleond/utils/file_utils.py
[modify] https://crrev.com/5b22ff63ce8445c8cbaa84a5c75d1e170f1c142a/utils/run_scheduler

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/chameleon/+/1558016a7d8a4be0569bb6e72e72ca264682a4e4

commit 1558016a7d8a4be0569bb6e72e72ca264682a4e4
Author: Cheng-Yi Chiang <cychiang@chromium.org>
Date: Sat Sep 23 22:08:31 2017

deploy: Stop running lighttpd on startup

lighttpd logs take too much space.
Stop running it since we do not need it.

BUG= chromium:747841 
TEST=deploy the bundle and see lighttpd does not run on startup.

Change-Id: I2292104a7d98773673f6334e3ec3317d940ca551
Reviewed-on: https://chromium-review.googlesource.com/678457
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>

[modify] https://crrev.com/1558016a7d8a4be0569bb6e72e72ca264682a4e4/deploy/deploy

Status: Fixed (was: Started)
Bundle r223 has been pushed to lab, and updated all the boards that are available.

Comment 11 by ka...@chromium.org, Sep 26 2017

Status: Verified (was: Fixed)
I checked yesterday and initiated update - r223 was coming up.
Verified.

Sign in to add a comment