Appdynamics / Appdynamics/HA-toolkit
Hugepage detection is fragile and breaks when kernel doesn't support Hugepages
- Dominant language
- Shell
- Stars
- 13
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
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
Later: (line 1375) -> divide by zero:
` (( APPD_HUGE_PAGES = APPD_TOTAL_RESERVED_BYTES / HUGE_PAGE_SIZE_BYTES ))`
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 ")
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.