Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api, vmware: Allow VM setting/detail for disk controller (root/data) to override template details #6276

Merged
merged 2 commits into from Aug 22, 2022

Conversation

Pearl1594
Copy link
Contributor

@Pearl1594 Pearl1594 commented Apr 18, 2022

Description

This PR allows VM details wrt root & data disk controller passed via details parameter of deployVMCmd to take precedence over template settings, i.e., the order of precedence for determining VM disk controller is : VM details passed during deployment > template settings > global setting vmware.root.disk.controller .

Types of changes

  • 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)
  • 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
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 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.

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3195

@Pearl1594
Copy link
Contributor Author

@blueorangutan test matrix

@blueorangutan
Copy link

@Pearl1594 a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@Pearl1594 Pearl1594 changed the title api, vmware: Allow VM setting/detail for disk controller (root/data) override template details api, vmware: Allow VM setting/detail for disk controller (root/data) to override template details Apr 18, 2022
@blueorangutan
Copy link

Trillian test result (tid-3926)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 30821 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6276-t3926-kvm-centos7.zip
Smoke tests completed. 93 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@blueorangutan
Copy link

Trillian test result (tid-3927)
Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
Total time taken: 33915 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6276-t3927-vmware-65u2.zip
Smoke tests completed. 92 look OK, 1 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_deploy_vm_from_iso Error 7.77 test_deploy_vm_iso.py

@blueorangutan
Copy link

Trillian test result (tid-3925)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 34828 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6276-t3925-xenserver-71.zip
Smoke tests completed. 91 look OK, 2 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestListIdsParams>:teardown Error 1.15 test_list_ids_parameter.py
test_02_cancel_host_maintenace_with_migration_jobs Error 1990.88 test_host_maintenance.py
test_02_cancel_host_maintenace_with_migration_jobs Error 1990.94 test_host_maintenance.py

@nvazquez
Copy link
Contributor

@Pearl1594 is this ready for review?

@Pearl1594 Pearl1594 marked this pull request as ready for review April 20, 2022 02:41
Copy link
Contributor

@harikrishna-patnala harikrishna-patnala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Pearl1594 Pearl1594 modified the milestone: 4.17.1.0 Apr 22, 2022
@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 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.

@blueorangutan
Copy link

Packaging result: ✖️ el7 ✔️ el8 ✔️ debian ✖️ suse15. SL-JID 3269

@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 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.

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3271

Comment on lines +4447 to +4450
if (vm.getDetail(VmDetailConstants.ROOT_DISK_CONTROLLER) == null) {
vm.setDetail(VmDetailConstants.ROOT_DISK_CONTROLLER, controllerSetting);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In UserVmVO we could create a method like setDetailIfNull. This way we can centralize the validation and reduce a bit of code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if it's worth doing this at this point, as it's not merely checking if it's null and setting it to some value.

@rohityadavcloud
Copy link
Member

Is this essential for 4.17 @nvazquez @Pearl1594 ?

@Pearl1594
Copy link
Contributor Author

@rohityadavcloud this isn't essential for 4.17.0 as this has always been the behavior and there also exists a workaround, where users can change the template setting for root disk controller. So IMO this can go into 4.17.1

@DaanHoogland
Copy link
Contributor

@blueorangutan test centos7 vmware-70u3

@blueorangutan
Copy link

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + vmware-70u3) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-4621)
Environment: vmware-70u3 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39638 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6276-t4621-vmware-70u3.zip
Smoke tests completed. 100 look OK, 1 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_deploy_vm_from_iso Error 7.84 test_deploy_vm_iso.py

@DaanHoogland
Copy link
Contributor

Test Result Time (s) Test File
test_deploy_vm_from_iso Error 7.84 test_deploy_vm_iso.py

@Pearl1594 , this remaining error seems to be consistent. Can you look at it?

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pearl1594 failing vm from iso test is due to validateRootDiskResize should we call it only for templates and not iso?

@Pearl1594 Pearl1594 force-pushed the consider-vm-setting-controller branch from a5d5379 to 59c5d0f Compare August 18, 2022 08:26
@shwstppr
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@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.

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4016

@Pearl1594
Copy link
Contributor Author

@blueorangutan test centos7 vmware-70u3

@blueorangutan
Copy link

@Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + vmware-70u3) has been kicked to run smoke tests

@sonarcloud
Copy link

sonarcloud bot commented Aug 18, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Aug 18, 2022

Codecov Report

Merging #6276 (59c5d0f) into 4.17 (010b47f) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##               4.17    #6276   +/-   ##
=========================================
  Coverage      5.86%    5.86%           
- Complexity     3918     3920    +2     
=========================================
  Files          2451     2451           
  Lines        242268   242277    +9     
  Branches      37910    37912    +2     
=========================================
+ Hits          14207    14211    +4     
- Misses       226491   226496    +5     
  Partials       1570     1570           
Impacted Files Coverage Δ
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 0.00% <0.00%> (ø)
...apache/cloudstack/syslog/AlertsSyslogAppender.java 58.75% <0.00%> (+2.25%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@blueorangutan
Copy link

Trillian test result (tid-4725)
Environment: vmware-70u3 (x2), Advanced Networking with Mgmt server 7
Total time taken: 40107 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6276-t4725-vmware-70u3.zip
Smoke tests completed. 101 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@shwstppr
Copy link
Contributor

@blueorangutan test matrix

@blueorangutan
Copy link

@shwstppr a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-4737)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 38043 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6276-t4737-xenserver-71.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 623.84 test_kubernetes_clusters.py

@blueorangutan
Copy link

Trillian test result (tid-4739)
Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
Total time taken: 40362 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6276-t4739-vmware-65u2.zip
Smoke tests completed. 101 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@blueorangutan
Copy link

Trillian test result (tid-4738)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 41359 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6276-t4738-kvm-centos7.zip
Smoke tests completed. 101 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

Copy link
Member

@rohityadavcloud rohityadavcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but didn't test it

Copy link
Contributor

@harikrishna-patnala harikrishna-patnala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the VM root disk controller settings at different places.

  1. With only global setting value
  2. With global setting and template setting
  3. With global, template and VM deployment
  4. Stopped the VM, changed VM setting in the above cases and started the VM

I've checked the VM settings on vCenter, in all the above cases I observed the precedence in the order of
VM setting > Template setting > Global setting

@shwstppr shwstppr merged commit 9847918 into apache:4.17 Aug 22, 2022
neogismm pushed a commit to neogismm/cloudstack that referenced this pull request Sep 5, 2022
…to override template details (apache#6276)

This PR allows VM details wrt root & data disk controller passed via details parameter of deployVMCmd to take precedence over template settings, i.e., the order of precedence for determining VM disk controller is : VM details passed during deployment > template settings > global setting vmware.root.disk.controller.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants