From 1cf933834f9c0089d9caa1ced19ad3dbc2f6bf11 Mon Sep 17 00:00:00 2001 From: Scott Hussey Date: Thu, 22 Feb 2018 20:18:30 -0600 Subject: [PATCH] Configure ceph for ga and hwe kerns - Ceph has some kernel-dependent configs that if set incorrectly will break the deployment Set CEPH_CRUSH_TUNABLES based on the kernel minor version returned by uname Change-Id: I24994a402354e8713cf069a73fd15b9b99c6bd9c --- manifests/basic_ucp/armada.yaml.sub | 2 +- manifests/basic_ucp/deploy_ucp.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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