Merge "Skip some steps for multinode case"

This commit is contained in:
Jenkins 2016-11-24 18:12:57 +00:00 committed by Gerrit Code Review
commit 1b9c1de984

View File

@ -1268,6 +1268,7 @@ function enroll_nodes {
total_cpus=$((total_cpus+$ironic_node_cpu))
done < $ironic_hwinfo_file
if [[ "$HOST_TOPOLOGY_ROLE" != 'subnode' ]]; then
if [ "$VIRT_DRIVER" == "ironic" ]; then
local adjusted_disk
adjusted_disk=$(($ironic_node_disk - $ironic_ephemeral_disk))
@ -1285,6 +1286,7 @@ function enroll_nodes {
wait_for_nova_resources "count" $total_nodes
wait_for_nova_resources "vcpus" $total_cpus
fi
fi
}
function configure_iptables {
@ -1470,7 +1472,6 @@ function build_ipa_dib_ramdisk {
# this function sets ``IRONIC_DEPLOY_KERNEL_ID``, ``IRONIC_DEPLOY_RAMDISK_ID``
function upload_baremetal_ironic_deploy {
declare -g IRONIC_DEPLOY_KERNEL_ID IRONIC_DEPLOY_RAMDISK_ID
echo_summary "Creating and uploading baremetal images for ironic"
if [ -z "$IRONIC_DEPLOY_KERNEL" -o -z "$IRONIC_DEPLOY_RAMDISK" -o -z "$IRONIC_DEPLOY_ISO" ]; then
local IRONIC_DEPLOY_KERNEL_PATH=$TOP_DIR/files/ir-deploy-$IRONIC_DEPLOY_DRIVER.kernel
@ -1482,6 +1483,13 @@ function upload_baremetal_ironic_deploy {
local IRONIC_DEPLOY_ISO_PATH=$IRONIC_DEPLOY_ISO
fi
local ironic_deploy_kernel_name
local ironic_deploy_ramdisk_name
ironic_deploy_kernel_name=$(basename $IRONIC_DEPLOY_KERNEL_PATH)
ironic_deploy_ramdisk_name=$(basename $IRONIC_DEPLOY_RAMDISK_PATH)
if [[ "$HOST_TOPOLOGY_ROLE" != 'subnode' ]]; then
echo_summary "Creating and uploading baremetal images for ironic"
if [ ! -e "$IRONIC_DEPLOY_RAMDISK_PATH" ] || \
[ ! -e "$IRONIC_DEPLOY_KERNEL_PATH" ] || \
( is_deploy_iso_required && [ ! -e "$IRONIC_DEPLOY_ISO_PATH" ] ); then
@ -1503,7 +1511,7 @@ function upload_baremetal_ironic_deploy {
# load them into glance
IRONIC_DEPLOY_KERNEL_ID=$(openstack \
image create \
$(basename $IRONIC_DEPLOY_KERNEL_PATH) \
$ironic_deploy_kernel_name \
--public --disk-format=aki \
--container-format=aki \
< $IRONIC_DEPLOY_KERNEL_PATH | grep ' id ' | get_field 2)
@ -1511,7 +1519,7 @@ function upload_baremetal_ironic_deploy {
IRONIC_DEPLOY_RAMDISK_ID=$(openstack \
image create \
$(basename $IRONIC_DEPLOY_RAMDISK_PATH) \
$ironic_deploy_ramdisk_name \
--public --disk-format=ari \
--container-format=ari \
< $IRONIC_DEPLOY_RAMDISK_PATH | grep ' id ' | get_field 2)
@ -1526,6 +1534,10 @@ function upload_baremetal_ironic_deploy {
< $IRONIC_DEPLOY_ISO_PATH -f value -c id)
die_if_not_set $LINENO IRONIC_DEPLOY_ISO_ID "Failed to load deploy iso into glance"
fi
else
IRONIC_DEPLOY_KERNEL_ID=$(openstack image show $ironic_deploy_kernel_name -f value -c id)
IRONIC_DEPLOY_RAMDISK_ID=$(openstack image show $ironic_deploy_ramdisk_name -f value -c id)
fi
}
function prepare_baremetal_basic_ops {