Skip to content

add global setting to allow parallel execution on vmware - #6413

Merged
DaanHoogland merged 18 commits into
apache:mainfrom
shapeblue:allowParallelSetting
Jul 15, 2022
Merged

add global setting to allow parallel execution on vmware#6413
DaanHoogland merged 18 commits into
apache:mainfrom
shapeblue:allowParallelSetting

Conversation

@DaanHoogland

@DaanHoogland DaanHoogland commented May 27, 2022

Copy link
Copy Markdown
Contributor

Description

This PR fixes the following situation:
As an operator one wants to be able to start a VM while another volume migration job is being already executed (when both actions are executed by same host). On vmware this is only possible when the setting vmware.create.full.clone is set to false, due to historic limitations in vmware. As a backwards compatible solution this PR adds a setting to override the behaviour when vmware.create.full.clone is set to true. when the new setting vmware.allow.parallel.command.execution is set to true parallel execution of storage commands is allways allowed.

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?

unit test added and tested manually;
In an environment with 1 host and 2 primary storages

  1. using the settings vmware.create.full.clone on individual primary storages, with the setting vmware.allow.parallel.command.execution set to false. When setting vmware.create.full.clone == true on only one of the primary storages the deploy will only happen immediately on the other storage.
  2. (not yet succeeded in getting the deploy to wait and happen on the other storage
  3. using the setting vmware.create.full.clone == true on a global level, with vmware.allow.parallel.command.execution == false, deployment always waits till VolumeMigration / CopyCommand / Relocate Virtual Machine is done
  4. using the setting vmware.create.full.clone == true on any level, with vmware.allow.parallel.command.execution == true always immediately deploys virtual machines

note variety 2, it is not significant but please argue if you feel we should do more testing.

@DaanHoogland DaanHoogland changed the title add global setting to allow paralel execution on vmware add global setting to allow parallel execution on vmware May 27, 2022
@DaanHoogland
DaanHoogland force-pushed the allowParallelSetting branch from 4a107e7 to ff10451 Compare May 27, 2022 12:57
Comment thread engine/components-api/src/main/java/com/cloud/storage/StorageManager.java Outdated
Comment thread engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java Outdated

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

code lgtm

@apache apache deleted a comment from blueorangutan Jun 2, 2022
@apache apache deleted a comment from blueorangutan Jun 2, 2022
@apache apache deleted a comment from weizhouapache Jun 2, 2022
@apache apache deleted a comment from blueorangutan Jun 2, 2022
@apache apache deleted a comment from blueorangutan Jun 2, 2022
@apache apache deleted a comment from blueorangutan Jun 3, 2022
@apache apache deleted a comment from blueorangutan Jun 3, 2022
@DaanHoogland DaanHoogland added this to the 4.18.0.0 milestone Jun 3, 2022
@acs-robot

Copy link
Copy Markdown

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

overall code lgtm
just a minor comment

} else {
_fullCloneFlag = Boolean.parseBoolean(value);
}
_fullCloneFlag = StorageManager.VmwareCreateCloneFull.value();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@DaanHoogland
is it possible _fullCloneFlag is null ?

@DaanHoogland DaanHoogland Jun 27, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, create full clone has a default value.

@acs-robot

Copy link
Copy Markdown

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6413 (SL-JID-1854)

@apache apache deleted a comment from blueorangutan Jun 28, 2022
@acs-robot

Copy link
Copy Markdown

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan test matrix

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File

@andrijapanicsb

Copy link
Copy Markdown
Contributor

Tested - LGTM

Details:

Tested by having 2 hosts, one of them disabled (env with one host - can't even reproduce the problem) - clean 4.17 env - reproduced the problem.

Deployed a VM and a 20GB volume with data in it (so it becomes thicker in the datastore - takes time to migrate it...)
Upgraded from a clean 4.17 to this PR packages - with all default ACS global settings, but with vmware.create.full.clone=true on both (2) storage pools - "Issue" still present with default settings - new VM deployment is waiting while the volume is being migrated - this is expected.

Configured global setting vmware.allow.parallel.command.execution=TRUE - and after this, the VM deployment will happen right away, even while the volume migration is still happening.

@github-actions

github-actions Bot commented Jul 1, 2022

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@acs-robot

Copy link
Copy Markdown

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6413 (SL-JID-1894)

@sonarqubecloud

sonarqubecloud Bot commented Jul 4, 2022

Copy link
Copy Markdown

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

5.3% 5.3% Coverage
0.0% 0.0% Duplication

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

I think this is good to go. I noticed the lint errors on several PRs and couldn´t figure out what it complains about.
@GutoVeronezi are you fine with it?

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.

8 participants