]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agorgw: simplify a code path 1138/head
Yehuda Sadeh [Fri, 24 Jan 2014 23:33:57 +0000 (15:33 -0800)]
rgw: simplify a code path

remove some duplicate code.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoradosgw-admin: add usage for user stats [--sync-stats]
Yehuda Sadeh [Fri, 24 Jan 2014 23:25:51 +0000 (15:25 -0800)]
radosgw-admin: add usage for user stats [--sync-stats]

add missing usage

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agocls_user: add generate_test_instances() implementation
Yehuda Sadeh [Fri, 24 Jan 2014 23:01:01 +0000 (15:01 -0800)]
cls_user: add generate_test_instances() implementation

to all the encoded/decoded stuff

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw, cls_user: handle error cases related to response decoding
Yehuda Sadeh [Fri, 24 Jan 2014 01:04:06 +0000 (17:04 -0800)]
rgw, cls_user: handle error cases related to response decoding

Certain operations weren't handling errors in decode, add some missing
logic.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: implement restful set user quota request
Yehuda Sadeh [Wed, 15 Jan 2014 22:35:57 +0000 (14:35 -0800)]
rgw: implement restful set user quota request

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: new restful api for retrieving user quota info
Yehuda Sadeh [Wed, 15 Jan 2014 19:36:47 +0000 (11:36 -0800)]
rgw: new restful api for retrieving user quota info

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: quota thread for full user stats sync
Yehuda Sadeh [Tue, 14 Jan 2014 22:48:16 +0000 (14:48 -0800)]
rgw: quota thread for full user stats sync

Get user stats up to date periodically. Add configurables for different
periods, whether we update idle users.
Make sure radosgw-admin does not start the quota threads.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: round bytes to the next 4k for quota use
Yehuda Sadeh [Tue, 14 Jan 2014 08:18:52 +0000 (00:18 -0800)]
rgw: round bytes to the next 4k for quota use

Be more consistent as we round it like this in the objclass, so we need
the accounting to match.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: sync bucket stats thread
Yehuda Sadeh [Tue, 14 Jan 2014 05:50:32 +0000 (21:50 -0800)]
rgw: sync bucket stats thread

a new thread that periodically sync stats of recently modified buckets.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw, cls_user: fix bucket creation
Yehuda Sadeh [Mon, 13 Jan 2014 22:19:27 +0000 (14:19 -0800)]
rgw, cls_user: fix bucket creation

There's a single op to create and update the user bucket info, however,
the cases differ a bit, as we only need to guard against ENOENT if we're
updating the info.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoradosgw-admin: dump header when requested for user stats
Yehuda Sadeh [Mon, 13 Jan 2014 21:21:27 +0000 (13:21 -0800)]
radosgw-admin: dump header when requested for user stats

header also contains sync timestamps, so we should dump it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoradosgw-admin: update stats sync completion
Yehuda Sadeh [Mon, 13 Jan 2014 21:20:08 +0000 (13:20 -0800)]
radosgw-admin: update stats sync completion

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agocls_user: op to keep track of sync completion time
Yehuda Sadeh [Mon, 13 Jan 2014 20:42:07 +0000 (12:42 -0800)]
cls_user: op to keep track of sync completion time

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agocls_user: keep time info about stats update
Yehuda Sadeh [Mon, 13 Jan 2014 20:31:26 +0000 (12:31 -0800)]
cls_user: keep time info about stats update

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agocls_user: header cleanup
Yehuda Sadeh [Mon, 13 Jan 2014 19:01:59 +0000 (11:01 -0800)]
cls_user: header cleanup

put stats under a new struct

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: user quota should rely on cached info
Yehuda Sadeh [Mon, 13 Jan 2014 18:23:30 +0000 (10:23 -0800)]
rgw: user quota should rely on cached info

user quota should rely on cached info if it says that we're at the
limit, since backend info might not be up to date.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: more quota fixes
Yehuda Sadeh [Sat, 11 Jan 2014 01:33:59 +0000 (17:33 -0800)]
rgw: more quota fixes

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: configure user quota also through region map
Yehuda Sadeh [Sat, 11 Jan 2014 01:32:35 +0000 (17:32 -0800)]
rgw: configure user quota also through region map

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: more rgw_quota fixes
Yehuda Sadeh [Sat, 11 Jan 2014 00:50:49 +0000 (16:50 -0800)]
rgw: more rgw_quota fixes

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: some quota fixes
Yehuda Sadeh [Sat, 11 Jan 2014 00:28:24 +0000 (16:28 -0800)]
rgw: some quota fixes

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: enable user quota
Yehuda Sadeh [Fri, 10 Jan 2014 23:38:37 +0000 (15:38 -0800)]
rgw: enable user quota

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoradosgw-admin: user quota interface
Yehuda Sadeh [Fri, 10 Jan 2014 23:11:08 +0000 (15:11 -0800)]
radosgw-admin: user quota interface

