diff options
| author | Michael Klishin <michael@clojurewerkz.org> | 2016-05-23 15:15:06 +0300 |
|---|---|---|
| committer | Michael Klishin <michael@clojurewerkz.org> | 2016-05-23 15:15:06 +0300 |
| commit | 2b9bdfd73b7157cbce9ece636d05f6916d5a3a5a (patch) | |
| tree | 40a080c495eed4e828b8d3707968466dea90c568 /scripts | |
| parent | 77332e682250f4e6a315de81abadd9e3a682e416 (diff) | |
| parent | ba88ee7f743f0abb85e09981c7d3a86f95e835c1 (diff) | |
| download | rabbitmq-server-git-2b9bdfd73b7157cbce9ece636d05f6916d5a3a5a.tar.gz | |
Merge branch 'stable' into rabbitmq-server-687
Diffstat (limited to 'scripts')
| -rwxr-xr-x[-rw-r--r--] | scripts/rabbitmq-env | 1 | ||||
| -rwxr-xr-x | scripts/rabbitmq-server | 6 | ||||
| -rwxr-xr-x | scripts/rabbitmq-server-ha.ocf | 18 |
3 files changed, 15 insertions, 10 deletions
diff --git a/scripts/rabbitmq-env b/scripts/rabbitmq-env index 35239620ca..def47ebd27 100644..100755 --- a/scripts/rabbitmq-env +++ b/scripts/rabbitmq-env @@ -177,6 +177,7 @@ DEFAULT_NODE_PORT=5672 [ "x" = "x$RABBITMQ_MNESIA_BASE" ] && RABBITMQ_MNESIA_BASE=${MNESIA_BASE} [ "x" = "x$RABBITMQ_SERVER_START_ARGS" ] && RABBITMQ_SERVER_START_ARGS=${SERVER_START_ARGS} [ "x" = "x$RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS" ] && RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=${SERVER_ADDITIONAL_ERL_ARGS} +[ "x" = "x$RABBITMQ_SERVER_CODE_PATH" ] && RABBITMQ_SERVER_CODE_PATH=${SERVER_CODE_PATH} [ "x" = "x$RABBITMQ_MNESIA_DIR" ] && RABBITMQ_MNESIA_DIR=${MNESIA_DIR} [ "x" = "x$RABBITMQ_MNESIA_DIR" ] && RABBITMQ_MNESIA_DIR=${RABBITMQ_MNESIA_BASE}/${RABBITMQ_NODENAME} diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server index ab2975feb1..74337311cd 100755 --- a/scripts/rabbitmq-server +++ b/scripts/rabbitmq-server @@ -133,11 +133,15 @@ ensure_thread_pool_size() { } start_rabbitmq_server() { + # "-pa ${RABBITMQ_SERVER_CODE_PATH}" should be the very first + # command-line argument. In case of using cached HiPE-compilation, + # this will allow for compiled versions of erlang built-in modules + # (e.g. lists) to be loaded. ensure_thread_pool_size check_start_params && RABBITMQ_CONFIG_FILE=$RABBITMQ_CONFIG_FILE \ exec ${ERL_DIR}erl \ - -pa ${RABBITMQ_EBIN_ROOT} \ + -pa ${RABBITMQ_SERVER_CODE_PATH} ${RABBITMQ_EBIN_ROOT} \ ${RABBITMQ_START_RABBIT} \ ${RABBITMQ_NAME_TYPE} ${RABBITMQ_NODENAME} \ -boot "${SASL_BOOT_FILE}" \ diff --git a/scripts/rabbitmq-server-ha.ocf b/scripts/rabbitmq-server-ha.ocf index 06eeb50837..8a2075d9f0 100755 --- a/scripts/rabbitmq-server-ha.ocf +++ b/scripts/rabbitmq-server-ha.ocf @@ -1358,18 +1358,18 @@ is_master() { # separately. The second argument is used to distingush them. check_timeouts() { local op_rc=$1 - local crm_attr_name=$2 + local timeouts_attr_name=$2 local op_name=$3 if [ $op_rc -ne 124 -a $op_rc -ne 137 ]; then - ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name $crm_attr_name --update 0 + ocf_run attrd_updater -p --name $timeouts_attr_name --update 0 return 0 fi local count - count=`crm_attribute -N $THIS_PCMK_NODE -l reboot --name $crm_attr_name --query 2>/dev/null` + count=`attrd_updater --name $timeouts_attr_name --query 2>/dev/null` if [ $? -ne 0 ]; then - # the crm_attribute exited with error. In that case most probably it printed garbage + # the attrd_updater exited with error. In that case most probably it printed garbage # instead of the number we need. So defensively assume that it is zero. count=0 @@ -1378,9 +1378,9 @@ check_timeouts() { count=$((count+1)) # There is a slight chance that this piece of code will be executed twice simultaneously. - # As a result, $crm_attr_name's value will be one less than it should be. But we don't need + # As a result, $timeouts_attr_name's value will be one less than it should be. But we don't need # precise calculation here. - ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name $crm_attr_name --update $count + ocf_run attrd_updater -p --name $timeouts_attr_name --update $count if [ $count -lt $OCF_RESKEY_max_rabbitmqctl_timeouts ]; then ocf_log warn "${LH} 'rabbitmqctl $op_name' timed out $count of max. $OCF_RESKEY_max_rabbitmqctl_timeouts time(s) in a row. Doing nothing for now." @@ -1670,9 +1670,9 @@ action_start() { return $OCF_SUCCESS fi - ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name 'rabbit_list_channels_timeouts' --update '0' - ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name 'rabbit_get_alarms_timeouts' --update '0' - ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name 'rabbit_list_queues_timeouts' --update '0' + ocf_run attrd_updater -p --name 'rabbit_list_channels_timeouts' --update '0' + ocf_run attrd_updater -p --name 'rabbit_get_alarms_timeouts' --update '0' + ocf_run attrd_updater -p --name 'rabbit_list_queues_timeouts' --update '0' ocf_log info "${LH} Deleting start time attribute" ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name 'rabbit-start-time' --delete ocf_log info "${LH} Deleting master attribute" |
