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.
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.
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.
John Spray [Thu, 18 Jun 2015 10:07:46 +0000 (11:07 +0100)]
mds: fix MDLog shutdown process
We must join threads before completing ::shutdown,
because otherwise these threads might try to use
torn-down resources like the objecter.
The replay/recovery threads may be blocking on
journaler calls like wait_for_readable, so we
must signal them using Journaler::shutdown. In
order for that to be safe, we must also protect
the assignment of ::journaler from the threads
using the mds_lock.
Fixes: #11985 Signed-off-by: John Spray <john.spray@redhat.com>
John Spray [Thu, 18 Jun 2015 10:08:05 +0000 (11:08 +0100)]
mds: drop MDSIOContext on mds->stopping
`stopping` is true once the MDS has entered suicide(). During
this phase, any MDSIOContexts that are called (e.g. from objecter,
journaler) become no-ops.
John Spray [Thu, 18 Jun 2015 10:07:52 +0000 (11:07 +0100)]
mds: refine shutdown, add ::stopping
Add a ::stopping flag, set at start of suicide(),
that other contexts must inspect after taking
mds_lock.
This guards against the possibility of multiple
threads entering suicide, and more generally
against the possibility of other procedures
starting while we're in the middle of shutting down.
John Spray [Tue, 16 Jun 2015 13:25:33 +0000 (14:25 +0100)]
osdc/Journaler: add a shutdown() method
Because consumers may be blocked on the on_readable
condition, it is necessary for Journaler to have
an explicit shutdown method that fires the completion
John Spray [Wed, 24 Jun 2015 22:58:36 +0000 (23:58 +0100)]
mds: store layout on header object
This is surprisingly simple because we were already redundantly
calling store_backtrace whenever the layout changed! That was
a side effect of the way add_old_pool is handled, the backtrace
version is bumped to latest even if the "old" pool is the
current one.
The upshot is that if we accept the existing behaviour of
also unnecessarily updating the 'parent' xattr, keeping
the new 'layout' xattr update requires no new dirty flags. This
is a twitchy enough behaviour that new tests are needed to guard
against regressions though.
Fixes: #4161 Signed-off-by: John Spray <john.spray@redhat.com>
Ken Dreyer [Wed, 24 Jun 2015 22:39:30 +0000 (16:39 -0600)]
ceph.spec.in: package rbd-replay-prep on all Fedoras
This reverts the change in commit 85517d611b7bf4cb6cbffcd2c65303be0d038264. Since we BuildRequire:
libbabeltrace-devel, autoconf will see that babeltrace is available
during the build, and make will build/install the rbd-replay-prep
utility.
This change also simplifies Fedora selection logic, because Fedora 19 is
EOL, so "%{fedora}" implies "Fedora 20 and above".
Reported-by: Ira Cooper <ira@samba.org> Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Owen Synge [Mon, 8 Jun 2015 15:48:55 +0000 (17:48 +0200)]
ceph.spec.in:BuildRequires sharutils
The uudecode binary is used to build Java-related components, and
uudecode is provided by the sharutils package on all supported
RPM platforms. When building with "--without=cephfs_java",
sharutils is not needed.
Thanks to Nathan Cutler <ncutler@suse.cz> for going into the
details with me.
On OBS without this patch we get the error message:
Sebastien Ponce [Wed, 27 May 2015 15:15:16 +0000 (17:15 +0200)]
tests : Fixed radosstriper tests to introduce the needed calls to setup and teardown
In particular port 7112 was replaced by 7113 for the monitor as 7112 is taken by test-erasure-eio now
And calls to setup and teardown have been added around the testing shell code
Sebastien Ponce [Fri, 6 Feb 2015 14:14:46 +0000 (15:14 +0100)]
tests: fixed environment for osd-class-dir
osd-class-dir was not set when activating osds in the test environment leading to failures with 'operation not supported' message when trying to lock objects