Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAM resources bar always dispplays value out of a NaN quota #116

Closed
jrha opened this issue Mar 6, 2018 · 5 comments · Fixed by #114
Closed

RAM resources bar always dispplays value out of a NaN quota #116

jrha opened this issue Mar 6, 2018 · 5 comments · Fixed by #114
Labels

Comments

@jrha
Copy link
Member

jrha commented Mar 6, 2018

screenshot

@jrha jrha added the bug label Mar 6, 2018
@jrha jrha changed the title Images that do not specify a minimum amount of RAM cause a NaN to display RAM resources bar always dispplays value out of a NaN quota Mar 6, 2018
@jrha
Copy link
Member Author

jrha commented Mar 6, 2018

This happens even with images that do specify a minimum amount of RAM, so it's a bigger bug.

@JHaydock-Pro
Copy link
Contributor

I was unable to reproduce this, but I think I know what the problem is. Do you mind checking this again, to see if it's been resolved.

I don't think this has anything to do with images, I think it happens when the project quota is undefined. The way I had it set up, the project quota would overwrite the largest flavour as the maximum value if it was smaller. It seems it counted 'undefined' as smaller than the largest flavour limit but since 'undefined' is not an int value it returned 'NaN'.

I modified it so the maximum value is not initially set as an int thus allowing an undefined value. Also it should only use a value if it's not undefined, if both are undefined it will use '∞'.

@JHaydock-Pro
Copy link
Contributor

I think I have resolved it now. I hadn't set an else statement for when biggestRAMAmount and availablequotamem have the same value. It was only set to return the smallest, which in your case was neither since they were identical.

@JHaydock-Pro
Copy link
Contributor

Third time lucky?

I think I've got it this time, I had been attempting to pass undefined values as arguments meaning they failed before before being checked.

@jrha
Copy link
Member Author

jrha commented Apr 26, 2018

Yes! It's fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants