Project

General

Profile

Actions

Bug #58090

closed
SH NS

Non-existent pending clone shows up in snapshot info

Bug #58090: Non-existent pending clone shows up in snapshot info

Added by Sebastian Hasler about 4 years ago. Updated 3 months ago.

Status:
Backporting
Priority:
Normal
Category:
fsck/damage handling
Target version:
Due date:
% Done:

0%

Source:
Community (user)
Backport:
reef,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:
v19.3.0-8040-g842fb60510
Released In:
v20.2.0~978
Upkeep Timestamp:
2026-08-27T18:15:00+00:00

Description

Ceph version: v17.2.5

My CephFS somehow got in a state where a snapshot has a pending clone, but the pending clone doesn't exist. (This is problematic, because the pending clone prevents me from being able to delete the snapshot.)

$ ceph fs subvolume --group_name=csi snapshot info ssd-fs csi-vol-9ce73497-1be0-11ec-88f1-e6360fd42c9e csi-snap-cd27f06b-4fbb-11ec-978d-8af73a17386e
{
    "created_at": "2021-11-27 19:54:16.134448",
    "data_pool": "ssd-fs-data0",
    "has_pending_clones": "yes",
    "pending_clones": [
        {
            "name": "csi-vol-ff687f29-4fbd-11ec-830e-6ed86f62d6ec",
            "target_group": "csi" 
        }
    ]
}

$ ceph fs clone --group_name=csi status ssd-fs csi-vol-ff687f29-4fbd-11ec-830e-6ed86f62d6ec
Error ENOENT: subvolume 'csi-vol-ff687f29-4fbd-11ec-830e-6ed86f62d6ec' does not exist

I think the CephFS got in this state when the clone failed due to insufficient disk space. This was already some time ago with an older version of Ceph. It might or might not have been fixed in the meantime.

The point of this ticket is that CephFS should be able to recover from this state, but currently that seems to not be the case.

To try to recover from this state, I had the idea to re-create the clone with that exact name and then cancel it.

$ ceph fs subvolume --group_name=csi snapshot clone ssd-fs csi-vol-9ce73497-1be0-11ec-88f1-e6360fd42c9e csi-snap-cd27f06b-4fbb-11ec-978d-8af73a17386e csi-vol-ff687f29-4fbd-11ec-830e-6ed86f62d6ec --target_group_name=csi

$ ceph fs clone --group_name=csi status ssd-fs csi-vol-ff687f29-4fbd-11ec-830e-6ed86f62d6ec
{
  "status": {
    "state": "in-progress",
    "source": {
      "volume": "ssd-fs",
      "subvolume": "csi-vol-9ce73497-1be0-11ec-88f1-e6360fd42c9e",
      "snapshot": "csi-snap-cd27f06b-4fbb-11ec-978d-8af73a17386e",
      "group": "csi" 
    }
  }
}

$ ceph fs subvolume --group_name=csi snapshot info ssd-fs csi-vol-9ce73497-1be0-11ec-88f1-e6360fd42c9e csi-snap-cd27f06b-4fbb-11ec-978d-8af73a17386e
{
    "created_at": "2021-11-27 19:54:16.134448",
    "data_pool": "ssd-fs-data0",
    "has_pending_clones": "yes",
    "pending_clones": [
        {
            "name": "csi-vol-ff687f29-4fbd-11ec-830e-6ed86f62d6ec",
            "target_group": "csi" 
        },
        {
            "name": "csi-vol-ff687f29-4fbd-11ec-830e-6ed86f62d6ec",
            "target_group": "csi" 
        }
    ]
}

$ ceph fs clone --group_name=csi cancel ssd-fs csi-vol-ff687f29-4fbd-11ec-830e-6ed86f62d6ec

$ ceph fs clone --group_name=csi status ssd-fs csi-vol-ff687f29-4fbd-11ec-830e-6ed86f62d6ec
{
  "status": {
    "state": "canceled",
    "source": {
      "volume": "ssd-fs",
      "subvolume": "csi-vol-9ce73497-1be0-11ec-88f1-e6360fd42c9e",
      "snapshot": "csi-snap-cd27f06b-4fbb-11ec-978d-8af73a17386e",
      "group": "csi" 
    },
    "failure": {
      "errno": "4",
      "error_msg": "user interrupted clone operation" 
    }
  }
}

$ ceph fs subvolume --group_name=csi snapshot info ssd-fs csi-vol-9ce73497-1be0-11ec-88f1-e6360fd42c9e csi-snap-cd27f06b-4fbb-11ec-978d-8af73a17386e
{
    "created_at": "2021-11-27 19:54:16.134448",
    "data_pool": "ssd-fs-data0",
    "has_pending_clones": "yes",
    "pending_clones": [
        {
            "name": "csi-vol-ff687f29-4fbd-11ec-830e-6ed86f62d6ec",
            "target_group": "csi" 
        }
    ]
}

