Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1684728 - nova_placement container fails healthcheck and goes "unhealthy" due to wrong url in healthcheck script
Summary: nova_placement container fails healthcheck and goes "unhealthy" due to wrong ...
Status: CLOSED DUPLICATE of bug 1630129
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-common
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Linux
Target Milestone: ---
: ---
Assignee: Adriano Petrich
QA Contact: Alexander Chuzhoy
Depends On:
TreeView+ depends on / blocked
Reported: 2019-03-01 23:43 UTC by Thomas Crowe
Modified: 2019-03-14 16:41 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-03-14 16:41:34 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Thomas Crowe 2019-03-01 23:43:35 UTC
Description of problem:
The nova_placement container will go into a "unhealthy" state, restarting the container will also result in the container going "unhealthy".  The API remains available, I believe.

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

How reproducible:

Steps to Reproduce:
1. Deploy a default overcloud

Actual results:
The nova_placement container will be marked "unhealthy"

Expected results:
The nova_placement container should show as "healthy"

Additional info:
This seems to be due to the /openstack/healthcheck script defined in the docker container.  
/openstack/healthcheck is a symbolic link to /usr/share/openstack-tripleo-common/healthcheck/nova-placement.  This simple script performs a curl against an URL defined as "${check_url}/placement/".

The "check_url" var is built using the "get_url_from_vhost" function defined in the /usr/share/openstack-tripleo-common/healthcheck/ script.

get_url_from_vhost generates the check_url var as "http://overcloud-controller-0.internalapi.localdomain:8778/placement/" (in my case).  It generates this value using values found in the /etc/httpd/conf.d/10-placement_wsgi.conf. Specifically, $check_url is a concatenation of the values of the following parameters in the 10-placement_wsgi.conf file; ServerName, bind port from the "<VirtualHost> definition parameter, and the value from WSGIScriptAlias.

However the healthcheck script uses a concatenation of $check_url and "/placement/".  The problem is $check_url is already the entire URL that needs to be examined, and when "/placement/" is appended it results in an HTTP/401 error from the API endpoint.  Removing the "/placement/" string from the healthcheck script results in a successful check being returned.

Comment 1 Martin Schuppert 2019-03-14 16:41:34 UTC
This was fixed in 1630129 and released with openstack-tripleo-common-8.6.6-3.el7ost and openstack-nova-placement-api:13.0-70 (latest at the moment is -72).

Please update to the latest version. Feel free to reopen this BZ in case you still see this issue after the update.

*** This bug has been marked as a duplicate of bug 1630129 ***

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