23 lines
1.0 KiB
Diff
23 lines
1.0 KiB
Diff
Index: git/ocf/ceilometer-api
|
|
===================================================================
|
|
--- git.orig/ocf/ceilometer-api
|
|
+++ git/ocf/ceilometer-api
|
|
@@ -183,7 +183,7 @@ ceilometer_api_validate() {
|
|
local rc
|
|
|
|
check_binary $OCF_RESKEY_binary
|
|
- check_binary netstat
|
|
+ check_binary lsof
|
|
ceilometer_api_check_port $OCF_RESKEY_api_listen_port
|
|
|
|
# A config file on shared storage that is not available
|
|
@@ -244,7 +244,7 @@ ceilometer_api_monitor() {
|
|
# Check the connections according to the PID.
|
|
# We are sure to hit the scheduler process and not other Cinder process with the same connection behavior (for example cinder-api)
|
|
pid=`cat $OCF_RESKEY_pid`
|
|
- scheduler_amqp_check=`netstat -apunt | grep -s "$OCF_RESKEY_api_listen_port" | grep -s "$pid" | grep -qs "LISTEN"`
|
|
+ scheduler_amqp_check=`lsof -nPp ${pid} | grep -s ":${OCF_RESKEY_api_listen_port}\s\+(LISTEN)"`
|
|
rc=$?
|
|
if [ $rc -ne 0 ]; then
|
|
ocf_log err "API is not listening for connections: $rc"
|