Fix MonitorNeutron start err.
This commit is contained in:
parent
56983e4fff
commit
79d8c460e0
@ -71,7 +71,7 @@ END
|
||||
|
||||
#######################################################################
|
||||
OCF_RESKEY_binary_default="/usr/local/bin/monitor.py"
|
||||
OCF_RESKEY_user_default="neutron"
|
||||
OCF_RESKEY_user_default="root"
|
||||
OCF_RESKEY_pid_default="$HA_RSCTMP/$OCF_RESOURCE_INSTANCE.pid"
|
||||
|
||||
: ${OCF_RESKEY_binary=${OCF_RESKEY_binary_default}}
|
||||
@ -117,6 +117,11 @@ MonitorNeutron_stop() {
|
||||
fi
|
||||
|
||||
pid=`cat $OCF_RESKEY_pid`
|
||||
if [ -z "$pid" ]; then
|
||||
ocf_log err "MonitorNeutron pid is empty"
|
||||
exit $OCF_ERR_GENERIC
|
||||
fi
|
||||
|
||||
ocf_run kill -s TERM $pid
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
|
@ -99,8 +99,8 @@ class MonitorNeutronAgentsDaemon(Daemon):
|
||||
env_data = '/etc/legacy_ha_env_data'
|
||||
if os.path.isfile(env_data):
|
||||
with open(env_data, 'r') as f:
|
||||
f.readline()
|
||||
data = f.split('=').strip()
|
||||
line = f.readline()
|
||||
data = line.split('=').strip()
|
||||
if data and data[0] and data[1]:
|
||||
env[data[0]] = env[data[1]]
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user