]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agoinit-radosgw: run RGW as root 4638/head
Ken Dreyer [Wed, 22 Apr 2015 22:36:42 +0000 (16:36 -0600)]
init-radosgw: run RGW as root

The ceph-radosgw service fails to start if the httpd package is not
installed. This is because the init.d file attempts to start the RGW
process with the "apache" UID. If a user is running civetweb, there is
no reason for the httpd or apache2 package to be present on the system.

Switch the init scripts to use "root" as is done on Ubuntu.

http://tracker.ceph.com/issues/11453 Refs: #11453

Reported-by: Vickey Singh <vickey.singh22693@gmail.com>
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
(cherry picked from commit 47339c5ac352d305e68a58f3d744c3ce0fd3a2ac)

10 years agoworkunits: remove defunct cephfs set_layout test
Greg Farnum [Fri, 8 May 2015 18:29:44 +0000 (11:29 -0700)]
workunits: remove defunct cephfs set_layout test

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #4571 from ceph/wip-11256-firefly
Yehuda Sadeh [Wed, 6 May 2015 20:07:11 +0000 (13:07 -0700)]
Merge pull request #4571 from ceph/wip-11256-firefly

Wip 11256 firefly

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agojava: libcephfs_jni.so is in /usr/lib64 on rhel
Noah Watkins [Sat, 28 Mar 2015 02:34:12 +0000 (19:34 -0700)]
java: libcephfs_jni.so is in /usr/lib64 on rhel

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
(cherry picked from commit aed3434dc7c5161c72c7d5655faa3bc693fc9777)

10 years agoqa/workunits/fs/misc: fix filelock_interrupt.py
Yan, Zheng [Mon, 2 Mar 2015 13:04:25 +0000 (21:04 +0800)]
qa/workunits/fs/misc: fix filelock_interrupt.py

Handle the case that kernel does not support fcntl.F_OFD_SETLK.
Also fix the code that checks if fnctl fails with errno == EINTR.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit 4ececa3dc4a21b98f61a592da9e2be60a0d71625)
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #4385 from xinxinsh/wip-11199-firefly
Loic Dachary [Wed, 29 Apr 2015 22:32:21 +0000 (00:32 +0200)]
Merge pull request #4385 from xinxinsh/wip-11199-firefly

osd: ENOENT on clone

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #4384 from xinxinsh/wip-11197-firefly
Loic Dachary [Wed, 29 Apr 2015 22:31:48 +0000 (00:31 +0200)]
Merge pull request #4384 from xinxinsh/wip-11197-firefly

pg stuck stale after create with activation delay

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #4382 from xinxinsh/wip-10718-firefly
Loic Dachary [Wed, 29 Apr 2015 22:31:32 +0000 (00:31 +0200)]
Merge pull request #4382 from xinxinsh/wip-10718-firefly

osd/PGLog.h: 279: FAILED assert(log.log.size() == log_keys_debug.size())

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #4185 from ldachary/wip-11156-firefly
Loic Dachary [Wed, 29 Apr 2015 22:23:04 +0000 (00:23 +0200)]
Merge pull request #4185 from ldachary/wip-11156-firefly

FAILED assert(soid < scrubber.start || soid >= scrubber.end)

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #4475 from ceph/wip-9538.firefly
Sage Weil [Tue, 28 Apr 2015 15:11:18 +0000 (08:11 -0700)]
Merge pull request #4475 from ceph/wip-9538.firefly

mon: OSDMonitor: fallback to json-pretty in case of invalid formatter

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agomon: osd find / metadata --format plain fallback 4475/head
Loic Dachary [Fri, 19 Sep 2014 13:28:36 +0000 (15:28 +0200)]
mon: osd find / metadata --format plain fallback

ceph --format plain osd find 1 (and metadata) are not implemented and
must fallback to the default (json-pretty).

http://tracker.ceph.com/issues/9538 Fixes: #9538

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 13780d755115387591888f94ea6c58ac0db3ecc4)

10 years agoMerge pull request #4453 from ceph/wip-11454
David Zafman [Mon, 27 Apr 2015 17:30:49 +0000 (10:30 -0700)]
Merge pull request #4453 from ceph/wip-11454

PG::actingset should be used when checking the number of acting OSDs for...

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4245 from ceph/wip-11113-firefly
Loic Dachary [Mon, 27 Apr 2015 08:14:00 +0000 (10:14 +0200)]
Merge pull request #4245 from ceph/wip-11113-firefly

librbd: snap_remove should ignore -ENOENT errors

Reviewed-by: Shu, Xinxin <xinxin.shu@intel.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #4206 from ceph/wip-5488-firefly
Loic Dachary [Mon, 27 Apr 2015 08:12:40 +0000 (10:12 +0200)]
Merge pull request #4206 from ceph/wip-5488-firefly

librbd: acquire cache_lock before refreshing parent

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agoMerge pull request #3963 from dachary/wip-10153-firefly
Loic Dachary [Mon, 27 Apr 2015 08:09:23 +0000 (10:09 +0200)]
Merge pull request #3963 from dachary/wip-10153-firefly

Rados.shutdown() dies with Illegal instruction (core dumped)

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #4383 from xinxinsh/wip-11144-firefly
Loic Dachary [Mon, 27 Apr 2015 08:08:15 +0000 (10:08 +0200)]
Merge pull request #4383 from xinxinsh/wip-11144-firefly

erasure-code-profile set races with erasure-code-profile rm

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoPG::actingset should be used when checking the number of acting OSDs for a given PG. 4453/head
Guang Yang [Mon, 29 Sep 2014 08:21:10 +0000 (08:21 +0000)]
PG::actingset should be used when checking the number of acting OSDs for a given PG.
Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
(cherry picked from commit 19be358322be48fafa17b28054619a8b5e7d403b)

Conflicts:
src/osd/PG.cc PG::get_backfill_priority() doesn't exist in firefly
Variation in code related to no "undersized" state in firefly

Fixes: #11454
10 years agoosd: erasure-code-profile incremental rm before set 4296/head 4383/head
Loic Dachary [Wed, 18 Mar 2015 13:17:00 +0000 (14:17 +0100)]
osd: erasure-code-profile incremental rm before set

It is possible for an incremental change to have both a rm and a set for
a given erasure code profile. It only happens when a rm is followed by a
set. When a set is followed by a rm, the rm will remove the pending set
in the incremental change.

The logic is the same for pool create and pool delete.

We must apply the incremental erasure-code-profile removal before the
creation otherwise rm and set in the same proposal will ignore the set.

This fix is minimal. A better change would be that erasure-code-profile
set checks if there is a pending removal and wait_for_finished_proposal
before creating.

http://tracker.ceph.com/issues/11144 Fixes: #11144

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

Conflicts:
src/osd/OSDMap.cc
        resolved by replacing i++ with ++i

10 years agoReplicatedPG: trim backfill intervals based on peer's last_backfill_started 4298/head 4385/head
Samuel Just [Tue, 24 Mar 2015 22:14:34 +0000 (15:14 -0700)]
ReplicatedPG: trim backfill intervals based on peer's last_backfill_started

Otherwise, we fail to trim the peer's last_backfill_started and get bug 11199.

1) osd 4 backfills up to 31bccdb2/mira01213209-286/head (henceforth: foo)

2) Interval change happens

3) osd 0 now finds itself backfilling to 4 (lb=foo) and osd.5
(lb=b6670ba2/mira01213209-160/snapdir//1, henceforth: bar)

4) recover_backfill causes both 4 and 5 to scan forward, so 4 has an interval
starting at foo, 5 has an interval starting at bar.

5) Once those have come back, recover_backfill attempts to trim off the
last_backfill_started, but 4's interval starts after that, so foo remains in
osd 4's interval (this is the bug)

7) We serve a copyfrom on foo (sent to 4 as well).

8) We eventually get to foo in the backfilling. Normally, they would have the
same version, but of course we don't update osd.4's interval from the log since
it should not have received writes in that interval. Thus, we end up trying to
recover foo on osd.4 anyway.

9) But, an interval change happens between removing foo from osd.4 and
completing the recovery, leaving osd.4 without foo, but with lb >= foo

Fixes: #11199
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 1388d6bd949a18e8ac0aecb0eb79ffb93d316879)

10 years agoPG: set/clear CREATING in Primary state entry/exit 4297/head 4384/head
Samuel Just [Tue, 24 Mar 2015 17:48:02 +0000 (10:48 -0700)]
PG: set/clear CREATING in Primary state entry/exit

Previously, we did not actually set it when we got a pg creation message from
the mon.  It would actually get set on the first start_peering_interval after
that point.  If we don't get that far, but do send a stat update to the mon, we
can end up with 11197.  Instead, let's just set it and clear it upon entry into
and exit from the Primary state.

Fixes: 11197
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit ddf0292250dfb1040d3cad96fa2cf886fd65933c)

10 years agoMerge pull request #4275 from jeanchlopez/wip-11160-firefly
Yehuda Sadeh [Mon, 6 Apr 2015 17:24:06 +0000 (10:24 -0700)]
Merge pull request #4275 from jeanchlopez/wip-11160-firefly

rgw: shouldn't need to disable rgw_socket_path if frontend is configured

10 years agorgw: don't use rgw_socket_path if frontend is configured 4275/head
Yehuda Sadeh [Thu, 19 Mar 2015 03:49:13 +0000 (20:49 -0700)]
rgw: don't use rgw_socket_path if frontend is configured

Fixes: #11160
Backport: hammer, firefly

Previously if we wanted to use the tcp fcgi socket, we needed to clear
rgw_socket_path.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #4247 from ceph/wip-11303
Josh Durgin [Wed, 1 Apr 2015 23:30:23 +0000 (16:30 -0700)]
Merge pull request #4247 from ceph/wip-11303

Fix do_autogen.sh so that -L is allowed

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agoFix do_autogen.sh so that -L is allowed 4247/head
Alfredo Deza [Wed, 1 Apr 2015 23:10:33 +0000 (19:10 -0400)]
Fix do_autogen.sh so that -L is allowed

Signed-off-by: Alfredo Deza <adeza@redhat.com>
10 years agolibrbd: snap_remove should ignore -ENOENT errors 4245/head
Jason Dillaman [Mon, 16 Mar 2015 22:40:49 +0000 (18:40 -0400)]
librbd: snap_remove should ignore -ENOENT errors

If the attempt to deregister the snapshot from the parent
image fails with -ENOENT, ignore the error as it is safe
to assume that the child is not associated with the parent.

Fixes: #11113
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit cf8094942ccdba831e03e5a79451cfa5d78a135f)

10 years agolibrbd: get_parent_info should protect against invalid parent
Jason Dillaman [Mon, 16 Mar 2015 22:35:07 +0000 (18:35 -0400)]
librbd: get_parent_info should protect against invalid parent

get_parent_info should return -ENOENT if the image does not
have an associated parent image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 21afd0ef8e1fb81c5ace5fd403513c542e2413e3)

10 years agoPGLog: improve PGLog::check() debugging 4243/head 4382/head
Samuel Just [Mon, 2 Feb 2015 17:07:27 +0000 (09:07 -0800)]
PGLog: improve PGLog::check() debugging

Related: 10718
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit c656bcec2441c90b084ca50a17c37625d69942a1)

10 years agoPGLog::merge_log: in tail extend case, log.log might be empty
Samuel Just [Tue, 17 Mar 2015 17:07:03 +0000 (10:07 -0700)]
PGLog::merge_log: in tail extend case, log.log might be empty

Even if the tail != last_update, the log might be empty due to split
moving all entries into other logs.

Fixes: 10718
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit f5a2aef3db29b99634250fd388a0c2d9b9a23d38)

10 years agocls_rgw: use multimap to keep pending operations in bucket index 4571/head
Yehuda Sadeh [Tue, 31 Mar 2015 00:34:57 +0000 (17:34 -0700)]
cls_rgw: use multimap to keep pending operations in bucket index

Fixes: #11256
Multiple concurrent requests might be sent using the same tag, need the
entry map to be able to hold multiple entries.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: generate new tag for object when setting object attrs
Yehuda Sadeh [Fri, 27 Mar 2015 23:32:48 +0000 (16:32 -0700)]
rgw: generate new tag for object when setting object attrs

Fixes: #11256
Backport: firefly, hammer

Beforehand we were reusing the object's tag, which is problematic as
this tag is used for bucket index updates, and we might be clobbering a
racing update (like object removal).

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agolibrbd: acquire cache_lock before refreshing parent 4206/head
Jason Dillaman [Mon, 16 Mar 2015 15:04:22 +0000 (11:04 -0400)]
librbd: acquire cache_lock before refreshing parent

cache_lock needs to be acquired before snap_lock to avoid
the potential for deadlock.

Fixes: #5488
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agoReplicatedPG::promote_object: check scrubber and block if necessary 4185/head
Samuel Just [Fri, 20 Mar 2015 22:28:15 +0000 (15:28 -0700)]
ReplicatedPG::promote_object: check scrubber and block if necessary

Otherwise, we might attempt to promote into an in-progress scrub
interval causing 11156.  I would have added a return value to
promote_object(), but could not find an existing user which
cared to distinguish the cases, even with a null op passed.
All existing users are in maybe_handle_cache.  The ones which
pass a null op are for promoting the object in parallel
with a proxy -- a case where not actually performing the promote
does not really matter.

Fixes: #11156
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 65bb4df599541cd2e0f195b905f24f529e255c00)

10 years agoMerge pull request #4126 from dzafman/wip-11176-firefly
Loic Dachary [Mon, 23 Mar 2015 19:38:43 +0000 (20:38 +0100)]
Merge pull request #4126 from dzafman/wip-11176-firefly

ceph-objectstore-tool: Output only unsupported features when incomatible

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #4079 from dachary/wip-11157-firefly
Loic Dachary [Sat, 21 Mar 2015 10:38:28 +0000 (11:38 +0100)]
Merge pull request #4079 from dachary/wip-11157-firefly

doc,tests: force checkout of submodules

Reviewed-by: David Zafman <dzafman@redhat.com>
10 years agoMerge pull request #4129 from dzafman/wip-11139-firefly
Yuri Weinstein [Sat, 21 Mar 2015 04:06:17 +0000 (21:06 -0700)]
Merge pull request #4129 from dzafman/wip-11139-firefly

ceph-objectstore-tool: Use exit status 11 for incompatible import attemp...

10 years agoceph-objectstore-tool: Use exit status 11 for incompatible import attempt 4129/head
David Zafman [Sat, 21 Mar 2015 00:48:01 +0000 (17:48 -0700)]
ceph-objectstore-tool: Use exit status 11 for incompatible import attempt

This is used so upgrade testing doesn't generate false failure.
Fixes: #11139
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 175aff8afe8215547ab57f8d8017ce8fdc0ff543)

10 years agoceph-objectstore-tool: Output only unsupported features when incomatible 4126/head
David Zafman [Fri, 20 Mar 2015 23:57:40 +0000 (16:57 -0700)]
ceph-objectstore-tool: Output only unsupported features when incomatible

Fixes: #11176
Backport: firefly, giant

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

10 years agoMerge pull request #3970 from ceph/firefly-11053
Loic Dachary [Fri, 20 Mar 2015 07:44:39 +0000 (08:44 +0100)]
Merge pull request #3970 from ceph/firefly-11053

mds: fix assertion caused by system clock backwards

Reviewed-by: John Spray <john.spray@redhat.com>
10 years agoMerge pull request #4021 from ceph/wip-7737-firefly
Loic Dachary [Fri, 20 Mar 2015 07:42:58 +0000 (08:42 +0100)]
Merge pull request #4021 from ceph/wip-7737-firefly

osd: fix negative degraded objects during backfilling

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #3952 from dachary/wip-9986-firefly
Loic Dachary [Fri, 20 Mar 2015 07:38:26 +0000 (08:38 +0100)]
Merge pull request #3952 from dachary/wip-9986-firefly

objecter: fix map skipping

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoinit-radosgw*: don't require rgw_socket_path to be defined
Yehuda Sadeh [Thu, 19 Mar 2015 03:55:24 +0000 (20:55 -0700)]
init-radosgw*: don't require rgw_socket_path to be defined

Fixes: #11159
Backport: hammer, firefly

Scripts required rgw_socket_path to exist in order to start radosgw.
This is not needed.

Reported-by: Dan Mick <dmick@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 6823bcdcd0ce72cd223e809291f46d82da76115c)

10 years agodoc,tests: force checkout of submodules 4079/head
Loic Dachary [Wed, 18 Mar 2015 23:32:39 +0000 (00:32 +0100)]
doc,tests: force checkout of submodules

When updating submodules, always checkout even if the HEAD is the
desired commit hash (update --force) to avoid the following:

    * a directory gmock exists in hammer
    * a submodule gmock replaces the directory gmock in master
    * checkout master + submodule update : gmock/.git is created
    * checkout hammer : the gmock directory still contains the .git from
      master because it did not exist at the time and checkout won't
      remove untracked directories
    * checkout master + submodule update : git rev-parse HEAD is
      at the desired commit although the content of the gmock directory
      is from hammer

http://tracker.ceph.com/issues/11157 Fixes: #11157

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoosd: fix negative degraded objects during backfilling 4021/head
Guang Yang [Thu, 26 Feb 2015 08:13:12 +0000 (08:13 +0000)]
osd: fix negative degraded objects during backfilling

When there is deleting requests during backfilling, the reported number of degraded
objects could be negative, as the primary's num_objects is the latest (locally) but
the number for replicas might not reflect the deletings. A simple fix is to ignore
the negative subtracted value.

Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
(cherry picked from commit 14d7e36d3c978844da73d0e1c8a3a1ec863bac15)

Conflicts:
src/osd/PG.cc

10 years agoMerge pull request #3966 from theanalyst/wip-10698-backport
Loic Dachary [Mon, 16 Mar 2015 22:20:36 +0000 (23:20 +0100)]
Merge pull request #3966 from theanalyst/wip-10698-backport

rgw: fail s3 POST auth if keystone not configured

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #3934 from dachary/wip-10665-firefly
Loic Dachary [Mon, 16 Mar 2015 22:19:22 +0000 (23:19 +0100)]
Merge pull request #3934 from dachary/wip-10665-firefly

rgw: Swift API. Dump container's custom metadata.

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #3929 from dachary/wip-10475-firefly
Loic Dachary [Mon, 16 Mar 2015 22:18:59 +0000 (23:18 +0100)]
Merge pull request #3929 from dachary/wip-10475-firefly

rgw: Swift API. Support for X-Remove-Container-Meta-{key} header.

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #3938 from dachary/wip-10770-firefly
Loic Dachary [Mon, 16 Mar 2015 22:18:24 +0000 (23:18 +0100)]
Merge pull request #3938 from dachary/wip-10770-firefly

rgw: send appropriate op to cancel bucket index pending operation

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #3961 from dachary/wip-10106-firefly
Loic Dachary [Mon, 16 Mar 2015 22:17:56 +0000 (23:17 +0100)]
Merge pull request #3961 from dachary/wip-10106-firefly

rgw: flush xml header on get acl request

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #3958 from dachary/wip-10062-firefly
Loic Dachary [Mon, 16 Mar 2015 22:16:53 +0000 (23:16 +0100)]
Merge pull request #3958 from dachary/wip-10062-firefly

