Skip to content

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

Merged
liewegas merged 1 commit into
ceph:masterfrom
liuchang0812:wip-19382
Nov 6, 2018
Merged

liewegas merged 1 commit into
ceph:masterfrom
liuchang0812:wip-19382

Conversation

@liuchang0812

Copy link
Copy Markdown
Contributor

@liuchang0812

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

liewegas commented May 11, 2017 via email

Copy link
Copy Markdown
Member

@liuchang0812

Copy link
Copy Markdown
Contributor Author

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

@liewegas

liewegas commented May 11, 2017 via email

Copy link
Copy Markdown
Member

@liuchang0812

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

jenkins test this please

@liewegas

liewegas commented May 12, 2017 via email

Copy link
Copy Markdown
Member

@liuchang0812

Copy link
Copy Markdown
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?

@liuchang0812
liuchang0812 force-pushed the wip-19382 branch 2 times, most recently from 94fe4e6 to 7c4a6ab Compare May 16, 2017 06:32
@liewegas

liewegas commented May 19, 2017 •

Copy link
Copy Markdown
Member

@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

jdurgin commented May 22, 2017

Copy link
Copy Markdown
Member

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.

Comment thread src/tools/ceph_objectstore_tool.cc Resolved
@stale

stale Bot commented Oct 18, 2018

Copy link
Copy Markdown

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
Copy Markdown
Member

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

@stale stale Bot removed the stale label Oct 19, 2018
@liuchang0812

Copy link
Copy Markdown
Contributor Author

Yeah I will rebase it tomorrow

@liuchang0812

Copy link
Copy Markdown
Contributor Author

jenkins test it please

@liewegas

liewegas commented Nov 6, 2018

Copy link
Copy Markdown
Member

retest this please

1 similar comment
@liewegas

liewegas commented Nov 6, 2018

Copy link
Copy Markdown
Member

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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants