cloudstack
cloudstack copied to clipboard
Updated resource counter to include correct size after volume creation/resize and other improvements
Description
This PR updates primary_storage resource counter to include correct size after volume creation/resize and other improvements.
- Recalculate resource counters for root domain in the periodic task
- Update correct size in the primary_storage resource counter after volume creation/resize
- Some code improvements
Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [x] 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)
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
- [ ] Major
- [x] Minor
Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [x] Major
- [ ] Minor
- [ ] Trivial
How Has This Been Tested?
Manually tested VM/Volume operations using ScaleIO/PowerFlex pool and checked the primary_storage resource counters for different domains.
Before fix (primarystorageavailable counter is not shown appropriately for unlimited):
(testenv) 🐱 > list domains filter=name,primarystoragetotal,primarystoragelimit,primarystorageavailable
{
"count": 3,
"domain": [
{
"name": "ROOT",
"primarystorageavailable": "Unlimited",
"primarystoragelimit": "Unlimited",
"primarystoragetotal": -5
},
{
"name": "Domain01",
"primarystorageavailable": "-1",
"primarystoragelimit": "-1",
"primarystoragetotal": 0
},
{
"name": "Domain02",
"primarystorageavailable": "-1",
"primarystoragelimit": "-1",
"primarystoragetotal": 0
}
]
}
(testenv) 🐱 > list domains filter=name,primarystoragetotal,primarystoragelimit,primarystorageavailable
{
"count": 3,
"domain": [
{
"name": "ROOT",
"primarystorageavailable": "Unlimited",
"primarystoragelimit": "Unlimited",
"primarystoragetotal": 3
},
{
"name": "Domain01",
"primarystorageavailable": "-9",
"primarystoragelimit": "-1",
"primarystoragetotal": 8
},
{
"name": "Domain02",
"primarystorageavailable": "-1",
"primarystoragelimit": "-1",
"primarystoragetotal": 0
}
]
}
(testenv) 🐱 > list domains filter=name,primarystoragetotal,primarystoragelimit,primarystorageavailable
{
"count": 3,
"domain": [
{
"name": "ROOT",
"primarystorageavailable": "Unlimited",
"primarystoragelimit": "Unlimited",
"primarystoragetotal": 6
},
{
"name": "Domain01",
"primarystorageavailable": "-25",
"primarystoragelimit": "-1",
"primarystoragetotal": 24
},
{
"name": "Domain02",
"primarystorageavailable": "-1",
"primarystoragelimit": "-1",
"primarystoragetotal": 0
}
]
}
After fix =>
(testenv) 🐱 > list domains filter=name,primarystoragetotal,primarystoragelimit,primarystorageavailable
{
"count": 3,
"domain": [
{
"name": "ROOT",
"primarystorageavailable": "Unlimited",
"primarystoragelimit": "Unlimited",
"primarystoragetotal": 88
},
{
"name": "Domain01",
"primarystorageavailable": "Unlimited",
"primarystoragelimit": "Unlimited",
"primarystoragetotal": 40
},
{
"name": "Domain02",
"primarystorageavailable": "Unlimited",
"primarystoragelimit": "Unlimited",
"primarystoragetotal": 24
}
]
}
@blueorangutan package
@sureshanaparti a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3856
@blueorangutan test
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6587 (SL-JID-2073)
@blueorangutan package
@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_check_mark: suse15. SL-JID 3902
Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 3907
Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 3913
Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 3917
@blueorangutan package
@sureshanaparti a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 3926
@blueorangutan package
@borisstoyanov a Jenkins job has been kicked to build packages. It will be bundled with SystemVM template(s). I'll keep you posted as I make progress.
Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3944
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3945
@blueorangutan test
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
Trillian test result (tid-4672) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 39739 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6587-t4672-kvm-centos7.zip Smoke tests completed. 100 look OK, 1 have errors Only failed tests results shown below:
Test | Result | Time (s) | Test File |
---|---|---|---|
test_08_upgrade_kubernetes_ha_cluster | Failure |
621.02 | test_kubernetes_clusters.py |
cc @harikrishna-patnala @shwstppr @DaanHoogland do we need this in 4.17 branch?