Skip to content

Conversation

@shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Dec 15, 2023

Description

Feature spec: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Granular+Resource+Limit+Management

Introduces the concept of tagged resource limits for granular resource limit management. Limits can be enforced on accounts and domains for the deployment of entities for a tagged resource. Current tagged resource limits can be used for the following resource types,

Host limits
- user_vm
- cpu
- memory

Storage limits
- volume
- primary_storage

Following global settings can used to specify tags for which limit needs to be enforced,

Host: `resource.limit.host.tags`
Storage: `resource.limit.storage.tags`

Option for specifying tagged resource limits and viewing tagged resource usage are made available in the UI.

Enhances the use of templatetag for VM deployment and template creation

Adds option to list service/compute offerings that can be used with a given template. A new parameter named templateid has been added.

Adds option to list disk offering with suitability flag for a virtual machine. A new parameter named virtualmachineid has been added to the listDiskOfferings API which when passed returns suitableforvirtualmachine param in the response.

ToDo: Schema changes to be moved in 4.20 upgrade path

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)
  • build/CI

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?

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

Introduces the concept of tagged resource limits. Limits can be enforced on accounts and domains for the deployment of entities for a tagged resource. Current tagged resource limits can be used for the following resource types,

Host limits

    user_vm
    cpu
    memory

Storage limits

    volume
    primary_storage

Following global settings can used to specify tags for which limit needs to be enforced,

    Host: resource.limit.host.tags
    Storage: resource.limit.storage.tags

Option for specifying tagged resource limits and viewing tagged resource usage are made available in the UI.

Enhances use of templatetag for VM deployment and template creation

Adds option to list disk offering with suitability flag for a virtualmachine. A new parameter named virtualmachineid has been added to the listDiskOfferings API which when passed returns suitableforvirtualmachine param in the reponse.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@codecov
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Attention: 570 lines in your changes are missing coverage. Please review.

Comparison is base (a31449b) 30.76% compared to head (711d9cb) 30.97%.

Files Patch % Lines
...in/java/com/cloud/server/ManagementServerImpl.java 29.62% 80 Missing and 15 partials ⚠️
.../cloud/resourcelimit/ResourceLimitManagerImpl.java 82.90% 35 Missing and 58 partials ⚠️
ui/src/components/view/ResourceLimitTab.vue 0.00% 41 Missing ⚠️
ui/src/components/view/ResourceCountUsage.vue 0.00% 35 Missing ⚠️
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 71.42% 23 Missing and 5 partials ⚠️
...rc/main/java/com/cloud/user/DomainManagerImpl.java 0.00% 25 Missing ⚠️
...ain/java/com/cloud/api/query/QueryManagerImpl.java 41.02% 21 Missing and 2 partials ⚠️
ui/src/views/infra/Resources.vue 0.00% 22 Missing ⚠️
...n/java/com/cloud/capacity/dao/CapacityDaoImpl.java 36.36% 17 Missing and 4 partials ⚠️
.../agent/manager/allocator/impl/RandomAllocator.java 33.33% 17 Missing and 1 partial ⚠️
... and 32 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8362      +/-   ##
============================================
+ Coverage     30.76%   30.97%   +0.20%     
- Complexity    33076    33473     +397     
============================================
  Files          5353     5355       +2     
  Lines        374607   375708    +1101     
  Branches      54635    54908     +273     