rgw: check for timestamp for s3 keystone auth

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
Reviewed-by: Valery Tschopp <valery.tschopp@switch.ch>
10 years agoMerge pull request #3942 from dachary/wip-10844-firefly
Loic Dachary [Mon, 16 Mar 2015 16:00:27 +0000 (17:00 +0100)]
Merge pull request #3942 from dachary/wip-10844-firefly

mon: MonCap: take EntityName instead when expanding profiles

Reviewed-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoMerge pull request #3936 from dachary/wip-10724-firefly
Loic Dachary [Mon, 16 Mar 2015 15:53:48 +0000 (16:53 +0100)]
Merge pull request #3936 from dachary/wip-10724-firefly

 backport ceph-disk man page to Firefly

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #3940 from dachary/wip-8753-firefly
Loic Dachary [Mon, 16 Mar 2015 15:50:39 +0000 (16:50 +0100)]
Merge pull request #3940 from dachary/wip-8753-firefly

ReplicatedPG::on_change: clean up callbacks_for_degraded_object

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3827 from dachary/wip-10259-firefly
Loic Dachary [Mon, 16 Mar 2015 15:49:56 +0000 (16:49 +0100)]
Merge pull request #3827 from dachary/wip-10259-firefly

osd_types: op_queue_age_hist and fs_perf_stat should be in osd_stat_t::o...

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3962 from dachary/wip-10150-firefly
Loic Dachary [Mon, 16 Mar 2015 15:48:02 +0000 (16:48 +0100)]
Merge pull request #3962 from dachary/wip-10150-firefly

ReplicatedPG::scan_range: an object can disappear between the list and t...

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3948 from dachary/wip-9891-firefly
Loic Dachary [Mon, 16 Mar 2015 15:45:32 +0000 (16:45 +0100)]
Merge pull request #3948 from dachary/wip-9891-firefly

DBObjectMap: lock header_lock on sync()

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3949 from dachary/wip-9915-firefly
Loic Dachary [Mon, 16 Mar 2015 15:43:48 +0000 (16:43 +0100)]
Merge pull request #3949 from dachary/wip-9915-firefly

osd: cache tiering: fix the atime logic of the eviction

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3944 from dachary/wip-9193-firefly
Loic Dachary [Mon, 16 Mar 2015 15:40:12 +0000 (16:40 +0100)]
Merge pull request #3944 from dachary/wip-9193-firefly

messages/MWatchNotify: include an error code in the message

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3943 from dachary/wip-8011-firefly
Loic Dachary [Mon, 16 Mar 2015 15:39:41 +0000 (16:39 +0100)]
Merge pull request #3943 from dachary/wip-8011-firefly

ReplicatedPG: fail a non-blocking flush if the object is being scrubbed

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3941 from dachary/wip-10817-firefly
Loic Dachary [Mon, 16 Mar 2015 15:39:16 +0000 (16:39 +0100)]
Merge pull request #3941 from dachary/wip-10817-firefly

WorkQueue: make wait timeout on empty queue configurable

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3937 from dachary/wip-10762-firefly
Loic Dachary [Mon, 16 Mar 2015 15:38:42 +0000 (16:38 +0100)]
Merge pull request #3937 from dachary/wip-10762-firefly

mon: ignore osd failures from before up_from

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3933 from dachary/wip-10617-firefly
Loic Dachary [Mon, 16 Mar 2015 15:38:22 +0000 (16:38 +0100)]
Merge pull request #3933 from dachary/wip-10617-firefly

osd: do not ignore deleted pgs on startup

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3932 from dachary/wip-10546-firefly
Loic Dachary [Mon, 16 Mar 2015 15:38:01 +0000 (16:38 +0100)]
Merge pull request #3932 from dachary/wip-10546-firefly

mon: Monitor: fix timecheck rounds period

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3931 from dachary/wip-10512-firefly
Loic Dachary [Mon, 16 Mar 2015 15:37:36 +0000 (16:37 +0100)]
Merge pull request #3931 from dachary/wip-10512-firefly

osd: requeue blocked op before flush it was blocked on

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3930 from dachary/wip-10497-firefly
Loic Dachary [Mon, 16 Mar 2015 15:37:05 +0000 (16:37 +0100)]
Merge pull request #3930 from dachary/wip-10497-firefly

librados: Translate operation flags from C APIs

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agoMerge pull request #3955 from dachary/wip-10059-firefly
Loic Dachary [Mon, 16 Mar 2015 15:31:40 +0000 (16:31 +0100)]
Merge pull request #3955 from dachary/wip-10059-firefly

PG: always clear_primary_state

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3954 from dachary/wip-10014-firefly
Loic Dachary [Mon, 16 Mar 2015 15:31:16 +0000 (16:31 +0100)]
Merge pull request #3954 from dachary/wip-10014-firefly

ObjectStore: Don't use largest_data_off to calc data_align.

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3947 from dachary/wip-9555-firefly
Loic Dachary [Mon, 16 Mar 2015 15:25:59 +0000 (16:25 +0100)]
Merge pull request #3947 from dachary/wip-9555-firefly

