Commit Graph

38 Commits

Author SHA1 Message Date
Kefu Chai
5c758f63aa qa/standalone: always decode output from check_output()
we could pass `text=True` for better readability, but that's introduced
in python3.7, or pass `error="ignore"` but it's too long.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-03 13:09:16 +08:00
Kefu Chai
eda90040ad qa: always use subprocess.{DEVNULL,check_output}
no need to check for their existence, and prepare a replacement.
because we've migrated to python3. and we only support python3.6 and up.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-03 13:09:16 +08:00
Kefu Chai
0ac787be2a qa/standalone: drop py2 support
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-07-05 10:58:28 +08:00
Kefu Chai
48f0e02d76 qa/standalone: flake8 fixes
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-23 23:01:27 +08:00
David Zafman
19054ceb43 tools: Add statfs operation to ceph-objecstore-tool
Fixes: https://tracker.ceph.com/issues/46064

Signed-off-by: David Zafman <dzafman@redhat.com>
2020-06-18 10:07:38 -07:00
David Zafman
08f7e7980f test: Fix failing ceph_objectstore_tool.py test
The -N option to vstart.sh was removed, use -k

Old hinfo_key binary happen to be utf-8 decodable, now it
throws an exception trying to decode it. Use new
option to ceph-objectstore-tool to treat stdout as a terminal
and convert binary data to base64.

Signed-off-by: David Zafman <dzafman@redhat.com>
2020-02-27 18:14:36 -08:00
Sage Weil
e47526e152 qa/standalone/special/ceph_objectstore_tool: python3
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-20 13:32:53 -06:00
Thomas Bechtold
0127cd1e88 qa: Enable flake8 tox and fix failures
There were a couple of problems found by flake8 in the qa/
directory (most of them fixed now). Enabling flake8 during the usual
check runs hopefully avoids adding new issues in the future.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-12 10:21:01 +01:00
David Zafman
2d79e77b6a ceph-objectstore-tool: call collection_bits() crashes on the meta collection
Skip new check for meta collection
test:
    Turn off osd_pool_default_pg_autoscale_mode just like bash tests do
    Fix test by checking for new error message

Caused by: f88b353454

Fixes: https://tracker.ceph.com/issues/42476

Signed-off-by: David Zafman <dzafman@redhat.com>
2019-10-24 11:37:30 -07:00
David Zafman
87d80eb417 test: ceph-objectstore-tool add remove --force with bad snapset test
Signed-off-by: David Zafman <dzafman@redhat.com>
2019-08-27 22:30:02 +00:00
Changcheng Liu
43ad4bf0dc ceph-objectstore-tool: set log date format
Set datefmt parameter to track the log information
%F Equivalent to %Y-%m-%d
%T Equivalent to "%H:%M:%S"

Signed-off-by: Robert Church <robert.church@windriver.com>
Reviewed-by: Changcheng Liu <changcheng.liu@aliyun.com>
2019-07-25 09:39:19 +08:00
Sage Weil
03b9c66080 ceph-objectstore-tool: fix use of SnapSet::snaps
Instead, use clone_snaps to identify clones.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-07-12 09:55:06 -05:00
David Zafman
96861a8116 ceph-objectstore-tool: Rename dump-import to dump-export
If user specifies dump-import it will still work, but isn't
in the usage that way.

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

Signed-off-by: David Zafman <dzafman@redhat.com>
2019-04-12 13:17:45 -07:00
David Zafman
553d83dd24
Merge pull request #25403 from liyichao/rdigest
tools: Add clear-data-digest command to objectstore tool.

Reviewed-by: David Zafman <dzafman@redhat.com>
2019-01-30 09:30:23 -08:00
David Zafman
388e54d906 test: ceph-objectstore-tool cut down on large run
Signed-off-by: David Zafman <dzafman@redhat.com>
2019-01-26 19:35:11 -08:00
David Zafman
07e4273c6a test: ceph-objectstore-tool: Add test for EC object dump to check hinfo section
Fixes: http://tracker.ceph.com/issues/38053

Signed-off-by: David Zafman <dzafman@redhat.com>
2019-01-26 19:35:11 -08:00
David Zafman
786b39f18f test: ceph-objectstore-tool: Fix EC code handling so it doesn't skip EC objects
Signed-off-by: David Zafman <dzafman@redhat.com>
2019-01-26 19:35:11 -08:00
David Zafman
0753dc2b17 test: Remove unnecessary shell code that breaks this python test
Caused by: 8a694fc2f9

Signed-off-by: David Zafman <dzafman@redhat.com>
2019-01-26 19:35:11 -08:00
liyichao
da5832b2b4 tools: Add clear-data-digest command to objectstore tool.
There may be a situation where data digest in object info is
inconsistent with that computed from object data, then deep-scrub
will fail even though all three repicas have the same object data.