also add needed functionality in RGWUser

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: some fixes
Yehuda Sadeh [Fri, 10 Jan 2014 22:46:01 +0000 (14:46 -0800)]
rgw: some fixes

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: implement quota handlers for user stats
Yehuda Sadeh [Fri, 10 Jan 2014 22:35:31 +0000 (14:35 -0800)]
rgw: implement quota handlers for user stats

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: extend infrastructure to handle user stats read
Yehuda Sadeh [Fri, 10 Jan 2014 21:44:56 +0000 (13:44 -0800)]
rgw: extend infrastructure to handle user stats read

Some helper functions that return data in required format for quota, add
async functions.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: move some code around, no actual changes
Yehuda Sadeh [Fri, 10 Jan 2014 18:46:11 +0000 (10:46 -0800)]
rgw: move some code around, no actual changes

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: refactor quota cache
Yehuda Sadeh [Fri, 10 Jan 2014 18:42:13 +0000 (10:42 -0800)]
rgw: refactor quota cache

bucket quota cache is going to be reused, add a new abstract layer.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: rename RGWBucketStats to RGWStorageStats
Yehuda Sadeh [Fri, 10 Jan 2014 05:37:34 +0000 (21:37 -0800)]
rgw: rename RGWBucketStats to RGWStorageStats

make it more generic, will be reused for user's stats.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: pass bucket owner all around
Yehuda Sadeh [Thu, 9 Jan 2014 00:39:19 +0000 (16:39 -0800)]
rgw: pass bucket owner all around

User quota operations require that we know who the actual user we do the
operation on is. Pass that info when creating new object and when
removing objects.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoradosgw-admin: bucket stats --sync-stats [--bucket=...]
Yehuda Sadeh [Wed, 8 Jan 2014 22:15:15 +0000 (14:15 -0800)]
radosgw-admin: bucket stats --sync-stats [--bucket=...]

Sync user stats, either for a single buckets, or for all user's buckets.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agocls/user: some fixes + handle old buckets case
Yehuda Sadeh [Wed, 8 Jan 2014 22:13:27 +0000 (14:13 -0800)]
cls/user: some fixes + handle old buckets case

If a bucket was created prior to the new accounting, we can't substract
the old values, as the header stats didn't account for them.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw, radosgw-admin, cls/user: retrieve user stats
Yehuda Sadeh [Wed, 8 Jan 2014 01:29:39 +0000 (17:29 -0800)]
rgw, radosgw-admin, cls/user: retrieve user stats

add a new op to retrieve user header, new radosgw-admin command to stat
user.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agocls/user: a new op to retrieve user header
Yehuda Sadeh [Tue, 7 Jan 2014 22:42:03 +0000 (14:42 -0800)]
cls/user: a new op to retrieve user header

user header holds user total stats

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agocls/user: accounting functionality
Yehuda Sadeh [Tue, 10 Dec 2013 00:09:41 +0000 (16:09 -0800)]
cls/user: accounting functionality

Keep user total accounting in omap header, handle add/dec functionality.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: move bucket add / remove to new user objclass
Yehuda Sadeh [Sat, 7 Dec 2013 00:23:33 +0000 (16:23 -0800)]
rgw: move bucket add / remove to new user objclass

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: replace user bucket listing with objclass call
Yehuda Sadeh [Fri, 6 Dec 2013 23:22:37 +0000 (15:22 -0800)]
rgw: replace user bucket listing with objclass call

instead of directly accessing the omap operation

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: new user objclass
Yehuda Sadeh [Fri, 6 Dec 2013 15:32:08 +0000 (07:32 -0800)]
rgw: new user objclass

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #893 from jdurgin/wip-init-highlander
Sage Weil [Wed, 4 Dec 2013 00:39:38 +0000 (16:39 -0800)]
Merge pull request #893 from jdurgin/wip-init-highlander

