Skip to content
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

osdmaptool: show all the pg map to osds info #9419

Merged
merged 1 commit into from Jan 23, 2017

Conversation

Projects
None yet
4 participants
@songbaisen
Copy link

songbaisen commented Jun 1, 2016

osdmaptool: show all the pg map to osds info

Signed-off-by:song baisen song.baisen@zte.com.cn

@songbaisen songbaisen force-pushed the songbaisen:a4 branch 2 times, most recently from 408a34a to 8b55462 Jun 1, 2016

@songbaisen

This comment has been minimized.

Copy link
Author

songbaisen commented Jun 1, 2016

Sometimes we want to know all the pg map to osd detail info.

@@ -30,6 +30,7 @@ void usage()
cout << " --import-crush <file> replace osdmap's crush map with <file>" << std::endl;
cout << " --test-map-pgs [--pool <poolid>] [--pg_num <pg_num>] map all pgs" << std::endl;
cout << " --test-map-pgs-dump [--pool <poolid>] map all pgs" << std::endl;
cout << " --test-map-pgs-dump_all [--pool <poolid>] map all pgs to osds" << std::endl;

This comment has been minimized.

Copy link
@liewegas

liewegas Jun 1, 2016

Member

dump-all

This comment has been minimized.

Copy link
@liewegas

liewegas Jun 1, 2016

Member

that's - not _

@@ -110,6 +112,8 @@ int main(int argc, const char **argv)
test_map_pgs = true;
} else if (ceph_argparse_flag(args, i, "--test-map-pgs-dump", (char*)NULL)) {
test_map_pgs_dump = true;
} else if (ceph_argparse_flag(args, i, "--test-map-pgs-dump_all", (char*)NULL)) {

This comment has been minimized.

Copy link
@liewegas

liewegas Jun 1, 2016

Member

here too

@songbaisen songbaisen force-pushed the songbaisen:a4 branch from 8b55462 to cb4b721 Jun 2, 2016

@songbaisen

This comment has been minimized.

Copy link
Author

songbaisen commented Jun 2, 2016

@liewegas Thank you sir.Done it!

@xiexingguo

This comment has been minimized.

Copy link
Member

xiexingguo commented Jun 2, 2016

This will definitely fail the cli testing and it did, see below:

src/test/cli/osdmaptool/help.t: failed
--- /home/jenkins-build/build/workspace/ceph-pull-requests/src/test/cli/osdmaptool/help.t
+++ ./src/test/cli/osdmaptool/help.t.err
@@ -5,6 +5,7 @@
      --import-crush <file>   replace osdmap's crush map with <file>
      --test-map-pgs [--pool <poolid>] [--pg_num <pg_num>] map all pgs
      --test-map-pgs-dump [--pool <poolid>] map all pgs
+     --test-map-pgs-dump-all [--pool <poolid>] map all pgs to osds
      --mark-up-in            mark osds up and in (but do not persist)
      --clear-temp            clear pg_temp and primary_temp
      --test-random           do random placements
src/test/cli/osdmaptool/missing-argument.t: failed
--- /home/jenkins-build/build/workspace/ceph-pull-requests/src/test/cli/osdmaptool/missing-argument.t
+++ ./src/test/cli/osdmaptool/missing-argument.t.err
@@ -5,6 +5,7 @@
      --import-crush <file>   replace osdmap's crush map with <file>
      --test-map-pgs [--pool <poolid>] [--pg_num <pg_num>] map all pgs
      --test-map-pgs-dump [--pool <poolid>] map all pgs
+     --test-map-pgs-dump-all [--pool <poolid>] map all pgs to osds
      --mark-up-in            mark osds up and in (but do not persist)
      --clear-temp            clear pg_temp and primary_temp
      --test-random           do random placements
@songbaisen

This comment has been minimized.

Copy link
Author

songbaisen commented Jun 2, 2016

@xiexingguo Oh got it. Thank you!

@songbaisen songbaisen force-pushed the songbaisen:a4 branch 3 times, most recently from 99a9882 to 8eabccf Jun 2, 2016

@liewegas

This comment has been minimized.

Copy link
Member

liewegas commented Jun 2, 2016

test_mon_crushmap_validation seems to be failing.. can you run make check and see what is going on?

@songbaisen songbaisen force-pushed the songbaisen:a4 branch from 8eabccf to 0e29f64 Jun 3, 2016

@songbaisen

This comment has been minimized.

Copy link
Author

songbaisen commented Jun 3, 2016

@liewegas Oh, that error is not relate my code. I update the new code and re run all the test,it pass all.

Testsuite summary for ceph 10.2.0

TOTAL: 138
PASS: 138
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0

@ghost

This comment has been minimized.

Copy link

ghost commented Nov 22, 2016

jenkins test this please (jenkins hung)

@ghost

This comment has been minimized.

Copy link

ghost commented Nov 23, 2016

https://jenkins.ceph.com/job/ceph-pull-requests/14763/console

/home/jenkins-build/build/workspace/ceph-pull-requests/src/tools/osdmaptool.cc: In function ‘int main(int, const char**)’:
/home/jenkins-build/build/workspace/ceph-pull-requests/src/tools/osdmaptool.cc:366:17: error: ‘class OSDMap’ has no member named ‘pg_to_osds’
          osdmap.pg_to_osds(pgid, &raw, &calced_primary);
                 ^

@songbaisen songbaisen force-pushed the songbaisen:a4 branch 2 times, most recently from b632c44 to c94180a Nov 29, 2016

songbaisen
osdmaptool: show all the pg map to osds info
Signed-off-by:song baisen <song.baisen@zte.com.cn>

@songbaisen songbaisen force-pushed the songbaisen:a4 branch from c94180a to 2af2058 Nov 30, 2016

@songbaisen

This comment has been minimized.

Copy link
Author

songbaisen commented Nov 30, 2016

jenkins test this please

@songbaisen

This comment has been minimized.

Copy link
Author

songbaisen commented Nov 30, 2016

@dachary Done.

@tchaikov tchaikov merged commit 4f13f3e into ceph:master Jan 23, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.