]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: use json-pretty for ceph-volume calls
authorAdam King <adking@redhat.com>
Wed, 29 Sep 2021 02:10:07 +0000 (22:10 -0400)
committerSebastian Wagner <sewagner@redhat.com>
Tue, 2 Nov 2021 09:01:21 +0000 (10:01 +0100)
To avoid a single line json string that is too long
and causes a chunk longer than limit error

Fixes: https://tracker.ceph.com/issues/52745
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit b20637714e366b44ec604a76bab9095d5f4a1ef2)

src/pybind/mgr/cephadm/serve.py
src/pybind/mgr/cephadm/tests/test_cephadm.py

index e4208767371789c79635ac76a14539c85c251e8d..0eed2090f96ee950a809178887540a78e325f6f0 100644 (file)
@@ -441,7 +441,7 @@ class CephadmServe:
 
         with_lsm = self.mgr.get_module_option('device_enhanced_scan')
         inventory_args = ['--', 'inventory',
-                          '--format=json',
+                          '--format=json-pretty',
                           '--filter-for-batch']
         if with_lsm:
             inventory_args.insert(-1, "--with-lsm")
index 008452a2c4c1fac217238f29139b4a6b79aeee7c..9593a3073eed339d361a2ae39dcb94c923f50dfd 100644 (file)
@@ -1431,10 +1431,10 @@ Traceback (most recent call last):
 
             assert _run_cephadm.mock_calls == [
                 mock.call('test', 'osd', 'ceph-volume',
-                          ['--', 'inventory', '--format=json', '--filter-for-batch'], image='',
+                          ['--', 'inventory', '--format=json-pretty', '--filter-for-batch'], image='',
                           no_fsid=False),
                 mock.call('test', 'osd', 'ceph-volume',
-                          ['--', 'inventory', '--format=json'], image='',
+                          ['--', 'inventory', '--format=json-pretty'], image='',
                           no_fsid=False),
             ]