Skip to content

Commit

Permalink
Fixes #153 - add hatop utility for troubleshooting haproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
geofffranks committed Oct 3, 2019
1 parent 891fa6d commit a4e5edd
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ci/release_notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# New Features

- The `hatop` utility has been added to haproxy-boshrelease to assist in haproxy troubleshooting
http://feurix.org/projects/hatop/ Kudos to @jhunt and the [Genesis Community](https://github.com/genesis-community) for making this possible!
- @Scoobed added support for specifying additional filesystem paths to make available to the HAProxy
process via BPM's [unrestricted volumes list](https://github.com/cloudfoundry/bpm-release/blob/master/docs/config.md#unsafe-schema).
This is particularly helpful when integrating LUA scripts from other BOSH releases. The
`ha_proxy.additional_unrestricted_volumes` will allow this, and uses the same syntax as BPM.

# Acknowledgements

Thanks @jhunt and @Scoobed!
3 changes: 3 additions & 0 deletions config/blobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ haproxy/haproxy-1.8.20.tar.gz:
size: 2083917
object_id: 4a94da26-7a25-4117-5e48-057d6a31fa03
sha: 7aa627e4ae0b2ee603d5525436c7f4d13b8e2f5e
haproxy/hatop:
size: 72429
sha: daddb3f13a70d4e2fa0802333c2e13468635171f
haproxy/lua-5.3.5.tar.gz:
size: 303543
object_id: 5acd4a28-51a4-45ed-536b-766fec394fa5
Expand Down
5 changes: 5 additions & 0 deletions packages/haproxy/packaging
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ pushd haproxy-${HAPROXY_VERSION}
cp haproxy ${BOSH_INSTALL_TARGET}/bin/
chmod 755 ${BOSH_INSTALL_TARGET}/bin/haproxy
popd

cp haproxy/hatop ${BOSH_INSTALL_TARGET}/bin/hatop
chmod 755 ${BOSH_INSTALL_TARGET}/bin/hatop
cp hatop-wrapper ${BOSH_INSTALL_TARGET}/
chmod 755 ${BOSH_INSTALL_TARGET}/hatop-wrapper
2 changes: 2 additions & 0 deletions packages/haproxy/spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ files:
- haproxy/pcre2-*.tar.gz
- haproxy/socat-*.tar.gz
- haproxy/lua-*.tar.gz
- haproxy/hatop
- hatop-wrapper
9 changes: 9 additions & 0 deletions src/hatop-wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
if [[ -z "${1:-}" ]]; then
if [[ -e /var/vcap/sys/run/haproxy/stats.sock ]]; then
exec /var/vcap/packages/haproxy/bin/hatop -s /var/vcap/sys/run/haproxy/stats.sock
elif [[ -e /var/vcap/sys/run/haproxy/stats1.sock ]]; then
exec /var/vcap/packages/haproxy/bin/hatop -s /var/vcap/sys/run/haproxy/stats1.sock
fi
fi
exec /var/vcap/packages/haproxy/bin/hatop "$@"

0 comments on commit a4e5edd

Please sign in to comment.