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: move 'pg map' to OSDMonitor #14559

Merged
merged 3 commits into from Apr 21, 2017

Conversation

Projects
None yet
2 participants
@liewegas
Member

liewegas commented Apr 14, 2017

No description provided.

mon: move 'pg map' to OSDMonitor (from PGMap)
1. this belongs on the mon, operating against the latest
osdmap.
2. it shouldn't go in PGMonitor because that is about to
be turned off.

Signed-off-by: Sage Weil <sage@redhat.com>

@liewegas liewegas requested a review from tchaikov Apr 14, 2017

f->dump_stream("pgid") << mpgid;
f->open_array_section("up");
for (vector<int>::iterator it = up.begin(); it != up.end(); ++it)

This comment has been minimized.

@tchaikov

tchaikov Apr 19, 2017

Contributor

could use range-based loop.

f->close_section();
f->open_array_section("acting");
for (vector<int>::iterator it = acting.begin(); it != acting.end(); ++it)

This comment has been minimized.

@tchaikov

tchaikov Apr 19, 2017

Contributor

ditto.

return int(pg['acting'][0])
output = self.raw_cluster_cmd("pg", "map", pg_str, '--format=json')
j = json.loads('\n'.join(output.split('\n')[1:]))
return int(pg['acting'][0])

This comment has been minimized.

@tchaikov

tchaikov Apr 21, 2017

Contributor

@liewegas
s/pg/j/

maybe the variable name of pg is better?

liewegas added some commits Apr 14, 2017

qa/tasks/ceph_manager: use 'pg map' for get_pg_{primary,replica}
Pulling this out of the 'pg dump' heap is inefficient.
Also, pg dump data comes from the mgr and may be stale.

Signed-off-by: Sage Weil <sage@redhat.com>
mon/OSDMonitor: cleanup: use range-based loop
Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas

This comment has been minimized.

Member

liewegas commented Apr 21, 2017

@tchaikov fixed

@tchaikov tchaikov added the needs-qa label Apr 21, 2017

@liewegas liewegas merged commit 27dd653 into ceph:master Apr 21, 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

@liewegas liewegas deleted the liewegas:wip-pg-map branch Apr 21, 2017

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