a072a7f07e
It seems lsof is a bit too heavy on the system when multiple healthchecks are running in parallel. So instead of calling a "big" process, let's split a bit things and get to the filesystem directly in order to pick only the things we actually need. What changes: - using /proc/net/{tcp,udp}, we get every socket matching the port - using find with the right options, we can ensure at least one socket exists with the wanted inode(s) The last part exits as soon as we have a match in order to make it faster and less resource consuming. Change-Id: I64776992a7e457781aa8ddaba359ef085d4cb77d Partial-Bug: #1921714 |
||
---|---|---|
.. | ||
releasenotes/notes | ||
README.md | ||
aodh-api | ||
aodh-evaluator | ||
aodh-listener | ||
aodh-notifier | ||
barbican-api | ||
barbican-keystone-listener | ||
barbican-worker | ||
ceilometer-agent-central | ||
ceilometer-agent-compute | ||
ceilometer-agent-ipmi | ||
ceilometer-agent-notification | ||
cinder-api | ||
cinder-backup | ||
cinder-scheduler | ||
cinder-volume | ||
collectd | ||
common.sh | ||
cron | ||
etcd | ||
fluentd | ||
frr | ||
glance-api | ||
gnocchi-api | ||
gnocchi-metricd | ||
gnocchi-statsd | ||
heat-api | ||
heat-api-cfn | ||
heat-engine | ||
horizon | ||
http-healthcheck.py | ||
ironic-api | ||
ironic-conductor | ||
ironic-inspector | ||
ironic-neutron-agent | ||
ironic-pxe | ||
iscsid | ||
keystone | ||
manila-scheduler | ||
mariadb | ||
memcached | ||
mistral-api | ||
mistral-engine | ||
mistral-event-engine | ||
mistral-executor | ||
multipathd | ||
neutron-api | ||
neutron-dhcp | ||
neutron-l3 | ||
neutron-metadata | ||
neutron-ovs-agent | ||
neutron-sriov-agent | ||
nova-api | ||
nova-compute | ||
nova-conductor | ||
nova-ironic | ||
nova-libvirt | ||
nova-metadata | ||
nova-scheduler | ||
nova-vnc-proxy | ||
octavia-api | ||
octavia-health-manager | ||
octavia-housekeeping | ||
octavia-worker | ||
ovn-controller | ||
ovn-dbs | ||
ovn-metadata | ||
panko-api | ||
placement-api | ||
qdrouterd | ||
rabbitmq | ||
redis | ||
swift-account-server | ||
swift-container-server | ||
swift-object-server | ||
swift-proxy | ||
swift-rsync | ||
zaqar-api | ||
zaqar-socket |
README.md
Health check commands
The scripts in this directory are meant to implement the container-healthcheck blueprint. They are written to be compatible with the Docker HEALTHCHECK api.
The scripts expect to source
/usr/share/tripleo-common/healthcheck/common.sh
. If you
want to run scripts without installing to that file, you can set the
HEALTHCHECKS_DIR
environment variable, e.g:
$ export HEALTHCHECKS_DIR=$PWD
$ ./heat-api
{"versions": [{"status": "CURRENT", "id": "v1.0", "links": [{"href": "http://192.168.24.1:8004/v1/", "rel": "self"}]}]}
300 192.168.24.1:8004 0.002 seconds
Notes about changing healthchecks
Because healthchecks are provided via a package when building containers, you cannot rename or remove a health check in combination with a change to a, file in tripleo-common/container-images/. Changes need to be backwards and forwards compatible when updating healthchecks. You may also need to land a new healthcheck first and update the container build process in a subsequent change that lands later.