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
Merged

Conversation

songbaisen
Copy link

osdmaptool: show all the pg map to osds info

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

@songbaisen
Copy link
Author

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dump-all

Copy link
Member

@liewegas liewegas Jun 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's - not _

@songbaisen
Copy link
Author

@liewegas Thank you sir.Done it!

@xiexingguo
Copy link
Member

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
Copy link
Author

@xiexingguo Oh got it. Thank you!

@liewegas
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
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
Copy link

ghost commented Nov 22, 2016

jenkins test this please (jenkins hung)

@ghost
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);
                 ^

Signed-off-by:song baisen <song.baisen@zte.com.cn>
@songbaisen
Copy link
Author

jenkins test this please

@songbaisen
Copy link
Author

@dachary Done.

@tchaikov tchaikov merged commit 4f13f3e into ceph:master Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants