path: root/lib/
diff options
authorTim Rozet <>2017-02-20 12:38:54 -0500
committerTim Rozet <>2017-02-22 18:53:51 +0000
commit1ef3c3600d5b1692f65a445cf9e1c2e10a46314e (patch)
tree82fb89b104482c842c89b9805f4bcb0cbdf5e134 /lib/
parente1a633529c06a63f9c710317f25e63b8bd574812 (diff)
Allows for specifying compute node RAM
Currently we allow specifying ram per Overcloud VM. If the node is detected as ODL, we bump the RAM to a minimum of 10GB. There is a need to be able to specify the RAM per compute node in cases where we need controller RAM to be high, but want compute nodes to be low (like CSIT) - in order to keep the memory footprint as small as possible. Changes Include: - Adds '--virtual-compute-ram' argument that will override the '--virtual-ram' param for compute nodes - Fixes a bug where if ODL is used and RAM is overridden to 10GB for Control nodes, it was also accidentally being set for compute nodes - Modifies '--virtual-ram' to be '--virtual-default-ram' in order to clarify this parameter sets the default amount of RAM for all overcloud nodes which may be overridden by a role specific arg Change-Id: Ia36082aa2167d9897f3ec6753d08804352301c63 Signed-off-by: Tim Rozet <>
Diffstat (limited to 'lib/')
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/ b/lib/
index 8aaa359..c74a374 100755
--- a/lib/
+++ b/lib/
@@ -11,7 +11,7 @@
##Create virtual nodes in virsh
##params: vcpus, ramsize
function setup_virtual_baremetal {
- local vcpus ramsize
+ local vcpus ramsize held_ramsize
if [ -z "$1" ]; then
@@ -39,9 +39,15 @@ EOF
+ # tmp var to hold ramsize in case modified during detection
+ held_ramsize=${ramsize}
for i in $(seq 0 $(($controller_index+$VM_COMPUTES))); do
- if [ $i -gt $controller_index ]; then
+ ramsize=${held_ramsize}
+ if [ $i -gt $controller_index ]; then
+ if [ -n "$VM_COMPUTE_RAM" ]; then
+ ramsize=$((${VM_COMPUTE_RAM}*1024))
+ fi
if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "$ramsize" -lt 10240 ]]; then