14. Add disk size hintsΒΆ
Note
Information on setting the root device for deployment is available here: <http://docs.openstack.org/developer/tripleo-docs/advanced_deployment/root_device.html#setting-the-root-device-for-deployment>
- Get nodes UUID
source /home/stack/stackrc
export items="$( ironic node-list | grep 'power' | awk '{print $2}' )"
- Find disk size from instackenv.json
export DISK_SIZE="$( cat instackenv.json | grep '"disk": ' | awk '{print $2}' | sed s/\"//g | sed s/\,// )"
- Update nodes with disk size hint
count=0
ARRAY_DISK_SIZE=($(echo $DISK_SIZE))
ROOT_DEVICE_SIZE={{ disk_root_device_size }}
for item in $items; do
if [ $ROOT_DEVICE_SIZE -ge ${ARRAY_DISK_SIZE[$count]} ]; then
declare i ADS
ADS=${ARRAY_DISK_SIZE[$count]}
ironic node-update $item add properties/root_device='{"size": '$ADS'}'
fi
count=$((count+1))
done
- Rerun introspection
openstack baremetal introspection bulk start