diff --git a/kickstart/files/kickstart.cfg b/kickstart/files/kickstart.cfg index c7a24f42..042a14df 100644 --- a/kickstart/files/kickstart.cfg +++ b/kickstart/files/kickstart.cfg @@ -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 diff --git a/kickstart/files/miniboot.cfg b/kickstart/files/miniboot.cfg index 99c45b09..03b01ec6 100644 --- a/kickstart/files/miniboot.cfg +++ b/kickstart/files/miniboot.cfg @@ -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