init, upstart: prevent daemons being started by both

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoinit, upstart: prevent daemons being started by both 893/head
Josh Durgin [Mon, 25 Nov 2013 21:43:43 +0000 (13:43 -0800)]
init, upstart: prevent daemons being started by both

There can be only one init system starting a daemon. If there is a
host entry in ceph.conf for a daemon, sysvinit would try to start it
even if the daemon's directory did not include a sysvinit file. This
preserves backwards compatibility with older installs using sysvinit,
but if an upstart file is present in the daemon's directory, upstart
will try to start them, regardless of host entries in ceph.conf.

If there's an upstart file in a daemon's directory and a host entry
for that daemon in ceph.conf, both sysvinit and upstart would attempt
to manage it.

Fix this by only starting daemons if the marker file for the other
init system is not present. This maintains backwards compatibility
with older installs using neither sysvinit or upstart marker files,
and does not break any valid configurations. The only configuration
that would break is one with both sysvinit and upstart files present
for the same daemon.

Backport: emperor, dumpling
Reported-by: Tim Spriggs <tims@uahirise.org>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #877 from ceph/wip-6892
Sage Weil [Tue, 3 Dec 2013 05:55:28 +0000 (21:55 -0800)]
Merge pull request #877 from ceph/wip-6892

rgw: don't error out on empty owner when setting acls

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoworkunits: use integers instead of true/false for hashpspool command
Greg Farnum [Fri, 22 Nov 2013 23:24:07 +0000 (15:24 -0800)]
workunits: use integers instead of true/false for hashpspool command

Backport: emperor

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com
11 years agoPartial revert "mon: osd pool set syntax relaxed, modify unit tests"
Sage Weil [Mon, 2 Dec 2013 06:21:31 +0000 (22:21 -0800)]
Partial revert "mon: osd pool set syntax relaxed, modify unit tests"

This reverts commit 08327fed8213a5d24cd642e12b38a171b98924cb, except
for the hashpspool bit.  We switched back to an integer argument in
commit 337195f04653eed8e8f153a5b074f3bd48408998.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agorgw: don't error out on empty owner when setting acls 877/head
Yehuda Sadeh [Wed, 27 Nov 2013 21:34:00 +0000 (13:34 -0800)]
rgw: don't error out on empty owner when setting acls

Fixes: #6892
Backport: dumpling, emperor
s3cmd specifies empty owner field when trying to set acls on object
/ bucket. We errored out as it didn't match the current owner name, but
with this change we ignore it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #859 from ceph/wip-pr781
Sage Weil [Tue, 26 Nov 2013 23:09:18 +0000 (15:09 -0800)]
Merge pull request #859 from ceph/wip-pr781

  fix the bug  ctypes.util.find_library to search for librados failed on...

11 years agoMerge pull request #862 from ceph/wip-6829
Josh Durgin [Tue, 26 Nov 2013 17:06:15 +0000 (09:06 -0800)]
Merge pull request #862 from ceph/wip-6829

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #871 from dmick/wip-6894
Josh Durgin [Tue, 26 Nov 2013 17:02:26 +0000 (09:02 -0800)]
Merge pull request #871 from dmick/wip-6894

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agomon: osd dump should dump pool snaps as array, not object 871/head
Dan Mick [Tue, 26 Nov 2013 05:58:39 +0000 (21:58 -0800)]
mon: osd dump should dump pool snaps as array, not object

Fixes: #6894
Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agoMerge pull request #835 from ceph/wip-6705
Josh Durgin [Tue, 26 Nov 2013 02:03:02 +0000 (18:03 -0800)]
Merge pull request #835 from ceph/wip-6705

qa: workunits: mon: ping.py: test 'ceph ping'

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #863 from ceph/wip-6804
Sage Weil [Mon, 25 Nov 2013 15:53:03 +0000 (07:53 -0800)]
Merge pull request #863 from ceph/wip-6804

rgw: lower some debug message

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agorgw: lower some debug message 863/head
Yehuda Sadeh [Fri, 22 Nov 2013 15:04:01 +0000 (07:04 -0800)]
rgw: lower some debug message

Fixes: #6084
Backport: dumpling, emperor

Reported-by: Ron Allred <rallred@itrefined.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: initialize RGWUserAdminOpState::system_specified 862/head
Yehuda Sadeh [Thu, 21 Nov 2013 14:52:48 +0000 (06:52 -0800)]
rgw: initialize RGWUserAdminOpState::system_specified

Fixes: #6829
Backport: dumpling, emperor
We didn't init this member variable, which might cause that when
modifying user info that has this flag set the 'system' flag might
inadvertently reset.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #857 from ceph/wip-6796
Gregory Farnum [Fri, 22 Nov 2013 02:56:49 +0000 (18:56 -0800)]
Merge pull request #857 from ceph/wip-6796

mon: OSDMonitor: receive CephInt on 'osd pool set' instead on CephString

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoPendingReleaseNotes: mention 6796 and 'ceph osd pool set' behavior change 857/head
Joao Eduardo Luis [Fri, 22 Nov 2013 02:37:54 +0000 (02:37 +0000)]
PendingReleaseNotes: mention 6796 and 'ceph osd pool set' behavior change

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agodoc: rados: operations: pools: document 'osd pool set foo hashpspool'
Joao Eduardo Luis [Fri, 22 Nov 2013 02:35:10 +0000 (02:35 +0000)]
doc: rados: operations: pools: document 'osd pool set foo hashpspool'

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: OSDMonitor: don't crash if formatter is invalid during osd crush dump
Joao Eduardo Luis [Fri, 22 Nov 2013 02:17:16 +0000 (02:17 +0000)]
mon: OSDMonitor: don't crash if formatter is invalid during osd crush dump

Code would assume a formatter would always be defined. If a 'plain'
formatter or even an invalid formatter were to be supplied, the monitor
would crash and burn in poor style.

Fixes: 6820
Backport: emperor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: OSDMonitor: receive CephInt on 'osd pool set' instead on CephString
Joao Eduardo Luis [Fri, 22 Nov 2013 02:10:35 +0000 (02:10 +0000)]
mon: OSDMonitor: receive CephInt on 'osd pool set' instead on CephString

This partially reverts 2fe0d0d9 in order to allow Emperor monitors to
forward mon command messages to Dumpling monitors without breaking a
cluster.

The need for this patch became obvious after issue #6796 was triggered.
Basically, in a mixed cluster of Emperor/Dumpling monitors, if a client
happens to obtain the command descriptions from an Emperor monitor and
then issue an 'osd pool set' this can turn out in one of two ways:

1. client msg gets forwarded to an Emperor leader and everything's a-okay;
2. client msg gets forwarded to a Dumpling leader and the string fails to
be interpreted without the monitor noticing, thus leaving the monitor with
an uninitialized variable leading to trouble.

If 2 is triggered, a multitude of bad things can happen, such as thousands
of pg splits, due to a simple 'osd set pool foo pg_num 128' turning out
to be interpreted as 109120394 or some other random number.

This patch is such that we make sure the client sends an integer instead
of a string. We also make sure to interpret anything the client sends as
possibly being a string, or an integer.

Fixes: 6796
Backport: emperor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: OSDMonitor: drop cmdval_get() for unused variable
Joao Eduardo Luis [Tue, 19 Nov 2013 23:21:11 +0000 (23:21 +0000)]
mon: OSDMonitor: drop cmdval_get() for unused variable

We don't ever use any value as a float, so just drop obtaining it.  This
makes it easier to partially revert 2fe0d0d9 in an upcoming patch.

Backport: emperor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agoqa: workunits: mon: ping.py: test 'ceph ping' 835/head
Joao Eduardo Luis [Fri, 22 Nov 2013 01:43:06 +0000 (01:43 +0000)]
qa: workunits: mon: ping.py: test 'ceph ping'

Basic testing by forcing each monitor out of quorum at a time and making
sure they still reply to ping requests.

Fixes: #6705
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agotest: use older names for module setup/teardown
Josh Durgin [Thu, 21 Nov 2013 02:35:34 +0000 (18:35 -0800)]
test: use older names for module setup/teardown

setUp and tearDown require nosetests 0.11, but 0.10.4 is the latest on
centos. Rename to use the older aliases, which still work with newer
versions of nosetests as well.

Fixes: #6368
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
11 years agoMerge pull request #854 from ceph/wip-osd-bench-size
Dan Mick [Tue, 19 Nov 2013 23:41:11 +0000 (15:41 -0800)]
Merge pull request #854 from ceph/wip-osd-bench-size

osd: fix bench block size

Reviewed-by: Dan Mick <dan.mick@inktank.com>
11 years agoosd: fix bench block size 854/head
Josh Durgin [Mon, 18 Nov 2013 22:39:12 +0000 (14:39 -0800)]
osd: fix bench block size

