]> git.proxmox.com Git - ceph.git/commitdiff
rebase patches to upstream release
authorAlwin Antreich <a.antreich@proxmox.com>
Wed, 6 Feb 2019 08:39:05 +0000 (09:39 +0100)
committerAlwin Antreich <a.antreich@proxmox.com>
Wed, 6 Feb 2019 10:02:28 +0000 (11:02 +0100)
Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
patches/0001-update-changelog.patch
patches/0002-cmake-disable-version-from-git.patch
patches/0003-enable-systemd-targets-by-default.patch
patches/0004-enable-LZ4-support.patch
patches/0006-Revert-debian-control-adjust-ceph-osdomap-kvstore-mo.patch
patches/0007-debian-control-add-break-libpvestorage-perl.patch
patches/0008-os-bluestore-handle-spurious-read-errors.patch [deleted file]
patches/series

index e8aedc11d96bf0c88a57a7c1316663e9d2c68f1c..41b2c59d45a3c60aff156c18d1a6446c0ed88cea 100644 (file)
@@ -5,14 +5,26 @@ Subject: [PATCH] update changelog
 
 Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
 ---
- debian/changelog | 19+++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 190 insertions(+)
+ debian/changelog | 196 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 196 insertions(+)
 
 diff --git a/debian/changelog b/debian/changelog
-index 2b61ec882..75c7fb9ac 100644
+index eaed6bfbb4..4425cd75f7 100644
 --- a/debian/changelog
 +++ b/debian/changelog
-@@ -1,3 +1,18 @@
+@@ -1,9 +1,30 @@
++ceph (12.2.11-pve1) stable; urgency=medium
++
++  * New upstream release 
++
++ -- Proxmox Support Team <support@proxmox.com>  Wed, 06 Feb 2019 09:35:13 +0100
++
+ ceph (12.2.11-1) stable; urgency=medium
+   * New upstream release
+  -- Ceph Release Team <ceph-maintainers@ceph.com>  Wed, 30 Jan 2019 15:51:24 +0000
 +ceph (12.2.10-pve1) stable; urgency=medium
 +
 +  * New upstream release
@@ -31,7 +43,7 @@ index 2b61ec882..75c7fb9ac 100644
  ceph (12.2.10-1) stable; urgency=medium
  
    * New upstream release
-@@ -10,12 +25,31 @@ ceph (12.2.9-1) stable; urgency=medium
+@@ -16,12 +37,31 @@ ceph (12.2.9-1) stable; urgency=medium
  
   -- Ceph Release Team <ceph-maintainers@ceph.com>  Wed, 24 Oct 2018 21:04:18 +0000
  
@@ -63,7 +75,7 @@ index 2b61ec882..75c7fb9ac 100644
  ceph (12.2.7-1) stable; urgency=medium
  
    * New upstream release
-@@ -28,90 +62,246 @@ ceph (12.2.6-1) stable; urgency=medium
+@@ -34,90 +74,246 @@ ceph (12.2.6-1) stable; urgency=medium
  
   -- Ceph Release Team <ceph-maintainers@ceph.com>  Mon, 09 Jul 2018 16:18:46 +0000
  
@@ -310,6 +322,3 @@ index 2b61ec882..75c7fb9ac 100644
  ceph (12.0.0-1) stable; urgency=medium
  
    * New upstream release
--- 
-2.19.2
-
index 6889ec62dd10c2b9fdc0d634e86ad79d883c520e..6ede15478f25f649aac883e5d8dd4457fe5d3488 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
  1 file changed, 5 deletions(-)
 
 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 80d4b351f5..10e4a6013b 100644
+index b0837ab1d9..f63bf44de3 100644
 --- a/src/CMakeLists.txt
 +++ b/src/CMakeLists.txt
 @@ -206,15 +206,10 @@ set(GCOV_PREFIX_STRIP 4)
index d99cef48eb4f3d96d8e488e05f17e053bc39a5f9..cb5ddca518a89717b5c284020d36b1d376be7a07 100644 (file)
@@ -12,7 +12,7 @@ Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
  1 file changed, 3 insertions(+)
 
 diff --git a/debian/rules b/debian/rules
-index 99a3e8e982..db051ded25 100755
+index b5ce42c6f3..00e9ac6b16 100755
 --- a/debian/rules
 +++ b/debian/rules
 @@ -133,6 +133,9 @@ override_dh_installinit:
index 55bb0883a2c018846aaf73827e2f2597f61b92f5..9bf4a116655db9adbec99510c8c12664c18fb3a3 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
  2 files changed, 2 insertions(+)
 
 diff --git a/debian/control b/debian/control
-index d5bc16e9ee..d96f5aedd0 100644
+index 65c29ed0d5..819f4f0b4d 100644
 --- a/debian/control
 +++ b/debian/control
 @@ -38,6 +38,7 @@ Build-Depends: bc,
@@ -25,7 +25,7 @@ index d5bc16e9ee..d96f5aedd0 100644
                 libsnappy-dev,
                 libssl-dev,
 diff --git a/debian/rules b/debian/rules
-index db051ded25..9dad5ad166 100755
+index 00e9ac6b16..3ac923f71a 100755
 --- a/debian/rules
 +++ b/debian/rules
 @@ -7,6 +7,7 @@ export DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
index 626d0d8d9e3f5204fc1159d1824ddbcbac18e301..98d0e166ad8b8a6a9e751238b6460fa2aca93520 100644 (file)
@@ -17,10 +17,10 @@ Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
  1 file changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/debian/control b/debian/control
-index d96f5aedd0..ecbecca725 100644
+index 819f4f0b4d..83dc414788 100644
 --- a/debian/control
 +++ b/debian/control
-@@ -106,10 +106,10 @@ Recommends: btrfs-tools,
+@@ -108,10 +108,10 @@ Recommends: btrfs-tools,
              ntp | time-daemon,
  Replaces: ceph (<< 10),
            ceph-common (<< 0.78-500),
@@ -33,7 +33,7 @@ index d96f5aedd0..ecbecca725 100644
          python-ceph (<< 0.92-1223),
  Description: common ceph daemon libraries and management tools
   Ceph is a massively scalable, open-source, distributed
-@@ -208,8 +208,8 @@ Depends: ceph-base (= ${binary:Version}),
+@@ -210,8 +210,8 @@ Depends: ceph-base (= ${binary:Version}),
           ${misc:Depends},
           ${shlibs:Depends},
  Recommends: ceph-common,
@@ -44,7 +44,7 @@ index d96f5aedd0..ecbecca725 100644
  Description: monitor server for the ceph storage system
   Ceph is a massively scalable, open-source, distributed
   storage system that runs on commodity hardware and delivers object,
-@@ -242,8 +242,8 @@ Depends: ceph-base (= ${binary:Version}),
+@@ -243,8 +243,8 @@ Depends: ceph-base (= ${binary:Version}),
           ${python:Depends},
           ${shlibs:Depends},
  Recommends: ceph-common (= ${binary:Version}),
index 977dc8e60538c0223540b4fcffc93b9ef5dc85aa..e68e6ae844c215e9fc3b7a4123a82c071238be57 100644 (file)
@@ -8,10 +8,10 @@ Subject: [PATCH] debian/control: add break libpvestorage-perl
  1 file changed, 2 insertions(+)
 
 diff --git a/debian/control b/debian/control
-index ecbecca725..19aa49f9f4 100644
+index 83dc414788..1cfa2250de 100644
 --- a/debian/control
 +++ b/debian/control
-@@ -111,6 +111,7 @@ Replaces: ceph (<< 10),
+@@ -113,6 +113,7 @@ Replaces: ceph (<< 10),
  Breaks: ceph (<< 10),
          ceph-test (<< 12.2.3),
          python-ceph (<< 0.92-1223),
@@ -19,11 +19,11 @@ index ecbecca725..19aa49f9f4 100644
  Description: common ceph daemon libraries and management tools
   Ceph is a massively scalable, open-source, distributed
   storage system that runs on commodity hardware and delivers object,
-@@ -407,6 +408,7 @@ Breaks: ceph (<< 10),
+@@ -409,6 +410,7 @@ Breaks: ceph (<< 10),
          ceph-test (<< 9.0.3-1646),
          librbd1 (<< 0.92-1238),
          python-ceph (<< 0.92-1223),
 +        libpve-storage-perl (<= 5.0-25),
+       radosgw (<< 12.0.3)
  Suggests: ceph-base (= ${binary:Version}),
            ceph-mds (= ${binary:Version}),
- Description: common utilities to mount and interact with a ceph storage cluster
diff --git a/patches/0008-os-bluestore-handle-spurious-read-errors.patch b/patches/0008-os-bluestore-handle-spurious-read-errors.patch
deleted file mode 100644 (file)
index 6fe8d59..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Alwin Antreich <a.antreich@proxmox.com>
-Date: Thu, 6 Dec 2018 12:14:04 +0100
-Subject: [PATCH] os/bluestore: handle spurious read errors
-
-Some kernels (4.9+) sometime fail to return data when reading
-from a block device under memory pressure. This patch retries
-the read if the checksum verification fails, tests show that
-the first retried read succeeds in ~99.5% of the cases, so
-3 attempts are made by default before giving up on the data.
-
-Works-around: http://tracker.ceph.com/issues/22464
-Signed-off-by: Paul Emmerich <paul.emmerich@croit.io>
-(cherry picked from commit cffcbc73aaaa874829d5fc9091af3042b887f9a7)
-
- Conflicts:
-        src/common/legacy_config_opts.h
-- adjacent options
-        src/common/options.cc
-- no RUNTIME flag in luminous
-        src/os/bluestore/BlueStore.cc
-        src/os/bluestore/BlueStore.h
-- adjacent perfcounter
-        src/test/objectstore/store_test.cc
-- adjacent tests, no #ifdef
-- g_conf, not g_conf()
-- no create_new_collection
-- queue_transaction etc take osr, not ch
-
-Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
----
- src/common/legacy_config_opts.h    |  2 +
- src/common/options.cc              | 10 +++++
- src/os/bluestore/BlueStore.cc      | 35 ++++++++++++++--
- src/os/bluestore/BlueStore.h       |  4 +-
- src/test/objectstore/store_test.cc | 67 ++++++++++++++++++++++++++++++
- 5 files changed, 114 insertions(+), 4 deletions(-)
-
-diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h
-index a51870ef6..54d2b578b 100644
---- a/src/common/legacy_config_opts.h
-+++ b/src/common/legacy_config_opts.h
-@@ -1031,6 +1031,7 @@ OPTION(bluestore_block_preallocate_file, OPT_BOOL) //whether preallocate space i
- OPTION(bluestore_csum_type, OPT_STR) // none|xxhash32|xxhash64|crc32c|crc32c_16|crc32c_8
- OPTION(bluestore_csum_min_block, OPT_U32)
- OPTION(bluestore_csum_max_block, OPT_U32)
-+OPTION(bluestore_retry_disk_reads, OPT_U64)
- OPTION(bluestore_min_alloc_size, OPT_U32)
- OPTION(bluestore_min_alloc_size_hdd, OPT_U32)
- OPTION(bluestore_min_alloc_size_ssd, OPT_U32)
-@@ -1124,6 +1125,7 @@ OPTION(bluestore_debug_omit_kv_commit, OPT_BOOL)
- OPTION(bluestore_debug_permit_any_bdev_label, OPT_BOOL)
- OPTION(bluestore_shard_finishers, OPT_BOOL)
- OPTION(bluestore_debug_random_read_err, OPT_DOUBLE)
-+OPTION(bluestore_debug_inject_csum_err_probability, OPT_FLOAT)
- OPTION(kstore_max_ops, OPT_U64)
- OPTION(kstore_max_bytes, OPT_U64)
-diff --git a/src/common/options.cc b/src/common/options.cc
-index ff3bb1a1b..8983210d9 100644
---- a/src/common/options.cc
-+++ b/src/common/options.cc
-@@ -3422,6 +3422,12 @@ std::vector<Option> get_global_options() {
-     .set_description("Maximum block size to checksum")
-     .add_see_also("bluestore_csum_min_block"),
-+    Option("bluestore_retry_disk_reads", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
-+    .set_default(3)
-+    .set_min_max(0, 255)
-+    .set_description("Number of read retries on checksum validation error")
-+    .set_long_description("Retries to read data from the disk this many times when checksum validation fails to handle spurious read errors gracefully."),
-+
-     Option("bluestore_min_alloc_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
-     .set_default(0)
-     .add_tag("mkfs")
-@@ -3791,6 +3797,10 @@ std::vector<Option> get_global_options() {
-     .set_default(0)
-     .set_description(""),
-+    Option("bluestore_debug_inject_csum_err_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
-+    .set_default(0.0)
-+    .set_description("inject crc verification errors into bluestore device reads"),
-+
-     // -----------------------------------------
-     // kstore
-diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc
-index b326d39bc..28ababbe5 100644
---- a/src/os/bluestore/BlueStore.cc
-+++ b/src/os/bluestore/BlueStore.cc
-@@ -4171,6 +4171,8 @@ void BlueStore::_init_logger()
-                   "collection");
-   b.add_u64_counter(l_bluestore_read_eio, "bluestore_read_eio",
-                     "Read EIO errors propagated to high level callers");
-+  b.add_u64_counter(l_bluestore_reads_with_retries, "bluestore_reads_with_retries",
-+                    "Read operations that required at least one retry due to failed checksum validation");
-   logger = b.create_perf_counters();
-   cct->get_perfcounters_collection()->add(logger);
- }
-@@ -6698,7 +6700,8 @@ int BlueStore::_do_read(
-   uint64_t offset,
-   size_t length,
-   bufferlist& bl,
--  uint32_t op_flags)
-+  uint32_t op_flags,
-+  uint64_t retry_count)
- {
-   FUNCTRACE();
-   int r = 0;
-@@ -6919,7 +6922,14 @@ int BlueStore::_do_read(
-       bufferlist& compressed_bl = *p++;
-       if (_verify_csum(o, &bptr->get_blob(), 0, compressed_bl,
-                      b2r_it->second.front().logical_offset) < 0) {
--      return -EIO;
-+        // Handles spurious read errors caused by a kernel bug.
-+        // We sometimes get all-zero pages as a result of the read under
-+        // high memory pressure. Retrying the failing read succeeds in most cases.
-+        // See also: http://tracker.ceph.com/issues/22464
-+        if (retry_count >= cct->_conf->bluestore_retry_disk_reads) {
-+          return -EIO;
-+        }
-+        return _do_read(c, o, offset, length, bl, op_flags, retry_count + 1);
-       }
-       bufferlist raw_bl;
-       r = _decompress(compressed_bl, &raw_bl);
-@@ -6937,7 +6947,14 @@ int BlueStore::_do_read(
-       for (auto& reg : b2r_it->second) {
-       if (_verify_csum(o, &bptr->get_blob(), reg.r_off, reg.bl,
-                        reg.logical_offset) < 0) {
--        return -EIO;
-+          // Handles spurious read errors caused by a kernel bug.
-+          // We sometimes get all-zero pages as a result of the read under
-+          // high memory pressure. Retrying the failing read succeeds in most cases.
-+          // See also: http://tracker.ceph.com/issues/22464
-+          if (retry_count >= cct->_conf->bluestore_retry_disk_reads) {
-+            return -EIO;
-+          }
-+          return _do_read(c, o, offset, length, bl, op_flags, retry_count + 1);
-       }
-       if (buffered) {
-         bptr->shared_blob->bc.did_read(bptr->shared_blob->get_cache(),
-@@ -6981,6 +6998,11 @@ int BlueStore::_do_read(
-   assert(pos == length);
-   assert(pr == pr_end);
-   r = bl.length();
-+  if (retry_count) {
-+    logger->inc(l_bluestore_reads_with_retries);
-+    dout(5) << __func__ << " read at 0x" << std::hex << offset << "~" << length
-+            << " failed " << std::dec << retry_count << " times before succeeding" << dendl;
-+  }
-   return r;
- }
-@@ -6993,6 +7015,13 @@ int BlueStore::_verify_csum(OnodeRef& o,
-   uint64_t bad_csum;
-   utime_t start = ceph_clock_now();
-   int r = blob->verify_csum(blob_xoffset, bl, &bad, &bad_csum);
-+  if (cct->_conf->bluestore_debug_inject_csum_err_probability > 0 &&
-+      (rand() % 10000) < cct->_conf->bluestore_debug_inject_csum_err_probability * 10000.0) {
-+    derr << __func__ << " injecting bluestore checksum verifcation error" << dendl;
-+    bad = blob_xoffset;
-+    r = -1;
-+    bad_csum = 0xDEADBEEF;
-+  }
-   if (r < 0) {
-     if (r == -1) {
-       PExtentVector pex;
-diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h
-index 6a14042df..70050a567 100644
---- a/src/os/bluestore/BlueStore.h
-+++ b/src/os/bluestore/BlueStore.h
-@@ -118,6 +118,7 @@ enum {
-   l_bluestore_extent_compress,
-   l_bluestore_gc_merged,
-   l_bluestore_read_eio,
-+  l_bluestore_reads_with_retries,
-   l_bluestore_last
- };
-@@ -2366,7 +2367,8 @@ public:
-     uint64_t offset,
-     size_t len,
-     bufferlist& bl,
--    uint32_t op_flags = 0);
-+    uint32_t op_flags = 0,
-+    uint64_t retry_count = 0);
- private:
-   int _fiemap(CollectionHandle &c_, const ghobject_t& oid,
-diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc
-index d2152d456..326c9785d 100644
---- a/src/test/objectstore/store_test.cc
-+++ b/src/test/objectstore/store_test.cc
-@@ -6855,6 +6855,73 @@ TEST_P(StoreTestSpecificAUSize, fsckOnUnalignedDevice2) {
-   g_conf->apply_changes(NULL);
- }
-+TEST_P(StoreTest, SpuriousReadErrorTest) {
-+  if (string(GetParam()) != "bluestore")
-+    return;
-+
-+  ObjectStore::Sequencer osr("test");
-+  int r;
-+  auto logger = store->get_perf_counters();
-+  coll_t cid;
-+  ghobject_t hoid(hobject_t(sobject_t("foo", CEPH_NOSNAP)));
-+  {
-+    ObjectStore::Transaction t;
-+    t.create_collection(cid, 0);
-+    cerr << "Creating collection " << cid << std::endl;
-+    r = store->queue_transaction(&osr, std::move(t), nullptr);
-+    ASSERT_EQ(r, 0);
-+  }
-+  bufferlist test_data;
-+  bufferptr ap(0x2000);
-+  memset(ap.c_str(), 'a', 0x2000);
-+  test_data.append(ap);
-+  {
-+    ObjectStore::Transaction t;
-+    t.write(cid, hoid, 0, 0x2000, test_data);
-+    r = store->queue_transaction(&osr, std::move(t), nullptr);
-+    ASSERT_EQ(r, 0);
-+    // force cache clear
-+    EXPECT_EQ(store->umount(), 0);
-+    EXPECT_EQ(store->mount(), 0);
-+  }
-+
-+  cerr << "Injecting CRC error with no retry, expecting EIO" << std::endl;
-+  g_conf->set_val("bluestore_retry_disk_reads", "0");
-+  g_conf->set_val("bluestore_debug_inject_csum_err_probability", "1");
-+  g_ceph_context->_conf->apply_changes(nullptr);
-+  {
-+    bufferlist in;
-+    r = store->read(cid, hoid, 0, 0x2000, in, CEPH_OSD_OP_FLAG_FADVISE_NOCACHE);
-+    ASSERT_EQ(-EIO, r);
-+    ASSERT_EQ(logger->get(l_bluestore_read_eio), 1u);
-+    ASSERT_EQ(logger->get(l_bluestore_reads_with_retries), 0u);
-+  }
-+
-+  cerr << "Injecting CRC error with retries, expecting success after several retries" << std::endl;
-+  g_conf->set_val("bluestore_retry_disk_reads", "255");
-+  g_conf->set_val("bluestore_debug_inject_csum_err_probability", "0.8");
-+  /**
-+   * Probabilistic test: 25 reads, each has a 80% chance of failing with 255 retries
-+   * Probability of at least one retried read: 1 - (0.2 ** 25) = 100% - 3e-18
-+   * Probability of a random test failure: 1 - ((1 - (0.8 ** 255)) ** 25) ~= 5e-24
-+   */
-+  g_ceph_context->_conf->apply_changes(nullptr);
-+  {
-+    for (int i = 0; i < 25; ++i) {
-+      bufferlist in;
-+      r = store->read(cid, hoid, 0, 0x2000, in, CEPH_OSD_OP_FLAG_FADVISE_NOCACHE);
-+      ASSERT_EQ(0x2000, r);
-+      ASSERT_TRUE(bl_eq(test_data, in));
-+    }
-+    ASSERT_GE(logger->get(l_bluestore_reads_with_retries), 1u);
-+  }
-+
-+  // revert
-+  g_conf->set_val("bluestore_retry_disk_reads", "3");
-+  g_conf->set_val("bluestore_debug_inject_csum_err_probability", "0");
-+  g_ceph_context->_conf->apply_changes(nullptr);
-+}
-+
- int main(int argc, char **argv) {
-   vector<const char*> args;
-   argv_to_vec(argc, (const char **)argv, args);
--- 
-2.19.2
-
index e069dacc36b00de2e617b1e898da0bef8ec3e08d..58a65f9f18c6472d5abf88249be90d75cdc4a4d5 100644 (file)
@@ -5,4 +5,3 @@
 0005-msg-async-rdma-uninitialized-variable-fix.patch
 0006-Revert-debian-control-adjust-ceph-osdomap-kvstore-mo.patch
 0007-debian-control-add-break-libpvestorage-perl.patch
-0008-os-bluestore-handle-spurious-read-errors.patch