diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-07-05 06:14:47 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-07-05 06:14:47 +0000 |
| commit | 160d6b270dc97bcf74bed765ad9b925dbae9f01c (patch) | |
| tree | 74be630939bdb0ab255fc0729563c29d6e54e9f9 /docker | |
| parent | 9b05eb87b8dc15a3b9de7ab237eda11b59971851 (diff) | |
| parent | d4269334dd7e99ebd84783a2dc9abf8a55804675 (diff) | |
| download | kolla-160d6b270dc97bcf74bed765ad9b925dbae9f01c.tar.gz kolla-160d6b270dc97bcf74bed765ad9b925dbae9f01c.zip | |
Merge "Use the disk size as the osd weight when osd_initial_weight is auto"
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/base/Dockerfile.j2 | 1 | ||||
| -rw-r--r-- | docker/ceph/ceph-osd/extend_start.sh | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 686cd3f5c..98461a851 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -192,6 +192,7 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences {% set base_apt_packages = [ 'ca-certificates', 'curl', + 'gawk', 'lvm2', 'open-iscsi', 'python', diff --git a/docker/ceph/ceph-osd/extend_start.sh b/docker/ceph/ceph-osd/extend_start.sh index 733e45ff9..ee745d0af 100644 --- a/docker/ceph/ceph-osd/extend_start.sh +++ b/docker/ceph/ceph-osd/extend_start.sh @@ -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 |
