Skip to content

DAOS-17681 tools: fix cont clone of EC containers with holes (#18866) - #19089

Merged
mchaarawi merged 1 commit into
release/2.8from
mschaara/17681-2.8
Sep 17, 2026
Merged

mchaarawi merged 1 commit into
release/2.8from
mschaara/17681-2.8

Conversation

@mchaarawi

Copy link
Copy Markdown
Contributor

cont clone enumerated the extents of an akey with daos_obj_list_recx() and copied that range verbatim. Two problems:

The listing and the fetch both ran at DAOS_TX_NONE, so they could be served at different epochs even though the tool creates a snapshot for the OIT. Read the source under a snapshot transaction instead.

For an EC object the listing is served by a parity shard, where one parity block stands for a whole stripe, so the returned extents are an upper bound and can cover punched records. The fetch leaves those holes untouched and still reports the full length, because only trailing holes shorten it, so the sg_nr_out check could not detect it and uninitialized bytes were written to the destination. Fetch with an io map and copy the extents it reports.

Also range check the extents and record size before deriving buffer offsets from them, and propagate a transaction close failure to the exit code.

Document in daos_obj.h that daos_obj_list_recx() returns an upper bound for EC objects, that the fetch reply length cannot detect a partial result, and that the listing and the fetch should share a transaction.

Test: daos_test -I -u 32,33,34,35 covers the copy and verifies the destination matches the source extent for extent. datamover/obj_ec.py runs the same over the real command on an EC container with punched extents. Adds IORequest.punch_array() and an object class and punch option to dataset_gen().

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

cont clone enumerated the extents of an akey with daos_obj_list_recx() and copied that range verbatim. Two problems:

The listing and the fetch both ran at DAOS_TX_NONE, so they could be served at different epochs even though the tool creates a snapshot for the OIT. Read the source under a snapshot transaction instead.

For an EC object the listing is served by a parity shard, where one parity block stands for a whole stripe, so the returned extents are an upper bound and can cover punched records. The fetch leaves those holes untouched and still reports the full length, because only trailing holes shorten it, so the sg_nr_out check could not detect it and uninitialized bytes were written to the destination. Fetch with an io map and copy the extents it reports.

Also range check the extents and record size before deriving buffer offsets from them, and propagate a transaction close failure to the exit code.

Document in daos_obj.h that daos_obj_list_recx() returns an upper bound for EC objects, that the fetch reply length cannot detect a partial result, and that the listing and the fetch should share a transaction.

Test: daos_test -I -u 32,33,34,35 covers the copy and verifies the destination matches the source extent for extent. datamover/obj_ec.py runs the same over the real command on an EC container with punched extents. Adds IORequest.punch_array() and an object class and punch option to dataset_gen().

Signed-off-by: Mohamad Chaarawi <mohamad.chaarawi@hpe.com>
@mchaarawi mchaarawi added the clean-cherry-pick Cherry-pick from another branch that did not require additional edits label Sep 16, 2026
@github-actions

Copy link
Copy Markdown

Ticket title is 'daos container clone: daos_obj_fetch unexpectedly returns 0 sg_nr_out'
Status is 'In Progress'
Labels: 'ALCF,hpe_cluster'
Job should run at elevated priority (1)
https://daosio.atlassian.net/browse/DAOS-17681

@github-actions github-actions Bot added the priority Ticket has high priority (automatically managed) label Sep 16, 2026
@mchaarawi
mchaarawi marked this pull request as ready for review September 16, 2026 12:48
@mchaarawi
mchaarawi requested review from a team as code owners September 16, 2026 12:48
@mchaarawi
mchaarawi requested a review from a team September 17, 2026 13:02
@mchaarawi
mchaarawi merged commit 4915713 into release/2.8 Sep 17, 2026
39 checks passed
@mchaarawi
mchaarawi deleted the mschaara/17681-2.8 branch September 17, 2026 13:02
@daltonbohning daltonbohning added the release-2.8.1 Targeted for release 2.8.1 label Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean-cherry-pick Cherry-pick from another branch that did not require additional edits priority Ticket has high priority (automatically managed) release-2.8.1 Targeted for release 2.8.1

Development

Successfully merging this pull request may close these issues.

2 participants