From 95ee731525170e8dd4df813d5ca7e43b0ba2f4eb Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Wed, 19 Apr 2017 12:08:41 -0400 Subject: Adding yamllint to build checks - making formatting changes to yaml files to meet yamllint checks Change-Id: Id48a8446512943e908e61dc00bbe6c033af27775 Signed-off-by: Dan Radez --- build/first-boot.yaml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'build/first-boot.yaml') diff --git a/build/first-boot.yaml b/build/first-boot.yaml index d4ac5df6..1e8921ba 100644 --- a/build/first-boot.yaml +++ b/build/first-boot.yaml @@ -1,3 +1,4 @@ +--- heat_template_version: 2014-10-16 description: > @@ -9,8 +10,10 @@ parameters: ComputeKernelArgs: description: > Space seprated list of Kernel args to be update to grub. - The given args will be appended to existing args of GRUB_CMDLINE_LINUX in file /etc/default/grub - Example: "intel_iommu=on default_hugepagesz=2MB hugepagesz=2MB hugepages=2048" + The given args will be appended to existing args of + GRUB_CMDLINE_LINUX in file /etc/default/grub + Example: + "intel_iommu=on default_hugepagesz=2MB hugepagesz=2MB hugepages=2048" type: string default: "" @@ -19,7 +22,7 @@ resources: type: OS::Heat::MultipartMime properties: parts: - - config: {get_resource: compute_kernel_args} + - config: {get_resource: compute_kernel_args} # Verify the logs on /var/log/cloud-init.log on the overcloud node compute_kernel_args: @@ -30,24 +33,24 @@ resources: template: | #!/bin/bash set -x - sed 's/^\(GRUB_CMDLINE_LINUX=".*\)"/\1 $KERNEL_ARGS"/g' -i /etc/default/grub ; + sed 's/^\(GRUB_CMDLINE_LINUX=".*\)"/\1 $KERNEL_ARGS"/g' \ + -i /etc/default/grub ; grub2-mkconfig -o /etc/grub2.cfg - hugepage_count=`echo $KERNEL_ARGS | grep -oP ' ?hugepages=\K[0-9]+'` + hugepage_count=$(echo $KERNEL_ARGS | \ + grep -oP ' ?hugepages=\K[0-9]+') if [ -z "$hugepage_count" ]; then hugepage_count=1024 fi echo vm.hugetlb_shm_group=0 >> /usr/lib/sysctl.d/00-system.conf - echo vm.max_map_count=$(printf "%.0f" $(echo 2.2*$hugepage_count | bc)) >> /usr/lib/sysctl.d/00-system.conf - echo kernel.shmmax=$(($hugepage_count * 2 * 1024 * 1024)) >> /usr/lib/sysctl.d/00-system.conf - rm -f /etc/sysconfig/network-scripts/ifcfg-* + HPAGE_CT=$(printf "%.0f" $(echo 2.2*$hugepage_count | bc)) + echo vm.max_map_count=$HPAGE_CT >> /usr/lib/sysctl.d/00-system.conf + HPAGE_CT=$(($hugepage_count * 2 * 1024 * 1024)) + echo kernel.shmmax=$HPAGE_CT >> /usr/lib/sysctl.d/00-system.conf + reboot params: $KERNEL_ARGS: {get_param: ComputeKernelArgs} outputs: - # This means get_resource from the parent template will get the userdata, see: - # http://docs.openstack.org/developer/heat/template_guide/composition.html#making-your-template-resource-more-transparent - # Note this is new-for-kilo, an alternative is returning a value then using - # get_attr in the parent template instead. OS::stack_id: value: {get_resource: userdata} -- cgit 1.2.3-korg