Draft
Conversation
Signed-off-by: Thibault NORMAND <thibault.normand@datadoghq.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Thibault NORMAND <me@zenithar.org>
d238abd to
6109573
Compare
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 499ca66 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a new
diskFulldisruption kind that genuinely fills a target pod volume using thefallocate(2)syscall, causing real ENOSPC errors on all subsequent write operations. This fills a gap where existing disruptions (DiskPressure = I/O throttling, DiskFailure = eBPF onopenatonly) don't simulate actual disk exhaustion visible to monitoring and all syscalls.Features
fallocate(2)syscall (instant, O(1) on ext4/xfs) to genuinely consume disk space. Falls back to writing zeros on unsupported filesystems.writesyscalls and return configurable error codes (ENOSPC, EDQUOT, EIO, etc.) with probability-based failure injection.unsafeMode.allowDiskFullNoFloor). Pod-level only. Webhook warning for ephemeral-storage eviction risk.fallocate/package (adapted from detailyang/go-fallocate, MIT) — no dependency onfallocateorddbinaries in the injector image.How it differs from existing disruptions
df/monitoring?openatonlyExample
Code Quality Checklist
Testing
unittests.Test coverage (50 specs)
Files changed (27 files, ~2000 lines)
api/v1beta1/disk_full.go,disruption_types.go,disruption_webhook.go,safemode.goinjector/disk_full.go(volume fill + eBPF launch)cli/injector/disk_full.go,cli/injector/main.gofallocate/(4 platform-specific files, adapted from go-fallocate MIT)ebpf/disk-full-write/(C kernel program + Go userspace binary)safemode/safemode_disk_full.go,safemode/safemode.gotypes/types.go(DisruptionKindDiskFull),ebpf/const-*.go(SysWrite)docs/disk_full.md,docs/disruption_catalogue.mdapi/v1beta1/disk_full_test.go,injector/disk_full_test.go