Merge "Fix bug in recent worker_reserved.conf handling"
This commit is contained in:
commit
2d51929684
@ -2382,6 +2382,8 @@ fi
|
||||
######################################################################
|
||||
# From post_system_aio
|
||||
######################################################################
|
||||
TEMPLATE_FILE="/usr/share/worker-utils/config/worker_reserved.conf"
|
||||
TARGET_FILE="/etc/platform/worker_reserved.conf"
|
||||
if [ "${aio}" = true ] ; then
|
||||
|
||||
## Reserve more memory for base processes since the controller has higher
|
||||
@ -2407,8 +2409,6 @@ if [ "${aio}" = true ] ; then
|
||||
# Normally we would set personality based files later
|
||||
# But we need to copy worker_reserved.conf now since it needs to be modified for AIO
|
||||
ilog "${SYSTEM_TYPE__AIO} Reserved Memory: ${RESERVEDMEM}"
|
||||
TEMPLATE_FILE="/usr/share/worker-utils/config/worker_reserved.conf"
|
||||
TARGET_FILE="/etc/platform/worker_reserved.conf"
|
||||
if [ ! -e "${TEMPLATE_FILE}" ] ; then
|
||||
report_failure_with_msg "Cannot configure worker cpu/memory ; missing ${TEMPLATE_FILE}"
|
||||
fi
|
||||
@ -2433,7 +2433,13 @@ elif [ "${worker}" = true ] ; then
|
||||
# Keep logic contained and copy worker_reserved.conf now since we need
|
||||
# to do the copy for AIO above
|
||||
ilog "Enable ${TARGET_FILE} for ${TRAIT__WORKER}"
|
||||
if [ ! -e "${TEMPLATE_FILE}" ] ; then
|
||||
report_failure_with_msg "Cannot configure worker cpu/memory ; missing ${TEMPLATE_FILE}"
|
||||
fi
|
||||
cp "${TEMPLATE_FILE}" "${TARGET_FILE}"
|
||||
if [ ! -e "${TARGET_FILE}" ] ; then
|
||||
report_failure_with_msg "Cannot configure worker cpu/memory ; missing ${TARGET_FILE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
true
|
||||
|
@ -2550,6 +2550,8 @@ fi
|
||||
######################################################################
|
||||
# From post_system_aio
|
||||
######################################################################
|
||||
TEMPLATE_FILE="/usr/share/worker-utils/config/worker_reserved.conf"
|
||||
TARGET_FILE="/etc/platform/worker_reserved.conf"
|
||||
if [ "${aio}" = true ] ; then
|
||||
|
||||
## Reserve more memory for base processes since the controller has higher
|
||||
@ -2575,8 +2577,6 @@ if [ "${aio}" = true ] ; then
|
||||
# Normally we would set personality based files later
|
||||
# But we need to copy worker_reserved.conf now since it needs to be modified for AIO
|
||||
ilog "${SYSTEM_TYPE__AIO} Reserved Memory: ${RESERVEDMEM}"
|
||||
TEMPLATE_FILE="/usr/share/worker-utils/config/worker_reserved.conf"
|
||||
TARGET_FILE="/etc/platform/worker_reserved.conf"
|
||||
if [ ! -e "${TEMPLATE_FILE}" ] ; then
|
||||
report_failure_with_msg "Cannot configure worker cpu/memory ; missing ${TEMPLATE_FILE}"
|
||||
fi
|
||||
@ -2601,7 +2601,13 @@ elif [ "${worker}" = true ] ; then
|
||||
# Keep logic contained and copy worker_reserved.conf now since we need
|
||||
# to do the copy for AIO above
|
||||
ilog "Enable ${TARGET_FILE} for ${TRAIT__WORKER}"
|
||||
if [ ! -e "${TEMPLATE_FILE}" ] ; then
|
||||
report_failure_with_msg "Cannot configure worker cpu/memory ; missing ${TEMPLATE_FILE}"
|
||||
fi
|
||||
cp "${TEMPLATE_FILE}" "${TARGET_FILE}"
|
||||
if [ ! -e "${TARGET_FILE}" ] ; then
|
||||
report_failure_with_msg "Cannot configure worker cpu/memory ; missing ${TARGET_FILE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
true
|
||||
|
Loading…
Reference in New Issue
Block a user