Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add cleanup script to manage build agent disk space #381

Merged
merged 1 commit into from
Jun 19, 2018

Conversation

mvines
Copy link
Member

@mvines mvines commented Jun 19, 2018

Docker containers/images in particular need to be actively pruned to avoid running out of disk

@garious garious requested a review from rob-solana June 19, 2018 18:48
@codecov
Copy link

codecov bot commented Jun 19, 2018

Codecov Report

Merging #381 into master will decrease coverage by 0.28%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #381      +/-   ##
==========================================
- Coverage   91.06%   90.78%   -0.29%     
==========================================
  Files          36       36              
  Lines        3493     3493              
==========================================
- Hits         3181     3171      -10     
- Misses        312      322      +10
Impacted Files Coverage Δ
src/tvu.rs 97.81% <0%> (-1.46%) ⬇️
src/crdt.rs 84.2% <0%> (-1.16%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6aced92...8c9e380. Read the comment docs.

# Regular maintenance performed on a buildkite agent to control disk usage
#

echo --- Delete all exited containers first
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer printf BUILTIN to echo

@garious garious merged commit 85b6e72 into solana-labs:master Jun 19, 2018
(
set -x
exited=$(docker ps -aq --no-trunc --filter "status=exited")
if [[ -n "$exited" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double quotes unnecessary in bash's builtin [[

set -x
dangling=$(docker images --filter 'dangling=true' -q --no-trunc | sort | uniq)
if [[ -n "$dangling" ]]; then
docker rmi "$dangling"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks to me like dangling is multiple strings... when you pass "$dangling" to docker rmi, you pass a single argument

consider
dangling=( $(docker ...) )
docker rmi "${dangliing[@]}"

echo "--- Delete /tmp files older than 1 day owned by $(whoami)"
(
set -x
find /tmp -maxdepth 1 -user "$(whoami)" -mtime +1 -print0 | xargs -0 rm -rf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoami isn't always around, as such introduces a dependency, consider ${USER} or

mvines added a commit to mvines/solana that referenced this pull request Jun 15, 2020
yhchiang-sol added a commit to yhchiang-sol/solana that referenced this pull request Mar 22, 2024
yhchiang-sol added a commit to yhchiang-sol/solana that referenced this pull request Mar 22, 2024
yhchiang-sol added a commit to yhchiang-sol/solana that referenced this pull request Mar 22, 2024
pgarg66 referenced this pull request in pgarg66/solana Mar 22, 2024
…torage (anza-xyz#381)

#### Problem
The current implementation of TieredStorage::file_size() requires
a sys-call to provide the file size.

#### Summary of Changes
Add len() API to TieredStorageReader, and have HotStorageReader()
implement the API using Mmap::len().

#### Test Plan
Update existing unit-test to also verify HotStorageReader::len().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants