Skip to content

Conversation

@Pearl1594
Copy link
Contributor

@Pearl1594 Pearl1594 commented Mar 16, 2021

Description

This PR fixes the issue pertaining to volume resize on VMWare for deploy as-is templates. VMware deploy as-is templates are those that are deployed as per the specification in the imported OVF. Hence override root disk size will not be adhered to for such templates. Moreover, when we deploy VMs in stopped state and resize the volume, the root disk doesn't get resized but the volume size is merely updated in the DB.
This PR also includes the following (for deploy as-is templates):

  • Disables overriding root disk size during VM deployment on the UI
  • Disables selection of compute offerings with root disk size specified, at the time of deployment
  • Provided users with the option to deploy VM is stopped state via UI (so as to give an option to users to resize the volumes before starting the VM)

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

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Prior to the fix:

Deployed a VM in stopped state, resized volume from 3GB to 8GB
image

While the UI shows that the Volume is resized, the root volume inside the VM doesn't seem to have gotten resized:
image

Post fix

Deployed a VM in stopped state, resized the volume from 3GB to 8GB
image

image

Notice that the volume size as shown in the UI complies with the value inside the VM
Or verify the same on vcenter

@Pearl1594 Pearl1594 requested a review from nvazquez March 16, 2021 14:52
@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S]

@blueorangutan
Copy link

Packaging result: ✖️ centos7 ✖️ centos8 ✖️ debian. SL-JID 138

@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S]

@blueorangutan
Copy link

Packaging result: ✖️ centos7 ✖️ centos8 ✔️ debian. SL-JID 140

@nvazquez
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S]

@blueorangutan
Copy link

Packaging result: ✔️ centos7 ✖️ centos8 ✔️ debian. SL-JID 141

Copy link
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

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

Looks good - perhaps also adding a check on the resizevolume and fail with a message when the volume is created from a deploy-as-is template?

for (DiskTO vol : sortedDisks) {
if (vol.getType() == Volume.Type.ISO || deployAsIs && vol.getType() == Volume.Type.ROOT) {
rootDiskTO = vol;
resizeRootDiskOnVMStart(vmMo, rootDiskTO, hyperHost, context);
Copy link
Contributor

Choose a reason for hiding this comment

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

@Pearl1594 is this required for ISO as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @sureshanaparti It's not required for ISO , have made the necessary change.

@Pearl1594
Copy link
Contributor Author

Looks good - perhaps also adding a check on the resizevolume and fail with a message when the volume is created from a deploy-as-is template?

@nvazquez added checks to see if a compute offering with root disk size mentioned is used / overriding root disk size is attempted when deploying a vm with deploy as-is template and will accordingly throw an exception.

@rohityadavcloud rohityadavcloud added this to the 4.15.1.0 milestone Mar 17, 2021
@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S]

@blueorangutan
Copy link

Packaging result: ✔️ centos7 ✖️ centos8 ✖️ debian. SL-JID 156

@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S]

@blueorangutan
Copy link

Packaging result: ✖️ centos7 ✔️ centos8 ✔️ debian. SL-JID 158

@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S]

@blueorangutan
Copy link

Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 160

@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 [S]

@blueorangutan
Copy link

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

@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 208

@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

@blueorangutan
Copy link

Trillian test result (tid-227)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 33443 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4829-t227-xenserver-71.zip
Intermittent failure detected: /marvin/tests/smoke/test_scale_vm.py
Smoke tests completed. 85 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_scale_vm Failure 12.27 test_scale_vm.py

@blueorangutan
Copy link

Trillian test result (tid-228)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 35299 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4829-t228-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Smoke tests completed. 85 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_migrate_VM_and_root_volume Error 74.35 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 51.19 test_vm_life_cycle.py

@blueorangutan
Copy link

Trillian test result (tid-229)
Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
Total time taken: 42211 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4829-t229-vmware-65u2.zip
Intermittent failure detected: /marvin/tests/smoke/test_internal_lb.py
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Smoke tests completed. 84 look OK, 2 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_03_deploy_and_upgrade_kubernetes_cluster Failure 796.21 test_kubernetes_clusters.py
ContextSuite context=TestVAppsVM>:setup Error 43.39 test_vm_life_cycle.py

@Pearl1594 Pearl1594 marked this pull request as ready for review March 24, 2021 04:25
Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

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

code LGTM

@rohityadavcloud
Copy link
Member

Tests LGTM

@rohityadavcloud
Copy link
Member

With @shwstppr to manually test 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.

Tested on VMware 65u2 env. Works fine.
UI disables Root disk resize option for newly registered templates unlike earlier where it was shown but not honoured.
Earlier
Screenshot from 2021-03-26 16-53-06
Now
Screenshot from 2021-03-26 16-54-29

  • Root volume resize of stopped VM deployed with a newly registered template (deployasis) - Successful
  • Root volume resize of stopped VM deployed with an ISO - Successfull

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.

While volume resize behaviour works for most cases CKS cluster noderootdisksize is not working as expected. Will need similar changes from f5e866c

@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 267

@Pearl1594
Copy link
Contributor Author

@blueorangutan test centos7 vmware-67u3

@blueorangutan
Copy link

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

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.

LGTM. Tested CKS node root disk resize with latest changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants