]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
9 years agotest: Add test cases for xattr and omap ceph-objectstore-tool operations
David Zafman [Tue, 10 Nov 2015 04:02:21 +0000 (20:02 -0800)]
test: Add test cases for xattr and omap ceph-objectstore-tool operations

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

9 years agorados: Minor output changes for consistency across operations
David Zafman [Wed, 11 Nov 2015 16:28:01 +0000 (08:28 -0800)]
rados: Minor output changes for consistency across operations

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

9 years agotest: osd-scrub-snaps.sh uses ceph-helpers.sh and added to make check
David Zafman [Thu, 29 Oct 2015 04:34:44 +0000 (21:34 -0700)]
test: osd-scrub-snaps.sh uses ceph-helpers.sh and added to make check

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

ceph-helpers.sh in different location in Hammer

9 years agoosd: Use boost::optional instead of snap 0 for "all_clones"
David Zafman [Mon, 26 Oct 2015 18:36:43 +0000 (11:36 -0700)]
osd: Use boost::optional instead of snap 0 for "all_clones"

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

9 years agoosd, test: When head missing a snapset, clones not an error
David Zafman [Mon, 26 Oct 2015 01:57:18 +0000 (18:57 -0700)]
osd, test: When head missing a snapset, clones not an error

Fix log message for this case and make into "info"

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

9 years agoosd, test: Keep missing count and log number of missing clones
David Zafman [Sat, 24 Oct 2015 23:23:13 +0000 (16:23 -0700)]
osd, test: Keep missing count and log number of missing clones

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

Conflicts:
src/osd/ReplicatedPG.h (trivial)

9 years agotest: Eliminate check for bogus "obj13/head snaps empty" error
David Zafman [Tue, 20 Oct 2015 18:14:42 +0000 (11:14 -0700)]
test: Eliminate check for bogus "obj13/head snaps empty" error

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

9 years agoceph-objectstore-tool: Add new remove-clone-metadata object op
David Zafman [Thu, 15 Oct 2015 03:34:28 +0000 (20:34 -0700)]
ceph-objectstore-tool: Add new remove-clone-metadata object op

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

No Sequencer in transactions in Hammer

9 years agoosd: Fix trim_object() to not crash on corrupt snapset
David Zafman [Thu, 15 Oct 2015 03:42:48 +0000 (20:42 -0700)]
osd: Fix trim_object() to not crash on corrupt snapset

Add test case to check for trim_object() osd crash

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

Conflicts:
src/osd/ReplicatedPG.cc (trivial)

9 years agoceph-objectstore-tool: Improve object spec error handling
David Zafman [Wed, 14 Oct 2015 20:12:17 +0000 (13:12 -0700)]
ceph-objectstore-tool: Improve object spec error handling

Add test cases

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

Conflicts:
src/test/ceph_objectstore_tool.py (trivial)

9 years agoceph-objectstore-tool: Add undocumented clear-snapset command for testing
David Zafman [Thu, 8 Oct 2015 00:25:44 +0000 (17:25 -0700)]
ceph-objectstore-tool: Add undocumented clear-snapset command for testing

Add test cases using new feature to corrupt SnapSet

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

No Sequencer in transactions in Hammer

9 years agoceph-objectstore-tool: Add set-size command for objects
David Zafman [Thu, 15 Oct 2015 04:59:50 +0000 (21:59 -0700)]
ceph-objectstore-tool: Add set-size command for objects

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

No Sequencer in transactions in Hammer

9 years agoceph-objectstore-tool: Enhanced dump command replaces dump-info
David Zafman [Thu, 15 Oct 2015 05:04:05 +0000 (22:04 -0700)]
ceph-objectstore-tool: Enhanced dump command replaces dump-info

Show object stat information from objectstore
Show SnapSet if present
Add --head for search by object name

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

9 years agotest: Add some clones to ceph-objectstore-tool test
David Zafman [Fri, 2 Oct 2015 20:39:29 +0000 (13:39 -0700)]
test: Add some clones to ceph-objectstore-tool test

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

9 years agoceph-objectstore-tool: For corrupt objectstores, don't abort listing on errors
David Zafman [Fri, 2 Oct 2015 02:28:54 +0000 (19:28 -0700)]
ceph-objectstore-tool: For corrupt objectstores, don't abort listing on errors

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

Conflicts:
src/tools/ceph_objectstore_tool.cc (trivial)

9 years agoceph-objectstore-tool: Improve some error messages
David Zafman [Tue, 13 Oct 2015 20:02:40 +0000 (13:02 -0700)]
ceph-objectstore-tool: Improve some error messages

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

9 years agoceph-objectstore-tool: White space fixes
David Zafman [Thu, 3 Sep 2015 21:22:20 +0000 (14:22 -0700)]
ceph-objectstore-tool: White space fixes

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

9 years agotools/rados: Improve xattr import handling so future internal xattrs ignored
David Zafman [Tue, 13 Oct 2015 22:33:26 +0000 (15:33 -0700)]
tools/rados: Improve xattr import handling so future internal xattrs ignored

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

Conflicts:
src/tools/rados/RadosImport.cc (Code in ceph_objectstore_tool.cc in Hammer)

9 years agotest: Test scrubbing of snapshot problems
David Zafman [Wed, 30 Sep 2015 02:57:43 +0000 (19:57 -0700)]
test: Test scrubbing of snapshot problems

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

9 years agoosd: Don't crash if OI_ATTR attribute is missing or corrupt
David Zafman [Mon, 28 Sep 2015 17:59:42 +0000 (10:59 -0700)]
osd: Don't crash if OI_ATTR attribute is missing or corrupt

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

9 years agoosd: Additional _scrub() check for snapset inconsistency
David Zafman [Wed, 14 Oct 2015 01:02:32 +0000 (18:02 -0700)]
osd: Additional _scrub() check for snapset inconsistency

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

9 years agoosd: Better SnapSet scrub checking (find issues instead of asserting)
David Zafman [Fri, 4 Sep 2015 02:43:35 +0000 (19:43 -0700)]
osd: Better SnapSet scrub checking (find issues instead of asserting)

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

9 years agoosd: Make the _scrub routine produce good output and detect errors properly
David Zafman [Wed, 26 Aug 2015 20:58:09 +0000 (13:58 -0700)]
osd: Make the _scrub routine produce good output and detect errors properly

Catch decode errors so osd doesn't crash on corrupt OI_ATTR or SS_ATTR
Use boost::optional<> to make current state clearer
Create next_clone as needed using head/curclone
Add equivalent logic after getting to end of scrubmap.objects

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

Conflicts:
src/osd/ReplicatedPG.cc (no num_objects_pinned in hammer)
src/osd/ReplicatedPG.h (no get_temp_recovery_object() in hammer)

9 years agoosd: Fix log message name of ceph-objectstore-tool
David Zafman [Thu, 1 Oct 2015 00:17:15 +0000 (17:17 -0700)]
osd: Fix log message name of ceph-objectstore-tool

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

9 years agoceph-objectstore-tool: add mark-complete operation
Mykola Golub [Tue, 16 Jun 2015 08:57:08 +0000 (11:57 +0300)]
ceph-objectstore-tool: add mark-complete operation

It is supposed to be used as a last resort to fix a cluster that has
PGs in 'incomplete' state, using the following procedure:

1) stop the osd that is primary for the incomplete PG;
2) run:
  ceph-objectstore-tool --data-path ... --journal-path ... --pgid $PGID --op mark-complete
3) start the osd.

Fixes: #10098
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit 6907778d767ba08bb80c495785056ed122b023fe)

Conflicts:
src/test/ceph_objectstore_tool.py (trivial)
src/tools/ceph_objectstore_tool.cc (trivial)

9 years agotest: Fix failure test to find message anywhere in stderr
David Zafman [Tue, 8 Sep 2015 19:33:44 +0000 (12:33 -0700)]
test: Fix failure test to find message anywhere in stderr

Consolidate test_failure() and test_failure_tty()

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

9 years agorados: Fix usage for "notify" command
David Zafman [Tue, 8 Sep 2015 20:41:31 +0000 (13:41 -0700)]
rados: Fix usage for "notify" command

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

9 years agotest: add test for {get,set}-inc-osdmap commands.
Kefu Chai [Fri, 17 Jul 2015 06:46:16 +0000 (14:46 +0800)]
test: add test for {get,set}-inc-osdmap commands.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 818de1a2c89272d98610328a958fea06d1cc41cc)

Conflicts:
src/test/ceph_objectstore_tool.py (trivial)

9 years agotest: add test for {get,set}-osdmap commands
Kefu Chai [Wed, 8 Jul 2015 07:51:55 +0000 (15:51 +0800)]
test: add test for {get,set}-osdmap commands

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 0257c150fe552300c0d9f5a22a27aaa49fb6cc64)

Conflicts:
src/test/ceph_objectstore_tool.py (trivial)

9 years agotools/ceph-objectstore-tool: add get-inc-osdmap command
Kefu Chai [Tue, 14 Jul 2015 02:33:47 +0000 (10:33 +0800)]
tools/ceph-objectstore-tool: add get-inc-osdmap command

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 7801bb20d23ce83fc4093c23331bcb75e43c878f)

Conflicts:
src/tools/ceph_objectstore_tool.cc (trivial)

9 years agotools/ceph-objectstore-tool: add set-inc-osdmap command
Kefu Chai [Sat, 11 Jul 2015 08:27:47 +0000 (16:27 +0800)]
tools/ceph-objectstore-tool: add set-inc-osdmap command

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 95344d07c3a1a9a6b1246e5eca3f7daeb062dd06)

Conflicts:
src/tools/ceph_objectstore_tool.cc (trivial)

9 years agotools/ceph-objectstore-tool: add "get-osdmap" command
Kefu Chai [Fri, 3 Jul 2015 15:09:54 +0000 (23:09 +0800)]
tools/ceph-objectstore-tool: add "get-osdmap" command

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit f0c130d6b1bc2a8a0cce6d78a6e69995fe00a427)

Conflicts:
src/tools/ceph_objectstore_tool.cc (trivial)

9 years agotools/ceph-objectstore-tool: add "set-osdmap" command
Kefu Chai [Thu, 2 Jul 2015 11:14:55 +0000 (19:14 +0800)]
tools/ceph-objectstore-tool: add "set-osdmap" command

Fixes: #12193
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 3e30c1746fb8d90b04e4776849069db0b7737c87)

Conflicts:
src/tools/ceph_objectstore_tool.cc (trivial)

9 years agotest: Add debug argument to the ceph-objectstore-tool test
David Zafman [Tue, 23 Jun 2015 23:51:27 +0000 (16:51 -0700)]
test: Add debug argument to the ceph-objectstore-tool test

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

9 years agotools, test: Some ceph-objectstore-tool error handling fixes
David Zafman [Fri, 26 Jun 2015 00:15:39 +0000 (17:15 -0700)]
tools, test: Some ceph-objectstore-tool error handling fixes

Improve various error messages generated with invalid syntax
Add test cases for most of these error messages

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

Conflicts:
src/test/ceph_objectstore_tool.py (trivial)

9 years agotools: Check for valid --op earlier so we can get a better error message
David Zafman [Tue, 23 Jun 2015 03:11:10 +0000 (20:11 -0700)]
tools: Check for valid --op earlier so we can get a better error message

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

Conflicts:
src/test/ceph_objectstore_tool.py (trivial)
src/tools/ceph_objectstore_tool.cc (meta-list op not in Hammer)

9 years agotools: Fix newlines in output of --op list
David Zafman [Thu, 11 Jun 2015 00:04:57 +0000 (17:04 -0700)]
tools: Fix newlines in output of --op list

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

9 years agotools: Fix dump-super which doesn't require pgid
David Zafman [Tue, 23 Jun 2015 01:38:01 +0000 (18:38 -0700)]
tools: Fix dump-super which doesn't require pgid

A valid pgid had to be specified in order for superblock to be displayed,
but it was otherwise ignored.
Fix message that didn't include dump-super

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

9 years agotools: Check and specify commands that require the pgid specification
David Zafman [Tue, 23 Jun 2015 02:16:22 +0000 (19:16 -0700)]
tools: Check and specify commands that require the pgid specification

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

9 years agohobject_t: modify operator<<
Sage Weil [Fri, 12 Dec 2014 00:25:49 +0000 (16:25 -0800)]
hobject_t: modify operator<<

Put the most significant fields to the left so that it matches the sort
order.  Also use unambiguous separator when the nspace is present
(like we do with the key).

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit ecdc8f697acf1627b35a83663c219a3bb0ada453)

9 years agoosd, tools: Always filter temp objects since not being exported
David Zafman [Tue, 7 Jul 2015 01:14:06 +0000 (18:14 -0700)]
osd, tools: Always filter temp objects since not being exported

Can't use object_locator_to_pg() directly with a temp object
because the pool is negative.

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

9 years agotools: Don't export temporary objects until we have persistent-temp objects
David Zafman [Mon, 22 Jun 2015 18:15:58 +0000 (11:15 -0700)]
tools: Don't export temporary objects until we have persistent-temp objects

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

Remove "assert(!i->hobj.is_meta());" since is_meta() is not in Hammer

9 years agotest, tools: Improve ceph-objectstore-tool import error handling and add tests
David Zafman [Thu, 11 Jun 2015 19:57:10 +0000 (12:57 -0700)]
test, tools: Improve ceph-objectstore-tool import error handling and add tests

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

9 years agotools: For ec pools list objects in all shards if the pgid doesn't specify
David Zafman [Wed, 10 Jun 2015 01:14:09 +0000 (18:14 -0700)]
tools: For ec pools list objects in all shards if the pgid doesn't specify

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

9 years agotools: clean up errors in ceph-objectstore-tool
John Spray [Mon, 20 Apr 2015 16:28:15 +0000 (17:28 +0100)]
tools: clean up errors in ceph-objectstore-tool

We use negative error codes everywhere else, should
use them here too.  Also add a couple of strategically
placed prints.

Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 8e5594da29e782b6efd046ed03f313599dafa1c5)

Conflicts:
src/tools/RadosDump.cc (Excluded, not in Hammer)

9 years agotest/ceph-objectstore-tool: Don't need stderr noise
David Zafman [Tue, 2 Jun 2015 00:22:18 +0000 (17:22 -0700)]
test/ceph-objectstore-tool: Don't need stderr noise

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

9 years agotest/ceph-objectstore-tool: Show command that should have failed
David Zafman [Tue, 2 Jun 2015 00:15:21 +0000 (17:15 -0700)]
test/ceph-objectstore-tool: Show command that should have failed

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

9 years agotest/ceph_objectstore_tool: Improve dump-journal testing
David Zafman [Sat, 23 May 2015 00:41:40 +0000 (17:41 -0700)]
test/ceph_objectstore_tool: Improve dump-journal testing

Fix false failure when journal has no entries
Test dump-journal on all osds in 2 places

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

9 years agoceph-objectstore-tool: Allow --pgid specified on import (for post split)
David Zafman [Fri, 22 May 2015 18:52:00 +0000 (11:52 -0700)]
ceph-objectstore-tool: Allow --pgid specified on import (for post split)

Revamp split import testing to use --pgid option post split

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

9 years agoceph-objectstore-tool: Invalidate pg stats when objects were skipped during pg import
David Zafman [Fri, 22 May 2015 17:53:48 +0000 (10:53 -0700)]
ceph-objectstore-tool: Invalidate pg stats when objects were skipped during pg import

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

9 years agoceph-objectstore-tool: Add dump-super to show OSDSuperblock in format specified
David Zafman [Tue, 19 May 2015 03:22:03 +0000 (20:22 -0700)]
ceph-objectstore-tool: Add dump-super to show OSDSuperblock in format specified

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

9 years agomds, include: Fix dump() numeric char array to include additional alpha chars
David Zafman [Tue, 19 May 2015 03:25:23 +0000 (20:25 -0700)]
mds, include: Fix dump() numeric char array to include additional alpha chars

Caused by: c87f55b5a8b3e003726e1be22b9cb6894ef2f37d

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

9 years agoceph-objectstore-tool: Add dump-journal as not requiring --pgid in usage
David Zafman [Tue, 19 May 2015 03:08:14 +0000 (20:08 -0700)]
ceph-objectstore-tool: Add dump-journal as not requiring --pgid in usage

Additional comment describes --pgid requirement checking

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

9 years agoosd: Show number of divergent_priors in log message
David Zafman [Thu, 9 Apr 2015 23:26:07 +0000 (16:26 -0700)]
osd: Show number of divergent_priors in log message

Report dirty_divergent_priors as true or false
Use dout(5) so tests can verify divergent_priors created

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

9 years agotest: Add config changes to all tests to avoid order dependency
David Zafman [Tue, 12 May 2015 22:28:07 +0000 (15:28 -0700)]
test: Add config changes to all tests to avoid order dependency

ReplayCorrupt was crashing because journal_ignore_corruption wasn't set true
Improve ReplayCorrupt by checking setting of bool corrupt and use ASSERT_FALSE()

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

9 years agotest: ceph_test_filejournal: Conform to test infrastructure requirements
David Zafman [Fri, 6 Mar 2015 00:37:46 +0000 (16:37 -0800)]
test: ceph_test_filejournal: Conform to test infrastructure requirements

Only call RUN_ALL_TESTS() once

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

9 years agotest: ceph_test_filejournal need to force aio because testing with a file
David Zafman [Fri, 6 Mar 2015 00:13:50 +0000 (16:13 -0800)]
test: ceph_test_filejournal need to force aio because testing with a file

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

9 years agotest: ceph_test_filejournal fix missing argument to FileJournal constructor
David Zafman [Fri, 6 Mar 2015 00:04:36 +0000 (16:04 -0800)]
test: ceph_test_filejournal fix missing argument to FileJournal constructor

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

9 years agotest: ceph_test_filejournal Add check of journalq in WriteTrim test
David Zafman [Fri, 20 Feb 2015 03:48:11 +0000 (19:48 -0800)]
test: ceph_test_filejournal  Add check of journalq in WriteTrim test

Commit all journal entries and check for empty journalq

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

9 years agotest: Fix ceph-objectstore-tool test missing fd.close()
David Zafman [Fri, 30 Jan 2015 01:14:39 +0000 (17:14 -0800)]
test: Fix ceph-objectstore-tool test missing fd.close()

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

9 years agotest: Fix ceph-objectstore-tool test error message
David Zafman [Fri, 30 Jan 2015 01:13:41 +0000 (17:13 -0800)]
test: Fix ceph-objectstore-tool test error message

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

9 years agotest: ceph-objectstore-tool: Remove duplicate debug messages, keep cmd/log/call together
David Zafman [Wed, 1 Apr 2015 17:32:32 +0000 (10:32 -0700)]
test: ceph-objectstore-tool: Remove duplicate debug messages, keep cmd/log/call together

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

9 years agotest: ceph-objectstore-tool import after split testing
David Zafman [Sat, 28 Mar 2015 02:47:01 +0000 (19:47 -0700)]
test: ceph-objectstore-tool import after split testing

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

9 years agotest: Use CEPH_DIR where appropriate
David Zafman [Tue, 31 Mar 2015 15:16:03 +0000 (08:16 -0700)]
test: Use CEPH_DIR where appropriate

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