============================================
+ Hits         115238   116363    +1125     
+ Misses       244099   243904     -195     
- Partials      15270    15441     +171     
Flag Coverage Δ
simulator-marvin-tests 24.84% <56.71%> (+0.21%) ⬆️
uitests 4.36% <3.54%> (-0.02%) ⬇️
unit-tests 16.57% <38.12%> (+0.13%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr 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
Copy link

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

@github-actions
Copy link

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

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr 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
Copy link

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

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

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

clgtm

@DaanHoogland
Copy link
Contributor

@shwstppr is this ready/can it go out of draft ?

@shwstppr
Copy link
Contributor Author

@shwstppr is this ready/can it go out of draft ?

Waiting for @vladimirpetrov to finish some manual QA

Copy link
Contributor

@vladimirpetrov vladimirpetrov left a comment

Choose a reason for hiding this comment

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

LGTM based on manual testing but let's wait for the final round of smoke tests before merging it. The following areas have been tested:

  • Migrating tagged resources
  • Global settings configuration
  • List resources by tag
  • Resource limits
  • Template tags

@shwstppr shwstppr marked this pull request as ready for review February 15, 2024 10:55
@blueorangutan
Copy link

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

Test Result Time (s) Test File

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.

Code LGTM

@DaanHoogland
Copy link
Contributor

@JoaoJandre @GutoVeronezi , this has been reviewed by several and has gone through our QA procedure (manual and automated testing. Do you guys hace any concerns with merging this?

@GutoVeronezi
Copy link
Contributor

@JoaoJandre @GutoVeronezi , this has been reviewed by several and has gone through our QA procedure (manual and automated testing. Do you guys hace any concerns with merging this?

@DaanHoogland, my concerns are regarding the structure of the proposal, as I mentioned here. Regarding the code itself, I did not have time to review 7,000+ lines of changes; therefore, I do not have an opinion on it. I am -0.

@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr 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
Copy link

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

@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr 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
Copy link

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

@shwstppr
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File

@vishesh92 vishesh92 mentioned this pull request Feb 19, 2024
13 tasks
@shwstppr
Copy link
Contributor Author

Merging based on approvals, manual QA and smoke test results

@shwstppr shwstppr merged commit 592038a into apache:main Feb 19, 2024
@DaanHoogland DaanHoogland deleted the add-resource-limit-tag branch February 19, 2024 08:58
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Feb 23, 2024
Feature spec: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Granular+Resource+Limit+Management

Introduces the concept of tagged resource limits for granular resource limit management. Limits can be enforced on accounts and domains for the deployment of entities for a tagged resource. Current tagged resource limits can be used for the following resource types,

Host limits
- user_vm
- cpu
- memory

Storage limits
- volume
- primary_storage

Following global settings can used to specify tags for which limit needs to be enforced,

Host: `resource.limit.host.tags`
Storage: `resource.limit.storage.tags`

Option for specifying tagged resource limits and viewing tagged resource usage are made available in the UI.

Enhances the use of templatetag for VM deployment and template creation

Adds option to list service/compute offerings that can be used with a given template. A new parameter named templateid has been added.

Adds option to list disk offering with suitability flag for a virtual machine. A new parameter named virtualmachineid has been added to the listDiskOfferings API which when passed returns suitableforvirtualmachine param in the response.
vishesh92 added a commit to apache/cloudstack-documentation that referenced this pull request Feb 27, 2024
* feature: tagged resource limits

apache/cloudstack#8362

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* missing

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* update template tag details

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* instance deploy

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Update source/adminguide/usage.rst

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Update source/adminguide/usage.rst

Co-authored-by: Vishesh <vishesh92@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
Co-authored-by: Vishesh <vishesh92@gmail.com>
shwstppr added a commit to shapeblue/cloudstack-documentation that referenced this pull request May 24, 2024
* feature: tagged resource limits

apache/cloudstack#8362

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* missing

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* update template tag details

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* instance deploy

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Update source/adminguide/usage.rst

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Update source/adminguide/usage.rst

Co-authored-by: Vishesh <vishesh92@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
Co-authored-by: Vishesh <vishesh92@gmail.com>
GaOrtiga pushed a commit to GaOrtiga/cloudstack-documentation that referenced this pull request Jun 28, 2024
* feature: tagged resource limits

apache/cloudstack#8362

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* missing

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* update template tag details

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* instance deploy

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Update source/adminguide/usage.rst

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Update source/adminguide/usage.rst

Co-authored-by: Vishesh <vishesh92@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
Co-authored-by: Vishesh <vishesh92@gmail.com>
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.

10 participants