osd: check that source OSD is valid for MOSDRepScrub

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3964 from dachary/wip-10157-firefly
Loic Dachary [Mon, 16 Mar 2015 15:25:30 +0000 (16:25 +0100)]
Merge pull request #3964 from dachary/wip-10157-firefly

PGLog: include rollback_info_trimmed_to in (read|write)_log

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3960 from dachary/wip-6003-firefly
Loic Dachary [Mon, 16 Mar 2015 15:24:55 +0000 (16:24 +0100)]
Merge pull request #3960 from dachary/wip-6003-firefly

FileJournal: fix journalq population in do_read_entry()

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3950 from dachary/wip-9985-firefly
Loic Dachary [Mon, 16 Mar 2015 15:24:03 +0000 (16:24 +0100)]
Merge pull request #3950 from dachary/wip-9985-firefly

Get the currently atime of the object in cache pool for eviction

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Xinze Chi <xmdxcxz@gmail.com>
10 years agoMerge pull request #3935 from dachary/wip-10723-firefly
Loic Dachary [Mon, 16 Mar 2015 15:20:12 +0000 (16:20 +0100)]
Merge pull request #3935 from dachary/wip-10723-firefly

Fix memory leak in python rados bindings

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agoMerge pull request #3866 from ceph/wip-cot-firefly
Loic Dachary [Mon, 16 Mar 2015 14:02:37 +0000 (15:02 +0100)]
Merge pull request #3866 from ceph/wip-cot-firefly

Backport ceph-objectstore-tool changes to firefly

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #3996 from dzafman/wip-10676
Loic Dachary [Mon, 16 Mar 2015 14:00:56 +0000 (15:00 +0100)]
Merge pull request #3996 from dzafman/wip-10676

Fix ceph command manpage to match ceph -h

Reviewed-by: Xinxin Shu <xinxin.shu5040@gmail.com>
10 years agoMerge pull request #3927 from dachary/wip-10351-firefly
Loic Dachary [Mon, 16 Mar 2015 13:55:37 +0000 (14:55 +0100)]
Merge pull request #3927 from dachary/wip-10351-firefly

mount.ceph: avoid spurious error message

Reviewed-by: Yan, Zheng <zyan@redhat.com>
10 years agodoc: Minor fixes to ceph command manpage 3996/head
David Zafman [Fri, 13 Mar 2015 23:50:13 +0000 (16:50 -0700)]
doc: Minor fixes to ceph command manpage

Fixes: #10676
Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agodoc: Fix ceph command manpage to match ceph -h (firefly)
David Zafman [Thu, 12 Mar 2015 18:39:52 +0000 (11:39 -0700)]
doc: Fix ceph command manpage to match ceph -h (firefly)

Improve synopsis section
Fixes: #10676
Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agorados.py: keep reference to python callbacks 3935/head
Josh Durgin [Tue, 10 Feb 2015 04:50:23 +0000 (20:50 -0800)]
rados.py: keep reference to python callbacks

If we don't keep a reference to these, the librados aio calls will
segfault since the python-level callbacks will have been garbage
collected. Passing them to aio_create_completion() does not take a
reference to them. Keep a reference in the python Completion object
associated with the request, since they need the same lifetime.

This fixes a regression from 60b019f69aa0e39d276c669698c92fc890599f50.

Fixes: #10775
Backport: dumpling, firefly, giant
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit 36d37aadbbbece28d70e827511f1a473d851463d)

10 years agodoc: Changes format style in ceph to improve readability as html.
Nilamdyuti Goswami [Thu, 18 Dec 2014 11:41:22 +0000 (17:11 +0530)]
doc: Changes format style in ceph to improve readability as html.

Signed-off-by: Nilamdyuti Goswami <ngoswami@redhat.com>
(cherry picked from commit 8b796173063ac9af8c21364521fc5ee23d901196)

10 years agomds: fix assertion caused by system clock backwards 3970/head
Yan, Zheng [Thu, 12 Mar 2015 03:01:46 +0000 (11:01 +0800)]
mds: fix assertion caused by system clock backwards

Fixes: #11053
Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agorgw: fail s3 POST auth if keystone not configured 3966/head
Yehuda Sadeh [Fri, 30 Jan 2015 15:03:30 +0000 (07:03 -0800)]
rgw: fail s3 POST auth if keystone not configured

Fixes: #10698
This fixes issue introduced in 8b3dfc9472022ea45ad24e02e0aa21dfdad798f8,
where if user does not exist, we try keystone authentication. However,
if keystone is not configured we justt fall through without failing.
This would have failed later on due to bucket permissions, unless bucket
had a public write permissions.

Backports: Firefly
Reported-by: Valery Tschopp <valery.tschopp@switch.ch>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Conflicts:
src/rgw/rgw_rest_s3.cc

10 years agoosd: check that source OSD is valid for MOSDRepScrub 3947/head
Sage Weil [Sat, 13 Dec 2014 16:06:31 +0000 (08:06 -0800)]
osd: check that source OSD is valid for MOSDRepScrub

