diff --git a/PendingReleaseNotes b/PendingReleaseNotes index ea06b760ba334..2c001894745c7 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -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). diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index de2abe5665b7d..6cda4cba5c39f 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -815,7 +815,7 @@ static int bi_log_iterate_entries(cls_method_context_t hctx, const string& marke map keys; string filter_prefix, end_key; bufferlist start_bl; - bool start_key_added; + bool start_key_added = false; uint32_t i = 0; string key; diff --git a/src/common/config_opts.h b/src/common/config_opts.h index b43808e211cf2..335a92071521a 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -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) diff --git a/src/init-ceph.in b/src/init-ceph.in index b0ed353f8e7fa..8eb02f8921438 100644 --- a/src/init-ceph.in +++ b/src/init-ceph.in @@ -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="" diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 9492f7c916874..bd189f1430ce4 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -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), diff --git a/src/os/ObjectStore.cc b/src/os/ObjectStore.cc index ae97b6b08d344..9d8b989225b65 100644 --- a/src/os/ObjectStore.cc +++ b/src/os/ObjectStore.cc @@ -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"); diff --git a/src/rgw/rgw_metadata.cc b/src/rgw/rgw_metadata.cc index ac8c703f5e056..e9094ad35d698 100644 --- a/src/rgw/rgw_metadata.cc +++ b/src/rgw/rgw_metadata.cc @@ -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; diff --git a/src/rgw/rgw_metadata.h b/src/rgw/rgw_metadata.h index 2cc9110191aab..3ff3b3317b8c6 100644 --- a/src/rgw/rgw_metadata.h +++ b/src/rgw/rgw_metadata.h @@ -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); diff --git a/src/test/cls_statelog/test_cls_statelog.cc b/src/test/cls_statelog/test_cls_statelog.cc index 294b528f5db2c..33028f4fbad63 100644 --- a/src/test/cls_statelog/test_cls_statelog.cc +++ b/src/test/cls_statelog/test_cls_statelog.cc @@ -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& entries, int expected) @@ -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; } diff --git a/src/test/cls_version/test_cls_version.cc b/src/test/cls_version/test_cls_version.cc index caa0a36cd74a7..acce4f00cf4c5 100644 --- a/src/test/cls_version/test_cls_version.cc +++ b/src/test/cls_version/test_cls_version.cc @@ -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)); @@ -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)); @@ -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)); @@ -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)); @@ -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)); @@ -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)); @@ -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); @@ -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; } diff --git a/src/upstart/ceph-osd.conf b/src/upstart/ceph-osd.conf index e26bbc790b9ca..c0bf4d68c1cb1 100644 --- a/src/upstart/ceph-osd.conf +++ b/src/upstart/ceph-osd.conf @@ -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