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

tool/ceph_objectstore_tool: add new op that reset last_complete to last_update #15047

Merged
merged 1 commit into from
Nov 6, 2018

Conversation

liuchang0812
Copy link
Contributor

@liuchang0812
Copy link
Contributor Author

test pass as following

sudo ./bin/ceph-objectstore-tool --data-path=./dev/osd0 --pgid 8.7 --op info
{
    "pgid": "8.7",
    "last_update": "29'47",
    "last_complete": "29'47",
    "log_tail": "0'0",
    "last_user_version": 47,
    "last_backfill": "MAX",
    "last_backfill_bitwise": 0,
    "purged_snaps": [],


➜  build git:(wip-19382) ✗ sudo ./bin/ceph-objectstore-tool --data-path=./dev/osd0 --pgid 8.7 --op mark-complete
Marking complete
Marking complete succeeded
➜  build git:(wip-19382) ✗ sudo ./bin/ceph-objectstore-tool --data-path=./dev/osd0 --pgid 8.7 --op info
{
    "pgid": "8.7",
    "last_update": "29'48",
    "last_complete": "29'47",
    "log_tail": "0'0",


➜  build git:(wip-19382) ✗ sudo ./bin/ceph-objectstore-tool --data-path=./dev/osd0 --pgid 8.7 --op reset-last-complete
Rest last_complete
Reset last_complete succeeded
➜  build git:(wip-19382) ✗ sudo ./bin/ceph-objectstore-tool --data-path=./dev/osd0 --pgid 8.7 --op info
{
    "pgid": "8.7",
    "last_update": "29'48",
    "last_complete": "29'48",

@liewegas
Copy link
Member

liewegas commented May 11, 2017 via email

@liuchang0812
Copy link
Contributor Author

@liewegas yes, i prefer to use --force here, because there is an option --force in ceph_objectstore_tool already.

@liewegas
Copy link
Member

liewegas commented May 11, 2017 via email

@liuchang0812
Copy link
Contributor Author

update as following:

➜  build git:(wip-19382) ✗ ./bin/ceph-objectstore-tool --data-path=./dev/osd0 --pgid 4.7 --op reset-last-complete 
WARNING: reset-last-complete is dangerous, to confirm, pass --force option!

@liuchang0812
Copy link
Contributor Author

jenkins test this please

@liewegas
Copy link
Member

liewegas commented May 12, 2017 via email

@liuchang0812
Copy link
Contributor Author

@liewegas of course! thanks. now this command shows warning message as following:

./bin/ceph-objectstore-tool --data-path=./dev/osd0 --pgid 4.7 --op reset-last-complete
WARNING: reset-last-complete is extremely dangerous and almost certain to lead to permanent data loss unless you know exactly what you are doing. Pass --force to proceed anyway.

"Pass to --force to proceed anyway." changes to "Pass --force to proceed anyway.". is it ok?

@liewegas
Copy link
Member

liewegas commented May 19, 2017

@jdurgin Thoughts on this? It makes me really nervous because it seems so much more likely that this will be misused than that it will be used correctly (or ever need to be used correctly). That said, that case is of course guaranteed to present itself shortly after if we don't merge this.

@jdurgin
Copy link
Member

jdurgin commented May 22, 2017

I think this sort of thing is just what ceph-objectstore-tool is for - and it would have helped work around a bug sam encountered (http://tracker.ceph.com/issues/19377). It's probably worth adding something to any ceph-objectstore-tool command that modifies the store to put an audit log of its operation in the objectstore as well.

@stale
Copy link

stale bot commented Oct 18, 2018

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you are a maintainer or core committer, please follow-up on this issue to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale bot added the stale label Oct 18, 2018
@liewegas
Copy link
Member

I think we should merge this. Can you rebase please?

@stale stale bot removed the stale label Oct 19, 2018
@liuchang0812
Copy link
Contributor Author

Yeah I will rebase it tomorrow

…st_update

Fixes: http://tracker.ceph.com/issues/19382

Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
@liuchang0812
Copy link
Contributor Author

jenkins test it please

@liewegas
Copy link
Member

liewegas commented Nov 6, 2018

retest this please

1 similar comment
@liewegas
Copy link
Member

liewegas commented Nov 6, 2018

retest this please

@liewegas liewegas merged commit 7c008d2 into ceph:master Nov 6, 2018
liewegas added a commit that referenced this pull request Nov 6, 2018
* refs/pull/15047/head:
	tool/ceph_objectstore_tool: add new op that reset last_complete to last_update

Reviewed-by: Sage Weil <sage@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants