If kernel/OS does not support Hugepages, init.d/ startup script fails (regardless of support requested or not) (Test sample is Ubuntu 16.04 lxbrand on SmartOS)
ENABLE_HUGE_PAGES="false"
HUGE_PAGE_SIZE_BYTES=`awk '/Hugepagesize:/{print $2*1024}' /proc/meminfo`
if [ -f $APPD_ROOT/HA/LARGE_PAGES_ENABLE -a -n "$HUGE_PAGE_SIZE_BYTES" ] ; then
ENABLE_HUGE_PAGES="true"
fi
^^ HUGE_PAGE_SIZE_BYTES == null because value doesn't exist
If kernel/OS does not support Hugepages, init.d/ startup script fails (regardless of support requested or not) (Test sample is Ubuntu 16.04 lxbrand on SmartOS)
^^ HUGE_PAGE_SIZE_BYTES == null because value doesn't exist
Later: (line 1375) -> divide by zero:
Output:
root@appd-node1:/# /etc/init.d/appdcontroller-db start /etc/init.d/appdcontroller-db: line 1375: ((: APPD_HUGE_PAGES = APPD_TOTAL_RESERVED_BYTES / HUGE_PAGE_SIZE_BYTES : division by 0 (error token is "HUGE_PAGE_SIZE_BYTES ") /etc/init.d/appdcontroller-db: line 1377: APPD_TOTAL_RESERVED_BYTES % HUGE_PAGE_SIZE_BYTES : division by 0 (error token is "HUGE_PAGE_SIZE_BYTES ")