Skip to content

Quota enable config to user/domain scope #6690

Merged
GutoVeronezi merged 10 commits intoapache:mainfrom
scclouds:quota-plugin-per-account
Oct 27, 2022
Merged

Quota enable config to user/domain scope #6690
GutoVeronezi merged 10 commits intoapache:mainfrom
scclouds:quota-plugin-per-account

Conversation

@BryanMLima
Copy link
Copy Markdown
Contributor

@BryanMLima BryanMLima commented Aug 30, 2022

Description

Currently, ACS only has the option to enable the Quota plugin globally. However, for some use cases having the plugin active to specific accounts and domains may be more interesting. Therefore, this PR aims to add this functionality through the quota config quota.account.enabled. Moreover, a new column was added to the quota summary section in the UI showing if the account has the plugin enabled. In the future, a filter will be added for accounts with the plugin enabled, disabled and for removed accounts.

Finally, for the config to be used in a domain scope, when it cannot be found at user level, it is required that the following global configurations are enabled: enable.account.settings.for.domain and enable.domain.settings.for.child.domain.

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

Screenshots (if appropriate):

List of accounts with the plugin enabled and disabled:
image

How Has This Been Tested?

This was tested in a local lab setting the quota.account.enabled to true and false to random accounts. In the quota summary section the accounts where correctly displayed: accounts with the plugin disabled had the (quota-disabled) string attached and accounts with the plugin enabled were normally displayed.

@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/6690 (SL-JID-2253)

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 30, 2022

Codecov Report

Merging #6690 (8a9d15d) into main (4a06363) will increase coverage by 0.00%.
The diff coverage is 50.00%.

❗ Current head 8a9d15d differs from pull request most recent head 553538c. Consider uploading reports for the commit 553538c to get more accurate results

@@            Coverage Diff            @@
##               main    #6690   +/-   ##
=========================================
  Coverage     10.84%   10.84%           
- Complexity     7095     7101    +6     
=========================================
  Files          2485     2485           
  Lines        245370   245387   +17     
  Branches      38319    38322    +3     
=========================================
+ Hits          26602    26614   +12     
- Misses       215500   215505    +5     
  Partials       3268     3268           
Impacted Files Coverage Δ
.../org/apache/cloudstack/quota/QuotaManagerImpl.java 45.09% <0.00%> (-0.91%) ⬇️
.../cloudstack/api/response/QuotaSummaryResponse.java 0.00% <0.00%> (ø)
.../org/apache/cloudstack/quota/QuotaServiceImpl.java 35.86% <ø> (ø)
...ache/cloudstack/quota/dao/QuotaAccountDaoImpl.java 50.00% <88.88%> (+50.00%) ⬆️
.../apache/cloudstack/quota/constant/QuotaConfig.java 100.00% <100.00%> (ø)
...org/apache/cloudstack/quota/vo/QuotaAccountVO.java 76.31% <0.00%> (+2.63%) ⬆️

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

Copy link
Copy Markdown
Contributor

@JoaoJandre JoaoJandre left a comment

Choose a reason for hiding this comment

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

CLGTM

Co-authored-by: dahn <daan.hoogland@gmail.com>
@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/6690 (SL-JID-2303)

@DaanHoogland
Copy link
Copy Markdown
Contributor

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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Sep 6, 2022

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

63.9% 63.9% Coverage
0.0% 0.0% Duplication

@blueorangutan
Copy link
Copy Markdown

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

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@DaanHoogland 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-4833)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 43715 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6690-t4833-kvm-centos7.zip
Smoke tests completed. 100 look OK, 1 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_08_upgrade_kubernetes_ha_cluster Failure 640.10 test_kubernetes_clusters.py

Comment thread framework/quota/src/main/java/org/apache/cloudstack/quota/QuotaManagerImpl.java Outdated
Comment thread ui/src/config/section/plugin/quota.js Outdated
@github-actions
Copy link
Copy Markdown

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

@DaanHoogland
Copy link
Copy Markdown
Contributor

@BryanMLima can you look at the conflicts

@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/6690 (SL-JID-2543)

@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/6690 (SL-JID-2544)

Comment thread framework/quota/src/main/java/org/apache/cloudstack/quota/QuotaManagerImpl.java Outdated
@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/6690 (SL-JID-2564)

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

22.9% 22.9% Coverage
0.0% 0.0% Duplication

@DaanHoogland
Copy link
Copy Markdown
Contributor

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

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@DaanHoogland 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-5205)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 38339 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6690-t5205-kvm-centos7.zip
Smoke tests completed. 104 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@DaanHoogland
Copy link
Copy Markdown
Contributor

@GutoVeronezi , I trust all your comments have been met?

@DaanHoogland DaanHoogland added this to the 4.18.0.0 milestone Oct 27, 2022
@GutoVeronezi
Copy link
Copy Markdown
Contributor

@DaanHoogland, yes, they have been met.

I will merge this one based on the packaging and tests results (#6690 (comment) and #6690 (comment)) and on the approvals.

@GutoVeronezi GutoVeronezi merged commit f580a8d into apache:main Oct 27, 2022
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.

7 participants