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

jewel: tools: Add export-remove ceph-objectstore-tool command option #21193

Closed
wants to merge 7 commits into from

Conversation

smithfarm
Copy link
Contributor

@smithfarm smithfarm commented Apr 3, 2018

@smithfarm smithfarm self-assigned this Apr 3, 2018
@smithfarm smithfarm added this to the jewel milestone Apr 3, 2018
@smithfarm smithfarm requested a review from dzafman April 3, 2018 03:40
@smithfarm smithfarm added feature and removed bug-fix labels Apr 3, 2018
@smithfarm smithfarm changed the title jewel: Add export and remove ceph-objectstore-tool command option jewel: tools: Add export and remove ceph-objectstore-tool command option Apr 3, 2018
@smithfarm smithfarm changed the title jewel: tools: Add export and remove ceph-objectstore-tool command option jewel: tools: Add export-remove ceph-objectstore-tool command option Apr 3, 2018
Copy link
Contributor

@dzafman dzafman left a comment

Choose a reason for hiding this comment

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

lgtm

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 49ca1ff)

Conflicts:
    qa/standalone/special/ceph_objectstore_tool.py - file does not exist in
        jewel; backported the changes manually to src/test/ceph_objectstore_tool.py
Add new export-remove to combine the 2 operations

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

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 3bb20f6)

Conflicts:
    qa/standalone/special/ceph_objectstore_tool.py - file does not exist in
        jewel; backported changes manually to src/test/ceph_objectstore_tool.py
    qa/tasks/divergent_priors2.py - jewel uses pgid 1.0
    qa/tasks/reg11184.py - jewel uses pgid 1.0 and lacks some of the code that
        is being changed
    src/tools/ceph_objectstore_tool.cc - jewel has slightly different list of
        subcommands
Remove unused argument test-align

Caused by: 1c8731c

Positional arguments are described by usage() because
the parsing code creates descriptions like "--object" for the
object positional argument.

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit c6896cc)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 5083287)
Caused by: 44cb6d3

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit b20eead)

Conflicts:
	src/tools/ceph_objectstore_tool.cc (left "divergent_priors" section,
                                          which is not in master, untouched)
Fixes: http://tracker.ceph.com/issues/22086

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit a8b8d54)

Conflicts:
	qa/standalone/special/ceph_objectstore_tool.py
	src/tools/ceph_objectstore_tool.cc
	src/tools/ceph_objectstore_tool.h
@smithfarm
Copy link
Contributor Author

@dzafman Please take another look - I cherry-picked the dump-import feature backport into this PR to avoid merge conflicts.

@smithfarm
Copy link
Contributor Author

tools/ceph_objectstore_tool.cc: In function ‘int dump_pg_metadata(ceph::Formatter*, ceph::bufferlist&, metadata_section&)’:
tools/ceph_objectstore_tool.cc:1179:6: error: ‘struct metadata_section’ has no member named ‘missing’
   ms.missing.dump(formatter);
      ^

formatter->flush(cout);

formatter->open_object_section("pg_missing_t");
ms.missing.dump(formatter);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dzafman The compilation failure happens here - metadata_section does not have a member missing. If you immediately see how to fix, please advise?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dzafman If I'm parsing the git history correctly, it's because jewel does not have 44cb6d3 and that commit looks pretty complicated to be backporting to jewel. So I will just remove this little section of code that deals with the missing set.

44cb6d3 introduced code to persist the missing
set. That commit is too complicated to backport to jewel, so remove code that
refers to the "missing" component of "metadata_section".

Signed-off-by: Nathan Cutler <ncutler@suse.com>
@smithfarm
Copy link
Contributor Author

merge conflict with #20882 and still doesn't pass make check


# Remove the same pg that was exported
cmd = ((prefix + "--op remove --pgid 1.0").
cmd = ((prefix + "--op export-remove --pgid 2.0 --file {file}").
Copy link
Contributor

Choose a reason for hiding this comment

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

The pgid is 1.0 in Jewel

@smithfarm
Copy link
Contributor Author

Jewel is EOL

@smithfarm smithfarm closed this Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants