]> git.proxmox.com Git - ceph.git/commitdiff
cherry-pick monitor fix
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 26 Apr 2017 12:17:49 +0000 (14:17 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 26 Apr 2017 12:20:46 +0000 (14:20 +0200)
otherwise monitors won't start after the upgrade from <=
12.0.2..

patches/0001-update-changelog.patch
patches/0002-build-with-system-boost.patch
patches/0003-ceph-detect-init-support-Debian-Stretch.patch
patches/0004-enable-systemd-targets-by-default.patch
patches/0005-Revert-debian-drop-boost-build-dependencies.patch
patches/0006-mon-OSDMonitor-tolerate-upgrade-from-post-kraken-dev.patch [new file with mode: 0644]
patches/series

index 599077519840f2dc1fe356ef31c6e986a8ed8643..fbc0d691a08ba07d9b6c143b8a58989b0563fb05 100644 (file)
@@ -1,7 +1,7 @@
 From f12b07be40d9cb909ef7b03c9168a274bfd13086 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
 Date: Mon, 20 Mar 2017 09:12:50 +0100
-Subject: [PATCH 1/5] update changelog
+Subject: [PATCH 1/6] update changelog
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
index ae9c51dd6ff3239b0fdfa344ed5470e02855df35..384bd74f8623a5c3c9c9d8b8228e4f31dff0d0df 100644 (file)
@@ -1,7 +1,7 @@
 From b56cf191f690b1ce3f1f0723fc09c634be6c81d8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
 Date: Mon, 20 Mar 2017 09:16:06 +0100
-Subject: [PATCH 2/5] build with system boost
+Subject: [PATCH 2/6] build with system boost
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
index 6f889a61abaa1a0c16662132321ea65469de672c..9b6324962cdf569c80d536fef78198ea6104fb5d 100644 (file)
@@ -1,7 +1,7 @@
 From 927fa850b146575bcb31c85c00fc75df321c5a7c Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
 Date: Tue, 21 Mar 2017 07:47:08 +0100
-Subject: [PATCH 3/5] ceph-detect-init: support Debian Stretch
+Subject: [PATCH 3/6] ceph-detect-init: support Debian Stretch
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
index 53be34546daffe0ee0f25332e3d6ac50d84728ee..1db33acbd0f801e5a9f1090ac64333184fcc185f 100644 (file)
@@ -1,7 +1,7 @@
 From cf2641af1f3e3c86e7a6cfdadd8967b837b88893 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
 Date: Wed, 22 Mar 2017 09:00:34 +0100
-Subject: [PATCH 4/5] enable systemd targets by default
+Subject: [PATCH 4/6] enable systemd targets by default
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
index 46031f19d2fb355e920a63adef65cb4459c5fdf0..72403b20898733c885e2ad64d4a809e8b6b63b32 100644 (file)
@@ -1,7 +1,7 @@
 From ead28414be9eca9c6c09b702bbda27a4c2fbe65b Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
 Date: Wed, 29 Mar 2017 09:10:54 +0200
-Subject: [PATCH 5/5] Revert "debian: drop boost build dependencies"
+Subject: [PATCH 5/6] Revert "debian: drop boost build dependencies"
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
diff --git a/patches/0006-mon-OSDMonitor-tolerate-upgrade-from-post-kraken-dev.patch b/patches/0006-mon-OSDMonitor-tolerate-upgrade-from-post-kraken-dev.patch
new file mode 100644 (file)
index 0000000..7019e79
--- /dev/null
@@ -0,0 +1,58 @@
+From 3e90e5f70f5d43c28eee66a533f3d06f13815f6e Mon Sep 17 00:00:00 2001
+From: Sage Weil <sage@redhat.com>
+Date: Mon, 10 Apr 2017 17:36:37 -0400
+Subject: [PATCH 6/6] mon/OSDMonitor: tolerate upgrade from post-kraken dev
+ cluster
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If the 'creating' pgs key is missing, move on without crashing.
+
+Signed-off-by: Sage Weil <sage@redhat.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
+---
+ src/mon/OSDMonitor.cc | 20 +++++++++++++-------
+ 1 file changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc
+index 554ba3a..46fea3e 100644
+--- a/src/mon/OSDMonitor.cc
++++ b/src/mon/OSDMonitor.cc
+@@ -251,12 +251,17 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
+       ceph::features::mon::FEATURE_LUMINOUS)) {
+     bufferlist bl;
+     mon->store->get(OSD_PG_CREATING_PREFIX, "creating", bl);
+-    auto p = bl.begin();
+-    std::lock_guard<std::mutex> l(creating_pgs_lock);
+-    creating_pgs.decode(p);
+-    dout(7) << __func__ << " loading creating_pgs last_scan_epoch "
+-          << creating_pgs.last_scan_epoch
+-          << " with " << creating_pgs.pgs.size() << " pgs" << dendl;
++    if (bl.length()) {
++      auto p = bl.begin();
++      std::lock_guard<std::mutex> l(creating_pgs_lock);
++      creating_pgs.decode(p);
++      dout(7) << __func__ << " loading creating_pgs last_scan_epoch "
++            << creating_pgs.last_scan_epoch
++            << " with " << creating_pgs.pgs.size() << " pgs" << dendl;
++    } else {
++      dout(1) << __func__ << " missing creating pgs; upgrade from post-kraken?"
++            << dendl;
++    }
+   }
+   // walk through incrementals
+@@ -268,7 +273,8 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
+     assert(err == 0);
+     assert(inc_bl.length());
+-    dout(7) << "update_from_paxos  applying incremental " << osdmap.epoch+1 << dendl;
++    dout(7) << "update_from_paxos  applying incremental " << osdmap.epoch+1
++          << dendl;
+     OSDMap::Incremental inc(inc_bl);
+     err = osdmap.apply_incremental(inc);
+     assert(err == 0);
+-- 
+2.1.4
+
index 6ef360b236c429210cbb0a56d32e8cd667f30b71..b60fe599d24ec387196f8a74db4acf76c1ab4155 100644 (file)
@@ -3,3 +3,4 @@
 0003-ceph-detect-init-support-Debian-Stretch.patch
 0004-enable-systemd-targets-by-default.patch
 0005-Revert-debian-drop-boost-build-dependencies.patch
+0006-mon-OSDMonitor-tolerate-upgrade-from-post-kraken-dev.patch