9 years agotest: Limit how long ceph-objectstore-tool test will wait for health
David Zafman [Tue, 31 Mar 2015 00:35:07 +0000 (17:35 -0700)]
test: Limit how long ceph-objectstore-tool test will wait for health

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

9 years agotest: Add optional arg to vstart() to provide additional args to vstart
David Zafman [Tue, 31 Mar 2015 00:33:46 +0000 (17:33 -0700)]
test: Add optional arg to vstart() to provide additional args to vstart

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

9 years agotest: Test ceph-objectstore-tool --op dump-journal output
David Zafman [Fri, 6 Mar 2015 03:35:27 +0000 (19:35 -0800)]
test: Test ceph-objectstore-tool --op dump-journal output

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

Conflicts:
src/test/ceph_objectstore_tool.py (trivial)

9 years agotest: Pep8 fixes for ceph-objectstore-tool test
David Zafman [Tue, 17 Mar 2015 21:56:06 +0000 (14:56 -0700)]
test: Pep8 fixes for ceph-objectstore-tool test

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

9 years agotest: Fix ceph-objectstore-tool test, overwrite OTHERFILE so second check is meaningful
David Zafman [Fri, 6 Mar 2015 02:37:44 +0000 (18:37 -0800)]
test: Fix ceph-objectstore-tool test, overwrite OTHERFILE so second check is meaningful

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

9 years agoosd: FileJournal: Add _fdump() that takes Formatter instead of ostream
David Zafman [Fri, 6 Mar 2015 03:16:45 +0000 (19:16 -0800)]
osd: FileJournal: Add _fdump() that takes Formatter instead of ostream

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

9 years agoosd: Add simple_dump() to FileJournal for unit testing
David Zafman [Wed, 18 Feb 2015 20:34:35 +0000 (12:34 -0800)]
osd: Add simple_dump() to FileJournal for unit testing

Allow a dump when entries aren't ObjectStore::Transaction's

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

9 years agoosd: FileJournal clean-up
David Zafman [Wed, 18 Feb 2015 20:29:38 +0000 (12:29 -0800)]
osd: FileJournal clean-up

Move aio / directio adjustments to constructor
Indicate functions which only operate before journal is active
Make functions const when possible
Move push_back() of journalq to read_entry()
Change dump() to use do_read_entry() to minimize side effects

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

Conflicts:
src/os/FileJournal.cc (trivial)

9 years agoosd: Dump header in FileJournal::dump()
David Zafman [Fri, 6 Feb 2015 02:48:22 +0000 (18:48 -0800)]
osd: Dump header in FileJournal::dump()

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

9 years agoosd: FileJournal::read_entry() can't use a zero seq to check for corruption
David Zafman [Fri, 6 Feb 2015 02:40:25 +0000 (18:40 -0800)]
osd: FileJournal::read_entry() can't use a zero seq to check for corruption

Seen when using dump() on a journal which has all entries committed

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

9 years agoosd: Fix flushing in FileJournal::dump()
David Zafman [Fri, 6 Feb 2015 02:36:01 +0000 (18:36 -0800)]
osd: Fix flushing in FileJournal::dump()

Use ostream arg since caller is specifying
Move flush after last section close

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

9 years agoosd: Add admin socket feature set_recovery_delay
David Zafman [Thu, 30 Apr 2015 17:20:24 +0000 (10:20 -0700)]
osd: Add admin socket feature set_recovery_delay

Set the value of osd_recovery_delay_start to specified seconds

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

Conflicts:
src/osd/OSD.cc (trivial)

9 years agoceph-objectstore-tool: For import/export --debug dump the log
David Zafman [Mon, 27 Apr 2015 22:37:14 +0000 (15:37 -0700)]
ceph-objectstore-tool: For import/export --debug dump the log

Move log dumping code to common function dump_log()

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

9 years agoceph-objectstore-tool: If object re-appears after removal, just skip it
David Zafman [Sat, 31 Jan 2015 00:56:10 +0000 (16:56 -0800)]
ceph-objectstore-tool: If object re-appears after removal, just skip it

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

