cloudfoundry / cloudfoundry/cloud_controller_ng

nearly 1MM empty directories under /var/vcap/store/shared

Open
#3,606 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
207
Forks
373
Avg merge
2d 12h
Merged PRs (30d)
56

Description

Issue

When looking into why some backups were running slowly we noted that our CF blobstore (using singleton-blobstore) has an extraordinary amount of empty directories.

find /var/vcap/store/shared -empty -type d | wc -l
883167

I note we actually only have 161 files!

find /var/vcap/store/shared -type f | wc -l
161

Most of the empty-dirs appear to be in cc-droplets:

...
/var/vcap/store/shared/cc-droplets/ae/ac/aeacaa07-929d-4c4e-b799-bcd7e799fb4d
/var/vcap/store/shared/cc-droplets/ae/ac/aeac8d1c-5e02-4146-a4ab-ac8e67a271af
/var/vcap/store/shared/cc-droplets/ae/ac/aeac3842-fd0b-499f-aded-2b320f396a1d
/var/vcap/store/shared/cc-droplets/ae/ac/aeac2392-2b04-479c-854f-0ed8b0c5b446
/var/vcap/store/shared/cc-droplets/ae/ac/aeac178b-529c-4b9b-b8c1-ecf7dbe6633c
...

Context

We deploy set of apps daily to our Cloudfoundry.

Steps to Reproduce

Run a Cloudfoundry for a long time with regular apps being pushed.

Expected result

Empty directories to not grow unbounded.

Current result

Empty directories being left on disk.

Possible Fix

We will probably run a pre-start script to install a cronjob or similar to delete the empty dirs, something like:
https://github.com/cloudfoundry/cloud_controller_ng/issues/1602#issuecomment-663345978

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names no source file or test. Start by tracing how the singleton-blobstore handles creation and removal of cc-droplets directories, then review the cleanup idea referenced in cloud_controller_ng#1602. Done means repeated app pushes no longer leave empty directories growing without bound.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.