Jianpeng Ma [Wed, 8 Jul 2015 00:31:22 +0000 (08:31 +0800)]
common/TrackedOp: Make get_duration get correctly value.
For get_duration(), it should return the duration of Op. For ops which in
flight, the duration is the time current time subtrace the
initiated_time. For the completed Ops, it used the last event(done)
subtrace the initiated_time.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
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:
erasure-code: do not hide overloaded ErasureCode::parse()
* this change fixes the warning from clang:
ErasureCodeJerasure::parse' hides overloaded virtual function
[-Woverloaded-virtual]
* some erasure codecs' ErasureCode::parse() rewrites the profile
using the default values when parsing it if the corresponding
items are not specified. and we don't call ErasureCode::parse()
via its children's references. so no need to make it a virtual
function.
* and ErasureCode::parse() is used as a helper function by its
children, so make it `protected`
* and parse() in ErasureCode's children is but a helper function
called by ctor, descendants' parse() and init(). so make them
protected or private accordingly.
obj_bencher: check run_name and prefix for empty string instead of NULL
change aio_bench and clean_up parameter const char * to const std::string & format.
In rest_bench.cc, aio_bench used run_name.c_str(), so this format will always be empty
string not NULL, so the condition statement
const std::string run_name_meta = (run_name == NULL ? BENCH_LASTRUN_METADATA : std::string(run_name));
is wrong!
test fix:
before:
./rest-bench --seconds 1 -t 2 -b 100 write --api-host=radosgw.com --bucket=test_rm --access-key=FTL7TSJAGXX5KKDQHMJM --secret=123456879
use s3cmd ls s3://test_rm , we can a lot of objects in this bucket, objects are not cleaned up.
after changes, do the same procedure, objects are cleaned up.
Jason Dillaman [Thu, 2 Jul 2015 16:39:42 +0000 (12:39 -0400)]
librbd: closing images now returns a result code
Added new librbd::Image::close method to allow checking the close result
when using the C++ librbd library. rbd_close is no longer hard-coded to
return 0.
Fixes: #12069 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jianpeng Ma [Thu, 2 Jul 2015 01:59:53 +0000 (09:59 +0800)]
mon/PGMonitor: Make blocked Op message more readable.
W/O this patch:
root@dev:/var/log/ceph# ceph health detail
HEALTH_WARN 1 pgs stuck unclean; 2 requests are blocked > 32 sec; 1 osds
have slow requests; recovery 5/115 objects degraded (4.348%); recovery
1/38 unfound (2.632%); too few PGs per OSD (15 < min 30)
pg 2.1 is stuck unclean for 899.708271, current state active, last
acting [2,3,0,1]
1 ops are blocked > 1048.58 sec
1 ops are blocked > 262.144 sec
1 ops are blocked > 1048.58 sec on osd.2
1 ops are blocked > 262.144 sec on osd.2
1 osds have slow requests
recovery 5/115 objects degraded (4.348%)
recovery 1/38 unfound (2.632%)
too few PGs per OSD (15 < min 30)
W/ this patch:
ceph health detail
HEALTH_WARN 1 pgs stuck unclean; 2 requests are blocked > 32 sec; 1 osds
have slow requests; recovery 5/115 objects degraded (4.348%); recovery
1/38 unfound (2.632%); too few PGs per OSD (15 < min 30)
pg 2.1 is stuck unclean for 427.103877, current state active, last
acting [2,3,0,1]
1 ops are blocked > 524.288 sec on osd.2
1 ops are blocked > 131.072 sec on osd.2
1 osds have slow requests
recovery 5/115 objects degraded (4.348%)
recovery 1/38 unfound (2.632%)
too few PGs per OSD (15 < min 30
Later messages looks better.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Nathan Cutler [Fri, 26 Jun 2015 11:13:33 +0000 (13:13 +0200)]
logrotate.conf: fixes for systemd
Before this patch, the command 'logrotate -f /etc/logrotate.d/ceph'
was generating an error "Failed to reload ceph.target: Job type reload is not
applicable for unit ceph.target".
Before we issue systemctl reload, check that there is at least
one active ceph-* service. (The hyphen is significant.)
Since we use grep, make the grep package a dependency.
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>
Swift sends Content-Type HTTP header even if the response
doesn't contain body. We have this behaviour implemented
until applying some changes in end_header() function.
Unfortunately, lack of Content-Type causes early exits in
many Tempest's tests for Swift API verification.
Nathan Cutler [Tue, 16 Jun 2015 16:27:20 +0000 (18:27 +0200)]
ceph.spec.in: python-argparse only in Python 2.6
argparse is a widely-used Python module for parsing command-line arguments.
Ceph makes heavy use of Python scripts, both in the build environment and on
cluster nodes and clients.
Until Python 2.6, argparse was distributed separately from Python proper.
As of 2.7 it is part of the Python standard library.
Although the python package in a given distro may or may not Provide:
python-argparse, this cannot be relied upon.
Therefore, this commit puts appropriate conditionals around Requires:
python-argparse and BuildRequires: python-argparse. It does so for Red
Hat/CentOS and SUSE only, because the last Fedora version with Python 2.6
was Fedora 13, which is EOL.
argparse is required by both the ceph and ceph-common packages, but since ceph
requires ceph-common, the argparse Requires and BuildRequires need only appear
once, under ceph-common.
Yehuda Sadeh [Thu, 25 Jun 2015 21:31:03 +0000 (14:31 -0700)]
rgw: error out if frontend did not send all data
Fixes: #11851
The civetweb mg_write() doesn't return error when it can't flush all data
to the user, it just sends the total number of bytes written. Modified the
client io to return total number of bytes and return an error if didn't
send anything.
Jason Dillaman [Thu, 25 Jun 2015 20:51:31 +0000 (16:51 -0400)]
librbd: prevent object map updates from being interrupted
Object map updates were being canceled in-flight when the exclusive lock
is released. This resulted in an ERESTART error code bubbling up to
AioRequest.
Fixes: 12165
Backport: hammer Signed-off-by: Jason Dillaman <dillaman@redhat.com>