From 0f7332e9259b320777770f0312233a31103bfeda Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 15 Nov 2017 08:55:33 -0600 Subject: [PATCH] mon/OSDMonitor: add option to fix up ruleset-* to crush-* for ec profiles The jewel->luminous upgrade test will fail if we finish the upgrade while a workload setting old-style ec profiles is running. Add option to automatically fix them up. Warn to the cluster log when this happens. For now, enable this option to ease upgrades and whitelist the warning. Only include this option in luminous so that we implicitly sunset this compatibility kludge immediately. Fixes: http://tracker.ceph.com/issues/22128 Signed-off-by: Sage Weil --- qa/releases/luminous-with-mgr.yaml | 2 ++ qa/releases/luminous.yaml | 1 + qa/workunits/cephtool/test.sh | 4 ++-- src/common/options.cc | 4 ++++ src/mon/OSDMonitor.cc | 16 ++++++++++++---- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/qa/releases/luminous-with-mgr.yaml b/qa/releases/luminous-with-mgr.yaml index d500803750ec..391a5e1816d1 100644 --- a/qa/releases/luminous-with-mgr.yaml +++ b/qa/releases/luminous-with-mgr.yaml @@ -8,3 +8,5 @@ overrides: conf: mon: mon warn on osd down out interval zero: false + log-whitelist: + - ruleset- diff --git a/qa/releases/luminous.yaml b/qa/releases/luminous.yaml index 9ed76715a960..5bd666ca004c 100644 --- a/qa/releases/luminous.yaml +++ b/qa/releases/luminous.yaml @@ -19,3 +19,4 @@ overrides: mon warn on osd down out interval zero: false log-whitelist: - no active mgr + - ruleset- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index b70f6f9bf0fb..15344172a966 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -2153,8 +2153,8 @@ function test_mon_osd_erasure_code() ceph osd erasure-code-profile set fooprofile a=b c=d e=f --force ceph osd erasure-code-profile set fooprofile a=b c=d e=f expect_false ceph osd erasure-code-profile set fooprofile a=b c=d e=f g=h - # make sure ruleset-foo doesn't work anymore - expect_false ceph osd erasure-code-profile set barprofile ruleset-failure-domain=host + # ruleset-foo will work for luminous only + ceph osd erasure-code-profile set barprofile ruleset-failure-domain=host ceph osd erasure-code-profile set barprofile crush-failure-domain=host # clean up ceph osd erasure-code-profile rm fooprofile diff --git a/src/common/options.cc b/src/common/options.cc index 269923239ca0..414f091d830b 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1298,6 +1298,10 @@ std::vector