Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1482109 - [UPDATES] Typo/mismatch in hostgroup names
[UPDATES] Typo/mismatch in hostgroup names
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-validations (Show other bugs)
12.0 (Pike)
Unspecified Unspecified
medium Severity medium
: beta
: 12.0 (Pike)
Assigned To: Florian Fuchs
nlevinki
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-16 09:24 EDT by Yurii Prokulevych
Modified: 2018-02-05 14:12 EST (History)
11 users (show)

See Also:
Fixed In Version: openstack-tripleo-validations-7.3.1-0.20170831052729.67faa39.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-12-13 16:52:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 495975 None None None 2017-09-05 05:56 EDT
Red Hat Product Errata RHEA-2017:3462 normal SHIPPED_LIVE Red Hat OpenStack Platform 12.0 Enhancement Advisory 2018-02-15 20:43:25 EST

  None (edit)
Description Yurii Prokulevych 2017-08-16 09:24:48 EDT
Description of problem:
-----------------------
In generated inventory file groups that contain controllers/computes are defined as:
[Controller:children]
controller-0
controller-1
controller-2
...
[Compute:children]
compute-0
compute-1

Though other groups reference them like:
----------------------------------------
[aodh_evaluator:children]
controller

Which leads to next error when running minor updates:
-----------------------------------------------------
ansible-playbook -b -i rhbz-hosts tmpconfig-latest/tripleo-VM7Mr1-config/update_steps_playbook.yaml --limit Compute
ERROR! Attempted to read "rhbz-hosts" as YAML: Syntax Error while loading YAML.


The error appears to have been in '/home/stack/rhbz-hosts': line 1, column 16, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


[aodh_evaluator:vars]
               ^ here

Attempted to read "rhbz-hosts" as ini file: rhbz-hosts:5: Section [aodh_evaluator:children] includes undefined group: controller


Version-Release number of selected component (if applicable):
-------------------------------------------------------------
openstack-tripleo-validations-7.2.1-0.20170807182119.1f60b6f.el7ost.noarch
openstack-tripleo-heat-templates-7.0.0-0.20170805163048.el7ost.noarch

Steps to Reproduce:
1. Generate list of hosts:
    /usr/bin/tripleo-ansible-inventory --static-inventory some-hosts
2. Try to ping computes/controllers
    ansible -b -i some-hosts Controller -m ping -vv

Expected results:
-----------------
Correct hostgroups names are dumped to file
Comment 1 Ana Krivokapic 2017-10-30 08:11:22 EDT
Running tripleo-ansible-inventory doesn't seem to work at all with --static-inventory option:

(undercloud) [stack@puma01 ~]$ /usr/bin/tripleo-ansible-inventory --static-inventory hello
Error creating inventory: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at 
 [no address given] to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>

Tested with openstack-tripleo-validations-7.4.2-0.20171016115241.c2c9bf2.el7ost.noarch
Comment 2 Florian Fuchs 2017-11-06 07:56:58 EST
(In reply to Ana Krivokapic from comment #1)
> Running tripleo-ansible-inventory doesn't seem to work at all with
> --static-inventory option:
> 
> (undercloud) [stack@puma01 ~]$ /usr/bin/tripleo-ansible-inventory
> --static-inventory hello
> Error creating inventory: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html><head>
> <title>500 Internal Server Error</title>
> </head><body>
> <h1>Internal Server Error</h1>
> <p>The server encountered an internal error or
> misconfiguration and was unable to complete
> your request.</p>
> <p>Please contact the server administrator at 
>  [no address given] to inform them of the time this error occurred,
>  and the actions you performed just before this error.</p>
> <p>More information about this error may be available
> in the server error log.</p>
> </body></html>
> 
> Tested with
> openstack-tripleo-validations-7.4.2-0.20171016115241.c2c9bf2.el7ost.noarch

I just tested static inventory creation with the same version/release and didn't encounter the error. My guess would be that the HTTP 500 originates from one of the APIs not being available during testing, rather than being a problem with the inventory itself (although this condition should probably be catched and displayed in a more helpful way).

However, I could create the static inventory, and the resulting file contained   
the correct hostgroup names (uppercase first letters) on all hosts. The ping test mentioned in the report worked as expected.
Comment 3 Ana Krivokapic 2017-11-06 09:53:37 EST
Retested this and it works well.
Comment 9 errata-xmlrpc 2017-12-13 16:52:15 EST
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:3462

Note You need to log in before you can comment on or make changes to this bug.