Skip to content

Commit

Permalink
Merge remote-tracking branch 'gh/next'
Browse files Browse the repository at this point in the history
Conflicts:
	PendingReleaseNotes
  • Loading branch information
Sage Weil committed Jul 25, 2013
2 parents ddaf6d5 + c541978 commit df9b877
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 24 deletions.
5 changes: 5 additions & 0 deletions PendingReleaseNotes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v0.67
~~~~~

* ceph-osd now requires a max fd limit of at least
filestore_wbthrottle_(xfs|btrfs)_inodes_hard_limit (5000 by default)
in order to accomodate the new write back throttle system. upstart
now sets the fd limit to 32k. sysvinit will set it to 32k by default
(still overrideable via max_open_files).
2 changes: 1 addition & 1 deletion src/cls/rgw/cls_rgw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ static int bi_log_iterate_entries(cls_method_context_t hctx, const string& marke
map<string, bufferlist> keys;
string filter_prefix, end_key;
bufferlist start_bl;
bool start_key_added;
bool start_key_added = false;
uint32_t i = 0;
string key;

Expand Down
24 changes: 12 additions & 12 deletions src/common/config_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,20 +501,20 @@ OPTION(osd_max_attr_size, OPT_U64, 65536)
OPTION(filestore, OPT_BOOL, false)

/// filestore wb throttle limits
OPTION(filestore_wbthrottle_btrfs_bytes_start_flusher, OPT_U64, 10<<20)
OPTION(filestore_wbthrottle_btrfs_bytes_hard_limit, OPT_U64, 100<<20)
OPTION(filestore_wbthrottle_btrfs_ios_start_flusher, OPT_U64, 100)
OPTION(filestore_wbthrottle_btrfs_ios_hard_limit, OPT_U64, 1000)
OPTION(filestore_wbthrottle_btrfs_inodes_start_flusher, OPT_U64, 100)
OPTION(filestore_wbthrottle_xfs_bytes_start_flusher, OPT_U64, 10<<20)
OPTION(filestore_wbthrottle_xfs_bytes_hard_limit, OPT_U64, 100<<20)
OPTION(filestore_wbthrottle_xfs_ios_start_flusher, OPT_U64, 10)
OPTION(filestore_wbthrottle_xfs_ios_hard_limit, OPT_U64, 100)
OPTION(filestore_wbthrottle_xfs_inodes_start_flusher, OPT_U64, 10)
OPTION(filestore_wbthrottle_btrfs_bytes_start_flusher, OPT_U64, 41943040)
OPTION(filestore_wbthrottle_btrfs_bytes_hard_limit, OPT_U64, 419430400)
OPTION(filestore_wbthrottle_btrfs_ios_start_flusher, OPT_U64, 500)
OPTION(filestore_wbthrottle_btrfs_ios_hard_limit, OPT_U64, 5000)
OPTION(filestore_wbthrottle_btrfs_inodes_start_flusher, OPT_U64, 500)
OPTION(filestore_wbthrottle_xfs_bytes_start_flusher, OPT_U64, 41943040)
OPTION(filestore_wbthrottle_xfs_bytes_hard_limit, OPT_U64, 419430400)
OPTION(filestore_wbthrottle_xfs_ios_start_flusher, OPT_U64, 500)
OPTION(filestore_wbthrottle_xfs_ios_hard_limit, OPT_U64, 5000)
OPTION(filestore_wbthrottle_xfs_inodes_start_flusher, OPT_U64, 500)

/// These must be less than the fd limit
OPTION(filestore_wbthrottle_btrfs_inodes_hard_limit, OPT_U64, 256)
OPTION(filestore_wbthrottle_xfs_inodes_hard_limit, OPT_U64, 100)
OPTION(filestore_wbthrottle_btrfs_inodes_hard_limit, OPT_U64, 5000)
OPTION(filestore_wbthrottle_xfs_inodes_hard_limit, OPT_U64, 5000)

// Tests index failure paths
OPTION(filestore_index_retry_probability, OPT_DOUBLE, 0)
Expand Down
2 changes: 1 addition & 1 deletion src/init-ceph.in
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ for name in $what; do
case "$command" in
start)
# Increase max_open_files, if the configuration calls for it.
get_conf max_open_files "8192" "max open files"
get_conf max_open_files "32768" "max open files"

# build final command
wrap=""
Expand Down
1 change: 1 addition & 0 deletions src/mon/Monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Monitor::Monitor(CephContext* cct_, string nm, MonitorDBStore *s,
elector(this),
leader(0),
quorum_features(0),
scrub_version(0),

// sync state
sync_provider_count(0),
Expand Down
1 change: 1 addition & 0 deletions src/os/ObjectStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
f->dump_string("first", first);
f->dump_string("last", last);
}
break;

default:
f->dump_string("op_name", "unknown");
Expand Down
14 changes: 7 additions & 7 deletions src/rgw/rgw_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -505,15 +505,15 @@ int RGWMetadataManager::pre_modify(RGWMetadataHandler *handler, string& section,
/* if write version has not been set, and there's a read version, set it so that we can
* log it
*/
if (objv_tracker && objv_tracker->read_version.ver &&
!objv_tracker->write_version.ver) {
objv_tracker->write_version = objv_tracker->read_version;
objv_tracker->write_version.ver++;
if (objv_tracker) {
if (objv_tracker->read_version.ver && !objv_tracker->write_version.ver) {
objv_tracker->write_version = objv_tracker->read_version;
objv_tracker->write_version.ver++;
}
log_data.read_version = objv_tracker->read_version;
log_data.write_version = objv_tracker->write_version;
}

log_data.read_version = objv_tracker->read_version;
log_data.write_version = objv_tracker->write_version;

log_data.status = op_type;

bufferlist logbl;
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/rgw_metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class RGWMetadataLog {

bool done;

LogListCtx() : done(false) {}
LogListCtx() : cur_shard(0), done(false) {}
};

void init_list_entries(int shard_id, utime_t& from_time, utime_t& end_time, string& marker, void **handle);
Expand Down
3 changes: 3 additions & 0 deletions src/test/cls_statelog/test_cls_statelog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ static void get_entries_by_client_id(librados::IoCtx& ioctx, string& oid,
cls_statelog_list(*rop, client_id, op_id, empty_str, marker, 0, entries, &marker, &truncated);
ASSERT_EQ(0, ioctx.operate(oid, rop, &obl));
ASSERT_EQ(expected, (int)entries.size());
delete rop;
}

static void get_all_entries(librados::IoCtx& ioctx, string& oid, list<cls_statelog_entry>& entries, int expected)
Expand Down Expand Up @@ -203,5 +204,7 @@ TEST(cls_rgw, test_statelog_basic)
string empty_str;
get_entries_by_client_id(ioctx, oid, entries, e.client_id, empty_str, 4);
get_entries_by_object(ioctx, oid, entries, e.object, empty_str, 1);
delete op;
delete rop;
}

16 changes: 15 additions & 1 deletion src/test/cls_version/test_cls_version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ TEST(cls_rgw, test_version_inc_read)
ASSERT_NE(0, (int)ver.tag.size());

/* inc version again! */
delete op;
op = new_op();
cls_version_inc(*op);
ASSERT_EQ(0, ioctx.operate(oid, op));
Expand Down Expand Up @@ -136,7 +137,6 @@ TEST(cls_rgw, test_version_inc_cond)
/* add chains */
string oid = "obj";


/* create object */

ASSERT_EQ(0, ioctx.create(oid, true));
Expand All @@ -160,6 +160,7 @@ TEST(cls_rgw, test_version_inc_cond)


/* inc version again! */
delete op;
op = new_op();
cls_version_inc(*op);
ASSERT_EQ(0, ioctx.operate(oid, op));
Expand All @@ -180,18 +181,22 @@ TEST(cls_rgw, test_version_inc_cond)
ASSERT_EQ(0, (int)ver2.tag.compare(ver.tag));

/* a bunch of conditions that should fail */
delete op;
op = new_op();
cls_version_inc(*op, cond_ver, VER_COND_EQ);
ASSERT_EQ(-ECANCELED, ioctx.operate(oid, op));

delete op;
op = new_op();
cls_version_inc(*op, cond_ver, VER_COND_LT);
ASSERT_EQ(-ECANCELED, ioctx.operate(oid, op));

delete op;
op = new_op();
cls_version_inc(*op, cond_ver, VER_COND_LE);
ASSERT_EQ(-ECANCELED, ioctx.operate(oid, op));

delete op;
op = new_op();
cls_version_inc(*op, cond_ver, VER_COND_TAG_NE);
ASSERT_EQ(-ECANCELED, ioctx.operate(oid, op));
Expand All @@ -201,18 +206,22 @@ TEST(cls_rgw, test_version_inc_cond)
ASSERT_EQ(0, (int)ver2.tag.compare(ver.tag));

/* a bunch of conditions that should succeed */
delete op;
op = new_op();
cls_version_inc(*op, ver2, VER_COND_EQ);
ASSERT_EQ(0, ioctx.operate(oid, op));

delete op;
op = new_op();
cls_version_inc(*op, cond_ver, VER_COND_GT);
ASSERT_EQ(0, ioctx.operate(oid, op));

delete op;
op = new_op();
cls_version_inc(*op, cond_ver, VER_COND_GE);
ASSERT_EQ(0, ioctx.operate(oid, op));

delete op;
op = new_op();
cls_version_inc(*op, cond_ver, VER_COND_TAG_EQ);
ASSERT_EQ(0, ioctx.operate(oid, op));
Expand Down Expand Up @@ -275,6 +284,7 @@ TEST(cls_rgw, test_version_inc_check)

obj_version ver2;

delete op;
op = new_op();
cls_version_inc(*op);
ASSERT_EQ(0, ioctx.operate(oid, op));
Expand All @@ -283,6 +293,8 @@ TEST(cls_rgw, test_version_inc_check)
ASSERT_GT((long long)ver2.ver, (long long)ver.ver);
ASSERT_EQ(0, (int)ver2.tag.compare(ver.tag));

delete op;

/* a bunch of conditions that should fail */
rop = new_rop();
cls_version_check(*rop, ver, VER_COND_LT);
Expand All @@ -295,4 +307,6 @@ TEST(cls_rgw, test_version_inc_check)
rop = new_rop();
cls_version_check(*rop, cond_ver, VER_COND_TAG_NE);
ASSERT_EQ(-ECANCELED, ioctx.operate(oid, rop, &bl));

delete rop;
}
2 changes: 1 addition & 1 deletion src/upstart/ceph-osd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ stop on runlevel [!2345] or stopping ceph-osd-all
respawn
respawn limit 5 30

limit nofile 16384 16384
limit nofile 32768 32768

pre-start script
set -e
Expand Down

0 comments on commit df9b877

Please sign in to comment.