apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.06k stars 1.1k forks source link

Improvement on collecting/updating Secondary Storage total size/capacity #8391

Closed andrijapanicsb closed 4 months ago

andrijapanicsb commented 10 months ago

Improvement request:

In certain cases, this becomes a very... useless... design, where the values can not be altered in case of edge cases where the Secondary Storage capacity needs to be expanded, but SSVMs are not running/existing, for whatever reason.

Proposal:

DaanHoogland commented 5 months ago

​@anddrijapanicsb, so far I implemented a API/UI change to update the value in the DB, but the value returned is still coming from the StatsCollector. When a manual change has been done that disagrees with the actual/discovered size, which do we consider when/on what grounds?

andrijapanicsb commented 5 months ago

As discussed, consider the value from the DB during the boot of the mgmt server (instead of having null or zero value, whatever is the case currently), but when the stats collectors runs for the next time (when SSVM returns the size of the SS), then update in-memory capacity as well as the capacity inside the DB (that was set manually/via API/UI).

rohityadavcloud commented 4 months ago

Fixed by https://github.com/apache/cloudstack/pull/8941 tested by @kiranchavala @andrijapanicsb pl review and discuss if this is enough, re-open the issue if more work in needed.