Checking if a port is up doesn't make sense when pointing at a load balancer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack-Ansible |
Fix Released
|
Low
|
Hugh Saunders |
Bug Description
The cinder playbooks check if the cinder api port is responsive before making requests (good idea). However that port is opened by haproxy (or your lb of choice) not the cinder api daemon. Haproxy may have an open port before any backends are up. This check passes because a port is open, but then when the next tasks attempts to access the service, haproxy gives 503 if there are no live backends.
Example:
=====
**11:44:46** TASK: [os_cinder | Add in cinder devices types] *******
**11:44:46** skipping: [jenk-heat-
**11:44:46** skipping: [jenk-heat-
**11:44:46** skipping: [jenk-heat-
**11:44:46** skipping: [jenk-heat-
**11:44:46** skipping: [jenk-heat-
**11:44:46** skipping: [jenk-heat-
**11:44:48** failed: [jenk-heat-
**11:44:48** stderr: ERROR: Service Unavailable (HTTP 503)
**11:44:48** ERROR: Service Unavailable (HTTP 503)
=====
Relevant section of code:
There may well be others.
summary: |
- Checking if a port is up, doesn't make sense where pointing at a load + Checking if a port is up, doesn't make sense when pointing at a load balancer |
summary: |
- Checking if a port is up, doesn't make sense when pointing at a load + Checking if a port is up doesn't make sense when pointing at a load balancer |
description: | updated |
Changed in openstack-ansible: | |
status: | New → In Progress |
assignee: | nobody → Hugh Saunders (hughsaunders) |
importance: | Undecided → Low |
Reviewed: https:/ /review. openstack. org/256414 /git.openstack. org/cgit/ openstack/ openstack- ansible/ commit/ ?id=eab4b15aeb1 204989355705fe2 ecdf184d8bbb8b
Committed: https:/
Submitter: Jenkins
Branch: master
commit eab4b15aeb12049 89355705fe2ecdf 184d8bbb8b
Author: Hugh Saunders <email address hidden>
Date: Fri Dec 11 13:10:41 2015 +0000
Use http request to check cinder api availability
Using a port open check is not reliable when going through a load
balancer.
httplib2 is added as it is required by the Ansible uri module.
Change-Id: I0e489e8f671b26 2c56c1442e7af85 fd53c061598
Closes-bug: #1525208
Closes-Bug: #1510990