database-nodemgr doesn't get number correctly
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R3.0 |
Fix Committed
|
High
|
Nikhil Bansal | |||
Trunk |
Fix Committed
|
High
|
Nikhil Bansal |
Bug Description
database_
========
popen_cmd = "set `df -Pk " + analytics_dir + " | grep % | awk '{s+=$4}END{print s}'` && echo $1"
========
# df -Pk /var/lib/
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/mapper/
# df -Pk /var/lib/
6.74076e+09
I fixed it with this patch.
========
- popen_cmd = "set `df -Pk " + analytics_dir + " | grep % | awk '{s+=$4}END{print s}'` && echo $1"
+ popen_cmd = "set `df -Pk " + analytics_dir + " | grep % | awk '{print $4}'` && echo $1"
========
The same issue may happens to other fields of df output.
Changed in juniperopenstack: | |
assignee: | nobody → Raj Reddy (rajreddy) |
tags: | added: analytics |
information type: | Proprietary → Public |
Tony, which OS is this, I don't see this on ubuntu 14 or cento 7.1
In any case can you see if change
{print s}
to
{printf "%i", s}
works.