Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1628960

Summary: Case issue in validation-scripts/all-nodes.sh
Product: Red Hat OpenStack Reporter: Darin Sorrentino <dsorrent>
Component: openstack-tripleo-heat-templatesAssignee: Alex Schultz <aschultz>
Status: CLOSED ERRATA QA Contact: Sasha Smolyak <ssmolyak>
Severity: low Docs Contact:
Priority: low    
Version: 13.0 (Queens)CC: aschultz, emacchi, mburns, pweeks
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-8.3.1-59.el7ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-03 16:55:32 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:

Description Darin Sorrentino 2018-09-14 14:07:01 UTC
Description of problem:

In the all-nodes-validation.yaml it has the following defaults defined:

parameters:
  PingTestIps:
    default: ''
    description: A string containing a space separated list of IP addresses used to ping test each available network interface.
    type: string
  ValidateFqdn:
    default: false
    description: Optional validation to ensure FQDN as set by Nova matches the name set in /etc/hosts.
    type: boolean
  ValidateNtp:
    default: true
    description: Validation to ensure at least one time source is accessible.
    type: boolean


These are fine, if they are really treated as a Boolean, however, when you look at how these are actually used:

  AllNodesValidationsImpl:
    type: OS::Heat::SoftwareConfig
    properties:
      group: script
      inputs:
        - name: ping_test_ips
          default: {get_param: PingTestIps}
        - name: validate_fqdn
          default: {get_param: ValidateFqdn}
        - name: validate_ntp
          default: {get_param: ValidateNtp}
      config: {get_file: ./validation-scripts/all-nodes.sh}
...
egrep -i '(validate_ntp|validate_fqdn)' ./validation-scripts/all-nodes.sh 
if [[ $validate_fqdn == "True" ]];then
if [[ $validate_ntp == "True" ]];then


This will not work.  We should add code to the all-nodes.sh to force the case of $validate_fqdn and $validate_ntp and do the compare against either uppercase TRUE or lowercase true.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Alex Schultz 2018-09-17 14:11:49 UTC
I believe heat actually converts this to a Python boolean equivalent (True/False) so I'm not sure this is actually necessary.  Will have to look into it further.

Comment 11 errata-xmlrpc 2019-09-03 16:55:32 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/RHBA-2019:2624