New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon/MDSMonitor: close object section of formatter #16516

Merged
merged 1 commit into from Jul 26, 2017

Conversation

Projects
None yet
5 participants
@Liuchang0812
Contributor

Liuchang0812 commented Jul 23, 2017

Signed-off-by: Chang Liu liuchang0812@gmail.com

➜  build git:(nit-close-formatter-section) ✗ ./bin/ceph mds metadata
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
2017-07-23 02:13:45.845648 7f635a42b700 -1 WARNING: all dangerous and experimental features are enabled.
2017-07-23 02:13:45.851948 7f635a42b700 -1 WARNING: all dangerous and experimental features are enabled.
this is a mock wrong
[
    {
        "name": "b",
        "addr": "127.0.0.1:6813/1288745739",
        "arch": "x86_64",
        "ceph_version": "ceph version 12.1.1-410-g27c1d62ae9 (27c1d62ae96ecc0c34fc0da55a7e529e0f718234) luminous (rc)",
        "cpu": "AMD Ryzen 7 1700 Eight-Core Processor",
        "distro": "ubuntu",
        "distro_description": "Ubuntu 17.04",
        "distro_version": "17.04",
        "hostname": "ubuntu",
        "kernel_description": "#30-Ubuntu SMP Tue Jun 27 09:30:12 UTC 2017",
        "kernel_version": "4.10.0-26-generic",
        "mem_swap_kb": "2097148",
        "mem_total_kb": "8746072",
        "os": "Linux"
    }

#comment: need ] here
➜  build git:(nit-close-formatter-section) ✗ git diff
diff --git a/src/boost b/src/boost
--- a/src/boost
+++ b/src/boost
@@ -1 +1 @@
-Subproject commit 1790aff3b34374d2af85f8c16755d101f49d2b6e
+Subproject commit 1790aff3b34374d2af85f8c16755d101f49d2b6e-dirty
diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc
index 50fd99ed86..a61d5f6f57 100644
--- a/src/mon/MDSMonitor.cc
+++ b/src/mon/MDSMonitor.cc
@@ -1012,6 +1012,8 @@ bool MDSMonitor::preprocess_command(MonOpRequestRef op)
         f->dump_string("name", info.name);
         std::ostringstream get_err;
         r = dump_metadata(info.name, f.get(), get_err);
+        r = 1024; // mock
+        get_err << "this is a mock wrong";
         if (r == -EINVAL || r == -ENOENT) {
           // Drop error, list what metadata we do have
           dout(1) << get_err.str() << dendl;
@@ -1020,6 +1022,7 @@ bool MDSMonitor::preprocess_command(MonOpRequestRef op)
           derr << "Unexpected error reading metadata: " << cpp_strerror(r)
                << dendl;
           ss << get_err.str();
+          // f->close_section();
           break;
         }
         f->close_section();

@Liuchang0812

This comment has been minimized.

Contributor

Liuchang0812 commented Jul 24, 2017

jenkins test this please

2 similar comments
@Liuchang0812

This comment has been minimized.

Contributor

Liuchang0812 commented Jul 24, 2017

jenkins test this please

@Liuchang0812

This comment has been minimized.

Contributor

Liuchang0812 commented Jul 24, 2017

jenkins test this please

mds: close object section of formatter
Signed-off-by: Chang Liu <liuchang0812@gmail.com>
@Liuchang0812

This comment has been minimized.

Contributor

Liuchang0812 commented Jul 25, 2017

jenkins test this please

1 similar comment
@Liuchang0812

This comment has been minimized.

Contributor

Liuchang0812 commented Jul 25, 2017

jenkins test this please

@Liuchang0812

This comment has been minimized.

Contributor

Liuchang0812 commented Jul 26, 2017

@liewegas would you mind take a look when you have a few minutes. a nit was found when I read ceph module metadata implementation.

@tchaikov tchaikov changed the title from mds: close object section of formatter to mon/MDSMonitor: close object section of formatter Jul 26, 2017

@tchaikov tchaikov added the needs-qa label Jul 26, 2017

@xiexingguo

looks fine

@tchaikov tchaikov merged commit 9f1243b into ceph:master Jul 26, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@Liuchang0812 Liuchang0812 deleted the Liuchang0812:nit-close-formatter-section branch Jul 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment