cloudfoundry / cloudfoundry/diego-release

Allocate zero disk to privileged containers

Open
#994 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
206
Forks
228
Avg merge
1d 19h
Merged PRs (30d)
9

Description

Current behavior

The allocation of volumes between privileged and unprivileged containers cannot be controlled. We are not using privileged containers but the grootfs is still allocating 50% of the available volumes per diego cell to privileged container storage.

Filesystem     1K-blocks     Used Available Use% Mounted on
tmpfs            3233124   108320   3124804   4% /run
/dev/nvme0n1p1   5077232  3197240   1608420  67% /
tmpfs           16165616        0  16165616   0% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs               4096        0      4096   0% /sys/fs/cgroup
/dev/nvme1n1p2  70807720 24118380  43046716  36% /var/vcap/data
tmpfs              16384      948     15436   6% /var/vcap/data/sys/run
/dev/loop0      50176344 14227740  35948604  29% /var/vcap/data/grootfs/store/unprivileged
/dev/loop1      50176224    83104  50093120   1% /var/vcap/data/grootfs/store/privileged
tmpfs            3233120        0   3233120   0% /run/user/1001

The config.ini.erb controls adding the privilege config, but there doesn't appear to be a way to set the size to a minimum

Config.ini.erb

  <% if use_default_privileged_image_plugin -%>
    privileged-image-plugin = /var/vcap/packages/grootfs/bin/grootfs
    privileged-image-plugin-extra-arg = "--config"
    privileged-image-plugin-extra-arg = <%= groot_config_dir %>/privileged_grootfs_config.yml
  <% end -%>
Desired behavior

Ideally, be able to set the Privileged container storage to a minimum and allocate the resources to the non-privileged containers.

Affected Version

2.104.0

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

Start with config.ini.erb and trace the privileged_grootfs_config.yml configuration into grootfs to find where privileged and unprivileged storage sizes are determined. Done means a documented configuration path exists for setting a minimum privileged storage allocation and the remaining volume capacity is available to unprivileged containers, with relevant tests or validation identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.