Description of problem: Check pod's metrics on web console, the available number is not matched with used number when choose different Time Range. The sum of available number and used number is not equal to the total number. It confused user how many resources are used. Version-Release number of selected component (if applicable): openshift v1.0.6-997-gff3b522 kubernetes v1.2.0-alpha.1-1107-g4c8e6f4 etcd 2.1.2 How reproducible: Always Steps to Reproduce: 1.Setup metrics. Create pod with cpu/memory requests/limits. 1.1 oc run cpuhog --image=busybox --requests=cpu=100m --limits=cpu=500m -- md5sum /dev/urandom 1.2 $oc create -f origin/examples/project-quota/application-template-with-resources.json -n pro1 $oc new-app ruby-helloworld-sample-with-resources 2.Login on web console, check pod cpuhog's metrics, switch "Time Range" in list: "Last 30 minutes, Last hour, Last 4 hours, Last day, Last week" 3.Check app's pod metrics such as frontend/database , switch "Time Range" in list: "Last 30 minutes, Last hour, Last 4 hours, Last day, Last week" Actual results: 2,3.The available number is not matched with used number for some Time Range. The sum of available number and used number is not equal to the total number. Refer to the attachment. Expected results: 2,3.Should have right number for any Time Range, and make it clear for users. Additional info:
Created attachment 1087148 [details] last-hour
Created attachment 1087149 [details] last-week
Created attachment 1087150 [details] 30-minutes
I suspect this is an angular-patternfly utilization chart bug since we don't calculate the available value, we only give them used and total. It looks like they're not watching changes to those values to update available. https://github.com/patternfly/angular-patternfly/blob/master/src/charts/utilization/utilization-chart-directive.js We should be able to set the available value ourselves to workaround the problem, although I'd like to open an upstream issue as well. /cc Jessica
Opened an upstream angular-patternfly pull request to fix: https://github.com/patternfly/angular-patternfly/pull/143
origin pull request: https://github.com/openshift/origin/pull/5475
Tested on latest origin code. openshift v1.0.7-32-gd17e473 kubernetes v1.2.0-alpha.1-1107-g4c8e6f4 etcd 2.1.2 Login on web console, check pod's metrics, switch "Time Range" in list: "Last 30 minutes, Last hour, Last 4 hours, Last day, Last week". Now the available number is matched with used number for all Time Range, and the sum of available number and used number is equal to the total number. The bug has been fixed, so move it to verified.