Project

General

Profile

Actions

Bug #50266

closed

"ceph fs snapshot mirror daemon status" should not use json keys as value

Added by Sébastien Han about 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Currently the command outputs:

{
  "14135": {
    "1": {
      "name": "a",
      "directory_count": 0,
      "peers": {
        "ae3f22e6-1c72-4a81-8d5d-eebca3bfd29d": {
          "remote": {
            "client_name": "client.mirror_remote",
            "cluster_name": "site-remote",
            "fs_name": "backup_fs" 
          },
          "stats": {
            "failure_count": 0,
            "recovery_count": 0
          }
        }
      }
    }
  }
}

JSON keys should not be the value, I'm proposing the following JSON:

{
  "daemon_id": "444607",
  "filesystem_id": "1",
  "name": "myfs",
  "directory_count": 0,
  "peers": [
    {
      "uuid": "4a6983c0-3c9d-40f5-b2a9-2334a4659827",
      "remote": {
        "client_name": "client.mirror_remote",
        "cluster_name": "site-remote",
        "fs_name": "backup_fs" 
      },
      "stats": {
        "failure_count": 0,
        "recovery_count": 0
      }
    }
  ]
}

It will make the JSON parsing and unmarshalling into other language type easier.


Related issues 1 (0 open1 closed)

Copied to CephFS - Backport #50537: pacific: "ceph fs snapshot mirror daemon status" should not use json keys as valueResolvedVenky ShankarActions
Actions

Also available in: Atom PDF