The command was declared to take 'size' in dumpling, but was trying to
read 'bsize' instead, so it always used the default of 4MiB. Change
the bench command to read 'size', so it matches what existing clients
are sending.

Fixes: #6795
Backport: emperor, dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoRevert "JounralingObjectStore: journal->committed_thru after replay"
Samuel Just [Mon, 18 Nov 2013 20:57:39 +0000 (12:57 -0800)]
Revert "JounralingObjectStore: journal->committed_thru after replay"

committed_thru can race with the sync thread.

This reverts commit d8d27f13e11dcaefd3aa1c049b97c980283da575.
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoceph-filestore-tool: add tool for fixing lost objects
Samuel Just [Wed, 13 Nov 2013 22:39:26 +0000 (14:39 -0800)]
ceph-filestore-tool: add tool for fixing lost objects

Used to repair: #6761
Backport: emperor
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoosd_types: fix object_info_t backwards compatibility
Samuel Just [Wed, 13 Nov 2013 21:24:10 +0000 (13:24 -0800)]
osd_types: fix object_info_t backwards compatibility

Shipping an object_info_t to a replica with the dirty
flag set would cause the replica to interpret that
object as being lost.  Instead, we always encode
lost into the slot where dumpling expects to find
it and add another field at the end of the encoding.

Backport: emperor
Fixes: #6761
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoCephContext: unregister lockdep after stopping service thread
Samuel Just [Thu, 14 Nov 2013 19:49:58 +0000 (11:49 -0800)]
CephContext: unregister lockdep after stopping service thread

Fixes: #6769
Fixes: #6674
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoReplicatedPG: test for missing head before find_object_context
Samuel Just [Tue, 12 Nov 2013 23:15:26 +0000 (15:15 -0800)]
ReplicatedPG: test for missing head before find_object_context

find_object_context doesn't return EAGAIN for a missing head.
I chose not to change that behavior since it might hide bugs
in the future.  All other callers check for missing on head
before calling into find_object_context because we potentially
need head or snapdir to map a snapid onto a clone.

Backport: emperor
Fixes: 6758
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agoJounralingObjectStore: journal->committed_thru after replay
Samuel Just [Tue, 12 Nov 2013 21:39:04 +0000 (13:39 -0800)]
JounralingObjectStore: journal->committed_thru after replay

It's possible that the osd stopped between when the filestore
op_seq file was updated and when the journal was trimmed.  In
that case, it's possible that on boot the journal might be
full, and yet not be trimmed because commit_start assumes
there is no work to do.  Calling committed_thru on the journal
ensures that the journal matches committed_seq.

Backport: emperor dumpling
Fixes: 6756
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agoMerge branch 'next'
Gary Lowell [Fri, 8 Nov 2013 05:19:11 +0000 (05:19 +0000)]
Merge branch 'next'

11 years agomon: Monitor: make 'quorum enter/exit' available through the admin socket
Joao Eduardo Luis [Fri, 8 Nov 2013 00:26:42 +0000 (00:26 +0000)]
mon: Monitor: make 'quorum enter/exit' available through the admin socket

If we don't have at least 'quorum enter' available through the admin
socket, then we can never tell a monitor to go back into quorum after
exiting, since it will not handle the command that forces it back in due
to not being in the quorum.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agov0.72 v0.72
Gary Lowell [Thu, 7 Nov 2013 20:27:35 +0000 (20:27 +0000)]
v0.72

11 years agorgw: deny writes to a secondary zone by non-system users
Yehuda Sadeh [Tue, 5 Nov 2013 22:54:20 +0000 (14:54 -0800)]
rgw: deny writes to a secondary zone by non-system users

Fixes: #6678
We don't want to allow regular users to write to secondary zones,
otherwise we'd end up with data inconsistencies.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #830 from ceph/port/gtest-death-tests
Sage Weil [Thu, 7 Nov 2013 13:47:33 +0000 (05:47 -0800)]
Merge pull request #830 from ceph/port/gtest-death-tests

test: Only build death tests on platforms that support them

11 years agodoc/release-notes: note crush update timeout on startup change
Sage Weil [Thu, 7 Nov 2013 04:02:09 +0000 (20:02 -0800)]
doc/release-notes: note crush update timeout on startup change

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosdmaptool: fix cli tests
Sage Weil [Thu, 7 Nov 2013 03:59:56 +0000 (19:59 -0800)]
osdmaptool: fix cli tests

