Sage Weil [Wed, 28 Oct 2015 00:55:26 +0000 (20:55 -0400)]
crush/mapper: ensure bucket id is valid before indexing buckets array
We were indexing the buckets array without verifying the index was within
the [0,max_buckets) range. This could happen because a multistep rule
does not have enough buckets and has CRUSH_ITEM_NONE
for an intermediate result, which would feed in CRUSH_ITEM_NONE and
make us crash.
* an erasure code plugin (or another part of the code) creates a
ruleset
* the ruleset crashes during mapping (for whatever reason)
* ceph osd pool create uses the bugous ruleset
* the monitors try to do mapping a crash
Having a bugous ruleset in the crush map is very difficult prevent. The
catastrophic event of using it with a newly created pool can however be
prevented by calling the CrushTester just before creating the pool and
after all implicit or explicit crush ruleset creation happened.
Conflicts:
src/test/mon/osd-crush.sh
removed the run_mon because in hammer it is shared
between all tests
src/mon/OSDMonitor.cc
prepare_new_pool changed stringstream to *ostream
Samuel Just [Fri, 25 Sep 2015 01:35:39 +0000 (18:35 -0700)]
OSDMap: fill in known encode_features where possible
Otherwise, if we get an incremental from hammer (struct_v = 6) we will
encode the full map as if it were before CEPH_FEATURE_PGID64, which
was actually pre-argonaut. Similarly, if struct_v >= 7, we know it
was encoded with CEPH_FEATURE_OSDMAP_ENC.
Sage Weil [Wed, 3 Jun 2015 18:57:34 +0000 (14:57 -0400)]
upstart: limit respawn to 3 in 30 mins (instead of 5 in 30s)
It may take tens of seconds to restart each time, so 5 in 30s does not stop
the crash on startup respawn loop in many cases. In particular, we'd like
to catch the case where the internal heartbeats fail.
This should be enough for all but the most sluggish of OSDs and capture
many cases of failure shortly after startup.
Ken Dreyer [Tue, 8 Sep 2015 16:41:02 +0000 (10:41 -0600)]
packaging: move rbd-replay* to ceph-common
The rbd-replay* utilities are useful for Ceph users with RBD clients.
Currently the rbd-replay* utilities ship in the "ceph-test" package, and
we intend this ceph-test package for Ceph developers and contributors,
not normal users.
Conflicts:
- ceph.spec.in and debian/ceph-test.install: trivial files list
conflict (ceph-monstore-update-crush.sh is in master but not hammer)
- debian/control - use different version numbers for Breaks/Replaces
in hammer vs master
Yehuda Sadeh [Thu, 13 Aug 2015 17:59:32 +0000 (10:59 -0700)]
rgw: don't preserve acls when copying object
Fixes: #12370
When copying an object we need to use the acls we calculated earlier,
and not the source acls.
This was broken at e41d97c8e38bb60d7e09e9801c0179efe7af1734.
Yehuda Sadeh [Wed, 26 Aug 2015 21:34:30 +0000 (14:34 -0700)]
rgw: init some manifest fields when handling explicit objs
Fixes: #11455
When dealing with old manifest that has explicit objs, we also
need to set the head size and head object correctly so that
code that relies on this info doesn't break.
Jason Dillaman [Fri, 21 Aug 2015 15:32:39 +0000 (11:32 -0400)]
Objecter: pg_interval_t::is_new_interval needs pgid from previous pool
When increasing the pg_num of a pool, an assert would fail since the
calculated pgid seed would be for the pool's new pg_num value instead
of the previous pg_num value.
Fixes: #10399
Backport: infernalis, hammer, firefly Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit f20f7a23e913d09cc7fc22fb3df07f9938ddc144)
Conflicts: (hobject_t sort order not backported, trivial resolution)
src/osdc/Objecter.cc
src/osdc/Objecter.h
Jason Dillaman [Mon, 10 Aug 2015 13:34:42 +0000 (09:34 -0400)]
common: bit_vector extent calculation incorrect for last page
It's highly probable that the last page in the bit vector will not
be a full page size. As a result, the computed extents will extend
beyond the data portion of the bit vector, resulting in a end_of_buffer
exception.
ceph.in: print more detailed error message for 'tell' command
* we do not allow user specify a certain daemon when starting an
interactive session. the existing error message could lead to
some confusion. so put more details in it.
radosgw init script is unable to start radosgw daemon.
as it is relies on requiretty being disabled.
once init script start this daemon with sudo it fails
to start the daemon.
changing 'sudo' to 'su', it will fix this issue and
will also help running radosgw daemon with our new
"ceph" UID project.
Yehuda Sadeh [Wed, 17 Jun 2015 18:35:18 +0000 (11:35 -0700)]
rgw: fix assignment of copy obj attributes
Fixes: #11563
Clarify the confusing usage of set_copy_attrs() by switching the source and
destinatiion params (attrs, src_attrs). Switch to use attrs instead of
src_attrs afterwards. In one of the cases we originally used the wrong
variable.
debian/control: ceph-common (>> 0.94.2) must be >= 0.94.2-2
The d8733be2ef8874b9a858a7ffddfb81b9b656e9a6 backport introduced a
regression by adding an incorrect Depends / Break combo supposed to
reflect the fact that ceph_argparse moved from ceph to ceph-common after
v0.94.2. It assumed the package is released under the 0.94.2 version
where in reality it is released under the 0.94.2-1xxx version (where xxx
is trusty, jessie etc.).
The Depends / Break combo is changed to use 0.94.2-2 instead.
See also http://tracker.ceph.com/issues/12529 for a larger discussion.
Yehuda Sadeh [Fri, 26 Jun 2015 23:56:28 +0000 (16:56 -0700)]
rgw: conversion tool to fix broken multipart objects
Fixes: #12079
Broken multipart objects: multipart objects that created on 0.94.2
and that start with underscore have a bad locator on their tail objects.
This extends the tool that was needed for older issue we've had with
hammer multipart objects (that start with underscore). The same usage
applies:
Samuel Just [Fri, 24 Jul 2015 22:38:18 +0000 (15:38 -0700)]
Log::reopen_log_file: take m_flush_mutex
Otherwise, _flush() might continue to write to m_fd after it's closed.
This might cause log data to go to a data object if the filestore then
reuses the fd during that time.
Jason Dillaman [Tue, 23 Jun 2015 15:14:51 +0000 (11:14 -0400)]
librbd: only update image flags when holding exclusive lock
It was possible for a client to open an image while another client
was shrinking an image. This would result in the former invalidating
the object map on-disk if it openned the image between updating the
image header and resizing the object map.
Ken Dreyer [Tue, 14 Apr 2015 13:58:17 +0000 (07:58 -0600)]
debian: move ceph_argparse into ceph-common
Prior to this commit, if a user installed the "ceph-common" Debian
package without installing "ceph", then /usr/bin/ceph would crash
because it was missing the ceph_argparse library.
Ship the ceph_argparse library in "ceph-common" instead of "ceph". (This
was the intention of the original commit that moved argparse to "ceph", 2a23eac54957e596d99985bb9e187a668251a9ec)
http://tracker.ceph.com/issues/11388 Refs: #11388
Reported-by: Jens Rosenboom <j.rosenboom@x-ion.de> Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
(cherry picked from commit 110608e5bdd9e2f03020ad41f0c2d756684d4417)
Conflicts:
debian/ceph.install
There is no ceph_daemon.py in hammer
debian/control
Depends/Replaces/Breaks version adapted (from 9.0.0 to 0.94.2)
also adapted ceph-dbg Replaces/Breaks
Zhiqiang Wang [Fri, 20 Mar 2015 08:15:42 +0000 (16:15 +0800)]
test: potential memory leak in FlushAioPP
Should call the release function instead of deleting it to free
librbd::RBD::AioCompletion and librbd::AioCompletion. Otherwise there is
a potential memory leak.
Jason Dillaman [Tue, 28 Apr 2015 14:56:15 +0000 (10:56 -0400)]
krbd: fix incorrect types in the krbd API
The C API functions were referencing the C++ CephContext
instead of the C rados_config_t. Additionally, the ceph
namespace was missing on the Formatter class.
Thorsten Behrens [Sun, 15 Mar 2015 23:13:38 +0000 (00:13 +0100)]
Conditional-compile against minimal tcmalloc.
Certain older systems (SLE11 in this case) do not provide the full
tcmalloc functionality, due to e.g. incomplete libunwind
pieces. Use --with-tcmalloc-minimal to enable the cut-down
version.
Here's how the various mem allocator switches interact now:
--with-jemalloc: overrides --with-tcmalloc & --with-tcmalloc-minimal
--with-tcmalloc-minimal: overrides --with-tcmalloc
--with-tcmalloc: the default. use --without-tcmalloc to disable