Regression in haproxy check since LP#1713165

Bug #1743287 reported by James Hebden
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph RADOS Gateway Charm
Fix Released
High
Unassigned
Charm Helpers
Fix Released
Undecided
Unassigned
OpenStack Ceilometer Charm
Fix Released
High
Unassigned
OpenStack Cinder Charm
Fix Released
High
Unassigned
OpenStack Dashboard Charm
Fix Released
High
Unassigned
OpenStack Glance Charm
Fix Released
High
Unassigned
OpenStack Heat Charm
Fix Released
High
Unassigned
OpenStack Keystone Charm
Fix Released
High
Unassigned
OpenStack Neutron API Charm
Fix Released
High
Unassigned
OpenStack Nova Cloud Controller Charm
Fix Released
High
Unassigned
OpenStack Swift Proxy Charm
Fix Released
High
Unassigned

Bug Description

The original bug reported in LP#1713165 [0] suggested that the following part of the haproxy check was a problem when there were backups of the config file present, as it recursively greps the haproxy config directory.

AUTH=$(grep -r "stats auth" /etc/haproxy | awk 'NR=1{print $4}')

The suggestion fix was -
AUTH=$(egrep "stats auth" /etc/haproxy/haproxy.cfg | awk 'NR=1{print $3}')

The implemented fix was -
AUTH=$(egrep "stats auth" /etc/haproxy/haproxy.cfg | awk 'NR=1{print $4}')
Note the awk token was not correct, and per comments on the original bug [1] and GitHub PR [2]

Despite this, this change has also made it into the OpenStack charms via a charmhelpers sync, which means we also have a regression in the Charms.

In addition to this, the fix also needs to be applied to 'check_haproxy_queue_depth.sh' in the same directory.

So far, I have found this has been merged into the following OpenStack charms, but I suspect that there are likely many more charms which would have synced the latest charmhelpers -
* ceilometer
* ceilometer-agent
* ceph-radosgw
* cinder
* cinder-backup
* cinder-ceph
* glance
* heat
* neutron-api
* neutron-gateway
* neutron-openvswitch
* nova-cloud-controller
* nova-compute
* openstack-dashboard
* rabbitmq-server
* swift-proxy
* swift-storage

The impact is that all of these charms install NRPE checks for haproxy, which report all backends as being down (which is a critical level alert) falsely due to not being able to grab status API credentials correctly.

[0] https://bugs.launchpad.net/charm-helpers/+bug/1713165
[1] https://bugs.launchpad.net/charm-helpers/+bug/1713165/comments/3
[2] https://github.com/juju/charm-helpers/pull/6#issuecomment-352010772

Related branches

Revision history for this message
James Hebden (ec0) wrote :

I have added the charm projects as well, as they will all need to be addressed by syncing a fixed charmhelpers version.

Revision history for this message
James Hebden (ec0) wrote :

I have removed and excluded services which carry the buggy charmhelpers code but would not be impacted due to lack of haproxy use.

no longer affects: charm-nova-compute
no longer affects: charm-neutron-openvswitch
no longer affects: charm-neutron-gateway
no longer affects: charm-cinder-ceph
no longer affects: charm-cinder-backup
no longer affects: charm-ceilometer-agent
no longer affects: charm-percona-cluster
Revision history for this message
James Hebden (ec0) wrote :
Revision history for this message
James Hebden (ec0) wrote :
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Thanks for reporting/fixing this James and apologies for the regression.

Changed in charm-helpers:
status: New → In Progress
Changed in charm-ceilometer:
importance: Undecided → High
status: New → Triaged
Changed in charm-ceph-radosgw:
importance: Undecided → High
status: New → Triaged
Changed in charm-cinder:
importance: Undecided → High
status: New → Triaged
Changed in charm-glance:
importance: Undecided → High
status: New → Triaged
Changed in charm-heat:
importance: Undecided → High
status: New → Triaged
Changed in charm-keystone:
importance: Undecided → High
status: New → Triaged
Changed in charm-neutron-api:
importance: Undecided → High
status: New → Triaged
Changed in charm-nova-cloud-controller:
importance: Undecided → High
status: New → Triaged
Changed in charm-openstack-dashboard:
importance: Undecided → High
status: New → Triaged
Changed in charm-swift-proxy:
importance: Undecided → High
status: New → Triaged
Revision history for this message
James Page (james-page) wrote :
Revision history for this message
James Page (james-page) wrote :

Fixed as part of charm-helpers resync in stable/17.11 branch

Changed in charm-ceilometer:
status: Triaged → Fix Released
Changed in charm-ceph-radosgw:
status: Triaged → Fix Released
Changed in charm-cinder:
status: Triaged → Fix Released
Changed in charm-glance:
status: Triaged → Fix Released
Changed in charm-heat:
status: Triaged → Fix Released
Changed in charm-helpers:
status: In Progress → Fix Released
Changed in charm-keystone:
status: Triaged → Fix Released
Changed in charm-neutron-api:
status: Triaged → Fix Released
Changed in charm-nova-cloud-controller:
status: Triaged → Fix Released
Changed in charm-openstack-dashboard:
status: Triaged → Fix Released
Changed in charm-swift-proxy:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.