Fix bug in recent worker_reserved.conf handling
The new TEMPLATE_FILE and TARGET_FILE is out of scope for work installs. Test Plan: PASS: Verify worker only install Closes-Bug: 1999561 Signed-off-by: emacdona <eric.macdonald@windriver.com> Change-Id: Id6ce9e773a208637a32d355e6a0bfb3745437eaa
This commit is contained in:
parent
af7defe48f
commit
97ccd3d962
@ -2352,6 +2352,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
|
||||
@ -2377,8 +2379,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
|
||||
@ -2403,7 +2403,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
|
||||
|
@ -2516,6 +2516,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
|
||||
@ -2541,8 +2543,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
|
||||
@ -2567,7 +2567,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…
x
Reference in New Issue
Block a user