diff --git a/manifests/basic_ucp/armada.yaml.sub b/manifests/basic_ucp/armada.yaml.sub index e352b474..f6625d9e 100644 --- a/manifests/basic_ucp/armada.yaml.sub +++ b/manifests/basic_ucp/armada.yaml.sub @@ -116,7 +116,7 @@ data: osd_crush_chooseleaf_type: 0 pool: crush: - tunables: null + tunables: ${CEPH_CRUSH_TUNABLES} target: osd: 1 pg_per_osd: 100 diff --git a/manifests/basic_ucp/deploy_ucp.sh b/manifests/basic_ucp/deploy_ucp.sh index 65872ecc..86b1bbc0 100755 --- a/manifests/basic_ucp/deploy_ucp.sh +++ b/manifests/basic_ucp/deploy_ucp.sh @@ -123,6 +123,16 @@ function init_env { export ARMADA_CONFIG=${ARMADA_CONFIG:-"armada.yaml"} export UP_SCRIPT_FILE=${UP_SCRIPT_FILE:-"genesis.sh"} + # detect the proper Ceph config for this kernel + kern_minor=$(uname -a | cut -d ' ' -f 3 | cut -d '.' -f 2) + if [[ $kern_minor -lt 5 ]] + then + CEPH_CRUSH_TUNABLES='hammer' + else + CEPH_CRUSH_TUNABLES='null' + fi + export CEPH_CRUSH_TUNABLES + # Validate environment if [[ $GENESIS_NODE_IP == "NA" || $MASTER_NODE_IP == "NA" ]] then