Bug 1482109 - [UPDATES] Typo/mismatch in hostgroup names
Summary: [UPDATES] Typo/mismatch in hostgroup names
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-validations
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: beta
: 12.0 (Pike)
Assignee: Florian Fuchs
QA Contact: nlevinki
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-16 13:24 UTC by Yurii Prokulevych
Modified: 2018-02-05 19:12 UTC (History)
11 users (show)

Fixed In Version: openstack-tripleo-validations-7.3.1-0.20170831052729.67faa39.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-13 21:52:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 495975 0 None None None 2017-09-05 09:56:24 UTC
Red Hat Product Errata RHEA-2017:3462 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 12.0 Enhancement Advisory 2018-02-16 01:43:25 UTC

Description Yurii Prokulevych 2017-08-16 13:24:48 UTC
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 12:11:22 UTC
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 12:56:58 UTC
(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 14:53:37 UTC
Retested this and it works well.

Comment 9 errata-xmlrpc 2017-12-13 21:52:15 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:3462


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