9 years agoceph-objectstore-tool: Add --no-overwrite flag for import-rados
David Zafman [Sat, 31 Jan 2015 00:11:13 +0000 (16:11 -0800)]
ceph-objectstore-tool: Add --no-overwrite flag for import-rados

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

9 years agoceph-objectstore-tool: Remove list-lost because now we have --dry-run flag
David Zafman [Tue, 3 Feb 2015 00:23:18 +0000 (16:23 -0800)]
ceph-objectstore-tool: Remove list-lost because now we have --dry-run flag

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

9 years agoceph-objectstore-tool: Add --dry-run option
David Zafman [Fri, 23 Jan 2015 15:34:11 +0000 (07:34 -0800)]
ceph-objectstore-tool: Add --dry-run option

Fixes: #10290
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 2795161f470ab87cf4a82f455773c9b1b82946ef)

9 years agoceph-objectstore-tool: Add dump-info command to show object info
David Zafman [Thu, 22 Jan 2015 18:07:09 +0000 (10:07 -0800)]
ceph-objectstore-tool: Add dump-info command to show object info

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

9 years agoceph-objectstore-tool: Use empty string for <object> to specify pgmeta object
David Zafman [Tue, 27 Jan 2015 22:32:42 +0000 (14:32 -0800)]
ceph-objectstore-tool: Use empty string for <object> to specify pgmeta object

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

9 years agoceph-objectstore-tool: Add a couple of strategically placed prints
John Spray [Mon, 20 Apr 2015 16:28:15 +0000 (17:28 +0100)]
ceph-objectstore-tool: Add a couple of strategically placed prints

Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit fdb1a4b676765c5d3ca5d436f34230dd6996d7a7)

9 years agoceph-objectstore-tool: Clean up error handling
David Zafman [Mon, 20 Apr 2015 23:10:18 +0000 (16:10 -0700)]
ceph-objectstore-tool: Clean up error handling

Use negative errors throughout and positive error to specify exit status
cpp_strerror() handles negative errors
Clean up main() code to use local "ret"
Let end of main() decide how to treat the final value of "ret"

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

Adjust back cherry-pick f237ed97228839a1b412ad213945f0343df05bf5
    Switched to use ret as in the original change from master

9 years agoceph-objectstore-tool: Create section around log/missing/divergent_priors of --op log
David Zafman [Wed, 15 Apr 2015 22:40:41 +0000 (15:40 -0700)]
ceph-objectstore-tool: Create section around log/missing/divergent_priors of --op log

Remove extra new lines in the output

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

9 years agoceph-objectstore-tool: Add divergent_priors handling
David Zafman [Tue, 14 Apr 2015 20:49:26 +0000 (13:49 -0700)]
ceph-objectstore-tool: Add divergent_priors handling

Add to --op log output
Add to metadata_section for export
Add filtering of divergent_priors in case of splits

Fixes: #11237
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 6ad7e9b362f437fe028fe59639489efe87b3525f)

9 years agoceph-objectstore-tool: Add --force option which is used for import only
David Zafman [Wed, 18 Mar 2015 17:05:24 +0000 (10:05 -0700)]
ceph-objectstore-tool: Add --force option which is used for import only

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

9 years agoceph-objectstore-tool: Fix pgid scan to skip snapdirs
David Zafman [Fri, 13 Mar 2015 07:41:39 +0000 (00:41 -0700)]
ceph-objectstore-tool: Fix pgid scan to skip snapdirs

Long standing bug where it wasn't skipping snapdirs if !debug
For debug output use stderr like all other cases

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

9 years agoceph-objectstore-tool: Add dump-journal op
David Zafman [Mon, 9 Feb 2015 20:24:19 +0000 (12:24 -0800)]
ceph-objectstore-tool: Add dump-journal op

Have dump-journal op directly dump a filestore journal without
mounting or try to dump after mounting.

Fixes: #11135
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 381605e34a44edb9acfcfb5a56bd598b020e022f)

