diff options
author | 2016-05-24 15:41:51 +0000 | |
---|---|---|
committer | 2016-05-24 15:41:51 +0000 | |
commit | 5fec80057dbd799d52a4c1ff2f35a1c8cc5ad6ea (patch) | |
tree | fb621e88b7ad9bdd8d6b1edbecdcde1ff85ea5a0 /build/build_perf_image.sh | |
parent | cefd51c360e3d3c4bc160844a467255d84c9f16c (diff) | |
parent | fb0f275cd373aec28a8a970ced0f1d20ca8abbfc (diff) |
Merge "Add pinning support"
Diffstat (limited to 'build/build_perf_image.sh')
-rw-r--r-- | build/build_perf_image.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/build/build_perf_image.sh b/build/build_perf_image.sh new file mode 100644 index 00000000..0a3e3d0f --- /dev/null +++ b/build/build_perf_image.sh @@ -0,0 +1,38 @@ +#!/bin/bash +############################################################################## +# Copyright (c) 2016 Red Hat Inc. +# Michael Chapman <michapma@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 +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +ROLE=$1 +shift +CATEGORY=$1 +shift +KEY=$1 +shift +VALUE=$1 +shift + +IMAGE=$ROLE-overcloud-full.qcow2 + +# Create image copy for this role +if [ ! -f $IMAGE ] ; then + cp overcloud-full.qcow2 $IMAGE +fi + +if [ "$CATEGORY" == "nova" ]; then + if [ "$KEY" == "libvirtpin" ]; then + sudo sed -i "s/#LibvirtCPUPinSet:.*/LibvirtCPUPinSet: '${VALUE}'/" /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml + fi +fi + +if [ "$CATEGORY" == "kernel" ]; then + LIBGUESTFS_BACKEND=direct virt-customize \ + --run-command "bash -x /root/setkernelparam.sh $KEY $VALUE" \ + -a $IMAGE +fi + |