Set root hints for disks less than 4Gb and IPA

Set root hint for Ironic node if deploying with IPA and
disk is less than 4Gb in size.

Change-Id: I88894a60362a3a025da2209653bf758857cbf53f
This commit is contained in:
Vasyl Saienko
2016-04-27 04:04:19 -04:00
committed by vsaienko
parent 8474e04644
commit 13fdffa5a1

View File

@@ -845,6 +845,13 @@ function enroll_nodes {
$node_options \
| grep " uuid " | get_field 2)
# NOTE(vsaienko) IPA didn't automatically recognize root devices less than 4Gb.
# Setting root hint allows to install OS on such devices.
# 0x1af4 is VirtIO vendor device ID.
if [[ "$ironic_node_disk" -lt "4" && is_deployed_by_agent ]]; then
ironic node-update $node_id add properties/root_device='{"vendor": "0x1af4"}'
fi
ironic port-create --address $mac_address --node $node_id
total_nodes=$((total_nodes+1))