cloudstack
cloudstack copied to clipboard
server: fix volume migration on user vm scale
Description
Fixes #6701
When volume migration is initiated by system, account check is not needed.
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)
- [ ] 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
- [ ] Minor
Bug Severity
- [ ] BLOCKER
- [x] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
Screenshots (if appropriate):
How Has This Been Tested?
@blueorangutan package
@shwstppr 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 4129
@blueorangutan test
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
Codecov Report
Merging #6704 (94db086) into 4.17 (296035d) will decrease coverage by
0.00%
. The diff coverage is4.16%
.
:exclamation: Current head 94db086 differs from pull request most recent head 2c7f27f. Consider uploading reports for the commit 2c7f27f to get more accurate results
@@ Coverage Diff @@
## 4.17 #6704 +/- ##
============================================
- Coverage 10.34% 10.34% -0.01%
- Complexity 6610 6611 +1
============================================
Files 2451 2451
Lines 242340 242352 +12
Branches 37924 37926 +2
============================================
- Hits 25070 25066 -4
- Misses 214182 214198 +16
Partials 3088 3088
Impacted Files | Coverage Δ | |
---|---|---|
...in/java/com/cloud/server/ManagementServerImpl.java | 2.50% <0.00%> (-0.01%) |
:arrow_down: |
...n/java/com/cloud/storage/VolumeApiServiceImpl.java | 10.79% <0.00%> (-0.03%) |
:arrow_down: |
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java | 5.63% <0.00%> (-0.01%) |
:arrow_down: |
.../apache/cloudstack/vm/UnmanagedVMsManagerImpl.java | 31.62% <0.00%> (ø) |
|
...rver/src/main/java/com/cloud/vm/UserVmManager.java | 100.00% <100.00%> (ø) |
|
...rg/apache/cloudstack/quota/QuotaStatementImpl.java | 36.28% <0.00%> (-3.99%) |
:arrow_down: |
...dstack/network/contrail/model/ModelObjectBase.java | 28.84% <0.00%> (+7.69%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Trillian test result (tid-4820) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 40069 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6704-t4820-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 |
604.34 | test_kubernetes_clusters.py |
Moving this to draft, need to revisit this later. Ideally, the normal user should not be allowed to scale VM or change volume offering with volume migration.
Moving this to draft, need to revisit this later. Ideally, the normal user should not be allowed to scale VM or change volume offering with volume migration.
is ther some technical reason not to allow that @shwstppr ? because from a business point of view I would want them to be able to scale VMs and volumes.
@DaanHoogland didn't understand you.
I was saying scale VM operation shouldn't be allowed with migration of volume and without migration it should be fine.
This was based on the fact that by default user role is not allowed to use migrateVolume
API.
@DaanHoogland didn't understand you. I was saying scale VM operation shouldn't be allowed with migration of volume and without migration it should be fine. This was based on the fact that by default user role is not allowed to use
migrateVolume
API.
ok, makes sense, migration not being allowed. sorry I misunderstood.
Trillian Build Failed (tid-5131)
Trillian Build Failed (tid-5137)
@blueorangutan package
@harikrishna-patnala 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.
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.
Added a new global setting for scale VM operation "allow.diskOffering.change.during.scale.vm" which determines whether to allow or disallow disk offering change for root volume during scaling of a stopped or running VM. By default it is false, which means disk offering change will not happen during scale VM. This is to keep the old behavior as is.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6704 (SL-JID-2517)
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 4479
@blueorangutan test matrix
@harikrishna-patnala a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests
Trillian Build Failed (tid-5141)
Trillian Build Failed (tid-5142)
Trillian test result (tid-5143) Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7 Total time taken: 40761 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6704-t5143-vmware-65u2.zip Smoke tests completed. 100 look OK, 1 have errors, 0 did not run Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File |
---|---|---|---|
test_05_scale_vm_dont_allow_disk_offering_change | Error |
0.11 | test_scale_vm.py |
@blueorangutan package
@harikrishna-patnala 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.
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.