Skip to content
Snippets Groups Projects
Commit 160d6b27 authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Use the disk size as the osd weight when osd_initial_weight is auto"

parents 9b05eb87 d4269334
No related branches found
No related tags found
No related merge requests found
......@@ -192,6 +192,7 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
{% set base_apt_packages = [
'ca-certificates',
'curl',
'gawk',
'lvm2',
'open-iscsi',
'python',
......
......@@ -50,6 +50,10 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
CEPH_ROOT_NAME=cache
fi
if [[ "${OSD_INITIAL_WEIGHT}" == "auto" ]]; then
OSD_INITIAL_WEIGHT=$(parted --script ${OSD_PARTITION} unit TB print | awk 'match($0, /^Disk.* (.*)TB/, a){printf("%.2f", a[1])}')
fi
# These commands only need to be run once per host but are safe to run
# repeatedly. This can be improved later or if any problems arise.
ceph osd crush add-bucket "${HOSTNAME}${CEPH_ROOT_NAME:+-${CEPH_ROOT_NAME}}" host
......
---
prelude: >
In most of case, the disks used by ceph have different size. Use the default
value 1 may block the ceph when one disk is full. Use the disk size as osd
weight will more reasonally.
features:
- support using the disk size as the osd weight when osd_initial_weight is
auto
upgrade:
- the os_initial_weight still has the default value 1, it will not break
cluster when upgrading.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment