Skip some steps for multinode case
This patch skip the following steps from executing on subnode: * Upload baremetal image * Create baremetal flavor Related-Bug: #1622653 Change-Id: Iae2024922fe5e5ba014264c867b897e2b044b992
This commit is contained in:
parent
c73b5d0d3c
commit
4cb95b7dc0
@ -1254,6 +1254,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))
|
||||
@ -1271,6 +1272,7 @@ function enroll_nodes {
|
||||
wait_for_nova_resources "count" $total_nodes
|
||||
wait_for_nova_resources "vcpus" $total_cpus
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function configure_iptables {
|
||||
@ -1456,7 +1458,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
|
||||
@ -1468,6 +1469,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
|
||||
@ -1489,7 +1497,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)
|
||||
@ -1497,7 +1505,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)
|
||||
@ -1512,6 +1520,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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user