Set RBD default features based on distro

In some jobs, we run tests that use "rbd map".
On older kernels, this will not work if newer
RBD features are used.  (Specifically, fast-diff
on bionic.)

On older distros, enable fewer features by default.

Closes-Bug: #1921897
Change-Id: Iff1c5210b0279379eb9612b206bdf456dd6f132e
(cherry picked from commit 35e1ff5cf4)
(cherry picked from commit 3db789ae6c)
(cherry picked from commit fe4c6269f9)
(cherry picked from commit 00fd7f3121)
This commit is contained in:
Eric Harney 2021-03-30 09:55:18 -04:00 committed by Radosław Piliszek
parent 6ffd7b04c1
commit 0f89989126
1 changed files with 5 additions and 1 deletions

View File

@ -57,7 +57,11 @@ MDS_ID=${MDS_ID:-a}
MGR_ID=${MGR_ID:-x}
# RBD configuration defaults
CEPH_RBD_DEFAULT_FEATURES=${CEPH_RBD_DEFAULT_FEATURES:-"layering, exclusive-lock, object-map, fast-diff"}
if [[ ${DISTRO} =~ (bionic|xenial) ]]; then
CEPH_RBD_DEFAULT_FEATURES=${CEPH_RBD_DEFAULT_FEATURES:-"layering, exclusive-lock"}
else
CEPH_RBD_DEFAULT_FEATURES=${CEPH_RBD_DEFAULT_FEATURES:-"layering, exclusive-lock, object-map, fast-diff"}
fi
# Glance
GLANCE_CEPH_USER=${GLANCE_CEPH_USER:-glance}