]> git-server-git.apps.pok.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>
Wed, 13 Apr 2022 08:56:06 +0000 (14:26 +0530)
commite0ba36f3344a3633b0343565b63472bbf94538b2
treec66bc7ef012bbbc6f49c6ea4f446c35f5607fa98
parent26a85872c361c7b2695165f7a0175451cc1860d6
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>
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