]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agoceph_objectstore_tool: Add special exit code for test infrastructure
David Zafman [Mon, 15 Dec 2014 18:03:53 +0000 (10:03 -0800)]
ceph_objectstore_tool: Add special exit code for test infrastructure

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

10 years agoceph_objectstore_tool: Check that pool exists before allowing import
David Zafman [Wed, 19 Nov 2014 19:41:39 +0000 (11:41 -0800)]
ceph_objectstore_tool: Check that pool exists before allowing import

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

Conflicts:
src/tools/ceph_objectstore_tool.cc

10 years agoceph_objectstore_tool: Check cluster_fsid before allowing an import
David Zafman [Wed, 15 Oct 2014 22:21:11 +0000 (15:21 -0700)]
ceph_objectstore_tool: Check cluster_fsid before allowing an import

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

10 years agoceph_objectstore_tool: Allow the metadata_section to be anywhere in the export
David Zafman [Thu, 16 Oct 2014 19:27:56 +0000 (12:27 -0700)]
ceph_objectstore_tool: Allow the metadata_section to be anywhere in the export

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

Conflicts:
src/tools/ceph_objectstore_tool.cc

10 years agoceph_objectstore_tool: import-rados shouldn't import internal namespace objects
David Zafman [Fri, 12 Dec 2014 23:01:24 +0000 (15:01 -0800)]
ceph_objectstore_tool: import-rados shouldn't import internal namespace objects

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

10 years agoceph_objectstore_tool: Get g_ceph_context available to import-rados
David Zafman [Fri, 12 Dec 2014 22:58:54 +0000 (14:58 -0800)]
ceph_objectstore_tool: Get g_ceph_context available to import-rados

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

Conflicts:
src/tools/ceph_objectstore_tool.cc

10 years agoceph_objectstore_tool: Fix import-rados skipping of snapshots
David Zafman [Wed, 10 Dec 2014 02:09:04 +0000 (18:09 -0800)]
ceph_objectstore_tool: Fix import-rados skipping of snapshots

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

10 years agoceph_objectstore_tool: read_fd() doesn't handle ^D from tty stdin, don't allow
David Zafman [Thu, 20 Nov 2014 21:00:10 +0000 (13:00 -0800)]
ceph_objectstore_tool: read_fd() doesn't handle ^D from tty stdin, don't allow

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

10 years agoceph-objectstore-tool: Remove --pretty-format and use new --format options
David Zafman [Fri, 19 Dec 2014 21:47:32 +0000 (13:47 -0800)]
ceph-objectstore-tool: Remove --pretty-format and use new --format options

Call new_formatter() with --format specified argument

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

Conflicts:
src/tools/ceph_objectstore_tool.cc

10 years agoceph_objectstore_tool: Describe super_ver values
David Zafman [Wed, 15 Oct 2014 22:20:03 +0000 (15:20 -0700)]
ceph_objectstore_tool: Describe super_ver values

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

10 years agoceph_objectstore_tool.cc: reduce scope of variable
Danny Al-Gaaf [Fri, 2 Jan 2015 17:36:54 +0000 (18:36 +0100)]
ceph_objectstore_tool.cc: reduce scope of variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 78542f9a901c05e627b53b5306ea604be3bc82e8)

10 years agoceph_objectstore_tool.cc: prefer ++operator for non-primitive iterators
Danny Al-Gaaf [Fri, 2 Jan 2015 14:48:08 +0000 (15:48 +0100)]
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 252fc03ba21c7b09922598a8d40997fc639bb994)

10 years agoceph_objectstore_tool: Prevent tool from transitioning struct_v on rm-past-intervals
David Zafman [Wed, 26 Nov 2014 00:56:19 +0000 (16:56 -0800)]
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 f056bdf93980a0a8e6157dbb124a79389a8f1a3c)

10 years agoceph_objectstore_tool: Accept json object with --pgid instead of array
David Zafman [Fri, 5 Dec 2014 02:53:08 +0000 (18:53 -0800)]
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 59b423e2e8846b098326fdec440de46b8e3d2769)

10 years agoceph_objectstore_tool: Improve object spec parsing error messages
David Zafman [Fri, 5 Dec 2014 02:27:50 +0000 (18:27 -0800)]
ceph_objectstore_tool: Improve object spec parsing error messages

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

10 years agoceph_objectstore_tool: Fix errors messages in newer code
David Zafman [Fri, 5 Dec 2014 01:48:28 +0000 (17:48 -0800)]
ceph_objectstore_tool: Fix errors messages in newer code

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

10 years agoceph_objectstore_tool: Remove extraneous endl on error throw messages
David Zafman [Fri, 5 Dec 2014 00:00:40 +0000 (16:00 -0800)]
ceph_objectstore_tool: Remove extraneous endl on error throw messages

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

10 years agoceph_objectstore_tool: Add --format and --pretty-format support
David Zafman [Thu, 4 Dec 2014 22:01:39 +0000 (14:01 -0800)]
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 cca85a534fe488ae314400e8faad55a758609467)

10 years agoceph_objectstore_tool: Strip _* (always _head) from pgid in list entry output
David Zafman [Thu, 4 Dec 2014 01:53:11 +0000 (17:53 -0800)]
ceph_objectstore_tool: Strip _* (always _head) from pgid in list entry output

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

10 years agoceph_objectstore_tool: BUG: --op list wasn't including snapshots
David Zafman [Thu, 4 Dec 2014 00:39:04 +0000 (16:39 -0800)]
ceph_objectstore_tool: BUG: --op list wasn't including snapshots

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

10 years agoceph_objectstore_tool: For terminal output of list one object per line
David Zafman [Thu, 4 Dec 2014 00:38:22 +0000 (16:38 -0800)]
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 5a66db9418aeed31fec98999c5053dab357d9c1e)

10 years agoceph_objectstore_tool: In error case umount objectstore
David Zafman [Thu, 4 Dec 2014 00:35:09 +0000 (16:35 -0800)]
ceph_objectstore_tool: In error case umount objectstore

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

10 years agoobjectstore_tool: test --op list variants
Loic Dachary [Thu, 27 Nov 2014 00:24:03 +0000 (01:24 +0100)]
objectstore_tool: test --op list variants

Signed-off-by: Loic Dachary <ldachary@redhat.com>
(cherry picked from commit ddba2676c4c48c2a556f5d4ffd817bfe134a9153)

10 years agoobjectstore_tool: parse new object description format
Loic Dachary [Wed, 26 Nov 2014 23:11:45 +0000 (00:11 +0100)]
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 df9d5c5cfd8b0ff793647a592c7661965cef5c92)

10 years agoobjectstore_tool: filter --op list and explore all PGs
Loic Dachary [Wed, 26 Nov 2014 22:35:21 +0000 (23:35 +0100)]
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 c69aaceac7f370e5369d511bf17898adc338ae43)

10 years agoobjectstore_tool: lookup objects by name
Loic Dachary [Wed, 26 Nov 2014 22:34:22 +0000 (23:34 +0100)]
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 7c1165f96391821c00cca1ac04b3433dbec6bb6e)

Conflicts:
src/tools/ceph_objectstore_tool.cc

10 years agoobjectstore_tool: refactor list-lost and fix-lost
Loic Dachary [Wed, 26 Nov 2014 16:30:30 +0000 (17:30 +0100)]
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 d9e747b1bdb53d1fe543ef311e3db35fb78d8051)

10 years agoobjectstore_tool: update usage strings
Loic Dachary [Wed, 26 Nov 2014 16:26:54 +0000 (17:26 +0100)]
objectstore_tool: update usage strings

Signed-off-by: Loic Dachary <ldachary@redhat.com>
(cherry picked from commit a90233c8b79ae6c035b5169c7f8809f853631689)

Conflicts:
src/tools/ceph_objectstore_tool.cc

10 years agoceph_objectstore_tool: Add feature called set-allow-sharded-objects
David Zafman [Tue, 18 Nov 2014 21:00:15 +0000 (13:00 -0800)]
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 f3dab446fc8e58b3b3d9334b8c38722e73881b9e)

Conflicts:
src/tools/ceph_objectstore_tool.cc

10 years agoceph_objectstore_tool: Add utility routine get_osdmap()
David Zafman [Tue, 18 Nov 2014 19:59:18 +0000 (11:59 -0800)]
ceph_objectstore_tool: Add utility routine get_osdmap()

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

Conflicts:
src/tools/ceph_objectstore_tool.cc

10 years agoceph_objectstore_tool: Clear ...INCOMPAT_SHARDS from feature if exporting replicated pg
David Zafman [Thu, 13 Nov 2014 05:14:11 +0000 (21:14 -0800)]
ceph_objectstore_tool: Clear ...INCOMPAT_SHARDS from feature if exporting 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 86baf2d38170ef19de2dd5e9ce3f280237d8474d)

10 years agotests: ceph_objectstore_tool.py test all variants of export/import
David Zafman [Tue, 18 Nov 2014 08:10:41 +0000 (00:10 -0800)]
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 9e53c3554c71121f2e2dd0234b5232da37ad5a1b)

10 years agoceph_objectstore_tool: Make --file option consistent by treating "-" as stdout/stdin
David Zafman [Tue, 18 Nov 2014 07:23:40 +0000 (23:23 -0800)]
ceph_objectstore_tool: Make --file option consistent by treating "-" as stdout/stdin

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

10 years agotests: ceph_objectstore_tool.py fix list-attr for erasure code
David Zafman [Sat, 15 Nov 2014 19:43:10 +0000 (11:43 -0800)]
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 cbecab477a70782f2f69258f035e78fb5c829810)

Conflicts:
src/test/ceph_objectstore_tool.py

10 years agotests: ceph_objectstore_tool.py check for malformed JSON for erasure code objs
David Zafman [Sat, 15 Nov 2014 19:46:15 +0000 (11:46 -0800)]
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 40717aa4c399e87d2c3e32038f78788eb213f87d)

10 years agotests: ceph_objectstore_tool.py fix off by 1 ATTR_OBJS handling
David Zafman [Sat, 15 Nov 2014 19:44:54 +0000 (11:44 -0800)]
tests: ceph_objectstore_tool.py fix off by 1 ATTR_OBJS handling

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

10 years agotests: ceph_objectstore_tool.py skip if /dev/tty fails
Loic Dachary [Fri, 14 Nov 2014 10:00:17 +0000 (11:00 +0100)]
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 4c94f1778fdf483e9e0b62f89f7e46e78aeeebf3)

10 years agotests: ceph_objectstore_tool.py encapsulate init-ceph stop
Loic Dachary [Thu, 13 Nov 2014 18:15:50 +0000 (19:15 +0100)]
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 fc435ff3623d196dd7cc375302acd8dfc9eb59fd)

10 years agotests: ceph_objectstore_tool.py main returns
Loic Dachary [Thu, 13 Nov 2014 18:14:49 +0000 (19:14 +0100)]
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 0f3d7b1315f2b5595047d8bd13949ed0d9194bfa)

10 years agotests: ceph_objectstore_tool.py replace stop.sh with init-ceph
Loic Dachary [Thu, 13 Nov 2014 16:32:14 +0000 (17:32 +0100)]
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 e8f34bd62bf282144b8851fb9764cf4429a49c25)

10 years agotests: ceph_objectstore_tool.py use a dedicated directory
Loic Dachary [Thu, 13 Nov 2014 16:30:29 +0000 (17:30 +0100)]
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 e303d1afde58e68c1f587962010da9e1f1278bc3)

Conflicts:
src/test/ceph_objectstore_tool.py

10 years agotests: ceph_objectstore_tool.py run faster by default
Loic Dachary [Thu, 13 Nov 2014 16:27:01 +0000 (17:27 +0100)]
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 235257c257aea98b770d9637957818c8aeb6c745)

10 years agotests: ceph_objectstore_tool.py run mon and osd on specific port
Loic Dachary [Thu, 13 Nov 2014 16:21:48 +0000 (17:21 +0100)]
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 f04d4e7539bc8c1b6cf94db815f9dcdecc52faa2)

10 years agotests: ceph_objectstore_tool.py can use a WARN cluster
Loic Dachary [Thu, 13 Nov 2014 16:16:41 +0000 (17:16 +0100)]
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 783378c019aaac36d542e1b12c0d64196ea21012)

10 years agotests: ceph_objectstore_tool.py use env python
Loic Dachary [Thu, 13 Nov 2014 16:12:35 +0000 (17:12 +0100)]
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 74506d2506d03d05935cbe342fef9dc1d9022a13)

10 years agoceph_objectstore_tool: Fixes to make import work again
David Zafman [Wed, 12 Nov 2014 23:22:04 +0000 (15:22 -0800)]
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 5ce09198bf475e5c3a2df26232fa04ba9912b103)

Conflicts:
src/tools/ceph_objectstore_tool.cc

10 years agoceph_objectstore_tool: Accept CEPH_ARGS environment arguments
David Zafman [Tue, 7 Oct 2014 01:26:44 +0000 (18:26 -0700)]
ceph_objectstore_tool: Accept CEPH_ARGS environment arguments

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

10 years agoceph_objectstore_tool: MemStore needs a CephContext
David Zafman [Fri, 3 Oct 2014 22:12:28 +0000 (15:12 -0700)]
ceph_objectstore_tool: MemStore needs a CephContext

Pass g_ceph_context to ObjectStore::create() needed by MemStore

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

10 years agoceph_objectstore_tool: Rename generated binary to ceph-objectstore-tool
David Zafman [Tue, 3 Mar 2015 18:41:28 +0000 (10:41 -0800)]
ceph_objectstore_tool: Rename generated binary to ceph-objectstore-tool

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

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

10 years agovstart.sh: warn less
Sage Weil [Wed, 12 Nov 2014 21:35:43 +0000 (13:35 -0800)]
vstart.sh: warn less

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

10 years agoceph_objectstore_tool: When exporting to stdout, don't cout messages
David Zafman [Tue, 18 Nov 2014 07:02:50 +0000 (23:02 -0800)]
ceph_objectstore_tool: When exporting to stdout, don't cout messages

Fixes: #10128
Caused by a2bd2aa7

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

10 years agoceph_objectstore_tool.cc: prefer ++operator for non-primitive iterators
Danny Al-Gaaf [Tue, 2 Sep 2014 12:56:10 +0000 (14:56 +0200)]
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 a5468abe4459159e8a9f7a4f21d082bb414e1cdd)

10 years agoTest: fixing a compile warning in ceph_objectstore_tool.cc
Zhiqiang Wang [Fri, 29 Aug 2014 08:39:40 +0000 (16:39 +0800)]
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 c3e1466b46076f133b62f98e2c0b712bdde0e119)

10 years agoceph_objectstore_tool: Bug fixes and test improvements
David Zafman [Wed, 20 Aug 2014 08:33:45 +0000 (01:33 -0700)]
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 a03f719eb3a46f410550afce313e6720e0c27946)

10 years agoceph_objectstore_tool, test: Implement import-rados feature and unit test code
David Zafman [Wed, 6 Aug 2014 01:26:11 +0000 (18:26 -0700)]
ceph_objectstore_tool, test: Implement import-rados feature and unit test code

Fixes: #8276
Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 23ec93a86140c4b271b45d87c62682288079cbba)

10 years agotest: ceph_objectstore_tool unit test improvements
David Zafman [Thu, 7 Aug 2014 02:53:43 +0000 (19:53 -0700)]
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>
10 years agoceph_objectstore_tool: Add operation "rm-past-intervals" for testing purposes
David Zafman [Thu, 7 Aug 2014 20:31:48 +0000 (13:31 -0700)]
ceph_objectstore_tool: Add operation "rm-past-intervals" for testing purposes

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 3694068b67fd625495c4511390bc5bcbfbbd28f5)

10 years agoceph_objectstore_tool: Add past_intervals to export/import code
David Zafman [Thu, 7 Aug 2014 18:46:08 +0000 (11:46 -0700)]
ceph_objectstore_tool: Add past_intervals to export/import code

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 9325ec15d4b89c5537cbcbda4c7594e25dc6e7df)

10 years agoceph_objectstore_tool: Minor improvements
David Zafman [Thu, 7 Aug 2014 21:11:21 +0000 (14:11 -0700)]
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 a2bd2aa7babb4ad45ba21c70f9d179fda27742aa)

10 years agoceph_objectstore_tool, test: Add list-pgs operations and unit test case
David Zafman [Tue, 5 Aug 2014 19:26:42 +0000 (12:26 -0700)]
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 f01e334c697057158354f0ce5ecff6d6ba8e2704)

10 years agoComplete replacement of ceph_filestore_tool and ceph_filestore_dump
David Zafman [Wed, 30 Jul 2014 19:39:49 +0000 (12:39 -0700)]
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 83fbc91e5c4e52cc1513f34908f99d2ac3b930df)

10 years agoRenames and removal towards a unified ceph_objectstore_tool
David Zafman [Wed, 30 Jul 2014 18:22:29 +0000 (11:22 -0700)]
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 77864193a1162393ade783480aee39a232934377)

10 years agoceph_filestore_dump: Add set-omaphdr object command
David Zafman [Tue, 20 May 2014 18:19:19 +0000 (11:19 -0700)]
ceph_filestore_dump: Add set-omaphdr object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit b4d95cc85af9af64d33d541cd69c5f28fd45423b)

10 years agoceph_filestore_dump: Add get-omaphdr object command
David Zafman [Tue, 20 May 2014 17:44:37 +0000 (10:44 -0700)]
ceph_filestore_dump: Add get-omaphdr object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 30c0f3114e665acdd99e64bf0d2a7399b33e8d61)

10 years agoceph_filestore_dump: Add rm-omap object command
David Zafman [Tue, 20 May 2014 03:55:47 +0000 (20:55 -0700)]
ceph_filestore_dump: Add rm-omap object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 0fc6bd2777edf24a044f454beacf1647cc52f9fe)

10 years agoceph_filestore_dump: Add set-omap object command
David Zafman [Tue, 20 May 2014 03:47:14 +0000 (20:47 -0700)]
ceph_filestore_dump: Add set-omap object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 50cd57e902fe508f98f63fea30626780b07561d9)

10 years agoceph_filestore_dump: Add get-omap object command
David Zafman [Tue, 20 May 2014 03:37:01 +0000 (20:37 -0700)]
ceph_filestore_dump: Add get-omap object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit b50c43ce5e52f5bbcb3684f6793d50f34ed741d1)

10 years agoceph_filestore_dump: Add rm-attr object command
David Zafman [Tue, 20 May 2014 01:33:24 +0000 (18:33 -0700)]
ceph_filestore_dump: Add rm-attr object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 465d77733c7499fbd65bebe7141895714c625e0d)

10 years agoceph_filestore_dump: Add set-attr object command
David Zafman [Tue, 20 May 2014 01:17:27 +0000 (18:17 -0700)]
ceph_filestore_dump: Add set-attr object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 95554e03dcb74b6d74b2f1b2891b3570abb187b8)

10 years agoceph_filestore_dump: Add get-attr object command
David Zafman [Thu, 15 May 2014 22:50:48 +0000 (15:50 -0700)]
ceph_filestore_dump: Add get-attr object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 55d43c0e20fc853daec134449b9954248fd7ef31)

10 years agoceph_filestore_dump: Add set-bytes object command
David Zafman [Thu, 15 May 2014 00:52:09 +0000 (17:52 -0700)]
ceph_filestore_dump: Add set-bytes object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 3c24d1f46a624d0a053ad234997a1f8c8b036db5)

10 years agoceph_filestore_dump: Add get-bytes object command
David Zafman [Thu, 15 May 2014 00:51:29 +0000 (17:51 -0700)]
ceph_filestore_dump: Add get-bytes object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 869dd92cc8ec29a3a684f88c335d359f225bba24)

10 years agoceph_filestore_dump: Add list-omap object command
David Zafman [Thu, 15 May 2014 00:50:16 +0000 (17:50 -0700)]
ceph_filestore_dump: Add list-omap object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 48890c7741d76cf92b5f589f49378ca57292e88b)

10 years agoceph_filestore_dump: Add list-attrs object command
David Zafman [Thu, 15 May 2014 01:32:42 +0000 (18:32 -0700)]
ceph_filestore_dump: Add list-attrs object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 00c6b0673288ca76fe144575b7af76eaa36f5857)

10 years agoceph_filestore_dump: Add --type list to output objects in a pg in json
David Zafman [Thu, 15 May 2014 00:39:17 +0000 (17:39 -0700)]
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 844dabb7f311e68eba0293ae9ca4c68521745877)

10 years agoceph_filestore_dump: Add remove object command and usage for new commands
David Zafman [Thu, 15 May 2014 00:44:31 +0000 (17:44 -0700)]
ceph_filestore_dump: Add remove object command and usage for new commands

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 605caec64b036f8ab5ae451d7e9e7515d414f28e)

10 years agoceph_filestore_dump: Add utility function get_fd_data()
David Zafman [Sat, 7 Jun 2014 00:05:53 +0000 (17:05 -0700)]
ceph_filestore_dump: Add utility function get_fd_data()

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit d4a9dafe442f139562497d746f80ba49faa954e8)

10 years agoceph_filestore_dump: Fail import/export with a tty for stdin/stdout
David Zafman [Tue, 20 May 2014 01:16:52 +0000 (18:16 -0700)]
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 7520e504cf2cdd3de2f236acb2cbf8a5016e6698)

10 years agoceph_filstore_dump: Save if stdout is a tty and add routine to clean binary strings
David Zafman [Tue, 20 May 2014 18:56:20 +0000 (11:56 -0700)]
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 3a574cc78b0e3ec6d8dd0c39ee20e7a54ad64056)

10 years agocommon: Add missing ghobject_t::decode() for json
David Zafman [Wed, 14 May 2014 22:30:11 +0000 (15:30 -0700)]
common: Add missing ghobject_t::decode() for json

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit c05f895d15a1d0e78ff5e9ae1a83f0a5424103d0)

Changes:
Adjusted for older shard_t

10 years agoceph_filestore_dump: Add --skip-journal-replay and --skip-mount-omap
David Zafman [Wed, 14 May 2014 22:37:17 +0000 (15:37 -0700)]
ceph_filestore_dump: Add --skip-journal-replay and --skip-mount-omap

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 2e9dcb256509e7c921556202052f0cc1dcd91398)

10 years agoos: Add optional flags to generic ObjectStore creation (SKIP_JOURNAL_REPLAY
David Zafman [Wed, 14 May 2014 22:41:15 +0000 (15:41 -0700)]
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 3d9fde9d92322cd8ac3e3d8bcbf5b0a01ef0528b)

Conflicts:
src/os/FileStore.cc

10 years agoceph_filestore_dump: Improve debug output by showing actual offset
David Zafman [Sat, 17 May 2014 01:20:11 +0000 (18:20 -0700)]
ceph_filestore_dump: Improve debug output by showing actual offset

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 44b261d5d1b36528bfbcb37dbd866b615e14be99)

10 years agoceph_filestore_dump: Use cerr now that we aren't closing stderr
David Zafman [Wed, 14 May 2014 19:36:37 +0000 (12:36 -0700)]
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 087c0f9d31e0f3d5bae7eac6231978105a71677e)

10 years agocommon,ceph_filestore_dump: Add ability for utilities to suppress library dout output
David Zafman [Wed, 14 May 2014 19:42:21 +0000 (12:42 -0700)]
common,ceph_filestore_dump: Add ability for utilities to suppress library 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 f7f9b251fc377651d8da4cbfd1942c3b86f3247e)

10 years agoceph_filestore_dump: Export omap in batches for large omap case
David Zafman [Wed, 14 May 2014 01:27:30 +0000 (18:27 -0700)]
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 501dd3c05b8983159a289b021943cb828b908f53)

10 years agoceph_filestore_dump: Remove unused bufferlist databl
David Zafman [Mon, 12 May 2014 22:50:34 +0000 (15:50 -0700)]
ceph_filestore_dump: Remove unused bufferlist databl

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 398b418e2b9f8260bcfacac8bcebea5beffcceca)

10 years agoceph_filestore_dump.cc: cleanup includes
Danny Al-Gaaf [Wed, 7 May 2014 12:12:15 +0000 (14:12 +0200)]
ceph_filestore_dump.cc: cleanup includes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 8620609884243596d35b69c571d2da751e63cf2b)

