diff options
author | Tim Rozet <trozet@redhat.com> | 2016-06-06 17:34:53 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2016-06-08 11:15:12 -0400 |
commit | c7fd00092d47da0f0f7f43bae159a2ec36294ea5 (patch) | |
tree | 3977139532ea164d8278265660cb0f16fab85cda /build/set_perf_images.sh | |
parent | 5c9c130fb9d6609ac1f0ebbf6945e63667c6b168 (diff) |
Fixes setting kernel boot arguments with perf options
JIRA: APEX-168
opnfv-tht-pr: 22
Change-Id: I224b16be24b34e245d22c9321ca94ebe52c52dfd
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'build/set_perf_images.sh')
-rw-r--r-- | build/set_perf_images.sh | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/build/set_perf_images.sh b/build/set_perf_images.sh index 2002e6fb..0025cc75 100644 --- a/build/set_perf_images.sh +++ b/build/set_perf_images.sh @@ -2,7 +2,7 @@ ############################################################################## # Copyright (c) 2016 Red Hat Inc. -# Michael Chapman <michapma@redhat.com> +# Michael Chapman <michapma@redhat.com>, Tim Rozet <trozet@redhat.com> # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at @@ -10,22 +10,40 @@ ############################################################################## for ROLE in $@; do + RAMDISK=${ROLE}-bm-deploy-ramdisk + if [ -f $ROLE-overcloud-full.qcow2 ]; then + echo "Uploading ${RAMDISK}" + glance image-create --name ${RAMDISK} --disk-format ari --container-format ari --file ${ROLE}-ironic-python-agent.initramfs --is-public True echo "Uploading $ROLE-overcloud-full.qcow2 " KERNEL=$(glance image-show overcloud-full | grep 'kernel_id' | cut -d '|' -f 3 | xargs) - RAMDISK=$(glance image-show overcloud-full | grep 'ramdisk_id' | cut -d '|' -f 3 | xargs) - glance image-create --name $ROLE-overcloud-full --disk-format qcow2 --file $ROLE-overcloud-full.qcow2 --container-format bare --property ramdisk_id=$RAMDISK --property kernel_id=$KERNEL + RAMDISK_ID=$(glance image-show ${RAMDISK} | grep id | awk {'print $4'}) + glance image-create --name $ROLE-overcloud-full --disk-format qcow2 --file $ROLE-overcloud-full.qcow2 --container-format bare --property ramdisk_id=$RAMDISK_ID --property kernel_id=$KERNEL --is-public True fi if [ "$ROLE" == "Controller" ]; then sed -i "s/overcloud-full/Controller-overcloud-full/" opnfv-environment.yaml + sed -i '/OvercloudControlFlavor:/c\ OvercloudControlFlavor: control' opnfv-environment.yaml fi if [ "$ROLE" == "Compute" ]; then sudo sed -i "s/NovaImage: .*/NovaImage: Compute-overcloud-full/" /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml + sudo sed -i '/OvercloudComputeFlavor:/c\ OvercloudComputeFlavor: compute' /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml fi if [ "$ROLE" == "BlockStorage" ]; then sudo sed -i "s/BlockStorageImage: .*/BlockStorageImage: BlockStorage-overcloud-full/" /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml fi + + RAMDISK_ID=$(glance image-show ${RAMDISK} | grep id | awk {'print $4'}) + nodes=$(ironic node-list | awk {'print $2'} | grep -Eo [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + role=$(echo $ROLE | awk '{print tolower($0)}') + if [ "$role" == "controller" ]; then + role="control" + fi + for node in $nodes; do + if ironic node-show $node | grep profile:${role}; then + ironic node-update $node replace driver_info/deploy_ramdisk=${RAMDISK_ID} + fi + done done |