Make sure the message we got from the peer OSD is valid.  Specifically,
this avoids a race like this:

- A marks down B
- B sends MOSDRepScrub
- A accepts connection from B as new
- A replies to scrub
- B crashes because msgr seq 1 < expected seq 1000+

See #8880 for the most recent fix for requests.

Fixes: #9555
Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 847e5e102522d651aa9687a54aaafcebf3afc596)

Conflicts:
    src/osd/OSD.cc: require functions first argument is now a reference

10 years agoosd: pass Message* to most require_* helpers
Sage Weil [Sat, 13 Dec 2014 15:56:39 +0000 (07:56 -0800)]
osd: pass Message* to most require_* helpers

These do nothing but op->get_req(); pass the Message* explicitly so that
non-OpRequest callers can use them.

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

Conflicts:
src/osd/OSD.cc
src/osd/OSD.h
        significantly changes had to be made but in a simple way and
stays within the scope of the original commit

10 years agoPGLog: include rollback_info_trimmed_to in (read|write)_log 3964/head
Samuel Just [Thu, 20 Nov 2014 23:15:08 +0000 (15:15 -0800)]
PGLog: include rollback_info_trimmed_to in (read|write)_log

Fixes: #10157
Backport: firefly, giant
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 1fe8b846641486cc294fe7e1d2450132c38d2dba)

Conflicts:
src/osd/PGLog.cc
        in the context coll_t::META_COLL was replaced with META_COLL

10 years agoFileJournal: fix journalq population in do_read_entry() 3960/head
Samuel Just [Fri, 6 Feb 2015 17:52:29 +0000 (09:52 -0800)]
FileJournal: fix journalq population in do_read_entry()

Fixes: 6003
Backport: dumpling, firefly, giant
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit bae1f3eaa09c4747b8bfc6fb5dc673aa6989b695)

Conflicts:
src/os/FileJournal.cc
        because reinterpret_cast was added near two hunks after firefly

10 years agoosd/ReplicatedPG: fix compile error 3950/head
Sage Weil [Sat, 1 Nov 2014 02:33:59 +0000 (19:33 -0700)]
osd/ReplicatedPG: fix compile error

From 1fef4c3d541cba360738437420ebfa2447d5802e.

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

10 years agocommon: do not unlock rwlock on destruction 3963/head
Federico Simoncelli [Sat, 15 Nov 2014 14:14:04 +0000 (14:14 +0000)]
common: do not unlock rwlock on destruction

According to pthread_rwlock_unlock(3p):

 Results are undefined if the read-write lock rwlock is not held
 by the calling thread.

and:

 https://sourceware.org/bugzilla/show_bug.cgi?id=17561

 Calling pthread_rwlock_unlock on an rwlock which is not locked
 is undefined.

calling pthread_rwlock_unlock on RWLock destruction could cause
an unknown behavior for two reasons:

- the lock is acquired by another thread (undefined)
- the lock is not acquired (undefined)

Moreover since glibc-2.20 calling pthread_rwlock_unlock on a
rwlock that is not locked results in a SIGILL that kills the
application.

This patch removes the pthread_rwlock_unlock call on destruction
and replaces it with an assertion to check that the RWLock is
not in use.

Any code that relied on the implicit release is now going to
break the assertion, e.g.:

 {
   RWLock l;
   l.get(for_write);
 } // implicit release, wrong.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
(cherry picked from commit cf2104d4d991361c53f6e2fea93b69de10cd654b)

10 years agocommon/RWLock: track read/write locks via atomics for assertion checks
Yehuda Sadeh [Sat, 3 May 2014 15:32:19 +0000 (08:32 -0700)]
common/RWLock: track read/write locks via atomics for assertion checks

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 92615ea95a31d9fd22c3d11c860e0f502dc52c26)

10 years agoReplicatedPG::scan_range: an object can disappear between the list and the attr get 3962/head
Samuel Just [Thu, 11 Dec 2014 21:05:54 +0000 (13:05 -0800)]
ReplicatedPG::scan_range: an object can disappear between the list and the attr get

The first item in the range is often last_backfill, upon which writes
can be occuring.  It's trimmed off on the primary side anyway.

Fixes: 10150
Backport: dumpling, firefly, giant
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit dce6f288ad541fe7f0ef8374301cd712dd3bfa39)

10 years agorgw: flush xml header on get acl request 3961/head
Yehuda Sadeh [Sat, 31 Jan 2015 02:42:40 +0000 (18:42 -0800)]
rgw: flush xml header on get acl request

Fixes: #10106
Backport: firefly, giant

dump_start() updates the formatter with the appropriate prefix, however,
we never flushed the formatter.

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

10 years agorgw: check for timestamp for s3 keystone auth 3958/head
Abhishek Lekshmanan [Mon, 17 Nov 2014 12:07:00 +0000 (17:37 +0530)]
rgw: check for timestamp for s3 keystone auth

