Xinze Chi [Fri, 3 Jul 2015 10:27:13 +0000 (18:27 +0800)]
mon/PGMonitor: bug fix pg monitor get crush rule
when some rules have been deleted before, the index in array of crush->rules
is not always equals to crush_ruleset of pool.
Fixes: #12210 Reported-by: Ning Yao <zay11022@gmail.com> Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
(cherry picked from commit 498793393c81c0a8e37911237969fba495a3a183)
This fixes a problem, wherein calamari does not provide
popup drill-downs for warnings or errors, should the summary
be missing.
Calamari gets health info from /api/v1/cluster/$FSID/health.
If the data here has a summary field, this summary is provided
in a popup window:
/api/v1/cluster/$FSID/health is populated (ultimately) with
status obtained via librados python bindings from the ceph
cluster. In the case where there's clock skew, the summary
field supplied by the ceph cluster is empty.
No summary field, no popup window with more health details.
Jason Dillaman [Fri, 26 Jun 2015 13:59:36 +0000 (09:59 -0400)]
librbd: assertion failure race condition if watch disconnected
It's possible for librbd's watch of the header object to be reset by
connection issues just prior to the image being removed. This will
causes an assertion failure which assumes at least one watcher on the
image.
Fixes: #12176
Backport: hammer, firefly Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit af276de4f299960e43761904c043924cec5fef11)
Josh Durgin [Mon, 20 Oct 2014 20:29:13 +0000 (13:29 -0700)]
Objecter: resend linger ops on any interval change
Watch/notify ops need to be resent after a pg split occurs, as well as
a few other circumstances that the existing objecter checks did not
catch.
Refactor the check the OSD uses for this to add a version taking the
more basic types instead of the whole OSD map, and stash the needed
info when an op is sent.
Xinze Chi [Wed, 5 Nov 2014 01:00:01 +0000 (01:00 +0000)]
osd: cache pool: flush object ignoring cache min flush age when cache pool is full Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
(cherry picked from commit f4ee9496ed15e7734abd659f5a353a3cde0dcb23)
Zhiqiang Wang [Fri, 1 Aug 2014 08:09:50 +0000 (16:09 +0800)]
osd: add local_mtime to struct object_info_t
This fixes a bug when the time of the OSDs and clients are not
synchronized (especially when client is ahead of OSD), and the cache
tier dirty ratio reaches the threshold, the agent skips the flush work
because it thinks the object is too young.
Guang Yang [Mon, 13 Oct 2014 04:18:45 +0000 (04:18 +0000)]
The fix for issue 9614 was not completed, as a result, for those erasure coded PGs with one OSD down, the state was wrongly marked as active+clean+degraded. This patch makes sure the clean flag is not set for such PG. Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
(cherry picked from commit 35bbb2d6002b1b435ff0b1df653cc7ab271f9258)
Sage Weil [Wed, 18 Feb 2015 22:53:04 +0000 (14:53 -0800)]
osd,mon: explicitly specify OSD features in MOSDBoot
We are using the connection features to populate the features field in the
OSDMap, but this is the *intersection* of mon and osd features, not the
osd features. Fix this by explicitly specifying the features in
MOSDBoot.
Ken Dreyer [Wed, 10 Jun 2015 21:43:41 +0000 (15:43 -0600)]
ceph.spec.in: package mkcephfs on EL6
Commit efbca0465c2946e113771966df08cf7cf37b1196 added mkcephfs to the
RPM %files listing, but this /usr/sbin path is only correct for CentOS
7. In CentOS 6, the utility is present at /sbin/mkcephfs instead. This
causes rpmbuild to fail to build the tip of the firefly branch on EL6.
Adjust the RPM %files list so we properly package mkcephfs on both EL7
and EL6.
max_req_id was moved to RGWRados and changed to atomic64_t.
The same request id resulted in gc giving the same idtag to all objects
resulting in a leakage of rados objects. It only kept the last deleted object in
it's queue, the previous objects were never freed.
Fixes: 10295
Backport: Hammer, Firefly
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
(cherry picked from commit c262259)
Ken Dreyer [Mon, 18 May 2015 16:50:58 +0000 (10:50 -0600)]
debian: set rest-bench-dbg ceph-test-dbg dependencies
Debian's debug packages ought to depend on their respective binary
packages. This was the case for many of our ceph packages, but it was
not the case for ceph-test-dbg or rest-bench-dbg.
Add the dependencies on the relevant binary packages, pinned to
"= ${binary:Version}" per convention.
Yehuda Sadeh [Thu, 14 May 2015 00:05:22 +0000 (17:05 -0700)]
rgw: merge manifests correctly when there's prefix override
Fixes: #11622
Backport: hammer, firefly
Prefix override happens in a manifest when a rados object does not
conform to the generic prefix set on the manifest. When merging
manifests (specifically being used in multipart objects upload), we need
to check if the rule that we try to merge has a prefix that is the same
as the previous rule. Beforehand we checked if both had the same
override_prefix setting, but that might not apply as both manifests
might have different prefixes.
Loic Dachary [Fri, 15 May 2015 15:02:05 +0000 (17:02 +0200)]
Merge pull request #4556 from xinxinsh/wip-11429-firefly
OSD::load_pgs: we need to handle the case where an upgrade from earlier versions which ignored non-existent pgs resurrects a pg with a prehistoric osdmap
Samuel Just [Tue, 21 Apr 2015 06:45:57 +0000 (23:45 -0700)]
OSD: handle the case where we resurrected an old, deleted pg
Prior to giant, we would skip pgs in load_pgs which were not present in
the current osdmap. Those pgs would eventually refer to very old
osdmaps, which we no longer have causing the assertion failure in 11429
once the osd is finally upgraded to a version which does not skip the
pgs. Instead, if we do not have the map for the pg epoch, complain to
the osd log and skip the pg.
Conflicts:
src/rgw/rgw_op.cc
discard the whitespace modification hunks that were creating
conflicts and ignore the conflict due to an unrelated cast
modification in the context
Jason Dillaman [Wed, 22 Apr 2015 15:27:35 +0000 (11:27 -0400)]
librbd: updated cache max objects calculation
The previous calculation was based upon the image's object size.
Since the cache stores smaller bufferheads, the object size is not
a good indicator of cache usage and was resulting in objects being
evicted from the cache too often. Instead, base the max number of
objects on the memory load required to store the extra metadata
for the objects.
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)
The cherry-picked commit did not compile as-is, because the hobject_t
class in firefly lacks a get_hash() method, which was added in 6de83d4.
To get the patch to compile, I replaced i->second.get_hash() with
i->second.hash.
Tim Serong [Fri, 1 May 2015 15:59:53 +0000 (01:59 +1000)]
json_spirit: use utf8 intenally when parsing \uHHHH
When the python CLI is given non-ASCII characters, it converts them to
\uHHHH escapes in JSON. json_spirit parses these internally into 16 bit
characters, which could only work if json_spirit were built to use
std::wstring, which it isn't; it's using std::string, so the high byte
ends up being zero'd, leaving the low byte which is effectively garbage.
This hack^H^H^H^H change makes json_spirit convert to utf8 internally
instead, which can be stored just fine inside a std::string.
Note that this implementation still assumes \uHHHH escapes are four hex
digits, so it'll only cope with characters in the Basic Multilingual
Plane. Still, that's rather a lot more characters than it could cope
with before ;)
(For characters outside the BMP, Python seems to generate escapes in the
form \uHHHHHHHH, i.e. 8 hex digits, which the current implementation
doesn't expect to see)
Changed $CEPH_MON to 127.0.0.1 -- the CEPH_MON was introduced after
firefly to allow tests to run in parallel. Back in firefly all tests
use the same port because 127.0.0.1 was hardcoded. We can't
conveniently backport all that's necessary for tests to run in
parallel, therefore we keep the 127.0.0.1 hardcoded.
Owen Synge [Tue, 17 Mar 2015 14:41:33 +0000 (15:41 +0100)]
Fix "disk zap" sgdisk invocation
Fixes #11143
If the metadata on the disk is truly invalid, sgdisk would fail to zero
it in one go, because --mbrtogpt apparently tried to operate on the
metadata it read before executing --zap-all.
Splitting this up into two separate invocations to first zap everything
and then clear it properly fixes this issue.
Based on patch by Lars Marowsky-Bree <lmb@suse.com> in ceph-deploy.
Created by Vincent Untz <vuntz@suse.com>
Jon Bernard [Fri, 8 May 2015 15:54:06 +0000 (11:54 -0400)]
common/admin_socket: close socket descriptor in destructor
Long-running processes that do not reuse a single client connection will
see accumulating file descriptors as a result of not closing the
listening socket. In this case, eventually the system will reach
file-max and subsequent connections will fail.
Loic Dachary [Sun, 8 Mar 2015 14:15:35 +0000 (15:15 +0100)]
ceph-disk: more robust parted output parser
In some cases, depending on the implementation or the operating system,
parted --machine -- /dev/sdh print
may contain empty lines. The current parsing code is fragile and highly
depends on output details. Replace it with code that basically does the
same sanity checks (output not empty, existence of units, existence of
the dev entry) but handles the entire output instead of checking line by
line.