Skip to content

Commit

Permalink
Merge pull request #18 from yj2317916/master
Browse files Browse the repository at this point in the history
Fix the port of amqp check
  • Loading branch information
Martin Loschwitz committed Jul 23, 2014
2 parents 77b8f75 + 154f4f3 commit a8e7cde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ocf/neutron-agent-l3
Expand Up @@ -38,13 +38,15 @@ OCF_RESKEY_plugin_config_default="/etc/neutron/l3_agent.ini"
OCF_RESKEY_user_default="neutron"
OCF_RESKEY_pid_default="$HA_RSCTMP/$OCF_RESOURCE_INSTANCE.pid"
OCF_RESKEY_neutron_server_port_default="9696"
OCF_RESKEY_amqp_server_port_default="5672"

: ${OCF_RESKEY_binary=${OCF_RESKEY_binary_default}}
: ${OCF_RESKEY_config=${OCF_RESKEY_config_default}}
: ${OCF_RESKEY_plugin_config=${OCF_RESKEY_plugin_config_default}}
: ${OCF_RESKEY_user=${OCF_RESKEY_user_default}}
: ${OCF_RESKEY_pid=${OCF_RESKEY_pid_default}}
: ${OCF_RESKEY_neutron_server_port=${OCF_RESKEY_neutron_server_port_default}}
: ${OCF_RESKEY_amqp_server_port=${OCF_RESKEY_amqp_server_port_default}}

#######################################################################

Expand Down Expand Up @@ -217,7 +219,7 @@ neutron_l3_agent_monitor() {
# We are sure to hit the scheduler process and not other Neutron process with the same connection behavior (for example neutron-server)
pid=`cat $OCF_RESKEY_pid`
# check the connections according to the PID
network_amqp_check=`netstat -punt | grep -s "$OCF_RESKEY_neutron_server_port" | grep -s "$pid" | grep -qs "ESTABLISHED"`
network_amqp_check=`netstat -punt | grep -s "$OCF_RESKEY_amqp_server_port" | grep -s "$pid" | grep -qs "ESTABLISHED"`
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "Neutron L3 Server is not connected to the Neutron server: $rc"
Expand Down

0 comments on commit a8e7cde

Please sign in to comment.