10 years agoMerge pull request #3852 from dachary/wip-10965-rgw-firefly
Loic Dachary [Tue, 3 Mar 2015 14:58:53 +0000 (15:58 +0100)]
Merge pull request #3852 from dachary/wip-10965-rgw-firefly

rgw: enable ipv6 in civetweb

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #3853 from dachary/wip-10907-rgw-firefly
Loic Dachary [Tue, 3 Mar 2015 14:58:39 +0000 (15:58 +0100)]
Merge pull request #3853 from dachary/wip-10907-rgw-firefly

rgw: pass civetweb configurables to civetweb

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #3851 from dachary/wip-10978-rgw-firefly
Loic Dachary [Tue, 3 Mar 2015 14:58:25 +0000 (15:58 +0100)]
Merge pull request #3851 from dachary/wip-10978-rgw-firefly

rgw: don't overwrite bucket / object owner when setting acls

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agorgw: don't overwrite bucket / object owner when setting acls 3851/head
Yehuda Sadeh [Fri, 27 Feb 2015 23:32:50 +0000 (15:32 -0800)]
rgw: don't overwrite bucket / object owner when setting acls

Fixes: #10978
Backport: hammer, firefly

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit eb13f2d4b60c031f16139f7cc4237c012644dd78)

Conflicts:
src/rgw/rgw_op.cc : trivial s/.empty()/== NULL/

10 years agorgw: pass civetweb configurables to civetweb 3853/head
Yehuda Sadeh [Tue, 17 Feb 2015 23:05:40 +0000 (15:05 -0800)]
rgw: pass civetweb configurables to civetweb

Fixes: #10907
Backport: firefly

Pass any configurables in the rgw frontends config line to civetweb.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 986d7554426764a149621ba733c5c075b94e0431)

10 years agocivetweb: update submodule 3852/head
Yehuda Sadeh [Fri, 27 Feb 2015 16:14:27 +0000 (08:14 -0800)]
civetweb: update submodule

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit f28fe744285117a1715eac0d08911cdb37285103)

10 years agorgw: update makefile to enable civetweb config
Yehuda Sadeh [Fri, 27 Feb 2015 16:14:41 +0000 (08:14 -0800)]
rgw: update makefile to enable civetweb config

Fixes: #10965
Backport: hammer, firefly

Civetweb compilation now includes conf header to enable ipv6.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit caa90225bad9fe5e9c275e6189b3396b4d396e3f)

Conflicts:
src/rgw/Makefile.am
           radosgw_CFLAGS = -Icivetweb/include
        was not yet changed into
           radosgw_CFLAGS = -I$(srcdir)/civetweb/include
        in firefly

10 years agoMerge pull request #3820 from tchaikov/firefly-pg-leak-10421
Loic Dachary [Sat, 28 Feb 2015 15:47:55 +0000 (16:47 +0100)]
Merge pull request #3820 from tchaikov/firefly-pg-leak-10421

osd: fix PG leak in SnapTrimWQ._clear()

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #3772 from ceph/wip-10883-firefly
Loic Dachary [Sat, 28 Feb 2015 15:46:42 +0000 (16:46 +0100)]
Merge pull request #3772 from ceph/wip-10883-firefly

osd: Fix FileJournal wrap to get header out first

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #3521 from dzafman/wip-10676
Loic Dachary [Sat, 28 Feb 2015 15:45:48 +0000 (16:45 +0100)]
Merge pull request #3521 from dzafman/wip-10676

Backport doc fixes that appear to apply to firefly

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoosd: fix PG leak in SnapTrimWQ._clear() 3820/head
Kefu Chai [Tue, 10 Feb 2015 08:29:45 +0000 (16:29 +0800)]
osd: fix PG leak in SnapTrimWQ._clear()

Fixes: #10421
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 01e154d592d6cdbf3f859cf1b4357e803536a6b4)

10 years agoMerge pull request #3730 from ceph/wip-firefly-flock
Gregory Farnum [Thu, 26 Feb 2015 23:59:24 +0000 (15:59 -0800)]
Merge pull request #3730 from ceph/wip-firefly-flock

backport ceph-fuse file locking patches to Firefly

Reviewed-by: Yan, Zheng <zyan@redhat.com>