However, as you can see, re-creating the clone leads to a duplicate entry in the `pending_clones` list, and cancellation of the clone just removes one of those two entries. So there's still the pending clone which I don't get rid of, so I cannot delete the snapshot.


Related issues 2 (1 open — 1 closed)

Copied to CephFS - Backport #70232: reef: Non-existent pending clone shows up in snapshot infoResolvedNeeraj Pratap Singh

Actions
Copied to CephFS - Backport #70233: squid: Non-existent pending clone shows up in snapshot infoFix Under ReviewNeeraj Pratap Singh

Actions

VS Updated by Venky Shankar about 4 years ago Actions #1

Hi Sebastian,

There is a stray index causing this issue. Could you list the contents of `/volumes/_index/clone/` (under cephfs mount point).

SH Updated by Sebastian Hasler about 4 years ago Actions #2

Now the snapshot is deleted (finally). From the logs of our CSI provisioner, it seems that the snapshot was deleted shortly after I created this issue. So I guess the re-creation and cancellation of the clone did have an effect, just slightly delayed.

SH Updated by Sebastian Hasler about 4 years ago Actions #3

The `/volumes/_index/clone/` directory is empty, by the way. But that's after the snapshot was deleted successfully. I don't know how this directory looked like for the previous year where the CSI provisioner continuously tried to delete this snapshot (and failed due to (non-existent) pending clones).

VS Updated by Venky Shankar almost 4 years ago Actions #4

Sebastian Hasler wrote:

The `/volumes/_index/clone/` directory is empty, by the way. But that's after the snapshot was deleted successfully. I don't know how this directory looked like for the previous year where the CSI provisioner continuously tried to delete this snapshot (and failed due to (non-existent) pending clones).

Most likely there would have been a dangling symlink in that directory. We have seen this before and one can run into it when there is insufficient disk-space.

VS Updated by Venky Shankar almost 4 years ago Actions #5

  • Assignee set to Rishabh Dave
  • Target version set to v18.0.0
  • Backport set to pacific,quincy
  • Component(FS) mgr/volumes added

Rishabh, please take a look at this. I think the dangling symlink can be gracefully handled by deleting it.

PD Updated by Patrick Donnelly about 3 years ago Actions #6

  • Target version deleted (v18.0.0)

VS Updated by Venky Shankar almost 3 years ago Actions #7

  • Assignee changed from Rishabh Dave to Neeraj Pratap Singh

Neeraj, please take this one.

KH Updated by Kotresh Hiremath Ravishankar almost 3 years ago Actions #8

Neeraj and I had a discussion regarding this.

We fixed a bunch of issues around clones and dangling index symlinks, so I think this issue should not occur anymore. But we do require a mechanism to get out of this situation if this was occurred in older versions.
I think we can check and clear the dangling symlinks in snapshot info command.

Thanks,
Kotresh H R

DP Updated by Dhairya Parmar over 2 years ago Actions #9

  • Pull request ID set to 55838

RD Updated by Rishabh Dave over 2 years ago Actions #10

  • Status changed from New to Fix Under Review

KS Updated by Konstantin Shalygin over 2 years ago Actions #11

  • Backport changed from pacific,quincy to quincy

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

  • Target version set to v20.0.0
  • Backport changed from quincy to quincy,reef,squid

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

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

RD Updated by Rishabh Dave almost 2 years ago Actions #14

  • Status changed from Fix Under Review to Pending Backport

UB Updated by Upkeep Bot almost 2 years ago Actions #15

  • Copied to Backport #70232: reef: Non-existent pending clone shows up in snapshot info added

UB Updated by Upkeep Bot almost 2 years ago Actions #16

  • Copied to Backport #70233: squid: Non-existent pending clone shows up in snapshot info added

UB Updated by Upkeep Bot almost 2 years ago Actions #17

  • Tags (freeform) set to backport_processed

UB Updated by Upkeep Bot over 1 year ago Actions #18

  • Merge Commit set to 842fb60510fb7d18327e37d4ca0cbcb25c531d6d
  • Fixed In set to v19.3.0-8040-g842fb60510f
  • Upkeep Timestamp set to 2025-07-09T17:10:12+00:00

UB Updated by Upkeep Bot over 1 year ago Actions #19

  • Fixed In changed from v19.3.0-8040-g842fb60510f to v19.3.0-8040-g842fb60510
  • Upkeep Timestamp changed from 2025-07-09T17:10:12+00:00 to 2025-07-14T17:42:03+00:00

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

  • Released In set to v20.2.0~978
  • Upkeep Timestamp changed from 2025-07-14T17:42:03+00:00 to 2025-11-01T00:58:37+00:00

UB Updated by Upkeep Bot 3 months ago Actions #21

  • Status changed from Pending Backport to Backporting
  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2025-11-01T00:58:37+00:00 to 2026-08-27T18:15:00+00:00
Actions

Also available in: PDF Atom