Skip to content

container_cleaner.py: keep the last 30 snapshots#3297

Open
johanneskastl wants to merge 1 commit intoopenSUSE:masterfrom
johanneskastl:20260207_tumbleweed_image_retention
Open

container_cleaner.py: keep the last 30 snapshots#3297
johanneskastl wants to merge 1 commit intoopenSUSE:masterfrom
johanneskastl:20260207_tumbleweed_image_retention

Conversation

@johanneskastl
Copy link
Copy Markdown

Due to the rapid release of Tumbleweed, keeping the last 5 snapshots per architecture means we only have a week old image for x86_64 at most...

Keeping 30 snapshots should not be a big hit on storage, according to @dirkmueller

Discussion see this thread

Signed-off-by: Johannes Kastl <git@johannes-kastl.de>
@Vogtinator
Copy link
Copy Markdown
Member

Keeping 30 snapshots should not be a big hit on storage, according to @dirkmueller

I think it's a very big hit, as it needs 6x the storage and likely processing power as well: For every additional image in the project, publishing gets a bit slower. There's no deduplication, as most images contain the TW snapshot number and get rebuilt for every new snapshot.

Currently with 5 snapshots it needs about 608GB:

> osc api /build/openSUSE:Containers:Tumbleweed/_result?view=binarylist | xmllint - --xpath "/resultlist/result/binarylist/binary[not(contains(@filename, '.tar'))]/@size" | awk -F'"' 'BEGIN { total=0 } /size/ { total += $2 } END { print total " B" }' | qalc -f -
608016158483 bytes ≈ 608,0161585 GB

With 30 snapshots it would be over 3.5TB...

@Vogtinator
Copy link
Copy Markdown
Member

Discussion see this thread

For Tumbleweed, using :latest is the most sensible option: You don't get any security or bug fixes in previous images, and if you install packages, you always get the latest snapshot (unless you try to use the https://download.opensuse.org/history/ repo).

For Leap, container images are (for now) kept indefinitely.

@Vogtinator
Copy link
Copy Markdown
Member

Currently with 5 snapshots it needs about 608GB:

I asked Adrian to have a look on the backend server directly and apparently it's about 389GiB.

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.

2 participants