[pve-devel] [PATCH ceph 4/5] cherry-pick monitor fix

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Apr 28 08:50:58 CEST 2017


otherwise monitors won't start after the upgrade from <=
12.0.2..

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 patches/0001-update-changelog.patch                |  2 +-
 patches/0002-build-with-system-boost.patch         |  2 +-
 ...3-ceph-detect-init-support-Debian-Stretch.patch |  2 +-
 .../0004-enable-systemd-targets-by-default.patch   |  2 +-
 ...vert-debian-drop-boost-build-dependencies.patch |  2 +-
 ...tor-tolerate-upgrade-from-post-kraken-dev.patch | 58 ++++++++++++++++++++++
 patches/series                                     |  1 +
 7 files changed, 64 insertions(+), 5 deletions(-)
 create mode 100644 patches/0006-mon-OSDMonitor-tolerate-upgrade-from-post-kraken-dev.patch

diff --git a/patches/0001-update-changelog.patch b/patches/0001-update-changelog.patch
index 5990775..fbc0d69 100644
--- a/patches/0001-update-changelog.patch
+++ b/patches/0001-update-changelog.patch
@@ -1,7 +1,7 @@
 From f12b07be40d9cb909ef7b03c9168a274bfd13086 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler at 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
diff --git a/patches/0002-build-with-system-boost.patch b/patches/0002-build-with-system-boost.patch
index ae9c51d..384bd74 100644
--- a/patches/0002-build-with-system-boost.patch
+++ b/patches/0002-build-with-system-boost.patch
@@ -1,7 +1,7 @@
 From b56cf191f690b1ce3f1f0723fc09c634be6c81d8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler at 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
diff --git a/patches/0003-ceph-detect-init-support-Debian-Stretch.patch b/patches/0003-ceph-detect-init-support-Debian-Stretch.patch
index 6f889a6..9b63249 100644
--- a/patches/0003-ceph-detect-init-support-Debian-Stretch.patch
+++ b/patches/0003-ceph-detect-init-support-Debian-Stretch.patch
@@ -1,7 +1,7 @@
 From 927fa850b146575bcb31c85c00fc75df321c5a7c Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler at 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
diff --git a/patches/0004-enable-systemd-targets-by-default.patch b/patches/0004-enable-systemd-targets-by-default.patch
index 53be345..1db33ac 100644
--- a/patches/0004-enable-systemd-targets-by-default.patch
+++ b/patches/0004-enable-systemd-targets-by-default.patch
@@ -1,7 +1,7 @@
 From cf2641af1f3e3c86e7a6cfdadd8967b837b88893 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler at 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
diff --git a/patches/0005-Revert-debian-drop-boost-build-dependencies.patch b/patches/0005-Revert-debian-drop-boost-build-dependencies.patch
index 46031f1..72403b2 100644
--- a/patches/0005-Revert-debian-drop-boost-build-dependencies.patch
+++ b/patches/0005-Revert-debian-drop-boost-build-dependencies.patch
@@ -1,7 +1,7 @@
 From ead28414be9eca9c6c09b702bbda27a4c2fbe65b Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler at 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
index 0000000..7019e79
--- /dev/null
+++ b/patches/0006-mon-OSDMonitor-tolerate-upgrade-from-post-kraken-dev.patch
@@ -0,0 +1,58 @@
+From 3e90e5f70f5d43c28eee66a533f3d06f13815f6e Mon Sep 17 00:00:00 2001
+From: Sage Weil <sage at 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 at redhat.com>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler at 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
+
diff --git a/patches/series b/patches/series
index 6ef360b..b60fe59 100644
--- a/patches/series
+++ b/patches/series
@@ -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
-- 
2.1.4





More information about the pve-devel mailing list