[Workload]: backup-churn
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- bash, kubernetes
- Área
- devops, infrastructure
Línea de trabajo
Comienza localizando la disk workload existente y sus implementaciones de DataVolumeTemplates(), ExtraVolumes() y ExtraDisks(). Compara cómo esa workload integra el almacenamiento persistente y cloud-init; después, añade el script backup-churn y el servicio systemd descritos aquí. La tarea estará terminada cuando la workload se despliegue en una única VM y cree, modifique, elimine y cambie continuamente el nombre de archivos en el disco de datos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Workload Name
backup-churn
Workload Description
Continuous file lifecycle workload that creates, modifies, and deletes files on a data disk at configurable rates. Produces sustained filesystem churn — new files appearing, existing files being modified (appended, truncated, rewritten), and old files being deleted — to simulate real-world data mutation patterns that stress backup and disaster recovery products.
This fills a gap distinct from the existing disk workload. The disk workload uses fio for block-level I/O patterns (random reads, sequential writes, mixed I/O) — it stresses the storage driver and measures IOPS/throughput. backup-churn operates at the filesystem level — creating, modifying, and removing actual files with realistic directory structures. Backup/DR products don't back up raw blocks; they back up files and filesystems. The challenge for these products is tracking what changed between backup windows: new files, modified files, deleted files, renamed files. That's exactly what this workload produces.
Tooling and Packages
- Tool: Custom shell script (zero external dependencies)
- RPM packages: none — uses only coreutils (
dd,mkdir,rm,mv,truncate,find) - systemd service command:
/usr/local/bin/virtwork-backup-churn.sh - Configurable parameters:
churn-rate: operations per second (default: 5)file-size-min/file-size-max: file size range (default: 1KB–10MB)max-files: maximum files on disk before deletions increase (default: 10000)dir-depth: maximum directory nesting depth (default: 5)data-path: target directory on the data disk (default:/data/churn)
VM Count Model
Single VM (like cpu, memory, disk)
Required Resources
- Persistent storage (DataVolume)
- Kubernetes Service (for inter-VM communication)
- Kubernetes Secret (for credentials or config)
- Additional CPU/memory beyond defaults
- GPU or special device passthrough
Cloud-Init Details
write_files:
- path: /usr/local/bin/virtwork-backup-churn.sh
permissions: '0755'
content: |
#!/bin/bash
set -euo pipefail
DATA_DIR="${CHURN_DATA_PATH:-/data/churn}"
RATE="${CHURN_RATE:-5}"
MIN_SIZE="${CHURN_FILE_SIZE_MIN:-1024}"
MAX_SIZE="${CHURN_FILE_SIZE_MAX:-10485760}"
MAX_FILES="${CHURN_MAX_FILES:-10000}"
MAX_DEPTH="${CHURN_DIR_DEPTH:-5}"
DELAY=$(echo "scale=3; 1/$RATE" | bc)
mkdir -p "$DATA_DIR"
FILE_COUNT=0
random_size() {
echo $(( (RANDOM % (MAX_SIZE - MIN_SIZE + 1)) + MIN_SIZE ))
}
random_subdir() {
local depth=$(( RANDOM % MAX_DEPTH + 1 ))
local path="$DATA_DIR"
for ((i=0; i<depth; i++)); do
path="$path/dir_$(( RANDOM % 20 ))"
done
mkdir -p "$path"
echo "$path"
}
while true; do
FILE_COUNT=$(find "$DATA_DIR" -type f 2>/dev/null | wc -l)
OP_RAND=$((RANDOM % 100))
if [ "$FILE_COUNT" -lt 10 ] || [ "$OP_RAND" -lt 40 ]; then
# CREATE: 40% of ops (or forced when few files exist)
DIR=$(random_subdir)
SIZE=$(random_size)
dd if=/dev/urandom of="$DIR/file_$(date +%s%N)_$$" bs=1 count="$SIZE" 2>/dev/null
elif [ "$OP_RAND" -lt 70 ]; then
# MODIFY: 30% of ops — append, truncate, or rewrite
TARGET=$(find "$DATA_DIR" -type f 2>/dev/null | shuf -n1)
if [ -n "$TARGET" ]; then
MOD=$((RANDOM % 3))
case $MOD in
0) dd if=/dev/urandom bs=1 count=$((RANDOM % 4096 + 512)) >> "$TARGET" 2>/dev/null ;;
1) truncate -s "$((RANDOM % 8192 + 256))" "$TARGET" ;;
2) dd if=/dev/urandom of="$TARGET" bs=1 count=$(random_size) 2>/dev/null ;;
esac
fi
elif [ "$OP_RAND" -lt 90 ] || [ "$FILE_COUNT" -gt "$MAX_FILES" ]; then
# DELETE: 20% of ops (or forced when over max-files)
TARGET=$(find "$DATA_DIR" -type f 2>/dev/null | shuf -n1)
[ -n "$TARGET" ] && rm -f "$TARGET"
else
# RENAME: 10% of ops
TARGET=$(find "$DATA_DIR" -type f 2>/dev/null | shuf -n1)
if [ -n "$TARGET" ]; then
DIR=$(dirname "$TARGET")
mv "$TARGET" "$DIR/renamed_$(date +%s%N)_$$" 2>/dev/null || true
fi
fi
sleep "$DELAY"
done
- path: /etc/systemd/system/virtwork-backup-churn.service
content: |
[Unit]
Description=Virtwork backup churn workload
After=data.mount
Requires=data.mount
[Service]
Type=simple
Environment=CHURN_DATA_PATH=/data/churn
Environment=CHURN_RATE=5
Environment=CHURN_FILE_SIZE_MIN=1024
Environment=CHURN_FILE_SIZE_MAX=10485760
Environment=CHURN_MAX_FILES=10000
Environment=CHURN_DIR_DEPTH=5
ExecStart=/usr/local/bin/virtwork-backup-churn.sh
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
runcmd:
- systemctl enable --now virtwork-backup-churn.service
Use Case
- Backup/DR partners (Velero, Trilio, Kasten by Veeam, Commvault, Cohesity): Need continuous filesystem mutation to validate incremental backup correctness. A static disk (like the
diskworkload produces) is easy to back up — the hard part is tracking which files changed between backup windows, correctly handling deleted files, and restoring a consistent point-in-time snapshot from a churning filesystem. - Storage snapshot partners: Need filesystem-level changes happening during CSI VolumeSnapshot operations to validate crash-consistency guarantees. The mix of create/modify/delete/rename operations exercises the snapshot driver's ability to capture a consistent filesystem state.
- Data protection partners: Need realistic file lifecycle patterns (not just raw I/O) to validate deduplication efficiency, changed-block tracking accuracy, and restore integrity. The configurable directory depth and file size range produce a realistic filesystem tree.
- Compliance/audit partners: Need to validate that file-level audit trails (who changed what, when) remain accurate under sustained churn — important for regulated environments running VMs on OpenShift.
Additional Context
- This workload reuses the data disk pattern from the existing
diskworkload —DataVolumeTemplates(),ExtraVolumes(), andExtraDisks()are already proven for attaching a CDI-provisioned persistent disk to a VM. - The operation distribution (40% create, 30% modify, 20% delete, 10% rename) is tunable and intentionally biased toward creation early (to build up a filesystem) and deletion later (when
max-filesis reached). This prevents unbounded disk usage. - The self-balancing
max-filesthreshold means the workload runs indefinitely without filling the disk — deletions automatically increase when the file count exceeds the threshold. This is important for multi-day validation runs. - At the default rate (5 ops/sec) with average file sizes around 1MB, this produces ~5MB/sec of filesystem mutation — enough to stress incremental backup tracking without overwhelming a 20Gi data disk within minutes.
- The variety of modification types (append, truncate, full rewrite) exercises different changed-block-tracking strategies that backup products use.
- Lenguaje dominante
- Go
- Estrellas
- 0
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de opdev/virtwork
-
good first issue needs-triage size/L workload-request workload/variant
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
-
[Workload]: chaos-migrationAbiertoneeds-triage priority/awaiting-more-evidence size/XL workload-request workload/tier-2
Dificultad 5/5 Más de una semana Aptitud para principiantes 48/100
-
[Workload]: disk-snapshotAbiertogood first issue needs-triage size/XL workload-request workload/variant
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
[Workload]: encryptionAbiertoneeds-triage size/L workload-request workload/tier-3
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
[Workload]: windowsAbiertoneeds-triage size/XXL workload-request workload/tier-3
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Todos los issues de opdev/virtwork
Issues similares
-
usage: a custom provider's balance meters ("…%" in the balance path) ignore the Left/Used switchAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug iam-service
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
platform-mesh/platform-mesh#425 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
grafana/tempo-operator#1691 ·
Los mantenedores suelen responder en 1 día
-
fix: presentation.go with mcp-table.go: the message for each MCP server comes backPosiblemente ocupada @mge1512 la tomó hoy. Abiertobug
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
mark3labs/kit#242 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Project submission: Sno StationAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
slavakurilyak/awesome-ai-agents#827 ·
Los mantenedores suelen responder en 1 día