Skip to content

rbd: add rbd object-map check#8562

Merged
yuriw merged 1 commit intomasterfrom
wip-djf-object-map-check
May 27, 2016
Merged

rbd: add rbd object-map check#8562
yuriw merged 1 commit intomasterfrom
wip-djf-object-map-check

Conversation

@fullerdj
Copy link
Contributor

Add a CLI option to verify the object map for an unmapped image
for debugging purposes. Syntax:

rbd object-map check

This operation is not supported on currently mapped images.

Any inconsistencies that could affect the correctness of future
operations are noted and the object map (and fast diff state, if
enabled) is invalidated. Inconsistencies that do not affect
correctness will be emitted at debug level 1 or higher.

Consolidate code path with object-map rebuild and remove newly
unused code.

Fixes: http://tracker.ceph.com/issues/14867
Signed-off-by: Douglas Fuller dfuller@redhat.com

@@ -0,0 +1,74 @@
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-

Choose a reason for hiding this comment

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

Can this just be combined with the current "ObjectMap.cc" file to keep all object map operations together?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, right now there is a 1:1 correspondence between tool actions and the source files that implement them (cf. ObjectMapUpdateRequest.cc). ObjectMap.cc contains the library tooling and this seemed like a user-level operation like the others in operations/. I'll change it if you want, though.

Choose a reason for hiding this comment

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

This is for the cli -- most of the related commands are grouped into the same file.

Choose a reason for hiding this comment

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

I'd still like to see all the object map commands handles within "src/tools/rbd/action/ObjectMap.cc"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I misconstrued this note to refer to librbd/operation instead of tools/rbd/action. Sorry about that; I'll merge the files.

@fullerdj fullerdj force-pushed the wip-djf-object-map-check branch from f99e923 to 9011d53 Compare April 27, 2016 21:12
@fullerdj fullerdj force-pushed the wip-djf-object-map-check branch 2 times, most recently from 9e995f0 to 94a5186 Compare May 5, 2016 13:13
@fullerdj fullerdj changed the title [DNM] rbd: add rbd object-map check rbd: add rbd object-map check May 5, 2016
@fullerdj fullerdj force-pushed the wip-djf-object-map-check branch 3 times, most recently from 57b67f9 to 09d714a Compare May 10, 2016 15:33
@dillaman
Copy link

@fullerdj unittest_librbd is failing on the TestLibRBD.CheckObjectMap test case.

@fullerdj
Copy link
Contributor Author

Where/how do you see that? It passes on my test setup, maybe I’m missing something.

On May 11, 2016, at 5:33 PM, Jason Dillaman notifications@github.com wrote:

@fullerdj unittest_librbd is failing on the TestLibRBD.CheckObjectMap test case.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@dillaman
Copy link

@fullerdj I just re-merged and re-built it and still see the failure:

$ RBD_FEATURES=61 ./unittest_librbd --gtest_filter=TestLibRBD.CheckObjectMap
Note: Google Test filter = TestLibRBD.CheckObjectMap
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from TestLibRBD
seed 16854
[ RUN ] TestLibRBD.CheckObjectMap
using new format!
0.00% done
25.00% done
50.00% done
75.00% done
test/librbd/test_librbd.cc:3727: Failure
Value of: (flags & RBD_FLAG_OBJECT_MAP_INVALID) != 0
Actual: false
Expected: true
[ FAILED ] TestLibRBD.CheckObjectMap (35 ms)
[----------] 1 test from TestLibRBD (35 ms total)

@fullerdj fullerdj force-pushed the wip-djf-object-map-check branch from 09d714a to 85c1e17 Compare May 12, 2016 18:41
@fullerdj
Copy link
Contributor Author

This should be fixed now.

@dillaman
Copy link

Now this fails on "RBD_FEATURES=109 ./unittest_librbd"

[ RUN ] TestLibRBD.CheckObjectMap
using new format!
test/librbd/test_librbd.cc:3723: Failure
Value of: bl1.contents_equal(bl2)
Actual: true
Expected: false

Add a CLI option to verify the object map for an unmapped image
for debugging purposes. Syntax:

rbd object-map check <image-name>

This operation is not supported on currently mapped images.

Any inconsistencies that could affect the correctness of future
operations are noted and the object map (and fast diff state, if
enabled) is invalidated. Inconsistencies that do not affect
correctness will be emitted at debug level 1 or higher.

Consolidate code path with object-map rebuild and remove newly
unused code.

Fixes: http://tracker.ceph.com/issues/14867
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
@fullerdj fullerdj force-pushed the wip-djf-object-map-check branch from 85c1e17 to a100f02 Compare May 19, 2016 13:12
@fullerdj
Copy link
Contributor Author

This should actually be fixed now.

@dillaman
Copy link

lgtm

@yuriw
Copy link
Contributor

yuriw commented May 27, 2016

@liewegas liewegas deleted the wip-djf-object-map-check branch November 23, 2016 20:12
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.

3 participants