~niedbalski/charms/trusty/swift-storage/backport-fix-lp1510666

« back to all changes in this revision

Viewing changes to scripts/health_checks.d/service_ports_live

  • Committer: Chad Smith
  • Date: 2013-02-27 23:20:44 UTC
  • mto: (19.1.3 swift-storage)
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: chad.smith@canonical.com-20130227232044-uidsf5k0jlgzi5qm
initial health-check scripts for swift-storage node to confirm node is behaving well with swift-recon

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
# Validate that service ports are active
 
3
HEALTH_DIR=`dirname $0`
 
4
SCRIPTS_DIR=`dirname $HEALTH_DIR`
 
5
. $SCRIPTS_DIR/scriptrc
 
6
set -e
 
7
 
 
8
# Grab any OPENSTACK_PORT* environment variables
 
9
openstack_ports=`env| awk -F '=' '(/OPENSTACK_PORT/){print $2}'`
 
10
for port in $openstack_ports
 
11
do
 
12
    netstat -ln | grep -q $port
 
13
done