kiri import copies a volume while a running container is writing to it, and reports done
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 76/100
Research direction
Start by reading crates/kiri/src/import.rs and the volume() function identified in the issue; trace how it selects and copies a source volume. Check how the CLI invokes Docker for the source context and how volume import behavior is tested. Done means an import detects a running container using the volume and warns or stops before copying, with a documented --force option if that approach is chosen.
Written by the indexing model from the issue text.
Description
Kiri version and system
0.2.1 on macOS 27.0.1 (Apple silicon, arm64); source OrbStack 2.2.5
What you did
A container on OrbStack keeps writing to a named volume, and I import that volume into Kiri while it runs:
docker --context orbstack volume create inuse-demo
docker --context orbstack run -d --name inuse-writer -v inuse-demo:/d alpine \
sh -c 'i=0; while true; do i=$((i+1)); echo $i >> /d/log; done'
sleep 3
kiri import orbstack volume inuse-demo
docker --context kiri run --rm -v inuse-demo:/d alpine sh -c 'echo "kiri copy: $(wc -l < /d/log) lines"'
docker --context orbstack stop -t1 inuse-writer
docker --context orbstack run --rm -v inuse-demo:/d alpine sh -c 'echo "source now: $(wc -l < /d/log) lines"'
What happened
volume inuse-demo: done
kiri copy: 1282471 lines
source now: 2237809 lines
What you expected instead
When a running container on the source mounts the volume, kiri import warns or stops before copying (for example: "inuse-writer is running with this volume; stop it first, or pass --force"). As it is, the import says done and the copy is a snapshot taken mid-write, with no sign that it may be incomplete. For a database volume (Postgres, MariaDB) that copy can be inconsistent, and nothing tells you.
Anything else
Without a running writer the import is exact: for a stopped volume with a 5 MB random file and a file owned 1234:5678 mode 640, sha256 and owner/mode match on both sides.
The check could live in crates/kiri/src/import.rs volume(): docker --context <source> ps --filter volume=NAME --filter status=running. Happy to send a pull request if that direction suits you; not starting on code before you say so, per CONTRIBUTING.
- Dominant language
- Rust
- Stars
- 7.5k
- Forks
- 329
- Avg merge
- 7h 48m
- Merged PRs (30d)
- 105
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from libracoder/kiri
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
libracoder/kiri#364 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
libracoder/kiri#289 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 47/100
libracoder/kiri#365 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
libracoder/kiri#362 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 47/100
libracoder/kiri#359 ·
Maintainers usually reply within 1 day
Similar issues
-
benchmark-review
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
area:filesystem bug need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Captions panel does not offer to show an existing transcriptPossibly taken @thedavidweng claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CapSoftware/Cap#4276 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
matrix-org/matrix-rust-sdk#7495 ·
Maintainers usually reply within 1 day