]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: Add clone failure reason in clone status
authorKotresh HR <khiremat@redhat.com>
Wed, 6 Apr 2022 07:16:01 +0000 (12:46 +0530)
committerKotresh HR <khiremat@redhat.com>
Mon, 18 Apr 2022 08:50:06 +0000 (14:20 +0530)
commit01c2734a522c788b4f2dde4aadbbb21ab5212e0f
tree3cf49659168d1c1a88812d51975d9c07b213e230
parent826f310d129e5d321e24399b9fff896ce0fed69a
mgr/volumes: Add clone failure reason in clone status

Add the clone failure reason in the clone status.
The sample output is as below:

$ ceph fs clone status cephfs clone_0
{
  "status": {
    "state": "failed",
    "source": {
      "volume": "cephfs",
      "subvolume": "subvolume_0",
      "snapshot": "snapshot_0",
      "size": "52428800"
    },
    "failure": {
      "errno": "2",
      "error_msg": "snapshot 'snapshot_0' does not exist"
    }
  }
}

Fixes: https://tracker.ceph.com/issues/55190
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit e0ba36f3344a3633b0343565b63472bbf94538b2)
src/pybind/mgr/volumes/fs/async_cloner.py
src/pybind/mgr/volumes/fs/operations/versions/metadata_manager.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py