heat-engine: fix AMQP check
On the last commit, I inserted an error with zeromq condition. This patch fix it. Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
parent
42c4dc36bc
commit
9b9b934a24
@ -235,14 +235,12 @@ heat_engine_monitor() {
|
||||
|
||||
# Check the connections according to the PID.
|
||||
# We are sure to hit the heat-engine process and not other heat process with the same connection behavior (for example heat-api)
|
||||
if ocf_is_true "$OCF_RESKEY_zeromq"; then
|
||||
pid=`cat $OCF_RESKEY_pid`
|
||||
engine_amqp_check=`netstat -punt | grep -s "$OCF_RESKEY_amqp_server_port" | grep -s "$pid" | grep -qs "ESTABLISHED"`
|
||||
rc_amqp=$?
|
||||
if [ $rc_amqp -ne 0 ]; then
|
||||
ocf_log err "Heat Engine is not connected to the AMQP server: AMQP connection test returned $rc_amqp"
|
||||
return $OCF_NOT_RUNNING
|
||||
fi
|
||||
if [ $rc_amqp -ne 0 ]; then
|
||||
ocf_log err "Heat Engine is not connected to the AMQP server: AMQP connection test returned $rc_amqp"
|
||||
return $OCF_NOT_RUNNING
|
||||
fi
|
||||
|
||||
ocf_log debug "OpenStack Orchestration Engine (heat-engine) monitor succeeded"
|
||||
|
Loading…
Reference in New Issue
Block a user