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)
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
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.
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.
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.
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
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)
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)
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)
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)
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;
mon: MonCap: take EntityName instead when expanding profiles
entity_name_t is tightly coupled to the messenger, while EntityName is
tied to auth. When expanding profiles we want to tie the profile
expansion to the entity that was authenticated. Otherwise we may incur
in weird behavior such as having caps validation failing because a given
client messenger inst does not match the auth entity it used.
has entity_name_t 'client.12345' and EntityName 'osd.0'. Using
entity_name_t during profile expansion would not allow the client access
to daemon-private/osd.X/foo (client.12345 != osd.X).
Samuel Just [Tue, 10 Feb 2015 01:11:38 +0000 (17:11 -0800)]
WorkQueue: make wait timeout on empty queue configurable
Fixes: 10817
Backport: giant, firefly, dumpling Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 5aa6f910843e98a05bfcabe6f29d612cf335edbf)
Samuel Just [Mon, 9 Feb 2015 18:37:15 +0000 (10:37 -0800)]
ReplicatedPG::on_change: clean up callbacks_for_degraded_object
Backport: dumpling, firefly, giant Fixes: 8753 Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit a5ecaa189d47a69466a6cd55fa4180e5c3092dc2)
Sage Weil [Thu, 5 Feb 2015 11:07:50 +0000 (03:07 -0800)]
mon: ignore osd failures from before up_from
If the failure was generated for an instance of the OSD prior to when
it came up, ignore it.
This probably causes a fair bit of unnecessary flapping in the wild...
Backport: giant, firefly Fixes: #10762 Reported-by: Dan van der Ster <dan@vanderster.com> Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 400ac237d35d0d1d53f240fea87e8483c0e2a7f5)
Billy Olsen [Mon, 2 Feb 2015 23:24:59 +0000 (16:24 -0700)]
Fix memory leak in python rados bindings
A circular reference was inadvertently created when using the
CFUNCTYPE binding for callbacks for the asynchronous i/o callbacks.
This commit refactors the usage of the callbacks such that the
Ioctx object does not have a class reference to the callbacks.
Fixes: #10723
Backport: giant, firefly, dumpling Signed-off-by: Billy Olsen <billy.olsen@gmail.com> Reviewed-by: Dan Mick <dmick@redhat.com> Reviewed-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit 60b019f69aa0e39d276c669698c92fc890599f50)
Fixes: #10665
Backport: hammer, firefly Reported-by: Ahmad Faheem <ahmad.faheem@ril.com> Signed-off-by: Dmytro Iurchenko <diurchenko@mirantis.com>
(cherry picked from commit 2f8d31e9b1c4b09506bd1b0dad635c6e820783b2)
Conflicts:
src/rgw/rgw_rest_swift.cc
The first hunk conflicts because X-Storage-Policy was added
after firefly. The second hunk conflicts because the type of the
s->object data member changed after firefly but it is irrelevant
because the patch does not need to access s->object anymore.
Sage Weil [Mon, 12 Jan 2015 01:28:04 +0000 (17:28 -0800)]
osd: requeue blocked op before flush it was blocked on
If we have request A (say, cache-flush) that blocks things, and then
request B that gets blocked on it, and we have an interval change, then we
need to requeue B first, then A, so that the resulting queue will keep
A before B and preserve the order.
Matt Richards [Thu, 8 Jan 2015 21:16:17 +0000 (13:16 -0800)]
librados: Translate operation flags from C APIs
The operation flags in the public C API are a distinct enum
and need to be translated to Ceph OSD flags, like as happens in
the C++ API. It seems like the C enum and the C++ enum consciously
use the same values, so I reused the C++ translation function.
Greg Farnum [Tue, 2 Dec 2014 23:17:57 +0000 (15:17 -0800)]
SimpleMessenger: allow RESETSESSION whenever we forget an endpoint
In the past (e229f8451d37913225c49481b2ce2896ca6788a2) we decided to disable
reset of lossless Pipes, because lossless peers resetting caused trouble and
they can't forget about each other. But they actually can: if mark_down()
is called.
I can't figure out how else we could forget about a remote endpoint, so I think
it's okay if we tell them we reset in order to clean up state. That's desirable
so that we don't get into strange situations with out-of-whack counters.