9 years agoceph-objectstore-tool: On any exit release CephContext so logging can flush
David Zafman [Mon, 9 Feb 2015 20:46:20 +0000 (12:46 -0800)]
ceph-objectstore-tool: On any exit release CephContext so logging can flush

Add myexit() which will put() the g_ceph_context if present before exit
Must umount() once the objectstore has been mounted

Fixes: #10809
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 409328bace0ffb3a457c0d384377bbbf37a2962d)

9 years agoceph-objectstore-tool: Check for keyvaluestore experimental feature
David Zafman [Tue, 10 Feb 2015 01:28:04 +0000 (17:28 -0800)]
ceph-objectstore-tool: Check for keyvaluestore experimental feature

Don't list keyvaluestore as a valid type if feature not enabled

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

9 years agoceph-objectstore-tool: Eliminate obscure "Invalid params" error
David Zafman [Tue, 10 Feb 2015 01:14:50 +0000 (17:14 -0800)]
ceph-objectstore-tool: Eliminate obscure "Invalid params" error

Will fail later with "No such file or directory" for an empty data-path
because we've already checked for vm.count("data-path")

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

9 years agoceph-objectstore-tool: Check pgid validity earlier like we did before
David Zafman [Mon, 9 Feb 2015 23:37:57 +0000 (15:37 -0800)]
ceph-objectstore-tool: Check pgid validity earlier like we did before

This code was not doing the umount() even though it was moved after mount()

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

9 years agoBackport the merge commit of branch 'wip-journal-header' of git://github.com/XinzeChi...
Sage Weil [Fri, 1 May 2015 16:22:01 +0000 (09:22 -0700)]
Backport the merge commit of branch 'wip-journal-header' of git://github.com/XinzeChi/ceph

(cherry picked from commit 8d596bfa24c9c3e2aadbb87494284cb5fd824e55)

Conflicts:
src/os/FileJournal.cc (trivial)
src/os/FileJournal.h (trivial)

Renamed write_header() to write_header_sync() in a merge
Signed-off-by: David Zafman <dzafman@redhat.com>
9 years agoosd: write journal header by force when journal write close
Xinze Chi [Tue, 3 Mar 2015 11:24:50 +0000 (11:24 +0000)]
osd: write journal header by force when journal write close

osd update the journal header when ceph call FileStore::sync_entry(
ApplyManager::commit_finish -> FileJournal::committed_thru).
But, it doesnot write the journal head until the next transaction
(calling do_write or do_aio_write).

So write jouranl header when journal write close, so that
committed_up_to in journal header is new enough. ceph may
not replay some transaction which has been writen to filestore.

Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
(cherry picked from commit 8f80ae3fbaba7b0e64b6e4df6c2dddd10ac50e5a)

9 years agocrushtool: send --tree to stdout
Sage Weil [Sun, 8 Feb 2015 15:47:23 +0000 (07:47 -0800)]
crushtool: send --tree to stdout

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit dca345280e4f6124a8b5aea73e6219488111c356)

Conflicts:
src/tools/crushtool.cc (trivial)

9 years agoMerge pull request #7501 from SUSE/wip-14624-hammer 7585/head
Loic Dachary [Mon, 8 Feb 2016 07:19:57 +0000 (14:19 +0700)]
Merge pull request #7501 from SUSE/wip-14624-hammer

hammer: fsx failed to compile

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #7524 from ktdreyer/wip-14637-hammer-man-radosgw-admin-orphans
Sage Weil [Sat, 6 Feb 2016 02:10:46 +0000 (21:10 -0500)]
Merge pull request #7524 from ktdreyer/wip-14637-hammer-man-radosgw-admin-orphans

hammer: doc: regenerate man pages, add orphans commands to radosgw-admin(8)

9 years agoMerge pull request #7526 from ceph/wip-14516-hammer
Orit Wasserman [Fri, 5 Feb 2016 09:30:22 +0000 (10:30 +0100)]
Merge pull request #7526 from ceph/wip-14516-hammer

hammer: rgw-admin: document orphans commands in usage