Fixes: https://tracker.ceph.com/issues/37935

Signed-off-by: Li Yichao <liyichao.good@gmail.com>
2019-01-17 11:03:51 +08:00
Vikhyat Umrao
8a694fc2f9 qa: specify filestore for misc tests
Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
2019-01-16 13:09:19 -06:00
liuchang0812
7c008d279e tool/ceph_objectstore_tool: add new op that reset last_complete to last_update
Fixes: http://tracker.ceph.com/issues/19382

Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
2018-10-22 11:03:06 +08:00
Sage Weil
26cb966cab ceph-objectstore-tool: import pg at original epoch
- In the jewel era, we fast-forwarded the PG to the OSD's latest epoch
and cleared past_intervals.

- In mimic, as of 2347ecb961, we brought the
PG up to date while updating past_intervals.  (At the same time we removed
the OSD's parallel past_intervals regeneration.)

The problem is that the tool then has to reimplement the past_intervals
update logic, and *also* has to cope with splits and merges.  Splits are
somewhat easier (until now we enable partial import of a PG into a split
child), but merges are not so easy.

This patch changes it so we import the PG and leave the pg_epoch matching
the import file.  The OSD is then responsible for bringing it up to date
with the latest map, and dealing with any intervening splits or merges.

We also adjust the safety check to ensure that we don't collide with
any existing PG, either a child we eventually split into, or a parent
we eventually merge into.

Fixes: http://tracker.ceph.com/issues/35955
Signed-off-by: Sage Weil <sage@redhat.com>
2018-09-20 12:58:00 -05:00
David Zafman
6d53e2c380 test: Fix for error message changed in ceph-objectstore-tool
Fixes: http://tracker.ceph.com/issues/35982

Caused by: 6bd682f53d

Signed-off-by: David Zafman <dzafman@redhat.com>
2018-09-13 13:19:11 -07:00
Sage Weil
2c26fb0fe1 rados: drop mkpool, rmpool commands
- mkpool and rmpool users should use the normal cli/mon commands

Signed-off-by: Sage Weil <sage@redhat.com>
2018-08-31 09:27:36 -05:00
Noah Watkins
61e2648c19 qa/ceph_objectstore_tool.py: set mgr module path
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-08-17 15:24:10 -07:00
David Zafman
a8d26122dc tools: Use --no-mon-config so ceph_objectstore_tool.py test doesn't hang
Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-06 11:52:10 -07:00
Josh Durgin
b01e4ea5e2 tools: Add pg log trim command to ceph-objectstore-tool
Add test script that verifies the command in qa/standalone/osd

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

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Signed-off-by: David Zafman <dzafman@redhat.com>
2018-03-08 15:58:55 -08:00
David Zafman
c4602c9ac8 test: ceph_objectstore_tool.py: Perform dump-import
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-12-08 18:50:04 -08:00
David Zafman
a8b8d541dd ceph-objectstore-tool: Add option "dump-import" to examine an export
Fixes: http://tracker.ceph.com/issues/22086

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-12-06 17:30:47 -08:00
David Zafman
f918b1fac1 test: Remove bogus check in ceph_objectstore_tool.py
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-10-18 18:07:23 -07:00
Sage Weil
b6a5c09dba ceph-objectstore-tool: remove rm-past-intervals op
The OSD doesn't rebuild this on demand anymore.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
David Zafman
0364ae104a test: Fix ceph-objectstore-tool usage check
Caused by: c7b7a1f04f

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-09-18 15:29:22 -07:00
David Zafman
3bb20f6d75 ceph-objectstore-tool: Make pg removal require --force
Add new export-remove to combine the 2 operations

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

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-09-08 17:56:05 -07:00
David Zafman
49ca1fff7f ceph-objectstore-tool: Better messages for bad --journal-path
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-09-08 17:50:46 -07:00
David Zafman
3ac219df2d test: Fix ceph-objectstore-tool test for standalone and latest code
vstart.sh now defaults to bluestore, so specify filestore
Set environment for run-standalone.sh and cmake build
Create td/cot_dir as test directory
Crush output format change
Change dir into test directory
Give a little time after pool creation
Check for core files as ceph-helpers.sh does

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-09-08 16:53:53 -07:00
David Zafman
495c32fd31 test: Move ceph-objectstore-tool test to standalone
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-09-08 16:53:30 -07:00
David Zafman
229de6b71d qa: Add support for core dumps
Save core dumps when running tests locally
Dump logs to output whenever cores seen

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-08-10 12:37:04 -07:00
David Zafman
b20dfc2864 qa: Add special test_failure.sh script (not run by default)
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-08-04 06:38:09 -07:00