Skip to content

Commit

Permalink
Merge pull request ClusterLabs#1819 from XingWei-Liu/main
Browse files Browse the repository at this point in the history
docker/podman/zabbixserver: replace error log messages with calls to ocf_exit_reason
  • Loading branch information
oalbrigt committed Nov 16, 2022
2 parents cd5df83 + 7bfc7bb commit 2113da3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion heartbeat/docker
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ docker_simple_status()
local val

if [ ! -x "$(command -v docker)" ]; then
ocf_log err "docker is not installed on this host"
ocf_exit_reason "docker is not installed on this host"
return $OCF_ERR_INSTALLED
fi

Expand Down
2 changes: 1 addition & 1 deletion heartbeat/podman
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ create_transient_drop_in_dependency()
local rc=$OCF_SUCCESS

if [ -z "$cid" ]; then
ocf_log error "Container ID not found for \"$CONTAINER\". Not creating drop-in dependency"
ocf_exit_reason "Container ID not found for \"$CONTAINER\". Not creating drop-in dependency"
return $OCF_ERR_GENERIC
fi

Expand Down
8 changes: 4 additions & 4 deletions heartbeat/zabbixserver
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ check_config() {
if ocf_is_probe; then
ocf_log info "Can't read configuration file $1 during probe"
else
ocf_log err "Can't read configuration file $1"
ocf_exit_reason "Can't read configuration file $1"
return 1
fi
fi
Expand Down Expand Up @@ -207,7 +207,7 @@ zabbixserver_start() {

startserver
if [ $? -ne 0 ]; then
ocf_log err "Can't start Zabbix server"
ocf_exit_reason "Can't start Zabbix server"
return $OCF_ERR_GENERIC
fi

Expand Down Expand Up @@ -244,14 +244,14 @@ zabbixserver_stop() {

pid=`getpid $OCF_RESKEY_pid`
if [ $? -ne 0 ]; then
ocf_log err "Can't find process PID"
ocf_exit_reason "Can't find process PID"
return $OCF_ERR_GENERIC
fi

# kill the process
ocf_run -q kill $pid
if [ $? -ne 0 ]; then
ocf_log err "Can't stop process (PID $pid)"
ocf_exit_reason "Can't stop process (PID $pid)"
return $OCF_ERR_GENERIC
fi

Expand Down

0 comments on commit 2113da3

Please sign in to comment.