Remove all AMQP checks from OCF scripts
Remove AMQP checks from OCF scripts as they are introducing race conditions and triggering false-positive restart actions breaking deployments Change-Id: Idcefa8346fd3948897550248d3f6bfa2694ac7d0 Closes-bug: #1399907
This commit is contained in:
parent
3e1f23e042
commit
6d2b4a8279
|
@ -237,18 +237,6 @@ ceilometer_agent_central_monitor() {
|
|||
return $rc
|
||||
fi
|
||||
|
||||
# Check the connections according to the PID, if has been invoked as a monitor action.
|
||||
if [ "${__OCF_ACTION}" = "monitor" ]; then
|
||||
# We are sure to hit the scheduler process and not other process with the same connection behavior
|
||||
pid=`cat $OCF_RESKEY_pid`
|
||||
scheduler_amqp_check=`lsof -nPp ${pid} | grep -s ':${OCF_RESKEY_amqp_server_port}\s\+(ESTABLISHED)'`
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
ocf_log err "Central Agent is not connected to the AMQP server : $rc"
|
||||
return $OCF_NOT_RUNNING
|
||||
fi
|
||||
fi
|
||||
|
||||
ocf_log debug "OpenStack Ceilometer Central Agent (ceilometer-agent-central) monitor succeeded"
|
||||
return $OCF_SUCCESS
|
||||
}
|
||||
|
|
|
@ -417,20 +417,6 @@ neutron_dhcp_agent_monitor() {
|
|||
return $rc
|
||||
fi
|
||||
|
||||
if [[ "$OCF_RESKEY_amqp_server_port" != 'none' ]] ; then
|
||||
# Check the connections according to the PID, if has been invoked as a monitor action.
|
||||
if [ "${__OCF_ACTION}" = "monitor" ]; then
|
||||
# We are sure to hit the scheduler process and not other Neutron process with the same connection behavior (for example neutron-server)
|
||||
pid=`get_worker_pid`
|
||||
# check the connections according to the PID
|
||||
network_amqp_check=`lsof -nPp ${pid} | grep -s ':${OCF_RESKEY_amqp_server_port}\s\+(ESTABLISHED)'`
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
ocf_log err "Neutron DHCP Agent is not connected to the AMQP server : $rc"
|
||||
return $OCF_NOT_RUNNING
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
ocf_log debug "OpenStack DHCP Agent (neutron-dhcp-agent) monitor succeeded"
|
||||
return $OCF_SUCCESS
|
||||
}
|
||||
|
|
|
@ -238,18 +238,6 @@ service_monitor() {
|
|||
return $rc
|
||||
fi
|
||||
|
||||
# Check the connections according to the PID, if has been invoked as a monitor action.
|
||||
if [ "${__OCF_ACTION}" = "monitor" ]; then
|
||||
# We are sure to hit the heat-engine process and not other heat process with the same connection behavior (for example heat-api)
|
||||
pid=`cat $OCF_RESKEY_pid`
|
||||
engine_amqp_check=`lsof -nPp ${pid} | grep -s ':${OCF_RESKEY_amqp_server_port}\s\+(ESTABLISHED)'`
|
||||
rc_amqp=$?
|
||||
if [ $rc_amqp -ne 0 ]; then
|
||||
ocf_log err "${SERVICE_NAME} is not connected to the AMQP server: AMQP connection test returned $rc_amqp"
|
||||
return $OCF_NOT_RUNNING
|
||||
fi
|
||||
fi
|
||||
|
||||
ocf_log debug "OpenStack Orchestration Engine (heat-engine) monitor succeeded"
|
||||
return $OCF_SUCCESS
|
||||
}
|
||||
|
|
|
@ -239,18 +239,6 @@ service_monitor() {
|
|||
return $rc
|
||||
fi
|
||||
|
||||
# Check the connections according to the PID, if has been invoked as a monitor action.
|
||||
if [ "${__OCF_ACTION}" = "monitor" ]; then
|
||||
# We are sure to hit the heat-engine process and not other heat process with the same connection behavior (for example heat-api)
|
||||
pid=`cat $OCF_RESKEY_pid`
|
||||
engine_amqp_check=`lsof -nPp ${pid} | grep -s ':${OCF_RESKEY_amqp_server_port}\s\+(ESTABLISHED)'`
|
||||
rc_amqp=$?
|
||||
if [ $rc_amqp -ne 0 ]; then
|
||||
ocf_log err "${SERVICE_NAME} is not connected to the AMQP server: AMQP connection test returned $rc_amqp"
|
||||
return $OCF_NOT_RUNNING
|
||||
fi
|
||||
fi
|
||||
|
||||
ocf_log debug "OpenStack Orchestration Engine (heat-engine) monitor succeeded"
|
||||
return $OCF_SUCCESS
|
||||
}
|
||||
|
|
|
@ -250,21 +250,6 @@ nova_compute_monitor() {
|
|||
return $rc
|
||||
fi
|
||||
|
||||
# Check the connections according to the PID, if has been invoked as a monitor action.
|
||||
if [ "${__OCF_ACTION}" = "monitor" ]; then
|
||||
# We are sure to hit the scheduler process and not other nova process with the same connection behavior (for example nova-scheduler)
|
||||
if ! ocf_is_true "$OCF_RESKEY_zeromq"; then
|
||||
pid=`cat $OCF_RESKEY_pid`
|
||||
# check the connections according to the PID
|
||||
console_amqp_check=`lsof -nPp ${pid} | grep -s ':${OCF_RESKEY_amqp_server_port}\s\+(ESTABLISHED)'`
|
||||
rc_amqp=$?
|
||||
if [ $rc_amqp -ne 0 ]; then
|
||||
ocf_log err "Nova Compute is not connected to the AMQP server: AMQP connection test returned $rc_amqp"
|
||||
return $OCF_NOT_RUNNING
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
ocf_log debug "OpenStack Nova Compute (nova-compute) monitor succeeded"
|
||||
return $OCF_SUCCESS
|
||||
}
|
||||
|
|
|
@ -159,7 +159,6 @@ nova_network_check_port() {
|
|||
# The length of the integer must be 4
|
||||
# Examples of valid port: "1080", "0080"
|
||||
# Examples of invalid port: "1080bad", "0", "0000", ""
|
||||
|
||||
local int
|
||||
local cnt
|
||||
|
||||
|
@ -393,19 +392,6 @@ nova_network_monitor() {
|
|||
return $rc
|
||||
fi
|
||||
|
||||
# Check the connections according to the PID, if has been invoked as a monitor action.
|
||||
if [ "${__OCF_ACTION}" = "monitor" ]; then
|
||||
# We are sure to hit the scheduler process and not other nova process with the same connection behavior (for example nova-cert)
|
||||
pid=`cat $OCF_RESKEY_pid`
|
||||
# check the connections according to the PID
|
||||
network_amqp_check=`lsof -nPp ${pid} | grep -s ':${OCF_RESKEY_amqp_server_port}\s\+(ESTABLISHED)'`
|
||||
rc_amqp=$?
|
||||
if [ $rc_amqp -ne 0 ]; then
|
||||
ocf_log err "Nova Network is not connected to the AMQP server: AMQP connection test returned $rc_amqp"
|
||||
return $OCF_NOT_RUNNING
|
||||
fi
|
||||
fi
|
||||
|
||||
ocf_log debug "OpenStack Nova Network (nova-network) monitor succeeded"
|
||||
return $OCF_SUCCESS
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue