267811c32b
* Drop gnocchi.conf from snap source in favor of installing it (as well as api-paste.ini and policy.json) from upstream source. * Drop gnocchi-api entry point in favor of using gnocchi-uwsgi and gnocchi-nginx to serve API requests. * Move to gnocchi 4.0.2 source. * Update gnocchi-snap.conf.j2 template with $SNAP_COMMON paths. * Add statsd and change-sack-size entry points and modify existing entry points to use snap-openstack. * Add test configs that enable a working gnocchi. * Enhance test scripts and split into separate scripts. * Bring back oslo-config-dirs.patch and upper constraints as they're needed for ocata.
26 lines
531 B
Bash
Executable File
26 lines
531 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
ret=0
|
|
DAEMONS=('snap.gnocchi.uwsgi' 'snap.gnocchi.nginx' 'snap.gnocchi.metricd' 'snap.gnocchi.statsd')
|
|
for daemon in "${DAEMONS[@]}"; do
|
|
sudo systemctl restart $daemon
|
|
TIMEOUT=50
|
|
while [ "$TIMEOUT" -gt 0 ]; do
|
|
if systemctl is-active $daemon > /dev/null; then
|
|
echo "OK"
|
|
break
|
|
fi
|
|
TIMEOUT=$((TIMEOUT - 1))
|
|
sleep 0.1
|
|
done
|
|
|
|
if [ "$TIMEOUT" -le 0 ]; then
|
|
echo "ERROR: ${daemon} IS NOT RUNNING"
|
|
ret=1
|
|
fi
|
|
done
|
|
|
|
exit $ret
|