From c22c84a88c22688b6044ab37f65a3fe40dfe1983.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoCeph: Fix memory leak in chain_flistxattr()
Li Wang [Thu, 7 Nov 2013 02:44:30 +0000 (10:44 +0800)]
Ceph: Fix memory leak in chain_flistxattr()

Free allocated memory before return.

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoReplicatedPG: don't skip missing if sentries is empty on pgls
Samuel Just [Wed, 6 Nov 2013 22:33:03 +0000 (14:33 -0800)]
ReplicatedPG: don't skip missing if sentries is empty on pgls

Formerly, if sentries is empty, we skip missing.  In general,
we need to continue adding items from missing until we get
to next (returned from collection_list_partial) to avoid
missing any objects.

Fixes: #6633
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agoMerge pull request #827 from ceph/port/bootstrap
Sage Weil [Thu, 7 Nov 2013 01:32:11 +0000 (17:32 -0800)]
Merge pull request #827 from ceph/port/bootstrap

Port/bootstrap

11 years agoMerge pull request #831 from ceph/port/func-name
Sage Weil [Thu, 7 Nov 2013 01:31:28 +0000 (17:31 -0800)]
Merge pull request #831 from ceph/port/func-name

assert: choose function-var name on non-gnu

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #819 from xinglin/coverity-fixes
Sage Weil [Thu, 7 Nov 2013 01:14:40 +0000 (17:14 -0800)]
Merge pull request #819 from xinglin/coverity-fixes

Coverity fixes

Reviewed-by; Sage Weil <sage@inktank.com>

11 years agoassert: choose function-var name on non-gnu 831/head
Noah Watkins [Sun, 21 Jul 2013 01:41:38 +0000 (18:41 -0700)]
assert: choose function-var name on non-gnu

Selects __PRETTY_FUNCTION__ or __func__. Linux assumes GNU, and chooses
__PRETTY_FUNCTION__ if gcc/g++ versions are favorable.

This also includes a fix in ax_c_var_func.m4:

AC_TRY_COMPILE will wrap the test in main{}, and then GCC will complain
about nested functions. Just use the original main{} body.

diff --git a/m4/ax_c_var_func.m4 b/m4/ax_c_var_func.m4
index 0ad7d2b..8b57563 100644
--- a/m4/ax_c_var_func.m4
+++ b/m4/ax_c_var_func.m4
@@ -57,9 +57,9 @@ AC_DEFUN([AX_C_VAR_FUNC],
 [AC_REQUIRE([AC_PROG_CC])
 AC_CACHE_CHECK(whether $CC recognizes __func__, ac_cv_c_var_func,
 AC_TRY_COMPILE(,
-[int main() {
+[
 char *s = __func__;
-}],
+],
 AC_DEFINE(HAVE_FUNC,,
 [Define if the C complier supports __func__]) ac_cv_c_var_func=yes,
 ac_cv_c_var_func=no) )

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agotest: Only build death tests on platforms that support them 830/head
Alan Somers [Fri, 11 Oct 2013 20:45:47 +0000 (13:45 -0700)]
test: Only build death tests on platforms that support them

googletest does not support death tests on FreeBSD.  I've submitted a
patch upstream that trivially enables support, but in the meantime we
can't compile death tests for Ceph on FreeBSD.

https://groups.google.com/forum/#!topic/googletestframework/tjY6UjWgNOw

Signed-off-by: Alan Somers <asomers@gmail.com>
11 years agoPG: fix operator<<,log_wierdness log bound warning
Samuel Just [Wed, 6 Nov 2013 05:48:53 +0000 (21:48 -0800)]
PG: fix operator<<,log_wierdness log bound warning

Split may cause holes such that head != tail and yet
log.empty().

Fixes: #6722
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agoPGLog::rewind_divergent_log: log may not contain newhead
Samuel Just [Wed, 6 Nov 2013 01:47:48 +0000 (17:47 -0800)]
PGLog::rewind_divergent_log: log may not contain newhead

Due to split, there may be a hole at newhead.

Fixes: #6722
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agoosd/ErasureCodePlugin: close library before return on error 819/head
Xing Lin [Tue, 5 Nov 2013 05:25:42 +0000 (22:25 -0700)]
osd/ErasureCodePlugin: close library before return on error

close and free resources for library before return

Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
11 years agoosd/erasurecode: free allocated memory before return NULL
Xing Lin [Tue, 5 Nov 2013 05:03:08 +0000 (22:03 -0700)]
osd/erasurecode: free allocated memory before return NULL

free memory space pointed by row_ids and ind_to_row before return

Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
11 years agomon/MDSMonitor: remove unnecessary assignment
Xing Lin [Sun, 3 Nov 2013 17:35:33 +0000 (10:35 -0700)]
mon/MDSMonitor: remove unnecessary assignment

epocharg is not initialized, so it does not make any difference
to assign its value to epoch.

Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
11 years agoosd/erasurecode: correct one variable name in jerasure_matrix_to_bitmatrix()
Xing Lin [Sun, 3 Nov 2013 01:13:42 +0000 (19:13 -0600)]
osd/erasurecode: correct one variable name in jerasure_matrix_to_bitmatrix()

When bitmatrix is NULL, this function returns NULL.

Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
11 years agoMerge remote-tracking branch 'gh/wip-doc-radosgw'
Sage Weil [Wed, 6 Nov 2013 16:06:11 +0000 (08:06 -0800)]
Merge remote-tracking branch 'gh/wip-doc-radosgw'

11 years agoRevert "doc: radosgw workaround for OpenStack Horizon bug"
Sage Weil [Wed, 6 Nov 2013 16:06:09 +0000 (08:06 -0800)]
Revert "doc: radosgw workaround for OpenStack Horizon bug"

This reverts commit c3c962eb7d2fb5ceea829924af08f8a1471f7acf.

11 years agoMerge pull request #799 from ceph/wip-doc-install
Sage Weil [Wed, 6 Nov 2013 15:57:23 +0000 (07:57 -0800)]
Merge pull request #799 from ceph/wip-doc-install

Wip doc install

Reviewed-by: Neil Levine <neil.levine@inktank.com>
11 years agoMerge pull request #821 from ceph/port/missing-headers
Sage Weil [Wed, 6 Nov 2013 15:51:02 +0000 (07:51 -0800)]
Merge pull request #821 from ceph/port/missing-headers

add missing headers

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #822 from ceph/port/rgw
Sage Weil [Wed, 6 Nov 2013 15:50:20 +0000 (07:50 -0800)]
Merge pull request #822 from ceph/port/rgw

portability patches in rgw

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #824 from dmick/next
Sage Weil [Wed, 6 Nov 2013 15:46:02 +0000 (07:46 -0800)]
Merge pull request #824 from dmick/next

osdmaptool: don't put progress on stdout

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #825 from ceph/port/utime
Sage Weil [Wed, 6 Nov 2013 15:45:17 +0000 (07:45 -0800)]
Merge pull request #825 from ceph/port/utime

utime: use to_timespec for conversion

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoRadosModel: use sharedptr_registry for snaps_in_use
Samuel Just [Tue, 5 Nov 2013 23:40:29 +0000 (15:40 -0800)]
RadosModel: use sharedptr_registry for snaps_in_use

There might be two concurrent rollback ops each of which
adds snap x to snaps_in_use.  Between when the first
completes and the second completes, snap x may be removed
since the first would have removed snap x from snaps_in_use.
Using sharedptr_registry here avoids this by ensuring that
the snap won't be removed from snaps_in_use until all refs
are gone.

This patch also adds size() to sharedptr_registry.

Fixes: #6719
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agoosdmaptool: don't put progress on stdout 824/head
Dan Mick [Wed, 6 Nov 2013 00:11:10 +0000 (16:11 -0800)]
osdmaptool: don't put progress on stdout

If one requests JSON output, the progress message pollutes the output;
don't do that, send it to stderr instead

Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agorgw: add compat file for name service macros 822/head
Noah Watkins [Sun, 4 Aug 2013 19:09:19 +0000 (12:09 -0700)]
rgw: add compat file for name service macros

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agorgw: avoid sighandler_t in favor of sig_t
Noah Watkins [Sun, 4 Aug 2013 19:11:01 +0000 (12:11 -0700)]
rgw: avoid sighandler_t in favor of sig_t

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agocrush: add mising header for count 821/head
Noah Watkins [Tue, 29 Oct 2013 18:50:24 +0000 (11:50 -0700)]
crush: add mising header for count

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoauth: add missing header for list
Noah Watkins [Tue, 29 Oct 2013 18:50:10 +0000 (11:50 -0700)]
auth: add missing header for list

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>