Check_haproxy script looking for Auth in incorrect file

Bug #1713165 reported by Benard Okolie
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
Fix Released
High
James Page
OpenStack Dashboard Charm
Invalid
Undecided
Unassigned

Bug Description

Currently the check_haproxy.sh script gains authentication using the following variable:

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

The problem is if the authentication credentials are changed a backup file is created in the same directory, which still contains the old credentials. This can cause the problem with the check.

This problem can be solved by grepping for stats inside the file rather than the directory

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

Revision history for this message
James Page (james-page) wrote :

Moving bug to charm-helpers as that is the source for the check_haproxy.sh script.

Changed in charm-openstack-dashboard:
status: New → Invalid
Changed in charm-helpers:
status: New → Triaged
importance: Undecided → High
Revision history for this message
James Page (james-page) wrote :
Changed in charm-helpers:
status: Triaged → In Progress
assignee: nobody → James Page (james-page)
James Page (james-page)
Changed in charm-helpers:
status: In Progress → Fix Committed
Changed in charm-helpers:
status: Fix Committed → Fix Released
Revision history for this message
Tilman Baumann (tilmanbaumann) wrote :

Regression: This check fails now

https://github.com/juju/charm-helpers/pull/6#issuecomment-352010772

The grep output has changed but the awk match was not changed accordingly.

tags: added: 4010
James Hebden (ec0)
tags: added: canonical-bootstack
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.