This commit ensures that we check for timestamp of s3 request is within
acceptable grace time of radosgw
Addresses some failures in #10062
Fixes: #10062
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
(cherry picked from commit 4b35ae067fef9f97b886afe112d662c61c564365)

10 years agoPG: always clear_primary_state on new interval, but only clear pg temp if not primary 3955/head
Samuel Just [Wed, 19 Nov 2014 16:20:16 +0000 (08:20 -0800)]
PG: always clear_primary_state on new interval, but only clear pg temp if not primary

Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit f692bfe076b8ddb679c6d1a6ea78cc47f0876326)

10 years agoPG: always clear_primary_state when leaving Primary
Samuel Just [Fri, 14 Nov 2014 23:44:20 +0000 (15:44 -0800)]
PG: always clear_primary_state when leaving Primary

Otherwise, entries from the log collection process might leak into the next
epoch, where we might end up choosing a different authoritative log.  In this
case, it resulted in us not rolling back to log entries on one of the replicas
prior to trying to recover from an affected object due to the peer_missing not
being cleared.

Fixes: #10059
Backport: giant, firefly, dumpling
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit c87bde64dfccb5d6ee2877cc74c66fc064b1bcd7)

10 years agoObjectStore: Don't use largest_data_off to calc data_align. 3954/head
Jianpeng Ma [Mon, 27 Oct 2014 03:22:13 +0000 (11:22 +0800)]
ObjectStore: Don't use largest_data_off to calc data_align.

If largest_data_off % CEPH_PAGE_SIZE != 0, the get_data_aligment return
a erro value. This make the FileJouranl::align_bl to memcopy much data.

Tested-by: Sage Weil <sage@redhat.com>
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit a1aa70f2f21339feabfe9c1b3c9c9f97fbd53c9d)

10 years agoosdc/Objecter: Fix a bug of dead looping in Objecter::handle_osd_map 3952/head
Ding Dinghua [Thu, 30 Oct 2014 06:58:42 +0000 (14:58 +0800)]
osdc/Objecter: Fix a bug of dead looping in Objecter::handle_osd_map

If current map epoch is less than oldest epoch, current map epoch
should step up to oldest epoch.

Fixes: #9986
Signed-off-by: Ding Dinghua <dingdinghua85@gmail.com>
(cherry picked from commit e0166a23c2cf655bfb4cf873be021a14d9b9be27)

Conflicts:
src/osdc/Objecter.cc
        the debug line that follows was re-indented

10 years agoosdc/Objecter: e shouldn't be zero in Objecter::handle_osd_map
Ding Dinghua [Thu, 30 Oct 2014 06:58:05 +0000 (14:58 +0800)]
osdc/Objecter: e shouldn't be zero in Objecter::handle_osd_map

Signed-off-by: Ding Dinghua <dingdinghua85@gmail.com>
(cherry picked from commit 31c584c8ba022cd44fe2872d221f3026618cefab)

Conflicts:
src/osdc/Objecter.cc
        the debug line that follows was re-indented

10 years agoGet the currently atime of the object in cache pool for eviction
Xinze Chi [Wed, 29 Oct 2014 07:11:11 +0000 (07:11 +0000)]
Get the currently atime of the object in cache pool for eviction

Because if there are mutiple atime in agent_state for the same object, we should use the recently one.

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

10 years agoosd: cache tiering: fix the atime logic of the eviction 3949/head
Zhiqiang Wang [Tue, 28 Oct 2014 01:37:11 +0000 (09:37 +0800)]
osd: cache tiering: fix the atime logic of the eviction

Reported-by: Xinze Chi <xmdxcxz@gmail.com>
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
(cherry picked from commit 622c5ac41707069ef8db92cb67c9185acf125d40)

10 years agoDBObjectMap: lock header_lock on sync() 3948/head
Samuel Just [Fri, 20 Feb 2015 21:43:46 +0000 (13:43 -0800)]
DBObjectMap: lock header_lock on sync()

Otherwise, we can race with another thread updating state.seq
resulting in the old, smaller value getting persisted.  If there
is a crash at that time, we will reuse a sequence number, resulting
in an inconsistent node tree and bug #9891.

Fixes: 9891
Backport: giant, firefly, dumpling
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 2b63dd25fc1c73fa42e52e9ea4ab5a45dd9422a0)

Conflicts:
src/os/DBObjectMap.cc
        because we have state.v = 1; instead of state.v = 2;

10 years agoMerge pull request #3828 from dachary/wip-10425-firefly
Loic Dachary [Wed, 11 Mar 2015 08:09:23 +0000 (09:09 +0100)]
Merge pull request #3828 from dachary/wip-10425-firefly

librados: fix resources leakage in RadosClient::connect()

Reviewed-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
10 years agoMerge pull request #3826 from dachary/wip-10257-firefly
Loic Dachary [Wed, 11 Mar 2015 08:06:27 +0000 (09:06 +0100)]
Merge pull request #3826 from dachary/wip-10257-firefly

mon: PGMonitor: several stats output error fixes

Reviewed-by: Joao Eduardo Luis <joao@redhat.com>