Skip to content

Resource reservation framework#6694

Merged
yadvr merged 20 commits intoapache:mainfrom
shapeblue:resourceReservationFramework
Sep 16, 2022
Merged

Resource reservation framework#6694
yadvr merged 20 commits intoapache:mainfrom
shapeblue:resourceReservationFramework

Conversation

@DaanHoogland
Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland commented Aug 31, 2022

Description

This PR addresses parallel resource allocation as a generalization of the problem and solution described in #6644. Instead of the Global lock on the resources a reservation record is created which is added in the resource check count in the ResourceLimitService/ResourceLimitManagerImpl. As a convenience a CheckedReservation is created. This is an implementation of AutoClosable and can be used as a guard in a try-with-resource fashion. The close method of the CheckedReservation wil delete the reservation record.

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?

in a cloud with three Management Servers

  • create a domain limited
  • set domain limits in limited (for instance user_vm == 2)
  • create an account luser
  • create a network for luser
  • create a first vm for this account in this network
  • execute a similar script as:
for i in 1 2 3 4 5
do
  for  profile in first second third
  do
    cmk -p $profile deploy virtualmachine templateid=82fb9e32-291b-11ed-89fb-1e001b000173 serviceofferingid=1009e2e0-1bd1-4142-a539-1a95a2835467 zoneid=8fb4602d-87cb-4942-ad64-140a2e53d686 domainid=9676aa4b-a218-4adb-99cd-3179b9cff867 account=luser &
  done
done

@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/6694 (SL-JID-2259)

@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/6694 (SL-JID-2260)

@acs-robot
Copy link
Copy Markdown

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

@apache apache deleted a comment from blueorangutan Aug 31, 2022
@apache apache deleted a comment from blueorangutan Aug 31, 2022
@apache apache deleted a comment from blueorangutan Aug 31, 2022
@blueorangutan
Copy link
Copy Markdown

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 31, 2022

Codecov Report

Merging #6694 (02dc903) into main (78b68fd) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##               main    #6694      +/-   ##
============================================
- Coverage      5.89%    5.89%   -0.01%     
+ Complexity     3945     3943       -2     
============================================
  Files          2454     2457       +3     
  Lines        242975   243080     +105     
  Branches      38036    38041       +5     
============================================
- Hits          14323    14319       -4     
- Misses       227064   227173     +109     
  Partials       1588     1588              
Impacted Files Coverage Δ
...g/apache/cloudstack/reservation/ReservationVO.java 0.00% <0.00%> (ø)
...cloudstack/reservation/dao/ReservationDaoImpl.java 0.00% <0.00%> (ø)
...va/com/cloud/resourcelimit/CheckedReservation.java 0.00% <0.00%> (ø)
.../cloud/resourcelimit/ResourceLimitManagerImpl.java 0.00% <0.00%> (ø)
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 0.00% <0.00%> (ø)
...apache/cloudstack/syslog/AlertsSyslogAppender.java 56.49% <0.00%> (-2.26%) ⬇️

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

@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

@rohityadavcloud 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 Build Failed (tid-4882)

@DaanHoogland
Copy link
Copy Markdown
Contributor Author

@blueorangutan test centos7 vmware65u2

@blueorangutan
Copy link
Copy Markdown

@DaanHoogland unsupported parameters provided. Supported mgmt server os are: centos7, centos6, suse15, alma8, ubuntu18, ubuntu22, ubuntu20, rocky8. Supported hypervisors are: kvm-centos6, kvm-centos7, kvm-rocky8, kvm-alma8, kvm-ubuntu18, kvm-ubuntu20, kvm-ubuntu22, kvm-suse15, vmware-55u3, vmware-60u2, vmware-65u2, vmware-67u3, vmware-70u1, vmware-70u2, vmware-70u3, xenserver-65sp1, xenserver-71, xenserver-74, xcpng74, xcpng76, xcpng80, xcpng81, xcpng82

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Sep 13, 2022

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@rohityadavcloud a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

Trillian Build Failed (tid-4890)

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Sep 13, 2022

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@rohityadavcloud a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

Trillian Build Failed (tid-4891)

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-4880)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39675 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6694-t4880-xenserver-71.zip
Smoke tests completed. 102 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-4881)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39623 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6694-t4881-kvm-centos7.zip
Smoke tests completed. 97 look OK, 5 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_secure_vm_migration Error 157.09 test_vm_life_cycle.py
test_02_unsecure_vm_migration Error 265.69 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 141.79 test_vm_life_cycle.py
test_08_migrate_vm Error 43.75 test_vm_life_cycle.py
test_01_add_primary_storage_disabled_host Error 0.59 test_primary_storage.py
test_01_primary_storage_nfs Error 0.12 test_primary_storage.py
ContextSuite context=TestStorageTags>:setup Error 0.21 test_primary_storage.py
test_03_deploy_and_scale_kubernetes_cluster Failure 26.71 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 67.63 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 39.98 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 35.91 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 120.10 test_kubernetes_clusters.py
test_02_list_snapshots_with_removed_data_store Error 9.46 test_snapshots.py
test_02_list_snapshots_with_removed_data_store Error 9.46 test_snapshots.py
test_hostha_enable_ha_when_host_in_maintenance Error 305.81 test_hostha_kvm.py

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Sep 14, 2022

@blueorangutan package

1 similar comment
@borisstoyanov
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@borisstoyanov 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 4188

@apache apache deleted a comment from blueorangutan Sep 14, 2022
@apache apache deleted a comment from blueorangutan Sep 14, 2022
@apache apache deleted a comment from blueorangutan Sep 14, 2022
@apache apache deleted a comment from blueorangutan Sep 14, 2022
@blueorangutan
Copy link
Copy Markdown

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

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Sep 15, 2022

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@rohityadavcloud a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File

Copy link
Copy Markdown
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

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

LGTM, manually tested

@DaanHoogland DaanHoogland marked this pull request as ready for review September 16, 2022 09:55
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.

6 participants