Stat collector solidfire capacity fix#4918
Conversation
Fixes regression introduced in 71c5dbc which would cause capacity bytes of certain pools to be update which shouldn't get updated by StatsCollector such as solidfire. Fixes apache#4911 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
…fault Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 405 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
@blueorangutan test centos7 vmware-67u3 |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
|
Trillian Build Failed (tid-432) |
|
Trillian test result (tid-433)
|
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
| s_logger.warn("Received 0 capacity for pool ID " + poolId); | ||
| } | ||
| } | ||
| if (pool.getUsedBytes() != ((StorageStats)answer).getByteUsed() && pool.getStorageProviderName().equalsIgnoreCase(DataStoreProvider.DEFAULT_PRIMARY) && !pool.isManaged()) { |
There was a problem hiding this comment.
@sureshanaparti I've added a check to not update when pool is managed, cc @skattoju4 @mike-tutkowski
There was a problem hiding this comment.
@rhtyd I think managed pool(s) doesn't use DefaultPrimary as its provider, in that case managed pool check is not required.
There was a problem hiding this comment.
That's a good point about managed-storage providers not using DefaultPrimary. Each of these storage providers probably provides its own plug-in.
| pool.setUsedBytes(((StorageStats) answer).getByteUsed()); | ||
| pool.setUpdateTime(new Date()); | ||
| if (_storagePoolStats.get(poolId) != null && _storagePoolStats.get(poolId).getCapacityBytes() != ((StorageStats)answer).getCapacityBytes()) { | ||
| if (((StorageStats)answer).getCapacityBytes() > 0) { |
There was a problem hiding this comment.
@sureshanaparti cc @DaanHoogland added check to log warning when capacity is reported 0; it's updated only when the value is > 0.
|
@blueorangutan package |
1 similar comment
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 421 |
|
@blueorangutan test matrix |
|
@rhtyd a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
Trillian test result (tid-451)
|
|
Trillian test result (tid-452)
|
|
Trillian test result (tid-457)
|
Co-authored-by: Nicolas Vazquez <nicovazquez90@gmail.com>
| s_logger.warn("Not setting capacity bytes, received " + ((StorageStats)answer).getCapacityBytes() + " capacity for pool ID " + poolId); | ||
| } | ||
| } | ||
| if (pool.getUsedBytes() != ((StorageStats)answer).getByteUsed() && pool.getStorageProviderName().equalsIgnoreCase(DataStoreProvider.DEFAULT_PRIMARY)) { |
There was a problem hiding this comment.
Thanks @sureshanaparti @mike-tutkowski - I've addressed the comment, removed the check for managed storage.
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 423 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-465)
|
|
Trillian test result (tid-468)
|
Fixes #4911
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Temporary repo builds here for testing purposes for community: http://download.cloudstack.org/testing/pr-4918/
(This will be removed after the PR is merged)