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: Backport ceph-objectstore-tool changes to firefly #3866
Commits on Mar 3, 2015
-
ceph_filestore_dump.cc: cleanup includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de> (cherry picked from commit 8620609)
-
ceph_filestore_dump: Remove unused bufferlist databl
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 398b418)
-
ceph_filestore_dump: Export omap in batches for large omap case
New function get_omap_batch() Create a TYPE_OMAP section for each batch Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 501dd3c)
-
common,ceph_filestore_dump: Add ability for utilities to suppress lib…
…rary dout output Suppress dout output with CODE_ENVIRONMENT_UTILITY_NODOUT ceph_filestore_dump turns on dout output if --debug specified When used it can still be enable with --log-to-stderr --err-to-stderr Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit f7f9b25)
-
ceph_filestore_dump: Use cerr now that we aren't closing stderr
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 087c0f9)
-
ceph_filestore_dump: Improve debug output by showing actual offset
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 44b261d)
-
os: Add optional flags to generic ObjectStore creation (SKIP_JOURNAL_…
…REPLAY and SKIP_MOUNT_OMAP) Only FileStore cares about these flags, so passed on during create() Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 3d9fde9) Conflicts: src/os/FileStore.cc
-
ceph_filestore_dump: Add --skip-journal-replay and --skip-mount-omap
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 2e9dcb2)
-
common: Add missing ghobject_t::decode() for json
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit c05f895) Changes: Adjusted for older shard_t
-
ceph_filstore_dump: Save if stdout is a tty and add routine to clean …
…binary strings Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 3a574cc)
-
ceph_filestore_dump: Fail import/export with a tty for stdin/stdout
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 7520e50)
-
ceph_filestore_dump: Add utility function get_fd_data()
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit d4a9daf)
-
ceph_filestore_dump: Add remove object command and usage for new comm…
…ands Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 605caec)
-
ceph_filestore_dump: Add --type list to output objects in a pg in json
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 844dabb)
-
ceph_filestore_dump: Add list-attrs object command
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 00c6b06)
-
ceph_filestore_dump: Add list-omap object command
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 48890c7)
-
ceph_filestore_dump: Add get-bytes object command
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 869dd92)
-
ceph_filestore_dump: Add set-bytes object command
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 3c24d1f)
-
ceph_filestore_dump: Add get-attr object command
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 55d43c0)
-
ceph_filestore_dump: Add set-attr object command
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 95554e0)
-
ceph_filestore_dump: Add rm-attr object command
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 465d777)
-
ceph_filestore_dump: Add get-omap object command
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit b50c43c)
-
ceph_filestore_dump: Add set-omap object command
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 50cd57e)
-
ceph_filestore_dump: Add rm-omap object command
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 0fc6bd2)
-
ceph_filestore_dump: Add get-omaphdr object command
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 30c0f31)
-
ceph_filestore_dump: Add set-omaphdr object command
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit b4d95cc)
-
Renames and removal towards a unified ceph_objectstore_tool
Rename ceph_filestore_dump.cc and ceph_filestore_dump.py Remove ceph_filestore_tool.cc Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 7786419)
-
Complete replacement of ceph_filestore_tool and ceph_filestore_dump
with unified ceph_objectstore_tool Move list-lost-objects and fix-lost-objects features from ceph_filestore_tool to ceph_objectstore_tool as list-lost, fix-lost Change --type to --op for info, log, export...operations Add --type for the ObjectStore type (defaults to filestore) Change --filestore-path to --data-path Update installation, Makefile.am, and .gitignore Fix and rename test case to match Add some additional invalid option checks Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 83fbc91)
-
ceph_objectstore_tool, test: Add list-pgs operations and unit test case
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit f01e334)
-
ceph_objectstore_tool: Minor improvements
Make all non-error non-debug output to stdout Fix a message Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit a2bd2aa)
-
ceph_objectstore_tool: Add past_intervals to export/import code
Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 9325ec1)
-
ceph_objectstore_tool: Add operation "rm-past-intervals" for testing …
…purposes Signed-off-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 3694068)
-
test: ceph_objectstore_tool unit test improvements
Add namespaces to testing Increase filesize so export will have multiple chunks Put json for each object into the db dict Signed-off-by: David Zafman <david.zafman@inktank.com>
-
ceph_objectstore_tool, test: Implement import-rados feature and unit …
-
ceph_objectstore_tool: Bug fixes and test improvements
ceph_objectgstore_tool: Fix bugs in the way collection_list_partial() was being called which caused objects to be seen over and over again. Unit test: Fix get_objs() to walk pg tree for pg with sub-directories Create more objects to test object listing code Limit number of larger objects Limit number of objects which get attributes and omaps Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit a03f719)
-
Test: fixing a compile warning in ceph_objectstore_tool.cc
For the compiler's sake: tools/ceph_objectstore_tool.cc:2547:15: warning: ‘r’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Zhiqiang Wang <wonzhq@hotmail.com> (cherry picked from commit c3e1466)
-
ceph_objectstore_tool.cc: prefer ++operator for non-primitive iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de> (cherry picked from commit a5468ab)
-
ceph_objectstore_tool: When exporting to stdout, don't cout messages
-
Signed-off-by: Sage Weil <sage@redhat.com> (cherry picked from commit a69b845)
-
ceph_objectstore_tool: Rename generated binary to ceph-objectstore-tool
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 4f72ba5) Conflicts: debian/ceph-test.install src/.gitignore src/test/ceph-helpers.sh (doesn't exist in firefly) src/test/ceph_objectstore_tool.py src/tools/ceph_objectstore_tool.cc
-
-
ceph_objectstore_tool: Accept CEPH_ARGS environment arguments
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 10fe7cf)
-
ceph_objectstore_tool: Fixes to make import work again
The is_pg() call is now true even for pgs pending removal, fix broken finish_remove_pgs() by removing is_pg() check. Need to add create_collection() to the initial transaction on import Fixes: #10090 Signed-off-by: David Zafman <dzafman@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com> (cherry picked from commit 5ce0919) Conflicts: src/tools/ceph_objectstore_tool.cc
-
tests: ceph_objectstore_tool.py use env python
Using #/usr/bin/env python instead of a hard coded path is more flexible and can also be used to run from virtualenv. Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit 74506d2)
-
tests: ceph_objectstore_tool.py can use a WARN cluster
The tests do not need HEALTH_OK exclusively, a HEALTH_WARN cluster can also run them successfully. Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit 783378c)
-
tests: ceph_objectstore_tool.py run mon and osd on specific port
By default vstart.sh runs MDS but they are not needed for the tests, only run mon and osd instead. Instead of using the default vstart.sh port which may conflict with a already running vstart.sh, set the CEPH_PORT=7400 which is not used by any other test run with make check. Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit f04d4e7)
-
tests: ceph_objectstore_tool.py run faster by default
By default use only a small number of objects to speed up the tests. If the argument "big" is given, use a large number of objects as it may help find some problems. Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit 235257c)
-
tests: ceph_objectstore_tool.py use a dedicated directory
Set CEPH_DIR to a directory that is specific to ceph_objectstore_tool so that it can run in parallel with other vstart.sh clusters. Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit e303d1a) Conflicts: src/test/ceph_objectstore_tool.py
-
tests: ceph_objectstore_tool.py replace stop.sh with init-ceph
The stop.sh will stop all ceph-* processes. Use the init-ceph script instead to selectively kill the daemons run by the vstart.sh cluster used for ceph_objectstore_tool. Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit e8f34bd)
-
tests: ceph_objectstore_tool.py main returns
Instead of calling sys.exit() the main function returns the desired exit code. Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit 0f3d7b1)
-
tests: ceph_objectstore_tool.py encapsulate init-ceph stop
Call init-ceph in kill_daemons and add a call to kill_daemon when main returns on error so that it never leaves daemons hanging. Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit fc435ff)
-
tests: ceph_objectstore_tool.py skip if /dev/tty fails
Some environments do not have a /dev/tty. When opening /dev/tty fails, skip the test instead of returning an error. Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit 4c94f17)
-
tests: ceph_objectstore_tool.py fix off by 1 ATTR_OBJS handling
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit eaf1d1e)
-
tests: ceph_objectstore_tool.py check for malformed JSON for erasure …
…code objs Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 40717aa)
-
tests: ceph_objectstore_tool.py fix list-attr for erasure code
Adding testing of xattr for erasure coded shards Fix error message when finding an unexpected xattr key Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit cbecab4) Conflicts: src/test/ceph_objectstore_tool.py
-
ceph_objectstore_tool: Make --file option consistent by treating "-" …
…as stdout/stdin Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 8c87f32)
-
tests: ceph_objectstore_tool.py test all variants of export/import
Handle change of error message text Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 9e53c35)
-
ceph_objectstore_tool: Clear ...INCOMPAT_SHARDS from feature if expor…
…ting replicated pg Don't require importing OSD to have shards feature for replicated pg http://tracker.ceph.com/issues/10077 Fixes: #10077 Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 86baf2d)
-
ceph_objectstore_tool: Add utility routine get_osdmap()
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit b3021b0) Conflicts: src/tools/ceph_objectstore_tool.cc
-
ceph_objectstore_tool: Add feature called set-allow-sharded-objects
Uses --op set-allow-sharded-objects option This operation will be rejected if on the target OSD's osdmap there is at least one OSD which does not support ERASURE CODES. Prompt the user that they could import if sharded state allowed Prompt the user to use new feature if sharded state found inconsistent Fixes: #10077 Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit f3dab44) Conflicts: src/tools/ceph_objectstore_tool.cc
-
objectstore_tool: update usage strings
Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit a90233c) Conflicts: src/tools/ceph_objectstore_tool.cc
-
objectstore_tool: refactor list-lost and fix-lost
Abstract out the PG exploration loops and encapsulate the list-lost and fix-lost semantic in a callable object. Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit d9e747b)
-
objectstore_tool: lookup objects by name
If the object is not a parsable JSON string, assume an object name and look it up in all the PGs. If multiple objects have the same name, only apply the command to one of them. It is primarily useful in a test environment where the names of the tests objects are known and only a small number of objects exists. It replaces the following: path='--data-path dev/osd0 --journal-path dev/osd0.journal' for pgid in $(./ceph_objectstore_tool $path --op list-pgs) ; do object=$(./ceph_objectstore_tool $path --pgid $pgid --op list | grep '"oid":"NAME"') test -n "$object" && break done ./ceph_objectstore_tool $path --pgid $pgid "$object" remove with: ./ceph_objectstore_tool $path NAME remove http://tracker.ceph.com/issues/10192 Fixes: #10192 Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit 7c1165f) Conflicts: src/tools/ceph_objectstore_tool.cc
-
objectstore_tool: filter --op list and explore all PGs
The positional object name is used to filter the output of --op list and only show the objects with a matching name. If both the object name and the pgid are omitted, all objects from all PGs are displayed. The output format is changed from {"oid":"GROUP","key":"","snapid":-2, "hash":2659194943,"max":0,"pool":0,"namespace":""} to [["0.7_head",{"oid":"GROUP","key":"","snapid":-2, "hash":2659194943,"max":0,"pool":0, "namespace":""}]] where the first member is the pgid where the object is found. Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit c69aace)
-
objectstore_tool: parse new object description format
The object format changed from {json object} to [pgid,{json object}] The parser is updated accordingly. If the --pgid is present, check that it equals the pgid from the object description. Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit df9d5c5)
-
objectstore_tool: test --op list variants
Signed-off-by: Loic Dachary <ldachary@redhat.com> (cherry picked from commit ddba267)
-
ceph_objectstore_tool: In error case umount objectstore
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit bc6ea9c)
-
ceph_objectstore_tool: For terminal output of list one object per line
Instead of a parsable array make it easier to cut and paste listed objects Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 5a66db9)
-
ceph_objectstore_tool: BUG: --op list wasn't including snapshots
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit b617ee2)
-
ceph_objectstore_tool: Strip _* (always _head) from pgid in list entr…
…y output Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 5eacd3c)
-
ceph_objectstore_tool: Add --format and --pretty-format support
--pretty-format defaults true Add --format so xml output can be requested --op list defaults to single line of json per object To override this more human readable output use --pretty-format=false Add testing of --op list special handling Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit cca85a5)
-
ceph_objectstore_tool: Remove extraneous endl on error throw messages
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 32c832f)
-
ceph_objectstore_tool: Fix errors messages in newer code
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit eae7c02)
-
ceph_objectstore_tool: Improve object spec parsing error messages
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit de6384f)
-
ceph_objectstore_tool: Accept json object with --pgid instead of array
It isn't anticipated that anyone would use this but keeps backward compatible Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 59b423e)
-
ceph_objectstore_tool: Prevent tool from transitioning struct_v on rm…
…-past-intervals Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit f056bdf)
-
ceph_objectstore_tool.cc: prefer ++operator for non-primitive iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de> (cherry picked from commit 252fc03)
-
ceph_objectstore_tool.cc: reduce scope of variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de> (cherry picked from commit 78542f9)
-
ceph_objectstore_tool: Describe super_ver values
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 0aeba0f)
-
ceph-objectstore-tool: Remove --pretty-format and use new --format op…
…tions Call new_formatter() with --format specified argument Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 22b7174) Conflicts: src/tools/ceph_objectstore_tool.cc
-
ceph_objectstore_tool: read_fd() doesn't handle ^D from tty stdin, do…
…n't allow Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 5cb6925)
-
ceph_objectstore_tool: Fix import-rados skipping of snapshots
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit fe93602)
-
ceph_objectstore_tool: Get g_ceph_context available to import-rados
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit ddc4613) Conflicts: src/tools/ceph_objectstore_tool.cc
-
ceph_objectstore_tool: import-rados shouldn't import internal namespa…
…ce objects Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit f727d2e)
-
ceph_objectstore_tool: Allow the metadata_section to be anywhere in t…
…he export Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 62dd912) Conflicts: src/tools/ceph_objectstore_tool.cc
-
ceph_objectstore_tool: Check cluster_fsid before allowing an import
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 196c811)
-
ceph_objectstore_tool: Check that pool exists before allowing import
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit f24f646) Conflicts: src/tools/ceph_objectstore_tool.cc
-
ceph_objectstore_tool: Add special exit code for test infrastructure
Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit b1f12f0)
-
ceph_objectstore_tool: Check for splits and fail import if there were…
-
ceph_objectstore_tool: Verify that object pool and pgid pool match
Also, earlier check for invalid --pgid with import op Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit da3be80)
-
ceph_objectstore_tool: On import following a split skip objects no lo…
…nger in pg Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 68b27e2) Conflicts: src/tools/ceph_objectstore_tool.cc
-
ceph_objectstore_tool: Handle import of pg which OSD has split
Fail import if import data doesn't include OSDMap and can't find it locally See if local map can be read for import's epoch Jump to current epoch like a split would if local map not present Fixes: #9781 Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit afda6e4) Conflicts: src/tools/ceph_objectstore_tool.cc
-
ceph_objectstore_tool: For import get object_info_t available for eac…
…h object Add object_info_t to object_begin so we have at object create time This will be useful for importing from multiple erasure coded exports Signed-off-by: David Zafman <dzafman@redhat.com> (cherry picked from commit 05d916e)
-
-
-
osd: Get pgid ancestor from last_map when building past intervals