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

tools: New "removeall" used to remove head with snapshots #10098

Merged
merged 8 commits into from Aug 1, 2016

Conversation

dzafman
Copy link
Contributor

@dzafman dzafman commented Jul 1, 2016

Use --force to allow remove to only remove head object

@dzafman
Copy link
Contributor Author

dzafman commented Jul 1, 2016

Still need to add test case

@dzafman dzafman force-pushed the wip-16568 branch 2 times, most recently from 5c15968 to e60e283 Compare July 3, 2016 06:26
bafna pushed a commit to bafna/ceph that referenced this pull request Jul 6, 2016
It is supposed to be used as a last resort to fix a cluster that has
PGs in 'incomplete' state, using the following procedure:

1) stop the osd that is primary for the incomplete PG;
2) run:
  ceph-objectstore-tool --data-path ... --journal-path ... --pgid $PGID --op mark-complete
3) start the osd.

Fixes: ceph#10098
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit 6907778)

Conflicts:
	src/test/ceph_objectstore_tool.py (trivial)
	src/tools/ceph_objectstore_tool.cc (trivial)
@dzafman dzafman force-pushed the wip-16568 branch 2 times, most recently from e930805 to dd757e7 Compare July 8, 2016 00:29
@tchaikov tchaikov self-assigned this Jul 8, 2016
}

t.remove(coll, ghobj);
if (!dry_run)
store->apply_transaction(&osr, std::move(t));
Copy link
Contributor

Choose a reason for hiding this comment

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

i think just checking for dry_run at this place would be enough. in other words, no need to check for dry_run every where.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tchaikov For consistency with the existing code I want to leave the dry_run checking as is for this pull request. However, I will consider a follow up to simplify every dry_run case throughout the application. Following your suggestion will produce better error checking.

@tchaikov tchaikov removed their assignment Jul 26, 2016
@tchaikov
Copy link
Contributor

@dzafman i see you attached "needs-test" label to this PR. so do you plan to add a test in qa suite or want to amend the test in ceph_objectstore_tool.py ?

@dzafman
Copy link
Contributor Author

dzafman commented Jul 27, 2016

@tchaikov Check out the additional changes including better testing. The cmake change isn't actually used. I used it to add "large" argument for testing in my build tree.

@@ -2,7 +2,7 @@

#adds makes target/script into a test, test to check target, sets necessary environment variables
function(add_ceph_test test_name test_path)
add_test(NAME ${test_name} COMMAND ${test_path})
add_test(NAME ${test_name} COMMAND ${test_path} ${ARGN})
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, nice to have this feature! could be useful in future.

Signed-off-by: David Zafman <dzafman@redhat.com>
Signed-off-by: David Zafman <dzafman@redhat.com>
Signed-off-by: David Zafman <dzafman@redhat.com>
Signed-off-by: David Zafman <dzafman@redhat.com>
Signed-off-by: David Zafman <dzafman@redhat.com>
Signed-off-by: David Zafman <dzafman@redhat.com>
Use --force to allow remove to only remove head object
Adding testing to unit test

Signed-off-by: David Zafman <dzafman@redhat.com>
Signed-off-by: David Zafman <dzafman@redhat.com>
@dzafman
Copy link
Contributor Author

dzafman commented Jul 27, 2016

@tchaikov This is ready to merge once Jenkins test complete successfully.

@tchaikov tchaikov merged commit 6c04c94 into ceph:master Aug 1, 2016
@tchaikov
Copy link
Contributor

tchaikov commented Aug 1, 2016

lgtm.

@tchaikov tchaikov self-assigned this Aug 1, 2016
@dzafman dzafman deleted the wip-16568 branch August 1, 2016 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants