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
This commit is contained in:
Scott Hussey 2018-02-22 20:18:30 -06:00
parent 50d9bcd527
commit 1cf933834f
2 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -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