Bug 1521154

Summary: update prechecks playbook to follow updated requirements
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Martin Bukatovic <mbukatov>
Component: web-admin-tendrl-ansibleAssignee: Nishanth Thomas <nthomas>
Status: CLOSED ERRATA QA Contact: Bala Konda Reddy M <bmekala>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.3CC: bmekala, mbukatov, rcyriac, rhs-bugs, sanandpa, sankarshan, shtripat, ssaha
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tendrl-ansible-1.5.4-6.el7rhgs Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-18 04:38:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1512823    
Bug Blocks: 1460574    

Description Martin Bukatovic 2017-12-05 21:30:33 UTC
Description of problem
======================

As described in https://bugzilla.redhat.com/show_bug.cgi?id=1512823#c8 the
minimal requirements has been updated, which means that checks in prechecks
playbook needs to be aligned accordingly.

Version-Release
===============

tendrl-ansible-1.5.4-2.el7rhgs.noarch

Steps to Reproduce
==================

1. Install tendrl-ansible
2. See /usr/share/doc/tendrl-ansible-1.5.4/prechecks.yml file

Actual results
==============

Old, much lower, requirements are referenced and checked there.

For example:

```
#
# Check hw requirements first, so far for *Tendrl Server* only.
#

- hosts: tendrl-server
  tasks:
    # Based on:
    #
    # > The Node hosting tendrl-api/central_store should have minimum 12
    # > GB of memory and 4 VCPUs (or equivalent)(due to alerts, logs
    # > being stored on this node)
    #
    # From https://github.com/Tendrl/documentation/wiki/Tendrl-release-v1.5.0-(install-doc)
    - assert:
        that:
          - ansible_memtotal_mb >= 12000
          - ansible_processor_vcpus >= 4
```


Expected results
================

Updated requirements are enforced:

* 32 GB of RAM
* 12 VCPUs

Moreover, we should also check:

* ensure that Etcd data directory is hosted/located on an
  separate disk
* graphite/carbon/whisper (time series) data directories are hosted on a
  separate disk other than the Etcd disk

Comment 2 Martin Bukatovic 2017-12-05 21:38:53 UTC
Adding this BZ into tendrl-ansible tracker.

Comment 3 Nishanth Thomas 2017-12-06 12:45:15 UTC
@Martin, For the time being we can fix the first part which is :

Updated requirements are enforced:

* 32 GB of RAM
* 12 VCPUs

Other things needs to be pushed out the next release. Please raise an RFE for the same.

Comment 4 Martin Bukatovic 2017-12-06 13:08:32 UTC
(In reply to Nishanth Thomas from comment #3)
> @Martin, For the time being we can fix the first part which is :
> 
> Updated requirements are enforced:
> 
> * 32 GB of RAM
> * 12 VCPUs
> 
> Other things needs to be pushed out the next release. Please raise an RFE
> for the same.

Asking PM to verify if this solution is acceptable.

Comment 5 Sayan Saha 2017-12-06 16:38:49 UTC
Ok to enforce just RAM & CPU for this release.

Comment 7 Sweta Anandpara 2017-12-08 07:13:05 UTC
Tested and verified this on the build tendrl-ansible-1.5.4-5.

It fails with the below error. The variable 'ansible_memtotal_mb' is set to "32768" which is 32*1024. I suppose 'ansible_memtotal_mb' uses "free -m" command to calculate internally. A virtual machine created with 32GB RAM, will not show 32768 in the output of 'free -m' but lower than that.. it shows 32012.

So, prechecks.yml needs to be updated to "ansible_memtotal_mb >= 32012" or "ansible_memtotal_mb >= 32000" if we are rounding it off.

     TASK [assert] ********************************************************************************************************************************************************************************************************************************
    fatal: [dhcp46-29.lab.eng.blr.redhat.com]: FAILED! => {
        "assertion": "ansible_memtotal_mb >= 32768",
        "changed": false,
        "evaluated_to": false,
        "failed": true
    }
            to retry, use: --limit @/root/site.retry

Comment 9 Martin Bukatovic 2017-12-08 07:45:35 UTC
One detail we need to fix there as well: the comment refers to release notes of
upstream v1.5.0 release, which no longer applies as the new requirements are
based on different wikipage.

Comment 11 Nishanth Thomas 2017-12-08 09:55:40 UTC
(In reply to Martin Bukatovic from comment #9)
> One detail we need to fix there as well: the comment refers to release notes
> of
> upstream v1.5.0 release, which no longer applies as the new requirements are
> based on different wikipage.

Build is already done and I don't this is critical at the moment to be handled. Please raise a separate Bz to track.

Comment 12 Bala Konda Reddy M 2017-12-12 10:18:14 UTC
Verified on the latest build: tendrl-ansible-1.5.4-7.el7rhgs.noarch

The prechecks yaml file is updated with below details as mentioned

- assert:
    that:
      - ansible_memtotal_mb >= 30000
      - ansible_processor_vcpus >= 12

Hence marking it as verified

Comment 14 errata-xmlrpc 2017-12-18 04:38:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3478