← Back to issue list

Whiteout files migration tracking failing when distributing content in partitions

View original Github issue

Metadata

Project
craft-parts
Number
#1173
Type
issue
State
closed
Author
upils
Labels
Status: Triaged Type: Bug
Created
Updated
Closed

Current evaluation

Fixed by PR #1193 (commit 2ca29040), which excludes entries already distributed to another partition and prevents repeated whiteout migration.

Resolution: closed resolved

Reason: PR #1193 was merged as commit 2ca29040 with the title "feat: exclude files already distributed to another partition." Its partition-exclusion logic addresses the duplicate migration of OCI whiteout entries described in #1173.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description When migrating an overlay whiteout file from the overlay, the created OCI whiteout file is recorded and not the original file. Consequently, when looping over the filesystems entries, these whiteout files are migrated multiple times. This leads to trying to migrate files in non-existent directories (because the target directory was migrated into another partition). ### To Reproduce `filesystems.yaml`: ```yaml filesystems: default: - mount: "/" device: "(volume/pc/rootfs)" - mount: "/boot/" device: "(volume/pc/efi)" ``` `python3 -mcraft_parts --filesystem-mounts filesystems.yaml --partitions volume/pc/rootfs,volume/pc/efi --overlay-base /tmp/overlay --trace -v prime` ### part yaml ```shell parts: part1: plugin: nil overlay-script: | mkdir -p $CRAFT_OVERLAY/boot/efi/test part2: after: [part1] plugin: nil overlay-script: | rm -r $CRAFT_OVERLAY/boot/efi/test ``` ### Relevant log output ```shell DEBUG:craft_parts.executor.part_handler:migrate volume/pc/rootfs partition part 'part2' layer to stage DEBUG:craft_parts.overlays.overlays:check layer visibility in /home/paul/scratch/craft-parts/parts/part2/layer/boot DEBUG:craft_parts.overlays.overlays:check if path is visible: root=/home/paul/scratch/craft-parts/partitions/volume/pc/efi/stage, relpath=efi DEBUG:craft_parts.overlays.overlays:check if path is visible: root=/home/paul/scratch/craft-parts/partitions/volume/pc/efi/stage, relpath=efi/test DEBUG:craft_parts.overlays.overlays:layer visibility files={'efi/test'}, dirs={'efi'} DEBUG:craft_parts.executor.part_handler:excluding already migrated files: set() DEBUG:craft_parts.executor.part_handler:excluding already migrated dirs: set() DEBUG:craft_parts.executor.migration:create OCI whiteout file '/home/paul/scratch/craft-parts/partitions/volume/pc/efi/stage/efi/.wh.test' DEBUG:craft_parts.overlays.overlays:check layer visibility in /home/paul/scratch/craft-parts/parts/part2/layer DEBUG:craft_parts.overlays.overlays:check if path is visible: root=/home/paul/scratch/craft-parts/stage, relpath=boot DEBUG:craft_parts.overlays.overlays:check if path is visible: root=/home/paul/scratch/craft-parts/stage, relpath=boot/efi DEBUG:craft_parts.overlays.overlays:check if path is visible: root=/home/paul/scratch/craft-parts/stage, relpath=boot/efi/test DEBUG:craft_parts.overlays.overlays:layer visibility files={'boot/efi/test'}, dirs={'boot/efi', 'boot'} DEBUG:craft_parts.executor.part_handler:excluding already migrated files: {'boot/efi/.wh.test'} DEBUG:craft_parts.executor.part_handler:excluding already migrated dirs: {'boot/efi'} DEBUG:craft_parts.executor.migration:create OCI whiteout file '/home/paul/scratch/craft-parts/stage/boot/efi/.wh.test' Error: /home/paul/scratch/craft-parts/stage/boot/efi/.wh.test: No such file or directory. ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by PR #1193 (commit 2ca29040), which excludes entries already distributed to another partition and prevents repeated whiteout migration.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #1193, replacing generated-whiteout tracking with records of migrated subpaths so files already assigned to another partition are excluded.
qwen/qwen3.6-35b-a3b — — Closed after triage and Jira sync (CRAFT-4659). No repository fix or merge was applied. The bug was tracked externally and remains unresolved in the codebase.
qwen/qwen3.6-35b-a3b — — Closed without a public fix. The whiteout migration tracking bug across partitions was tracked internally via Jira but remains unresolved.
qwen/qwen3.6-35b-a3b — — Closed and deferred to internal Jira tracking (CRAFT-4659) without a code fix. The bug causes duplicate whiteout file migration across partitions, triggering directory-not-found errors.
qwen3.6-35b-a3b-mtp-q6 — — Closed following triage and synchronization to internal Jira ticket CRAFT-4659. The bug was tracked internally without a direct GitHub resolution or merge.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: craft-parts#1193 (confidence 99%)

    Commit 2ca29040 directly changes partition migration to exclude files already distributed elsewhere, matching the reported failure.

Related issues

Issue Project State Summary Similarity
#1193 feat: exclude files already distributed to another partition craft-parts merged Merged PR #1193 (commit 2ca29040), replacing whiteout tracking with migrated-subpath records to exclude files already assigned to another partition; fixes #1173.
80%
#188 fix: whiteout files migration imagecraft merged Whiteout-file migration was fixed in PR #188 via merged commit 20df50c; two reviewers approved and all CI checks passed.
76%
#1161 fix: Whiteout files not properly interpreted at the root craft-parts merged Merged PR #1161 in commit 664f356e fixed root whiteout handling, cleaned whiteouts in non-default partitions, and resolved #1157/CRAFT-4639.
74%