server: fix volume migration on user vm scale#6704
Conversation
Fixes apache#6701 When volume migration is initiated by system account check is not needed. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
@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: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4129 |
|
SonarCloud Quality Gate failed. |
|
@blueorangutan test |
|
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Codecov Report
@@ 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
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Trillian test result (tid-4820)
|
|
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. |
ok, makes sense, migration not being allowed. sorry I misunderstood. |
|
Trillian Build Failed (tid-5131) |
|
Trillian Build Failed (tid-5137) |
…o allow or skip disk offering change upon scale VM operation. Added marvin tests to verify scale VM operation with user account and also to verify the new global/zone setting
|
@blueorangutan test matrix |
|
@shwstppr a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
I've tested this pr, wiith this patch, I can scale the VM as a domain admin. |
|
Trillian test result (tid-5259)
|
|
Trillian test result (tid-5261)
|
|
Trillian test result (tid-5260)
|
|
Test LGTM |
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
@blueorangutan package |
|
@rohityadavcloud 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: ✔️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 4671 |
|
env issue - pkg is okay for EL7 and others (will rekick after smoketests) |
|
@rohityadavcloud a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
| private boolean compareEqualsIncludingNullOrZero(Long a, Long b) { | ||
| a = ObjectUtils.defaultIfNull(a, 0L); | ||
| b = ObjectUtils.defaultIfNull(b, 0L); | ||
|
|
||
| return a.equals(b); | ||
| } |
There was a problem hiding this comment.
@shwstppr, we could move this method to com.cloud.utils.NumbersUtils and add some unit tests.
| * @param b | ||
| * @return true if a and b are equal excluding 0 and null values. | ||
| */ | ||
| private boolean compareEqualsIncludingNullOrZero(Long a, Long b) { |
There was a problem hiding this comment.
@shwstppr, what do you think about renaming the method to compareLongsDefaultingNullToZero?
vladimirpetrov
left a comment
There was a problem hiding this comment.
LGTM based on manual testing.
|
Trillian test result (tid-5285)
|
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
|
I've committed suggestions, there's one outstanding on refactoring to a utils which can be done in a separate PR as #shwstppr is on holiday this week. I'll merge this to keep effort on-going for 4.17.2.0 release. |
|
@rohityadavcloud 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: ✖️ el7 ✔️ el8 ✖️ debian ✖️ suse15. SL-JID 4694 |









Description
Fixes #6701
When volume migration is initiated by system, account check is not needed.
Introduces a new global setting -
allow.diskOffering.change.during.scale.vmDetermines whether to allow or disallow disk offering change for root volume during scaling of a stopped or running VM. Default value is
trueTypes of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?