cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Introducing granular command timeouts global setting

Open harikrishna-patnala opened this issue 1 year ago • 38 comments

Description

CloudStack has a global setting "wait" which controls the wait time by the management server for all the commands which it sends. There are also some command specific timeout settings which controls specific commands like "ready.command.wait", "kvm.storage.online.migration.wait", etc.

This PR simplifies these configurations by introducing a new parent global setting which serves as a single point to configure any command timeout. The new global setting is "commands. timeout", this timeout overrides the wait global config. This holds a comma separated key value pairs containing timeout for specific commands. For example: DhcpEntryCommand=600, SavePasswordCommand=300, VmDataCommand=300.

There are also some hardcoded values defined in the code base for few commands. so the order of precedence of all these timeouts will be

"commands.timeout" > Existing global settings > Hardcoded value for the command > global "wait"

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)
  • [x] Enhancement (improves an existing feature and functionality)
  • [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
  • [ ] build/CI
  • [ ] test (unit or integration test code)

Feature/Enhancement Scale

  • [x] Major
  • [ ] Minor

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

harikrishna-patnala avatar Sep 09 '24 12:09 harikrishna-patnala

@blueorangutan package

harikrishna-patnala avatar Sep 09 '24 12:09 harikrishna-patnala

@harikrishna-patnala a [SL] 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 avatar Sep 09 '24 13:09 blueorangutan

Codecov Report

Attention: Patch coverage is 46.39175% with 52 lines in your changes missing coverage. Please review.

Project coverage is 16.05%. Comparing base (a4224e5) to head (124da2b). Report is 1 commits behind head on 4.20.

Files with missing lines Patch % Lines
...java/com/cloud/agent/manager/AgentManagerImpl.java 24.07% 40 Missing and 1 partial :warning:
.../cloud/configuration/ConfigurationManagerImpl.java 73.80% 7 Missing and 4 partials :warning:
Additional details and impacted files
@@            Coverage Diff            @@
##               4.20    #9659   +/-   ##
=========================================
  Coverage     16.04%   16.05%           
- Complexity    12848    12858   +10     
=========================================
  Files          5639     5639           
  Lines        493945   494040   +95     
  Branches      59901    59917   +16     
=========================================
+ Hits          79272    79316   +44     
- Misses       405854   405899   +45     
- Partials       8819     8825    +6     
Flag Coverage Δ
uitests 4.02% <ø> (ø)
unittests 16.89% <46.39%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Sep 09 '24 13:09 codecov[bot]

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 11058

blueorangutan avatar Sep 09 '24 13:09 blueorangutan

@blueorangutan package

harikrishna-patnala avatar Sep 10 '24 05:09 harikrishna-patnala

@harikrishna-patnala a [SL] 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 avatar Sep 10 '24 05:09 blueorangutan

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11069

blueorangutan avatar Sep 10 '24 06:09 blueorangutan

@blueorangutan test

sureshanaparti avatar Sep 10 '24 08:09 sureshanaparti

@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

blueorangutan avatar Sep 10 '24 08:09 blueorangutan

[SF] Trillian test result (tid-11439) Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8 Total time taken: 52865 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9659-t11439-kvm-ol8.zip Smoke tests completed. 139 look OK, 2 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_UpdateConfigParamWithScope Error 0.08 test_global_settings.py
test_01_snapshot_usage Error 4.24 test_usage.py

blueorangutan avatar Sep 11 '24 00:09 blueorangutan

@blueorangutan package

harikrishna-patnala avatar Sep 11 '24 05:09 harikrishna-patnala

@harikrishna-patnala a [SL] 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 avatar Sep 11 '24 05:09 blueorangutan

@blueorangutan package

harikrishna-patnala avatar Sep 11 '24 06:09 harikrishna-patnala

@harikrishna-patnala a [SL] 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 avatar Sep 11 '24 06:09 blueorangutan

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11092

blueorangutan avatar Sep 11 '24 08:09 blueorangutan

@blueorangutan test

sureshanaparti avatar Sep 12 '24 05:09 sureshanaparti

@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

blueorangutan avatar Sep 12 '24 05:09 blueorangutan

[SF] Trillian test result (tid-11457) Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8 Total time taken: 57345 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9659-t11457-kvm-ol8.zip Smoke tests completed. 138 look OK, 3 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_UpdateConfigParamWithScope Error 0.08 test_global_settings.py
test_01_snapshot_usage Error 6.26 test_usage.py
test_02_unsecure_vm_migration Error 497.36 test_vm_life_cycle.py

blueorangutan avatar Sep 12 '24 21:09 blueorangutan

@blueorangutan package

harikrishna-patnala avatar Sep 13 '24 05:09 harikrishna-patnala

@harikrishna-patnala a [SL] 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 avatar Sep 13 '24 06:09 blueorangutan

Packaging result [SF]: ✔️ el8 ✔️ el9 ✖️ debian ✔️ suse15. SL-JID 11107

blueorangutan avatar Sep 13 '24 06:09 blueorangutan

@blueorangutan test

harikrishna-patnala avatar Sep 13 '24 10:09 harikrishna-patnala

@harikrishna-patnala a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

blueorangutan avatar Sep 13 '24 10:09 blueorangutan

[SF] Trillian test result (tid-11470) Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8 Total time taken: 61057 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9659-t11470-kvm-ol8.zip Smoke tests completed. 138 look OK, 3 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_snapshot_usage Error 6.28 test_usage.py
test_02_unsecure_vm_migration Error 448.61 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 259.21 test_vm_life_cycle.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL Failure 623.62 test_vpc_redundant.py
test_05_rvpc_multi_tiers Failure 557.63 test_vpc_redundant.py
test_05_rvpc_multi_tiers Error 557.65 test_vpc_redundant.py

blueorangutan avatar Sep 14 '24 03:09 blueorangutan

@blueorangutan package

harikrishna-patnala avatar Sep 18 '24 12:09 harikrishna-patnala

@harikrishna-patnala a [SL] 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 avatar Sep 18 '24 12:09 blueorangutan

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11146

blueorangutan avatar Sep 18 '24 13:09 blueorangutan

@blueorangutan test

harikrishna-patnala avatar Sep 19 '24 03:09 harikrishna-patnala

@harikrishna-patnala a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

blueorangutan avatar Sep 19 '24 03:09 blueorangutan

[SF] Trillian test result (tid-11518) Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8 Total time taken: 71888 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9659-t11518-kvm-ol8.zip Smoke tests completed. 138 look OK, 3 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_snapshot_usage Error 4.24 test_usage.py
test_01_secure_vm_migration Error 135.20 test_vm_life_cycle.py
test_01_secure_vm_migration Error 135.21 test_vm_life_cycle.py
ContextSuite context=TestVnfTemplates>:setup Error 0.00 test_vnf_templates.py

blueorangutan avatar Sep 20 '24 00:09 blueorangutan