From fbd5bb6e4d09ec43a1d789ee34fcd7aa783c4f30 Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Thu, 4 Aug 2016 15:16:02 +0200 Subject: [PATCH] Validation to verify the undercloud RAM reqs The overcloud deployment will fail if there's not enough memory. Change-Id: I350f38f6d7cb4648edbb9b052d091aef87f016db --- README.rst | 4 ++++ validations/undercloud-ram.yaml | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 validations/undercloud-ram.yaml diff --git a/README.rst b/README.rst index edd131f83..fa5f93cda 100644 --- a/README.rst +++ b/README.rst @@ -37,12 +37,16 @@ Prep Validations that are run on a fresh machine *before* the undercloud is installed. +- `undercloud-ram.yaml`: Verify the undercloud fits the RAM requirements + Pre Introspection ~~~~~~~~~~~~~~~~~ Validations that are run when the undercloud is ready to perform hardware introspection. +- `undercloud-ram.yaml`: Verify the undercloud fits the RAM requirements + Pre Deployment ~~~~~~~~~~~~~~ diff --git a/validations/undercloud-ram.yaml b/validations/undercloud-ram.yaml new file mode 100644 index 000000000..111ab7d07 --- /dev/null +++ b/validations/undercloud-ram.yaml @@ -0,0 +1,18 @@ +--- +- hosts: undercloud + vars: + metadata: + name: Verify the undercloud fits the RAM requirements + description: > + Verify that the undercloud has enough RAM. + + https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/7/html/Director_Installation_and_Usage/sect-Undercloud_Requirements.html + groups: + - prep + - pre-introspection + min_undercloud_ram_gb: 16 + tasks: + - name: Verify the RAM requirements + fail: msg="The RAM on the undercloud node is {{ ansible_memtotal_mb }} MB, the minimal recommended value is {{ min_undercloud_ram_gb|int * 1024 }} MB." + # NOTE(shadower): converting GB to MB + failed_when: "({{ ansible_memtotal_mb }}) < {{ min_undercloud_ram_gb|int * 1024 }}"