ravening opened a new pull request #4360:
URL: https://github.com/apache/cloudstack/pull/4360
## Description
<!--- Describe your changes in detail -->
Update the used_bytes for all default primary storage pools
Also, get used_bytes of storage pool from the database instead of
memory
<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to
reproduce. -->
<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be
closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
<!-- Fixes: # -->
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the
boxes that apply: -->
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
## Screenshots (if appropriate):
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to
-->
<!-- see how your change affects other areas of the code, etc. -->
Below sql query should return the latest used bytes of the storage pol
```
mysql> select * from storage_pool\G
*************************** 1. row ***************************
id: 1
name: primary1
uuid: 74d0b-9e65-3183-8345-e749fcd0e
pool_type: NetworkFilesystem
port: 2049
data_center_id: 1
pod_id: NULL
cluster_id: NULL
used_bytes: 10363076608
capacity_bytes: 52709818368
host_address: 10.135.122.14
user_info: NULL
path: /data/primary1
created: 2020-07-10 09:27:51
removed: NULL
update_time: 2020-09-30 10:50:19
status: Up
storage_provider_name: DefaultPrimary
scope: ZONE
hypervisor: KVM
managed: 0
capacity_iops: NULL
1 row in set (0.01 sec)
```
<!-- Please read the
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md)
document -->
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]