Project

General

Profile

Actions

Bug #67330

closed
VS NS

mgr/volumes: resilience to failed non-atomic operations

Bug #67330: mgr/volumes: resilience to failed non-atomic operations

Added by Venky Shankar over 2 years ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Urgent
Category:
Correctness/Safety
Target version:
Due date:
% Done:

0%

Source:
other
Backport:
tentacle,squid
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
mgr/volumes
Labels (FS):
Pull request ID:
Tags (freeform):
Fixed In:
v20.3.0-3333-g629e419edf
Released In:
v21.2.0~1956
Upkeep Timestamp:
2026-10-24T01:48:55+00:00

Description

Take the example of removing a subvolume which involes moving the subvolume uuid directory to staging (trash) followed by updating the subvolume metadata to reflect its state (e.g.: snapshot-retained). Now, what has been seen in a cluster full case is that the move to stating directory, which essentially is a rename operation succeeds, however, the metadata update operation fails (due to lack to cluster free size to store the update operation). Result is an invalid subvolume state - missing uuid directory (due to removal), but the path component in the subvolume metadata is still pointing to the uuid directory, causing subsequent subvolume operations to fail.

In theory, we could simply reverse the order of operation (update metadata and then remove the subvolume), thereby catching -ENOSPC failure first and erroring out, however, we should also assess if doing some sort of multi-phase commit could mitigate or recover from the intermediate state.


Related issues 3 (1 open — 2 closed)

Related to CephFS - Feature #62715: mgr/volumes: switch to storing subvolume metadata in libcephsqliteNewNeeraj Pratap Singh

Actions
Copied to CephFS - Backport #73308: tentacle: mgr/volumes: resilience to failed non-atomic operationsResolvedNeeraj Pratap Singh

Actions
Copied to CephFS - Backport #73309: squid: mgr/volumes: resilience to failed non-atomic operationsResolvedJos Collin

Actions

VS Updated by Venky Shankar over 2 years ago Actions #1

  • Status changed from New to Triaged
  • Assignee set to Neeraj Pratap Singh

RS Updated by Raimund Sacherer over 2 years ago Actions #2

Hello,

I see backport for reef and squid, can we please have a backport for Quincy as well?

Thank you,

Raimund

VS Updated by Venky Shankar over 2 years ago Actions #3

  • Backport changed from reef,squid to quincy,reef,squid

Raimund Sacherer wrote in #note-2:

Hello,

I see backport for reef and squid, can we please have a backport for Quincy as well?

Of course.

VS Updated by Venky Shankar over 2 years ago Actions #4

  • Related to Feature #62715: mgr/volumes: switch to storing subvolume metadata in libcephsqlite added

VS Updated by Venky Shankar over 2 years ago Actions #5

Update on the proposal: It would suffice to change the order of operation done for subvolume removal -- updating the metadata first followed by a rename operation on the uuid directory. If the metadata update fails, the remove operations is failed thereby keeping the subvolume metadata consistent with the uuid path. The case where the rename would fail is very unlikely. This is the only place in mgr/volumes where such the non-atomic nature of operations causes inconsistent metadata to be left over.

VS Updated by Venky Shankar over 2 years ago Actions #6

  • Priority changed from Normal to Urgent

VS Updated by Venky Shankar about 2 years ago Actions #7

@Neeraj Pratap Singh - any update on this?

NS Updated by Neeraj Pratap Singh about 2 years ago Actions #8

  • Status changed from Triaged to Fix Under Review
  • Pull request ID set to 59676

NS Updated by Neeraj Pratap Singh about 2 years ago Actions #9

Venky Shankar wrote in #note-7:

@Neeraj Pratap Singh - any update on this?

PR has been opened for it now.

KS Updated by Konstantin Shalygin almost 2 years ago Actions #10

  • Backport changed from quincy,reef,squid to reef,squid

VS Updated by Venky Shankar about 1 year ago Actions #11

  • Status changed from Fix Under Review to Pending Backport
  • Target version changed from v20.0.0 to v21.0.0
  • Backport changed from reef,squid to tentacle,squid

UB Updated by Upkeep Bot about 1 year ago Actions #12

  • Merge Commit set to 629e419edf3f07a122332935ee425ff542d3eda2
  • Fixed In set to v20.3.0-3333-g629e419edf
  • Upkeep Timestamp set to 2025-09-29T15:58:29+00:00

UB Updated by Upkeep Bot about 1 year ago Actions #13

  • Copied to Backport #73308: tentacle: mgr/volumes: resilience to failed non-atomic operations added

UB Updated by Upkeep Bot about 1 year ago Actions #14

  • Copied to Backport #73309: squid: mgr/volumes: resilience to failed non-atomic operations added

UB Updated by Upkeep Bot about 1 year ago Actions #15

  • Tags (freeform) set to backport_processed

UB Updated by Upkeep Bot 3 months ago Actions #16

  • Status changed from Pending Backport to Resolved
  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2025-09-29T15:58:29+00:00 to 2026-08-27T18:12:57+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #17

  • Released In set to v21.2.0~1956
  • Upkeep Timestamp changed from 2026-08-27T18:12:57+00:00 to 2026-10-24T01:48:55+00:00
Actions

Also available in: PDF Atom